Changing database authentication mode (MS SQL Server)

During the creation of the License Metric Tool database, you choose to authenticate the MS SQL Server database user through Windows authentication or MS SQL Server authentication. You can later on change the setting depending on your needs.

Changing from MS SQL Server authentication to Windows authentication

To change database authentication mode from MS SQL Server authentication to Windows authentication, perform the following steps.

Procedure

  • For application update 9.2.30 and later, run the SetupDatabase script to change the authentication mode. For more information, see: Changing database connection parameters.
  • For application update 9.2.29 and earlier, perform the following steps.
    1. Stop the License Metric Tool server.
    2. Open the database.yml file that is by default in the following location: C:\Program Files\ibm\LMT\wlp\usr\servers\server1\config. Change the value of the windows_authenticated parameter to true.
    3. Open the server.xml file that is by default in the following location: C:\Program Files\ibm\LMT\wlp\usr\servers\server1. Change the following line.
      Before:
      <dataSource id="DatabaseConnection" jndiName="jdbc/ilmtDatabaseConnection">
      <jdbcDriver libraryRef="DatabaseLib"/>
      <properties.microsoft.sqlserver databaseName="temadb" lockTimeout="180000" serverName="localhost" user="user_name" password="password"/>
      </dataSource>
      After:
      <dataSource id="DatabaseConnection" jndiName="jdbc/ilmtDatabaseConnection">
      <jdbcDriver libraryRef="DatabaseLib"/>
      <properties.microsoft.sqlserver databaseName="temadb" lockTimeout="180000" serverName="localhost" integratedSecurity="true"/>
      </dataSource>
    4. Start the License Metric Tool server.
      Important:
      To use Windows authentication, the License Metric Tool server must be started by a user who meets the following requirements.
      • The user has administrative privileges for the database and can add, remove or alter database schema elements such as tables, triggers, functions, keys, indexes and other. This user needs to have the dbcreator or sysadmin rights in the MS SQL Server database.
      • If your database server is remote, the user is a domain user who can accesses the remote database.

Changing from Windows authentication to MS SQL Server authentication

To change database authentication mode from Windows authentication to MS SQL Server authentication, perform the following steps.

Procedure

  • For application update 9.2.30 and later, run the SetupDatabase script to change the authentication mode. For more information, see: Changing database connection parameters.
  • For application update 9.2.29 and earlier, perform the following steps.
    1. Generate a new password for the database user.
    2. Stop the License Metric Tool server.
    3. Open the database.yml file that is by default in the following location: C:\Program Files\ibm\LMT\wlp\usr\servers\server1\config. Edit the following lines.
      host: localhost
        database: temadb
        username: <user_name>
        database_type: mssql
        windows_authenticated: false
        encrypted_password: "<password>"
      Where:
      username
      The name of the License Metric Tool user that is used to connect to the MS SQL Server database.
      encrypted_password
      Encrypted password of the License Metric Tool user that is used to connect to the MS SQL Server database. It is the password that you created in step 1.
    4. Open the server.xml file that is by default in the following location: C:\Program Files\ibm\LMT\wlp\usr\servers\server1. Edit the following lines.
      Before:
      <dataSource id="DatabaseConnection" jndiName="jdbc/ilmtDatabaseConnection">
      <jdbcDriver libraryRef="DatabaseLib"/>
      <properties.microsoft.sqlserver databaseName="temadb" lockTimeout="180000" integratedSecurity="true" serverName="localhost"/>
      </dataSource>
      After:
      <dataSource id="DatabaseConnection" jndiName="jdbc/ilmtDatabaseConnection">
      <jdbcDriver libraryRef="DatabaseLib"/>
      <properties.microsoft.sqlserver databaseName="temadb" lockTimeout="180000" user="user_name" password="password" serverName="localhost"/>
      </dataSource>
      Where:
      user
      The name of the License Metric Tool user that is used to connect to the MS SQL Server database.
      password
      Encrypted password of the License Metric Tool user that is used to connect to the MS SQL Server database. It is the password that you created in step 1.
    5. Start the License Metric Tool server.