Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Copy table to another server

Author  Topic 

Dominika
Starting Member

3 Posts

Posted - 2008-06-12 : 09:54:56
Hi,

I am trying to copy a table from one server to another server using SQL Server Management Studio. I opened a new query window on the destination server and typed the following code:

EXEC sp_addLinkedServer 'VSQL025'

However it gives me an error as follows:
Could not find server 'VSQL025' in sysservers. Execute sp_addlinkedserver to add the server to sysservers.

Not sure what I am doing wrong since I know that I need to connect to the source server, yet it errors out. I am new to this so please give me lots of details. Also, if I could copy the entire database between servers that would be better. Thank you.

suresha_b
Yak Posting Veteran

82 Posts

Posted - 2008-06-12 : 10:03:23
To copy a table from one server to another using SSMS, you can right click on the database -> Tasks -> Import/Export Data...
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-12 : 10:13:19
or use OPENROWSET
Go to Top of Page

Dominika
Starting Member

3 Posts

Posted - 2008-06-12 : 10:26:40
Hi,

Thank you as looks like I was going about it the wrong way. The question I have now is that it attempts to copy TableA into TableA on destination server. The destination Table has some read-only fields. How do I create a copy of this table and remove the read-only fields?

Thank you.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-12 : 10:30:24
quote:
Originally posted by Dominika

Hi,

Thank you as looks like I was going about it the wrong way. The question I have now is that it attempts to copy TableA into TableA on destination server. The destination Table has some read-only fields. How do I create a copy of this table and remove the read-only fields?

Thank you.


read only fields? didnt get that
Go to Top of Page

Dominika
Starting Member

3 Posts

Posted - 2008-06-12 : 10:37:17
Hi,

Basically when the wizard attempts to copy the table from one server to the same table name in the other server, I get a bunch of errors, of which some state that the columns in the destination table are read only.

Is there a way to set the wizard so as to create a new table in the destination server that will hold the copied table from the source server? Thank you.
Go to Top of Page

suresha_b
Yak Posting Veteran

82 Posts

Posted - 2008-06-13 : 01:01:36
>>Is there a way to set the wizard so as to create a new table in the destination server that will hold the copied table from the source server? Thank you.

If you drop the table manually, the wizard will create a new one.

In SQL Server there are NO read-only columns.
Go to Top of Page
   

- Advertisement -