Skip to Content

Dear All,

 

 

OBJECTIVE:

 

This Document explains steps how to Read device/client side database.

 

REQUIREMENT:

 

  • SUP 2.x

 

Procedure:

 

You are wondering how to access the client side database from SUP side.

 

You would have checked How to access SUP CDB (Cache Database) ?

 

Assuming that you have created MBO(s) and deployed successfully to SUP server. then the same package has been implemented with client side (iOS native) application.

 

once you run the application on device, a .udb file would be created on the same.Sybase creates a .udb file on the iOS native apps to keep the data synchronised from the unwired server. Every Unwired Server setup comes with Sybase Central as db tool. For accessing client side data, Ultralite Plugin is available in this tool.

 

Finding Out the path for Ultralite Tool:

 

  • go to the location: C:\Sybase\UnwiredPlatform\Servers\SQLAnywhere12\Bin32

 

  • look for scjview.exe

 

 

Capture.PNG

 

 

  • when you open it. A screen will be prompted like below:

 

Capture.PNG

 

  • Open the UltraLite 12 Plugin. Click on Connect to a database

 

Capture.PNG

  • Download the .udb file from device on the SUP server. Pass dba as user ID, sql as password.
  • Browse the database file (.udb file)

 

Capture.PNG

 

 

 

 

  • Once you are connected to UltraLite 12, you would be seeing the contents related to database created on iOS device.

 

Capture.PNG

 

 

  • here, you can view details in a particular table like columns details, constraints, referencing constraints, indexes, data. You can navigate to ER diagram for a table.

 

I hope this document will help you to read the data available at client side.

Your comments/Suggestions are most welcome.

 

Regards,

Jitendra Kansal

To report this post you need to login first.

31 Comments

You must be Logged on to comment or reply to a post.

    1. Jitendra Kansal Post author

      Hi Vikas,

      it is very simple.

      once you run the app lets say in iPad device, you connect device with MAC machine, then move to organizer >Devices>Applications

      then you will the udb file. you can download it from there.

      Regards,

      Jitendra

      (0) 
      1. Vikas Singh

        Thanks but wondering if you know of any mechanism by which we can analyse udb files of remote users once the app is productive. They might not be in the same location ..so we can’t connect to macbook for analysis.

        Thanks,

        Vikas

        (0) 
  1. Midhun VP

    Jithendra, Whether this will work only when the device is connected to SQL DB or Is it gonna with if the device is connected to SAP as backend.

    (0) 
  2. Guven Bolukbasi

    When I hit Connect (in the Connect to UltraLite db view), I am getting the following error:

    “Could not connect to the database.

    Data source name not found and no default driver specified.”

    Any kind of settings that needs to be done prior to connecting to UltraLite databases? I am running SUP 2.1.3.

    (0) 
      1. Guven Bolukbasi

        Problem solved Jitendra. The registry update wasn’t done before and that is why I got that error. After updating the registry with regsvr32 and with the dll, it worked fine.

        Thanks for your help.

        (0) 
        1. Daniel Laguerta

          Hellow

          Im getting the same error than you did

          can you please Specify the solution that you have implemented?

          I’m not getting as it is

          thansk a lot

          (0) 
          1. Guven Bolukbasi

            Unfortunately, I can’t remember the exact steps. Sathis Kumar was having a similar problem, maybe he can point you to the right direction. It was about missing jar/dll files that wouldn’t let you connect to the DB.

            (0) 
    1. Jitendra Kansal Post author

      Hi Florian,

      actually it should work without encrption key.

      is it possible you to share the steps you are following with.

      Regards,

      Jitendra

      (0) 
      1. Florian Kekule

        Of Course,

        i run the app –> open organizer –> download udb-file –> put it from Mac to Win-Machine –> open Sybase Central 6.1.0 (the win machine isn´t the machine where the SUP runs, so it´s i had to download sybase central to use ultraLite12)  –> open UltraLite 12 –> Connect with a database –> user “dba” password “sql” –> select Database file and click connect.

        Then i get the error: “Connection with database no possible. Wrong or missing encryption key”

        Thanks for your fast reply!

        Regards,

        Florian

        (0) 
      2. Florian Kekule

        Hi Jitendra,

        i did it like you explained:

        1. Run iPad-App
        2. start Sync
        3. in Xcode–>Organizer download udb-File
        4. copied file from mac to win-machine
        5. opened Sybase Central 6.1.0 (the sup doesn´t run on this win machine so i had to install sybase central by myself)
        6. opened UltraLite12
        7. User: dba; pass: sql
        8. selected previously to win pc copied udb-file
        9. clicked Connect
        10. Got error: “Wrong or missing encryption key”

        Thank you!

        Regards,

        Florian

        (0) 
        1. Jitendra Kansal Post author

          Hi Florian,

          it should  not ask for any type of encryption key.

          i am wondering since you are running ultraLite on a machine where SUP is not installed.

          btw: how did you install sybase central on different machine? did u download it from somewhere? wont it possible for you to run sybase central on same machine where SUP has been installed.

          Regards,

          Jitendra

          (0) 
          1. Florian Kekule

            Hi Jitendra,

            sorry for my late reply. I downloaded it from Sybase but i can´t find the link anymore! The problem is that i don´t have access on the machine where SUP is installed!

            Regards,

            Florian

            (0) 
    2. Guven Bolukbasi

      Hello Florian,

      I remember that SUP APIs provide a way to encrypt the database. Can you check your client side code to see if you are encrypting the database? The encryption is done via the [setEncryptionKey:] method, more details are in the link below:

      http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01217.0212/doc/html/apr1272289920141.html

      If you are encrypting the database, then you will probably need that encryption key to be able to connect to the database.

      (0) 
  3. Sathis Kumar

    Hi Jitendra,

    I am getting this error while connecting the database

    “Could not connect to the database.

    Data source name not found and no default driver specified.”  Can you please tell me why am getting this error.

    Thanks in advance!

    Sathis

    (0) 
        1. Jitendra Kansal Post author

          Hi Sathis,

          this issue is related to some missing jar files. but i am unable to find where exactly the required jar files has to be pasted. i ll try once and let u know if i find something useful.

          Regards,

          Jitendra

          (0) 

Leave a Reply