SQLTeam.com | Weblogs | Forums

How to copy data from one table to another table using DBlinks


#1

I need to copy data from one database table to another database table. Both databases are on different server.

I have created Db links to do that . But it is not working.

This is what i am doing - testdbt is the name of the Dblink

select * into [testdbt].[test].[dbo].temp_test_abc
from test_abc

Error - The object name '[testdbt].[test].[dbo].temp_test_abc' contains more than the maximum number of prefixes. The maximum is 2.

is there any other way to do this .


#2
  1. use the import export wizard
  2. select * into new_table from source_server.source_db.source_schema.source_table
  3. see 1.

#3

Thank you for the reply, it worked.