Tip T301 -Restoring The Cisco Tms Database Using Osql; Restoring A Database To The Same Sql Server; Restoring A Database To A Different Sql Server - Cisco TMS SQL DATABASE Configuration Manual

Table of Contents

Advertisement

TIP T301 –Restoring the Cisco TMS Database using osql
Cisco TMS Versions
All
A database can be restored to an existing database, or have it create a database if it does not exist. If
restoring a database to a different server or newly installed server, additional steps must be taken. The
below examples assume a default Cisco TMS installation and you are a SQL administrator.

Restoring a database to the same SQL server

To restore a database, the database must be idle and have no active connection. To stop all
connections to the Cisco TMS database, stop all Cisco TMS Windows Services and IIS web servers
pointed at the Cisco TMS database.
Open the Services Control Panel. Start Menu -> Control Panel -> Administrative Tools -> Services
Find the Services whose names begin with TMS. Right-click on each and click Stop. Repeat for all
services whose name starts with TMS
Right-Click the World Wide Web Publishing Service and select Stop
Repeat the above steps for all Cisco TMS servers pointed at the Cisco TMS database
SQL provides several types of backups, but to perform a full backup issue the following command in a
command prompt. Example to restore the Cisco TMS database from a backup set at c:\tms\backup.bak
osql –S servername –E –Q "restore database tmsng FROM DISK =
'c:\tms\backup.bak'"
Once the restore is complete, restart the services that were stopped using the Services Control panel by
right-clicking on each and selecting Start.

Restoring a database to a different SQL server

To restore a database, the database must be idle and have no active connection. To stop all
connections to the Cisco TMS database, stop all Cisco TMS Windows Services and IIS web servers
pointed at the Cisco TMS database.
Open the Services Control Panel. Start Menu -> Control Panel -> Administrative Tools -> Services
Find the Services whose names begin with TMS. Right-click on each and click Stop. Repeat for all
services whose name starts with TMS
Right-Click the World Wide Web Publishing Service and select Stop
Repeat the above steps for all Cisco TMS servers pointed at the Cisco TMS database
The backup set contains the physical file path of the database files. When switching servers, the
physical location for database files is often different. This requires adding addition MOVE parameters to
the restore command for each file in the backup set to tell the server where to restore the database files
on the new server. Typically the new location for the files should be the DATA folder of the new SQL
server.
The files that make up the tmsng database may vary based on when your database was created. To
verify the filenames and paths of files in your backup set c:\tms\backup.bak, use the following command
in a command prompt. This will output each file, their path, and additional information.
osql –E –S servername –Q "RESTORE filelistonly FROM DISK =
'c:\tms\backup.bak'"
If the file paths are different on the new server, you must add the MOVE parameter for each file. The
syntax is:
Cisco TMS Database Knowledge Tips
SQL Server Versions
SQL 2000 – All Versions
MSDE 2000 – All Versions
SQL 2005 – All Versions
SQL 2005 Express – All Versions
Tips category – Maintaining/Upkeep
Page 23 of 35

Advertisement

Table of Contents
loading

Table of Contents