Solved

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

Posted on 2009-06-27
5
349 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 Solution for AWS

Read about how CloudBerry Backup fully integrates your backups with Amazon S3 and Amazon Glacier to provide military-grade encryption and dramatically cut storage costs on any platform.

Question has a verified solution.

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

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
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.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

749 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