开发者

Proxy tables SQL Server vs SQL Server

We have 2 databases and we need data to be tr开发者_Go百科ansferred from db 1 to db 2. How can I do that (in SYBASE there are proxy tables) in SQL Server?


As @Nathan says just BULK INSERT the data. Assuming both databases are on the same server then you reference the table usually as databasename.schema.tablename thus db1.dbo.table1 or db2.dbo.table1

As such you can also just create a view in the destination data to use as a 'proxy' and pull the data without actually copying it. The view would be in db2 and be something like:

CREATE VIEW table1 AS SELECT * FROM db1.dbo.table1


I think INSERT INTO would be a good way to go.

http://msdn.microsoft.com/en-us/library/aa933206(v=sql.80).aspx

First of all, you can create a linked server in your destination server to the other server. Then you can do the INSERT INTO.

If you don't want to do that (or are unable), then dump the data to a file and do the very fast BULK INSERT to get the data into your new table.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜