Checking file server references

BMC 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

Tip

To obtain well-formatted output from the file_server_check_oracle.sql script, execute the script with a GUI tool (such as Quest Software TOAD or Oracle SQL Developer).

  1. In the file structure extracted from BBSA<version>-<platform>.zip, copy the following scripts from BBSA<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
  2. Change (cd) to the directory where you copied the scripts.
  3. 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.sql

    The 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 0

    This 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

Tip

To obtain well-formatted output from the file_server_check_sqlserver.sql script, execute the script with a GUI tool (such as Microsoft SQL Server Management Studio).

  1. In the file structure extracted from BBSA<version>-<platform>.zip copy the following scripts from BBSA<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
  2. Change (cd) to the directory where you copied the scripts.
  3. 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:

      sqlsrv

      The name of the SQL Server hosting the BMC Server Automation database (with the optional instance name)

      user

      The user name of a database user that has the privileges required to perform this operation

      database

      The database name

      Example

      sqlcmd -S dbserver -U dbadmin -d bladelogic -i file_server_check_sqlserver.sql -o file_server_check_sqlserver.out

      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.

The procedure to move the file server location affects only Depot objects such as Depot Software, BLPackages, RPMS, MSIs, and so on. It operates on the following subdirectores under Storage:

  • blpackages
  • depotfiles
  • files
  • imported
  • installables
  • scripts

There are other objects not directly under the management of the file server that are not included in this migration, such as Extended Objects, and Config File Grammars stored on the file server. Review these objects and update as needed.

Where to go from here

Based on the results of the script, do one of the following:

Was this page helpful? Yes No Submitting... Thank you

Comments