Skip to Content

How to…. open an ultralite db (udb)

First of all, credits to Jan from SAP for helping me out on this. I thought it is worthwhile to share it to you all. From SUP 2.1.3, Sybase creates a .udb file on the iOS native apps to keep the data synchronised from the unwired server. In the previous version it was SQLLite.

I normally prefer to have a look into the local db (called sandbox) to see if my native app queries work. It was a piece of cake when it was SQLite as there is a simple browser on sourceforge that anyone can download and use. I found it a little difficult when Sybase moved from SQLite to Ultralite. My existing SQLite browser did not work. If you face the same issue use this technique:

1. Every unwired server installation comes with Sybase Central as db editing tool for all Sybase databases. However each DB can be analysed by its respective plugin inside Sybase Central. Normally the Ultralite plugin is available in the tool. So first find Sybase Central: where your unwired server is installed

ultraliteexe.JPG

2. Next connect with ultralite plugin from connections:

openultraliteplugin.JPG

3. Specify the connection parameters: Before doing this, download the .udb file from you device onto the server. You must undertsand that if you use client object APIs then Sybase automatically creates the DB with an encryption key when it is needed by the messaging client. However AFAIK you can not get hold of the encryption key. So I manually created the DB using client object API methods and set my own encryption key. Here is an example of a key

f0317df41d7807d005e37ef4034d7ce7a0780bceb8f760820c4e8417cd3ddb5104e03f38035e80dc00b713b0fd0f9eba

The connection parameters are:

1. The user name (usually) : dba

2. Password: sql

3. The path to the UDB file

4. The encryption key

connect to ultralite.JPG

4. On successful connection, it takes you the DB browser where you can see the databases created on your iOS device. Use interactive SQL by performing a right click on the desired table to write queries and analyse data.

tableview.JPG

5. This is important if you HIT an error: If you get an error before you connect that says “database driver not found or not registered” then just do this

     1. From the command prompt on your server navigate to C:Windows\System32 and run the regsvr32 command. The command takes an argument, specify

     C:\Sybase\UnwiredPlatform\Servers\SQLAnywhere12\BIN32\ulodbc12.dll. This registers the ulodbc12.dll with the reg and the error  should go away.

cmd.JPG

Thats it for now, see you back in an other blog.

19 Comments
Comments are closed.
Comments are closed.