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
- when you open it. A screen will be prompted like below:
- Open the UltraLite 12 Plugin. Click on Connect to a database
- Download the .udb file from device on the SUP server. Pass dba as user ID, sql as password.
- Browse the database file (.udb file)
- Once you are connected to UltraLite 12, you would be seeing the contents related to database created on iOS device.
- 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
Thanks for writing this . However, wondering how can you download the .udb file from the device ?
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
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
Hi Vikas,
i dont think so without connecting device to MAC machine (in case of iOS platform) we can do analysis.
Regards,
Jitendra
Nice Blog Bro. Keep it up.
thanks Midhun. 🙂
Bahu fine 🙂 🙂 🙂
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.
Hi Midhun,
i am not clear with your query. please explain.
Regards,
Jitendra
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.
Hi Guven,
can u put the snapshot of that error. would be helpful to trace
Regards,
Jitendra
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.
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
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.
Thanks.
Hi Jitendra,
when i want to connect to the udb file it says wrong or not existing encryption key. Any idea?
Thanks!
Hi Florian,
actually it should work without encrption key.
is it possible you to share the steps you are following with.
Regards,
Jitendra
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
Hi Jitendra,
i did it like you explained:
Thank you!
Regards,
Florian
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
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
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.
I didn´t thought about this although it´s pretty obvious! Of course this works 🙂
Thank you very much!
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
Hi Sathish,
can you please share snapshot of that error?
Regards,
Jitendra
Hi Jitendra,
Any luck to resolve the issue..? Please do let me know if there is clue.
Thanks
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
Thanks Jitendra,
Please do revert back to me if you find anything interesting.
Hellow Sathis Kumar,
How did you solve this issue?
Cheers
Hi Jitendra,
PF the SS.
Great!, thanks Jitendra.