Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server / March 2008

Tip: Looking for answers? Try searching our database.

Backup and restore to a different machine

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
fniles - 21 Mar 2008 02:22 GMT
I am using SQL Server 2000. I backup database dbA in machine A. I would like
to restore this backup in another machine (machine B).
In Machine B I map network drive to machine A (say to drive X).
So, in Enterprise Manager on the SQL Server for machine B, I created a
database called dbA, then I go to task - restore database.
In restore database I do not see drive X to restore the database from.
Can I restore dbA that is located on machine A to dbA on machine B without
copying the backup for dbA to machine B ?

Thank you.
Linchi Shea - 21 Mar 2008 04:30 GMT
It's best to do this by executing the RESTORE DATABASE statement, and by
using UNC instead of a mapped drive letter.

First, find out the database files used by the database on Machine A. You
can execute RESTORE FILELISTONLY against the MacbineB instance as follows to
find the logical names of these database files (assuming that the backup file
DBA.bak is in C:\junk):

restore filelistonly from disk='\\MachineA\c$\junk\DBA.bak'

Then, you can execute RESTORE DATABASE against the MachineB instance as
follows to restore the database (assuming that the database file logical
names are 'dba' and 'dba_log'):

restore database DBA from disk='\\MachineA\c$\junk\DBA.bak'
 with recovery, move 'dba' to 'd:\junk\dba.mdf',
move 'dba_log' to 'd:\junk\dba_log.ldf'

Linchi

> I am using SQL Server 2000. I backup database dbA in machine A. I would like
> to restore this backup in another machine (machine B).
[quoted text clipped - 6 lines]
>
> Thank you.
bass_player - 21 Mar 2008 06:37 GMT
In addition to Linchi's suggestion you also need to copy the logins to make
sure you won't have problems with accessing those databases once they are
restored on the other machine.  Creating those same users on the other
machine manually won't do the trick as accounts are mapped using SID values

> It's best to do this by executing the RESTORE DATABASE statement, and by
> using UNC instead of a mapped drive letter.
[quoted text clipped - 30 lines]
>>
>> Thank you.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.