on 06-20-2016 1:42 AM
Hi ,
Our iPad application uses UDB in iOS and Mobilink as middleware.
We used to have 4 publications. We modified it to 3 publications to improve Sync performance.
From iOS end, we upgrade UDB schema using sql file by executing below statement
ALTER DATABASE SCHEMA FROM FILE UDBSchema_v2.sql
As we removed a publication in Mobilink server, We have to drop publication at client side too. So, we added below 2 lines to drop publication and synchronization profile
DROP PUBLICATION [ IF EXISTS ] "pub_name"
go
DROP SYNCHRONIZATION PROFILE [ IF EXISTS ] "sync_profile"
go
But these are not working and it's throwing an error -131 (Syntax error)
It works If we remove IF EXISTS clause from the statements. We would like to add IF EXISTS in the query to make sure no error throws eventhough DROP statement executes if publication does not exist in UDB.
Please let me know if we are doing wrong here. Please suggest us the correct way.
Thanks,
Suman Kumar
Generally, the SQL file supplied to ALTER DATABASE SCHEMA FROM FILE would represent the schema that you want the remote to use. Is there a reason that the publication and sync profile need to be dropped after that ALTER?
The IF EXISTS was added to the DROP statements in v12. An example statement is:
DROP PUBLICATION IF EXISTS p;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We figured it out. ALTER would recreate the schema of UDB. But we thought, its modifies existing Schema.
So, here in SQL file, drop publication statement doesn't work as it alters whole publications.
Thanks for the help.
I have one more doubt.
Is there a way to get Publication Names of UDB. At Present, we are maintaining a plist file with Publication names and versions. We would like to avoid plist. So, I am looking for an alternate to fetch Publication names from UDB.
Is there a query that can be executed to fetch Publications info?
Please suggest me..
Thanks,
Suman Kumar
Hi Suman,
I might be wrong, but I believe there are a few errors in the statement.
If you were really using the statements such as the example, it would be error.
You shouldn't describe the brackets ("[" and "]") to the statements.
It shows an optional item in the document.
When the actual statement were correct, we will need the product version and build number.
Thanks,
Koichi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.