Changing DBA Passwords for SQLAnywhere Databases in a Single-Node Installation

By default, Unwired Platform uses multiple SQLAnywhere databases to support the server runtime environment and transactions. Unwired Server accesses these databases with the DBA user identity.

During installation, enter a custom password for the DBA user on each of the SQLAnywhere databases used by the runtime: the cache database (CDB), the cluster database, the log database, and monitor database.

In single-node deployment, a single database server named CacheDB supports all installed databases.

  1. Stop all instances of Unwired Server, as well as all database services.
    For a list of database services, search for Unwired Platform Windows Services in System Administration.
  2. On data tier host:
    1. Set the location of the BIN directory for your operating system (32-bit or 64-bit):
      set SQLANY12_BIN=<UnwiredPlatform_InstallDir>\Servers\SQLAnywhere12\bin<32|64>
    2. Set the path to the data:
      If you are using a single node, run:
      set DATA_PATH= <UnwiredPlatform_InstallDir>\Servers\UnwiredServer\data
      If you are using a cluster deployment, run:
      set DATA_PATH= <UnwiredPlatform_InstallDir>\data\CDB
  3. Use dbisql to change passwords for each database as required:
    For the cache database, use:
    "%SQLANY12_BIN%\dbisqlc" -q -c "Server=default;DBF=%DATA_PATH%\default.db;
    UID=DBA;PWD=ExistingPwd" grant connect to dba identified by NewPwd
    For the cluster database, use:
    "%SQLANY12_BIN%\dbisqlc" -q -c "Server=clusterdb;DBF=%DATA_PATH%\clusterdb.db;
    UID=DBA;PWD=ExistingPwd" grant connect to dba identified by NewPwd
    For the monitor database, use:
    "%SQLANY12_BIN%\dbisqlc" -q -c "Server=monitordb;DBF=%DATA_PATH%\monitordb.db;
    UID=DBA;PWD=ExistingPwd" grant connect to dba identified by NewPwd
    For the domain log database, use:
    "%SQLANY12_BIN%\dbisqlc" -q -c "Server=domainlogdb;DBF=%DATA_PATH%\domainlogdb.db;
    UID=DBA;PWD=ExistingPwd" grant connect to dba identified by NewPwd
  4. If you receive an Invalid user ID or Invalid password :
    1. Backup register-dsn.bat.
    2. Open this file in a text editor and locate:
      IF "default" == "%CDB_INSTALLTYPE%" (
          echo Changing DBA password for databases ...
          "%SQLANY12_BIN%\dbisqlc" -q -c "Server=default;DBF=%DJC_HOME%\data\default.db;UID=DBA;PWD=sql" grant connect to dba identified by %CDB_PASSWORD%
          "%SQLANY12_BIN%\dbisqlc" -q -c "Server=clusterdb;DBF=%DJC_HOME%\data\clusterdb.db;UID=DBA;PWD=sql" grant connect to dba identified by %CLDB_PASSWORD%
          "%SQLANY12_BIN%\dbisqlc" -q -c "Server=monitordb;DBF=%DJC_HOME%\data\monitordb.db;UID=DBA;PWD=sql" grant connect to dba identified by %MONITORDB_PASSWORD%
          "%SQLANY12_BIN%\dbisqlc" -q -c "Server=domainlogdb;DBF=%DJC_HOME%\data\domainlogdb.db;UID=DBA;PWD=sql" grant connect to dba identified by %DOMAINLOGDB_PASSWORD%
      )
    3. Replace PWD=sql with the PWD=NewPassword.
  5. To register the change with the runtime, run this command:
    Register-dsn.bat cdb.install_type cdb.serverhost cdb.serverport cdb.username
     %CDB_PASSWORD% cdb.servername cldb.dsnname %CLDB_PASSWORD% %MONITORDB_PASSWORD% %DOMAINLOGDB_PASSWORD%
    To see the values used in the properties of this command, open the <UnwiredPlatform_InstallDir>\Servers\UnwiredServer\Repository\Instance\com\sybase\sup\server\SUPServer\sup.properties file and search for the corresponding property.
  6. To register the change with the synchronization server, run:
    run-ant-config.bat configure-mlsrv.ini configure-sup -Dsqlany12.bin=%SQLANY12_BIN%
    

    where %SQLANY12_BIN% is substituted with the path value recorded in the asa-setenv.bat.

  7. Restart all database services, then all Unwired Servers.