
Tips category – Maintaining/Upkeep
Cisco TMS Database Knowledge Tips
Page 24 of 35
RESTORE databasename FROM DISK = ‘filename’ WITH MOVE ‘file’ TO
‘path\filename’, MOVE ‘file’ to ‘path\filename’
If the new server’s DATA directory is d:\databases the command syntax to restore the backup to the new
folder would be:
osql –E –S servername –Q “RESTORE database FROM disk = ‘c:\tms\backup.bak’
WITH MOVE ‘tmsng’ TO ‘d:\databases\tmsng.mdf’, MOVE ‘tmsng_log’ TO
‘d:\databases\tmsng_log.ldf’”
Once the restore is complete, restart the services that were stopped using the Services Control panel by
right-clicking on each and selecting Start.
For additional help on osql command line options, see ‘TIP T109 –Using osql for Cisco TMS tasks
’
Extra reference links
How to manage the SQL Server Desktop Engine (MSDE 2000) or SQL Server 2005 Express Edition by
using the osql utility
Backing Up and Restoring Databases in SQL Server
Copying Databases with Backup and Restore
RESTORE Arguments (Transact-SQL)