Changing DBA Passwords for SQLAnywhere Databases

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.

Depending on whether or not you have deployed Unwired Platform as a single node (as in the case of Online Data Proxy environments), or as a cluster, the process varies slightly:
  • In single-node deployment, a single database server named CacheDB supports all installed databases.
  • In a cluster deployment, these servers are used: the monitor and domain log databases use a server called LogDataDB, the default database used for the cache data uses the CacheDB server, and the cluster database uses the ClusterDB server.
  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. Run this command on each Unwired Server node host:
    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.
  5. If you receive an Invalid user ID or Invalid password error, you may have already the password from "sql" to different one). In this case:
    1. Backup the register-dsn.bat.
    2. Open this file in a text editor and locate this section of the file:
      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=PreviousPassword.
  6. Restart all database services, then all Unwired Servers.