Restore from server 1 db. name A, to server 2 db. renamed B, recovery: FULL so .bak + 10 log files
----- on server 2----
RESTORE DATABASE B
FROM DISK='D:\.BAK'
WITH REPLACE,NORECOVERY,
MOVE 'b_sql_Data' TO 'E:\mssqldata\b.mdf',
MOVE 'b_sql_Log' TO 'F:\gwlra_mssqllog\b.ldf', STATS=20 - new filename too as db.
----- Restoring log files -----
RESTORE LOG <db name> FROM DISK = 'D:\xxx_1.TRN' WITH NORECOVERY .. use norecovery till all trn. files are restored
GO
RESTORE LOG <dbname> FROM DISK = 'D:\xxx_10.TRN'
GO
------
What <dbname> to use for log restore - A or B since the name was changed while restoring to server 2 ?
TIA
🙂
(Still think like an Oracle DBA)