How do I access the local Sybase db on a Zen 10 server?

Hi again gang… I just needed to whip together a quick-n-dirty cheatsheet for connecting to the internal Sybase database on a Zenworks 10 Configuration Management server. I work on many different servers (customers and whatnot) and this is one of those things I need to have in a handy place for reference. I hope it helps you, too!

(**NOTE: All the examples in this post are based on a Windows server, so I’ll add the WindowsGeneral tag… but those Linux-user readers out there will be able to figure out how to do the same thing on their systems… šŸ˜‰ )

Enter the following at a command prompt on the server:
zman dgc

…this will give you the userrname and password for the local db user. The password will be a long crazy string, and that is the actual password, not encrypted. Copy it to Notepad or just the clipboard for now.

Launch the Interactive SQL tool:
[zen dir]\share\ASA\win32\dbisql.exe

Supply the user ID and password from the earlier command.
On the Database tab, click Find and select the zone server that should be found automatically.
Browse to the db file that should be at [zen dir]\database\
Uncheck the “Start database…” and “Stop database…” options, and click OK.
You should now be connected.

A cool command you might want to enter is (this is all one command, but you can enter this on multiple lines in the dbisql tool):
select d.DNS, d.Site, i.UpdateStatus
from zDevice d join zSystemUpdateDeviceInfo i
on d.ZUID = i.DeviceUID
where i.UpdateStatus != 'FINISHED';

(**NOTE: This SQL command is similar to the one on Novell TID 7001146, but their TID has a typo and won’t work.)

…And click the play/run button. Or if you’re really brave, or have a small db,
select * from zDevice;
select * from zSystemUpdateDeviceInfo;

…and so on. From the db commands you can get a feel for what the database looks like, and I suppose the table are documented somewhere…

So I hope this gets you started…. Have fun!

Leave a Comment

Your email address will not be published.