Reputation: 9
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
Upvotes: 0
Views: 3721
Reputation: 29689
If you have SQL Server 2008 Express or a later version, it comes with a "Import/Export" wizard that will do it.
Upvotes: 0
Reputation: 3929
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.
Upvotes: 1
Reputation: 23123
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
Upvotes: 1