SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Copy table to another server
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Dominika
Starting Member

USA
3 Posts

Posted - 06/12/2008 :  09:54:56  Show Profile  Reply with Quote
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.

Edited by - Dominika on 06/12/2008 09:56:42

suresha_b
Yak Posting Veteran

India
82 Posts

Posted - 06/12/2008 :  10:03:23  Show Profile  Send suresha_b a Yahoo! Message  Reply with Quote
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

India
52309 Posts

Posted - 06/12/2008 :  10:13:19  Show Profile  Reply with Quote
or use OPENROWSET
Go to Top of Page

Dominika
Starting Member

USA
3 Posts

Posted - 06/12/2008 :  10:26:40  Show Profile  Reply with Quote
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

India
52309 Posts

Posted - 06/12/2008 :  10:30:24  Show Profile  Reply with Quote
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

USA
3 Posts

Posted - 06/12/2008 :  10:37:17  Show Profile  Reply with Quote
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

India
82 Posts

Posted - 06/13/2008 :  01:01:36  Show Profile  Send suresha_b a Yahoo! Message  Reply with Quote
>>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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000