Wednesday, August 31, 2011

Database Access

Many UC appliances (like CUCM, CUPS, etc.) use database to store configuration.  For security and supportability reason, the regular CLI provides limited access to database.  However, if you could get root access to the box, you would have full access.


su - informix

Change user role to 'informix' which is a built in Linux user to access the Informix database.

dbaccess $(dblutil -c) -

dbaccess is a SQL client to access Informix database.  'dblutil' is a DB role.

select * from licenseinfo

A standard SQL command to view all records in 'licenseinfo' table.

Notes:
  • Press Ctrl-D to execute SQL commands
  • Press Ctrl-C to exit
  • On some terminals, you may have to press Delete to Backspace
If you want to know the relationship between different database tables, refer to "Data Dictionary" on CCO Docs.

To list all tables:
select tabname from systables where tabid > 99 and tabtype = "T"

Grab a some books like "SQL for Dummies" and test in your lab.

I wondered what does this do?  ;)

2 comments:

  1. Any chance you've taken a look into the UCCX schema? I'm trying to prevent my demo lab license from expiring and can't seem to find the right fields to modify.

    ReplyDelete
  2. This is great information. How do you read the Unity Connection license info? licenseinfo is empty for the Unity Connection licenseinfo table.
    Thx,

    ReplyDelete