I'm sure you know all this, but if you want to use a SQL Restore command here's my template:
-- Get Details of Logical names
RESTORE FILELISTONLY FROM DISK = 'x:\Mypath\MyBackupFilename_Full.BAK'
RESTORE HEADERONLY FROM DISK = 'x:\Mypath\MyBackupFilename_Full.BAK'
USE master -- (Can't sit in the database whilst its being Restored / Dropped!)
GO
ALTER DATABASE MyDatabaseName SET OFFLINE WITH ROLLBACK IMMEDIATE
GO
-- Restore Full Backup
RESTORE DATABASE MyDatabaseName
FROM DISK = 'x:\Mypath\MyBackupFilename_Full.BAK'
WITH
REPLACE
**** Choose one: !!!
-- RECOVERY -- Use if NO more file to recover
-- NORECOVERY -- Use if there are DIFFs and/or T/Logs to recover
-- STANDBY = 'x:\MSSQL\DATA\MyDatabaseName.STB' -- Use for STANDBY mode
, STATS = 10 -- Show progress (every 10%)
**** Change the Logical Names here
, MOVE 'MyDatabaseName_Data' TO 'x:\MSSQL\DATA\MyDatabaseName.mdf'
, MOVE 'MyDatabaseName_Log' TO 'x:\MSSQL\DATA\MyDatabaseName.ldf'
GO
-- Optional restore Differential Backup
RESTORE DATABASE MyDatabaseName
FROM DISK = 'x:\Mypath\MyDatabaseName_Diff.BAK'
WITH
**** Choose one: !!!
-- RECOVERY -- Use if NO more file to recover
-- NORECOVERY -- Use if there are T/Logs to recover
-- STANDBY = 'x:\MSSQL\DATA\MyDatabaseName.STB' -- Use for STANDBY mode
, STATS = 10 -- Show progress (every 10%)
GO
-- Optional restore Transaction Log Backup
RESTORE LOG MyDatabaseName
FROM DISK = 'x:\Mypath\MyDatabaseName_yyyymmdd_hhmm_Trans.BAK'
WITH
**** Choose one: !!!
-- RECOVERY -- Use if NO more T/Logs to recover
-- NORECOVERY -- Use if more T/Logs to recover
-- STANDBY = 'x:\MSSQL\DATA\MyDatabaseName.STB' -- Use for STANDBY mode
-- , STATS = 10 -- Show progress (every 10%)
-- On the LAST TLog restore optionally use:
-- , STOPAT = '19991231 23:59:59.999'
GO
-- REPEAT FOR EACH Transaction Log Backup file - in chronological order
-- Now activate the database (NOT required if RECOVERY was used earlier)
RESTORE DATABASE MyDatabaseName WITH RECOVERY
GO
-- Rename logical names (only needed if restoring from a backup for a Different database):
ALTER DATABASE MyDatabaseName
**** Change the Logical Name here
MODIFY FILE (NAME = 'OrigDatabase_Data', NEWNAME = 'MyDatabaseName_data')
GO
ALTER DATABASE MyDatabaseName
**** Change the Logical Name here
MODIFY FILE (NAME = 'OrigDatabase_Log', NEWNAME = 'MyDatabaseName_log')
GO
-- Optional - if backup-file was from a database set to SINGLE_USER or READ_ONLY
ALTER DATABASE MyDatabaseName SET MULTI_USER, READ_WRITE
GO