tailieunhanh - Transfer Tables Between SQL Server Databases
Chuyển Bàn Giữa Cơ sở dữ liệu SQL Server Người dùng đôi khi cần phải chuyển giao (bản sao) các bảng cơ sở dữ liệu SQL Server giữa. Điều này thế nào-Để cho thấy làm thế nào để cho phép người dùng lựa chọn nhiều bảng | Transfer Tables Between SQL Server Databases Users sometimes need to transfer copy tables between SQL Server databases. This How-To shows how to allow the user to choose multiple tables and copy them from one database to another as well as tables from two different databases on two different SQL servers. One of the tasks your clients have you perform for them using the Enterprise Manager is to transfer objects such as tables between SQL Server databases. How do you create a dialog box that would allow the user to transfer databases between two SQL Server databases Technique Unlike the earlier How-Tos in this chapter you will be using the SQL-DTS object model in addition to SQL-DMO. You can see the objects properties and methods that will be used from SQL-DTS in Table . Table . SQL-DTS Objects That Are Used to Perform the Transfer of Tables from One SQL Server Database to Another Object Property Method Package Execute Step TaskName Name Task CustomTask CustomTask Name SourceServer SourceUseTrustedConnection SourceDatabase DestinationServer DestinationUseTrustedConnection DestinationDatabase CopyAllObjects IncludeDependencies IncludeLogins IncludeUsers DropDestinationObjectsFirst CopySchema CopyData AddObjectForTransfer Using the items just listed you will create a form with options to transfer tables between two SQL databases. Steps Open and run the -Chapter 7 solution. From the main Windows form click on the command button with the caption How-To . You will then see a form allowing you to pick SQL Servers on the network to transfer from and to. After you have chosen these you can then select which databases you want to transfer from and to. After choosing from the database to transfer from you are then presented with a list of tables to transfer from. You can then highlight multiple tables as shown in Figure . Figure . Transferring tables between SQL Server databases. Tip One of the options included
đang nạp các trang xem trước