0

I am trying to copy a table from a live remote server to my local development machine. I tried:

select * 
into mmm 
from [sqlb8.webcontrolcenter.com].[1photo].[kelraie].[pix]

But got this error:

Msg 7202, Level 11, State 2, Line 1 Could not find server 'sqlb8.webcontrolcenter.com' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.

How do i link the servers? Or is there an easier way to do this? Thanks Khaled

3 Answers 3

1

Have you tried Backup - Restore? You can also use Export, but Export won't script any Primary or Foreign keys.

And don't forget about BCP http://msdn.microsoft.com/en-us/library/ms162802.aspx

To link servers, use the stored proc sp_addlinkedserver http://msdn.microsoft.com/en-us/library/ms190479.aspx

Sign up to request clarification or add additional context in comments.

1 Comment

If the OP just wants one table it might be because it's 10MB but the backup might be 100GB. So backup/restore might not be practical.
1

The linked server can use other provider drivers on your system to allow you to query directly from within SQL Server from that source. In your case, it may look like you're trying to connect to a web based version of SQL, which might not be as simple as setting up a linked server. Depending on how you're accessing the data, you may have to create a backup or use another method to pass the credentials along to be able to access the source.

Comments

0

If you have SQL Server 2008 Express or a later version, it comes with a "Import/Export" wizard that will do it.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.