-
Bringing table from a server to a local sql server
Hi,
I got two tables in a rather big sql server database that I need to work on.
Is there any command that will allow me to import the two tables to a
database in my local server. If I do a select * into temptable from
sourcetable it is created in the database of the main server. However I want
the table creation in my local server. Any help is appreciated. Thanks
-
Re: Bringing table from a server to a local sql server
You can create a linked server to the original database and then use SELECT
INTO to copy the tables from the linked server to your local database:
http://msdn.microsoft.com/en-us/library/ms190479.aspx
Also, you can use the Import/Export Wizard to transfer tables:
http://www.databasejournal.com/featu...le.php/3580216
Note that both methods will not transfer constraints and indexes. If they
are important you can script the tables with all related constraints and
indexes and use them to create the target tables, then import.
In addition you can use the Integration Services Transfer SQL Server Objects
Task (it transfers constraints and indexes too):
http://technet.microsoft.com/en-us/l.../ms142159.aspx
HTH,
Plamen Ratchev
http://www.SQLStudio.com