Solved

Copy data from a MS SQL View to a table on another SQL server

Posted on 2009-06-27
5
332 Views
Last Modified: 2012-05-07
Hi,
I have a view on one MS SQL server that I want to be copied to a table on another MS SQL server once a day. I'm not sure whether to use replciation or not. When I did is required me to replicate all the tables that the view referenced which is not what I want.
Any help much appreciated.
Thanks
0
Comment
Question by:browsw
5 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 24727524
check for OpenRowset in the BOL (books on line) to see if you can use it. You could then schedule a query to run once a day.
0
 
LVL 17

Accepted Solution

by:
pssandhu earned 500 total points
ID: 24729027
You can do that by creating a linked server by using sp_addlinkedserver stored proc and then create the view as you would normally do.
Here is reference to the stored proc: http://msdn.microsoft.com/en-us/library/aa259589(SQL.80).aspx
Or, if you do not want to use the stored proc you can do that via GUI. In SSMS connect to the sql server>Expand "Server Objects> Right click "Linked Servers">select "New Linked Server".
Hope this helps.
P.
0
 

Author Closing Comment

by:browsw
ID: 31597534
Question not answered
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question