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.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
"fniles" wrote:
> 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.
>
>|||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
"Linchi Shea" <LinchiShea@.discussions.microsoft.com> wrote in message
news:98E7782B-40E4-40AE-A891-7A03143BAD84@.microsoft.com...
> 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
> "fniles" wrote:
>> 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.
>>
>>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment