March 12, 2009 at 1:21 pm
Is it possible to do something like:
[Code]
BEGIN TRANSACTION
INSERT into stagingDatabase.DestinationTable
SELECT *
FROM productionDatabase.SourceTable
COMMIT TRANSACTION
[/Code]
when stagingDatabase is on server A and productionDatabase is on server B? (These servers are not linked, nor will they ever be.)
Thanks!
March 12, 2009 at 1:35 pm
You can't query a remote server without specifying a Linked Server, you will get an error that server is not in sysservers.
Check for sp_addlinkedserver in BOL.
After that you should not have any problem running a query similar to what you have posted.
Make sure to use fully qualified name:
[LinkedServer].[Database].[owner].[Table]
hth!
March 12, 2009 at 2:25 pm
You can look at using OPENROWSET function, look at link.
Thanks.
Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN[/url].
Microsoft FTE - SQL Server PFE
* Some time its the search that counts, not the finding...
* I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing. :smooooth:[/font]
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy