Changes to the WhatsUp Gold v12 application require that the database schema be upgraded. If you are running a default database configuration, the WhatsUp Gold v12 upgrade automatically upgrades your database schema for you. If not, you must manually upgrade your database schema after installing WhatsUp Gold v12 before you can use the application.
You must first complete the WhatsUp Gold installation, then upgrade the database schema. This section steps through how to upgrade the database schema for an installation of WhatsUp Gold that is a non-default configuration.
To upgrade the database from WhatsUp Gold v11.x or WhatsUp Professional 2006:
Warning: Ipswitch Technical Support may not be able to recover your network data from a database which has failed an upgrade attempt. It is imperative to make a backup copy of the database, in case any portion of the database schema upgrade encounters a problem.
<WUG_Install_Folder>\DB Scripts
folder to the computer running the SQL Server that hosts the WhatsUp database.Important: You must copy the entire DB Scripts folder to the computer running the SQL Server. This includes any files and sub-directories it may contain.
Warning: The upgrade scripts should be run only once. If an upgrade script is interrupted or errors occur, you must restore your database before running the scripts a second time.
Important: Before running the scripts, close the WhatsUp Gold application; then, stop the Ipswitch WhatsUp Engine and the Ipswitch Web Server service, for more information see Stopping and starting the Ipswitch WhatsUp Engine and Stopping and starting the internal web server in the Help. If you are running IIS as your web server, stop IIS, then restart it.
To upgrade the database automatically using the VB Script:
<WUG_Install_Folder>\DB Scripts
directory. Navigate to the Upgrade Scripts
directory inside it.Warning: The VB script must be executed locally on the SQL Server. If SQL Server is installed on another computer, attempting to run the VB script from the WhatsUp computer will cause the database upgrade to fail.
Note: If running the VB script on a Windows Vista computer, be sure to run the command prompt with administrative privileges. For more information, see the Microsoft Command Prompt FAQ article.
cscript upgrade_db.vbs -S "<sql_server_name>" -d "WhatsUp"
<sql_server_name>
with the machine name or machine name and database instance name.SQLBOX
:cscript upgrade_db.vbs -S "SQLBOX" -d "WhatsUp"
SQLSYSTEM
and the instance name is WUG
:cscript upgrade_db.vbs -S "SQLSYSTEM\WUG" -d "WhatsUp"
For assistance in determining whether your SQL instance is a default or named instance, please contact your database administrator.Note: Arguments are case-sensitive (-d is not the same as -D).
Tip: Optional: If you prefer to use SQL authentication to execute the VB script, you can use the -U
and -P
switches to provide an SQL user and that user's password.
cscript upgrade_db.vbs -S "<sql_server_name>" -d "WhatsUp" -U "<sql_user_name>" -P "<sql_password>"
Replace
<sql_user_name>
with the SQL username and <sql_password>
with that user's password.
For example:
cscript upgrade_db.vbs -S "SQLSERVER" -d "WhatsUp" -U "sa" -P "WhatsUp_Gold"
The VB script will execute the appropriate upgrade scripts, based on the existing WhatsUp Gold database schema. As each upgrade script is executed, a log file is created in the DB Scripts\Upgrade Scripts
directory. If errors occur during the execution of an upgrade script, the corresponding log file for the script will be displayed in a Notepad window.
Note: We recommend that you make a backup of your SQL database after the upgrade has completed. This will be useful for any disaster recovery mechanisms in place at your company.
To manually run the upgrade scripts:
The alternative to using the VB script is to manually execute the upgrade scripts using Query Analyzer (SQL 2000), SQL Management Studio (SQL 2005), or the SQL command-line utilities (osql.exe
or sqlcmd.exe
). If you need assistance using the management tools for SQL 2000 or SQL 2005, contact your database administrator or consult the online documentation for each tool.
Important: Be sure to run all of the queries, in the instructions below, against the WhatsUp database.
SELECT sValue FROM DatabaseProperty WHERE sName = N'Version'
Transform.ini
file located in the DB Scripts\Transforms
directory. In the [VERSIONS]
section, locate the version that matches the version of your database. [SCRIPTS]
section in Transform.ini
file. Make note of all the Transform entries which appear after your starting transform version. upgrade_from_110302_to_120001.sql
) and the last is FinalUpgradeScript.sql
.<DATAFILESPATH>
variable with the absolute path to the DB Scripts
directory. Some scripts may have several <DATAFILESPATH>
variables that need replacement, some scripts may have none. Note: Be sure to exclude any trailing slashes from the directory path when replacing the text.
For example, in an upgrade script, we see the following text:BULK INSERT WorkspaceReport FROM '<DATAFILESPATH>\WorkspaceReport.txt'
If we copied the DB Scripts
directory to a WUG
directory at the root of the C
drive on the SQL Server, we would change it to the following:BULK INSERT WorkspaceReport FROM 'C:\WUG\DB Scripts\WorkspaceReport.txt'
Important: The path you replace the <DATAFILESPATH>
variable with must be local to the SQL Server hosting the WhatsUp database. It must be a directory on a local drive, not a network share or mapped drive. If you are running Query Analyzer Management Studio from another computer, be sure to use the path that would be "seen" by the SQL Server, not your remote computer.
Transform.ini
. Check for any errors or warnings returned by the SQL tool before continuing to the next upgrade script. If any script should fail, restore your database backup and repeat any previously successful upgrade scripts before attempting to run the failing script again.Tip: Optional: We recommend making another backup of your SQL database once the upgrade has completed. This will be useful for any disaster recovery mechanisms in place at your company.
An alternative to using the Query Analyzer or Management Studio tools is using the SQL command-line tools to execute the upgrade scripts. If your database is SQL 2000, use the osql utility. If you are running SQL 2005, you should use the sqlcmd utility. For more information, see the Microsoft web site for information about the osql utility and the sqlcmd utility.
Each utility needs connection and authentication information specific to your environment in order to connect to the WhatsUp database and issue queries and schema updates. Your specific connection and authentication information may vary from the examples below. Contact your database administrator for information about using these command-line utilities. These examples assume that that Windows user running the utility has administrative access to the DB, and that the SQL Server is a default instance on a computer named SQLSYSTEM
.
osql -E -S "SQLSYSTEM" -d "WhatsUp" -Q "SET NOCOUNT ON SELECT sValue FROM DatabaseProperty WHERE sName = N'Version'"
sqlcmd -E -S "SQLSYSTEM" -d "WhatsUp" -Q "SET NOCOUNT ON SELECT sValue FROM DatabaseProperty WHERE sName = N'Version'"
Note: Arguments are case-sensitive (-d is not the same as -D).
Transform.ini
file located in the DB Scripts\Transforms
directory. In the [VERSIONS]
section, locate the version that matches the version of your database. For example, database version 110302 corresponds to transform version 39. Make a note of the transform version, which we will refer to as the "starting transform version."[SCRIPTS]
section in Transform.ini
. Make note of all the Transform entries which appear after your starting transform version. For example, if your starting transform version is 39, the first upgrade script you'll need to run is transform 40 (upgrade_from_110302_to_120001.sql
) and the last is FinalUpgradeScript.sql
.<DATAFILESPATH>
variable with the absolute path to the DB Scripts
directory. Some scripts may have several that need replacement, some may have none. Be sure to exclude any trailing slashes from the directory path when replacing the text.BULK INSERT WorkspaceReport FROM
'<DATAFILESPATH>\WorkspaceReport.txt'
BULK INSERT WorkspaceReport FROM 'C:\WUG\DB
Scripts\WorkspaceReport.txt'
Note: The path you replace <DATAFILESPATH>
variable with must be local to the SQL Server hosting the WhatsUp database. It must be a directory on a local drive, not a network share or mapped drive. If you are running the command-line tools from another computer, be sure to use the path that would be "seen" by the SQL Server, not your remote computer.
Transform.ini
. Check for any errors or warnings returned by the SQL tool before continuing to the next upgrade script. If any script fails, restore your database backup and repeat any previously successful upgrade scripts before attempting to run the failing script again.osql -E -S "<sql_server_name>" -d "WhatsUp" -i
"<upgrade_script_name.sql>"
sqlcmd -E -S "<sql_server_name>" -d "WhatsUp" -i
"<upgrade_script_name.sql>"
osql -E -S "SQLSYSTEM" -d "WhatsUp" -i
"upgrade_from_110302_to_120001.sql"
SQL 2005 (sqlcmd):sqlcmd -E -S "SQLSYSTEM" -d "WhatsUp" -i
"upgrade_from_110302_to_120001.sql"
Tip: Optional: You can specify to create a log file for each upgrade script using the -o
switch and by specifying a filename. We recommend creating a separate log file for each upgrade script. For example:sqlcmd -E -S "SQLSYSTEM" -d "WhatsUp" -i "upgrade_from_110302_to_120001.sql" -o "upgrade_from_110302_to_120001.log"
Note: We recommend that you make a backup of your SQL database after the upgrade has completed. This will be useful for any disaster recovery mechanisms in place at your company.