Sql Code To Update Indexes And Statistics; Cisco Tms Database Knowledge Tips - Cisco TMS SQL DATABASE Configuration Manual

Table of Contents

Advertisement

12. The next screen prompts you for your release and option keys. Do not enter any keys and click Next.
You will be warned this will leave the server in Trial mode. Acknowledge the warning and continue.
13. The next screen has the Server settings, leave all the values at default and click Next.
14. The next screen is for the default Zone configuration. You cannot leave these fields blank, so enter
any information for the fields and click Next. Remember the values will be overwritten later so the
values entered are not important.
15. The next screen allows you to specify the installation folders. You should reuse the same folders for
the Cisco TMS installation that you had previously. The SQL Server folders can be customized if
desired. These values are significant and will not be overwritten.
16. The last screen is the summary; click Next to complete the installation, including the installation of
the SQL Server. SQL Server 2005 Express will be installed as the named instance \SQLTMS
17. When the installation is complete, you will be prompted to restart the server now or later. Choose to
restart the server now and log in again once the server restarts. The Cisco TMS installer will finish
some tasks at the start of your login – this is normal.
18. Stop all Cisco TMS Windows Services and IIS web servers pointed at the Cisco TMS database.
a.
Open the Services Control Panel. Start Menu -> Control Panel -> Administrative Tools ->
Services
b.
Find the Services whose names begin with TMS. Right-click on each and click Stop. Repeat for
all services whose name starts with TMS
c.
Right-Click the World Wide Web Publishing Service and select Stop
19. Delete the current tmsng database from the SQL Server. Open a command prompt and enter
osql –E –S localhost\sqltms –Q "drop database tmsng"
20. Copy the tmsng.mdf file copied earlier in this process to the DATA directory of the SQL Server.
Default location is C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\MSSQL.1\MSSQL\Data
21. Attach the older database to the new SQL Server. Open a command prompt and enter the following
command as a single command
osql -E -S localhost\sqltms -Q "sp_attach_db 'tmsng', C:\Program
Files\Microsoft SQL Server\MSSQL.1\MSSQL\MSSQL.1\MSSQL\Data tmsng.mdf'"
22. The server will report a new log file was created and will show several steps upgrading the database.
23. Your original tmsng database is now updated to 2005 format and the Cisco TMS server is
configured to point at the new Cisco TMS Server. You can verify the database by running the
following command in your command prompt. If the command completes with no errors – you are
ready.
osql -E -S localhost\sqltms -d tmsng -Q "select * from
information_schema.tables"
24. Microsoft recommends updating the indexes and statistics on databases that have been upgraded
from SQL 2000 to SQL 2005. Follow the
create a SQL script to perform the task. Return here when completed.
25. Restart the TMS services that were stopped earlier using the Services Control Panel or just restart
the Server. Once all services have been restarted, log into the Cisco TMS webpage to verify it is
operating properly.
Your Cisco TMS Server is now running SQL Server 2005 Express and has all the original data you had
prior to the upgrade. It is now ready for upgrades to future versions if required. Downloading and
installing SQL Server Management Studio Express is recommended for future management.

SQL code to update indexes and statistics

1. Create a new text file using Notepad and copy the below text into the text file. Save the file as
update.txt
DECLARE @table_name varchar(1000)
declare c1 cursor for SELECT name

Cisco TMS Database Knowledge Tips

SQL code to update indexes and statistics instructions
Tips category – Maintaining/Upkeep
Page 32 of 35
to

Advertisement

Table of Contents
loading

Table of Contents