How to Access the Embedded Sybase Database

  • 7001996
  • 29-Mar-2012
  • 21-Mar-2018

Environment


Novell ZENworks 11 Configuration Management
Novell ZENworks 10 Configuration Management with Support Pack 3 - 10.3
ZENworks Configuration Management 2017

Situation

Support requests a query be run in the embedded Sybase database.
Need to connect to the internal ZENworks Sybase database.

Note: These steps will only work for an embedded Sybase database.

Resolution

Important: Before making any changes in the database, please take a backup of the database.

To access the embedded Sybase database on ZCM 10.3.x and 11.0:

1. Run zman dgc in the command line and enter the ZCM administrator credentials when prompted to retrieve the database user name and password.
2. Depending on the platform, do the following:
Windows:
a) run dbisql from the command line
 
Linux:
a) navigate to /opt/novell/zenworks/share/sybase/bin64s/ in a terminal (bin32s for 32 bit)
b) run ./dbisql
3. In the window that appears, put in the database user name and password.
4. Go to the Database tab and hit Find next to Server name (make sure that Search network for database servers is not selected).
5. Select the ZCM server from the list when it populates.
6. If it doesn't automatically populate the database name in the bottom area, select Browse and got to %ZENworks_Home%\database on Windows or /var/opt/novell/zenworks/database/ on linux and select the .db file with the ZCM zone name.
7. Click OK.
 
To access the embedded Sybase database on ZCM 11.1 and higher:
 
1. Run zman dgc in the command line and enter the ZCM administrator credentials when prompted to retrieve the database user name and password.
      (Note: ZCM v11.3.x introduced ZENworks Audit Database: To get the zenauditadmin password use zman dgca )
2. Depending on the platform, do the following:
Windows:
a) run dbisql from the command line
 
Linux:
a) navigate to /opt/novell/zenworks/share/sybase/bin64s/ in a terminal  (bin32s for 32 bit)
b) run ./dbisql
3. In the window that appears, put in the database user name and password.
4. Below that, make sure the action is set to Connect to a running database on this computer.
5. Click Connect.
 
Note: If changes need to be made to database tables, please make sure to stop the ZENworks services on all other primaries before accessing the database. Do this by running novell-zenworks-configure -c Start and choosing the option to stop the services. You will then need to select the action to Start and connect to a database on this computer

Also note this method for access when in DBISQL:
Action: "Connect to a running database on another computer"
Host: 127.0.0.1 (if accessing from same system where DB resides) or IP of DB server
Port: 2638 (for ZEN DB) or 2639 (for ZEN Audit DB)

Additional Information

Here are some additional TIDs that may help with problems connecting to the embedded Sybase database:
 
TID 7000764 - Linux dbisql can't connect to local internal sybase database without additional parameter
TID 7007891 - dqisql Find does not find Sybase ZENworks instance
TID 7008766 - Unable to connect to ZCM embedded Sybase database