dbTalk Databases Forums  

how to synchronize local and remote sql server databases

microsoft.public.sqlserver.tools microsoft.public.sqlserver.tools


Discuss how to synchronize local and remote sql server databases in the microsoft.public.sqlserver.tools forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
S N
 
Posts: n/a

Default Re: how to synchronize local and remote sql server databases - 07-16-2010 , 10:41 PM






"Erland Sommarskog" wrote:

Quote:
S N (SN (AT) discussions (DOT) microsoft.com) writes:
I have tried logging onto the remote SQL server and run the command

BACKUP DATABASE db TO DISK = 'somepath.bak'

However, it did run and take backup of the remote database on the remote
server itself and it did not take the backup of remote database on the
local computer.
What i actually want is to take backup of the remote database on the local
computer.
please advise on how to achieve it.

So you want to be connected to server A and backup a database on server B?

You can only backup a datbase on a server if you are connected to it.

You can be connected to to server A and from server A run commands on
server B, using EXEC() AT, but it may get you into more trouble with
setting up linked servers than it pays back.


Exactly that is what I want - be connected to both servers A & B. Then
backup the data of server A on server B. I need to do it because Server A is
the public hosted server for website, while server B is the backup server
maintained at my location. I want to keep a backup of Server A on Server B.
Please advise.

Quote:
--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

.

Reply With Quote
  #12  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: how to synchronize local and remote sql server databases - 07-17-2010 , 08:10 AM






S N (SN (AT) discussions (DOT) microsoft.com) writes:
Quote:
"Erland Sommarskog" wrote:
You can only backup a datbase on a server if you are connected to it.

You can be connected to to server A and from server A run commands on
server B, using EXEC() AT, but it may get you into more trouble with
setting up linked servers than it pays back.



Exactly that is what I want - be connected to both servers A & B. Then
backup the data of server A on server B. I need to do it because Server
A is the public hosted server for website, while server B is the backup
server maintained at my location. I want to keep a backup of Server A on
Server B.
Well, as I said: you can only run the command to backup a database
on the server where the database is located. By using linked servers
you can initiate the command from a different server, but eventually
you need to connect to the server where the database is connected.

You can of course then restore the backup of the database from server A
on server B, but the BACKUP command MUST run on server A. There is no
way around it.



--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.