TAILIEUCHUNG - Hướng dẫn học Microsoft SQL Server 2008 part 110

Tách và Đính kèm Mặc dù nó thường bị bỏ qua, một trong những cách dễ nhất để di chuyển một cơ sở dữ liệu từ máy này sang máy khác là để tách các cơ sở dữ liệu, sao chép các tập tin, và đính kèm các cơ sở dữ liệu SQL Server trên các máy tính đích. Để phát triển những người thường xuyên di chuyển cơ sở dữ liệu giữa các máy tính xách tay và máy chủ, đây là phương pháp được đề nghị | Part VI Enterprise Data Management Detaching and Attaching Though it is often overlooked one of the easiest ways to move a database from one computer to another is to detach the database copy the files and attach the database to SQL Server on the destination computer. For developers who frequently move databases between notebooks and servers this is the recommended method. Detaching a database effectively deletes the database from SQL Server s awareness but leaves the files intact. The database must have no current connections and not be replicated if it is to be detached. Only members of the SysAdmins fixed server role may detach and attach databases. For more details on the security roles refer to Chapter 50 Authorizing Securables. Detaching and attaching the database will carry with it any database users security roles and permissions but it will not replicate server logins. These will need to be resolved manually on the destination server. It s best to coordinate security with the network administration folks and leverage their security groups. If the source and destination servers have access to the same network security groups this will alleviate the security login issues for most installations. Using Management Studio right-click the database to be copied and select Tasks O Detach. The Detach Database dialog shown in Figure 44-17 will appear. FIGURE 44-17 The Detach Database feature removes the database from SQL Server s list of databases and frees the files for copying 1052 Transferring Databases 44 Once the database file is detached it will disappear from the list of databases in Management Studio. The files may be copied or moved like regular files. To reattach the database file select Databases in the Management Studio console tree and Tasks O Attach from the action menu or context menu. The Attach Databases dialog shown in Figure 44-18 simply offers a place to select the file and verify the file locations and names. FIGURE 44-18 The

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.