Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

backup database on another server as instance

 
   Database Help (Home) -> Programming RSS
Next:  OLEDB HResult error reference?  
Author Message
Matt Williamson

External


Since: Oct 02, 2007
Posts: 12



(Msg. 1) Posted: Wed Jun 04, 2008 3:56 pm
Post subject: backup database on another server as instance
Archived from groups: microsoft>public>sqlserver>programming (more info?)

I'm trying to work out a script/sp that I can use to backup a database
running in an instance on another server to a local workstation running
MSDE. Is this possible and if so, how? I can't find anything in the archives
that show anyone has done this. Here is an example

Running script from PC1 through MSDE2000

Backup Server1\Instance1.database1 to file on local drive of PC1

TIA

Matt

 >> Stay informed about: backup database on another server as instance 
Back to top
Login to vote
Tom Moreau

External


Since: Apr 21, 2004
Posts: 502



(Msg. 2) Posted: Wed Jun 04, 2008 4:03 pm
Post subject: Re: backup database on another server as instance [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You cannot backup a database and directly restore it. Rather, you back it
up to a file somewhere and then have the other instance restore it. In your
case, PC1 should have a file share to which the service account on Server1
has read-write access. This account must be a domain account - not a local
one. Your MSDE instance on PC1 can then do a restore from that file.

--
Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau


"Matt Williamson" wrote in message

I'm trying to work out a script/sp that I can use to backup a database
running in an instance on another server to a local workstation running
MSDE. Is this possible and if so, how? I can't find anything in the archives
that show anyone has done this. Here is an example

Running script from PC1 through MSDE2000

Backup Server1\Instance1.database1 to file on local drive of PC1

TIA

Matt

 >> Stay informed about: backup database on another server as instance 
Back to top
Login to vote
Matt Williamson

External


Since: Oct 02, 2007
Posts: 12



(Msg. 3) Posted: Wed Jun 04, 2008 4:21 pm
Post subject: Re: backup database on another server as instance [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> You cannot backup a database and directly restore it. Rather, you back it
> up to a file somewhere and then have the other instance restore it. In
> your
> case, PC1 should have a file share to which the service account on Server1
> has read-write access. This account must be a domain account - not a
> local
> one. Your MSDE instance on PC1 can then do a restore from that file.

I'm not really worried about restoring it. That will probably be done later
through EM. I really just want to make a backup file of the database of an
instance on another server from PC1. So on PC1 I'm connected to a local
instance called PC1\Billing. How do a structure a BACKUP DATABASE command to
allow me to backup the instance on SERVER1 to the local drive of PC1
provided the SQL instance on SERVER1 is a domain account with write access
to the backup share on PC1? Can I do it directly in a script or stored proc
on PC1 or do I need to create something on SERVER1 and call it from PC1? If
that's the case, what is the best way to do it?

TIA

Matt
 >> Stay informed about: backup database on another server as instance 
Back to top
Login to vote
Erland Sommarskog2

External


Since: May 30, 2004
Posts: 2061



(Msg. 4) Posted: Wed Jun 04, 2008 4:21 pm
Post subject: Re: backup database on another server as instance [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Matt Williamson (ih8spam@spamsux.org) writes:
> I'm not really worried about restoring it. That will probably be done
> later through EM. I really just want to make a backup file of the
> database of an instance on another server from PC1. So on PC1 I'm
> connected to a local instance called PC1\Billing. How do a structure a
> BACKUP DATABASE command to allow me to backup the instance on SERVER1 to
> the local drive of PC1 provided the SQL instance on SERVER1 is a domain
> account with write access to the backup share on PC1? Can I do it
> directly in a script or stored proc on PC1 or do I need to create
> something on SERVER1 and call it from PC1? If that's the case, what is
> the best way to do it?

On SQL 2000, you cannot easily initiate a BACKUP operation on different
instance. You need to be connected to that instance. Or at least have
a stored procedure on the remote instance that performs the back that
you can call.


--
Erland Sommarskog, SQL Server MVP, esquel.TakeThisOut@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
 >> Stay informed about: backup database on another server as instance 
Back to top
Login to vote
Tom Moreau

External


Since: Apr 21, 2004
Posts: 502



(Msg. 5) Posted: Thu Jun 05, 2008 9:42 am
Post subject: Re: backup database on another server as instance [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Why do you need to connect to the local instance? Simply uses EM, QA, or
osql on your PC to connect to the remote instance and initiate from there.
Just be sure to use the full UNC name of the share - not a drive letter.

--
Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau


"Matt Williamson" wrote in message

> You cannot backup a database and directly restore it. Rather, you back it
> up to a file somewhere and then have the other instance restore it. In
> your
> case, PC1 should have a file share to which the service account on Server1
> has read-write access. This account must be a domain account - not a
> local
> one. Your MSDE instance on PC1 can then do a restore from that file.

I'm not really worried about restoring it. That will probably be done later
through EM. I really just want to make a backup file of the database of an
instance on another server from PC1. So on PC1 I'm connected to a local
instance called PC1\Billing. How do a structure a BACKUP DATABASE command to
allow me to backup the instance on SERVER1 to the local drive of PC1
provided the SQL instance on SERVER1 is a domain account with write access
to the backup share on PC1? Can I do it directly in a script or stored proc
on PC1 or do I need to create something on SERVER1 and call it from PC1? If
that's the case, what is the best way to do it?

TIA

Matt
 >> Stay informed about: backup database on another server as instance 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
No default instance?? Adding an instance to same server? - Doh.. SQL 2005. what if the only instance on the DB server was MyServer/BadName .. and attempting to connect to MyServer (default) was of course not possible. How could this have happened? Any way to create the default instance? Best way to add a new....

unable to debug SP call made on a local sql instance to an.. - Hello, I have a VB.Net app (using ADO.Net) which calls a stored procedure on a local sql server instance, which, in turn, calls another SP via a linked server which points to yet another local sql server instance. I am able to debug everything excep...

SQL Server Instance - Can some one please answer me how do find the number of instances running on SQL Server 2000 using the SQL command.

Can't get rid of orphaned instance of a database - I recently lost my datadrive where a number of databases lived. SQL is still running OK, but when I look at the list of databases in SSMS object explorer, I see the databases even though their data files are gone. I have backups of the database but...

How to transfer backup from client to server machine (SQL .. - In my line of bussiness it is not possible to help every client on this issue (several thousand users) What I need to achieve is transferring backup to the server by using SQL Server to do it and restoring it with SQL Server. A solution for SQL 2005 woul...
   Database Help (Home) -> Programming All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]