Checking file server references
TrueSight Server Automation supports the use of one file server at a time. This includes one host and one root directory location. If you want to change the file server host or root directory (for example, to migrate to a virtualized or centralized file server), you must first run the file server check script to ensure that there is only a single file server.
The way you execute the file_server_check script depends on your database platform.
This topic includes the following sections:
- To check file server references for Oracle
- To check file server references for SQL server
- Where to go from here
To check file server references for Oracle
- In the file structure extracted from BSA<version>-<platform>.zip, copy the following scripts from BSA<version>-<platform>/files/configurations/db_scripts/oracle/utility/file_server_change to a directory from which you can access SQL*Plus:
file_server_check_oracle.sql
file_server_change_oracle.sql
file_server_change_oracle_system_property.sql - Change (cd) to the directory where you copied the scripts.
Determine how many file servers your database references by using SQL*Plus to execute the following command:
sqlplus user/password@service_name @file_server_check_oracle.sqlThe output should be similar to the following example:
The Default File Server and root path current setting
//devfs1/blade/corp
Counts of items at File Servers and root paths referenced in the database
//devfs1/blade/corp 199 2 Default
//devfs1_x1/blade/first/test 12 0This output tells you that the current file server and root path is //devfs1/blade/corp and that the script has counted:
- 199 references to that file server and path, and two are marked for deletion.
- 12 references to another file server, //devfs1_x1/blade/first/test.
To check file server references for SQL server
- In the file structure extracted from BSA<version>-<platform>.zip copy the following scripts from BSA<version>-<platform>/files/configurations/db_scripts/sqlserver/utility/file_server_change to a directory from which you can access the sqlcmd utility:
file_server_check_sqlserver.sql
file_server_change_sqlserver.bat
file_server_change_sqlserver.sql
file_server_change_sqlserver_system_property.bat
file_server_change_sqlserver_system_property.sql - Change (cd) to the directory where you copied the scripts.
- Determine how many file servers your database references by using SQL Query Analyzer or a similar tool to execute the contents of the script file_server_check_sqlserver.sql.
If you do not have access to SQL Query Analyzer, you can run this script by using the following sqlcmd command:
sqlcmd -S <sqlsrv host>[\<instance>] -U <user> -d <database> -i file_server_check_sqlserver.sql
-o <file_server_check_sqlserver.out>Replace the variables with the following values:
The [confluence_table-plus] macro is a standalone macro and it cannot be used inline. Click on this message for details.
If you run the script by using sqlcmd, the output includes many headings, underscores, and blank lines. You must scroll through all of these to find the important information, near the bottom. The output should be similar to the output shown in the following figure.
Where to go from here
Based on the results of the script, do one of the following:
- If the script determined that there are multiple file servers, complete the steps to get to a single file server. See Consolidating-multiple-file-servers.
- If the script confirms that there is a single file server, change the location of the file server and move any applicable files to the new file server.