DMS works off a schema defined in the repository. The portion of that schema that a client application can see is done through a publication. A publication can consist of 100% of that schema or a subset of it. If you add additional users to your Oracle backend db, and those user have access to the same schema then what ever syncing is done by the clients will be visible to the new users. If the new users establish a new schema and a publication has not been set up, then they cannot be synced to.
thanks for your reply Mike.
You have talked about a subset of the schema. Is it possible to create a publication by filtering the table rows by a user.
As an example,
I have a table called Orders on the backend DB. This table has a column called UserID. This UserID belongs to the mobile user in the Users table in my DB. Is it possible to create a publication for the Orders table by filtering on the UserID column for the mobile user? Is it possible to link a record in the Users table to a user created in the DMS?
Kindly refer to our docs. Oracle® Database Mobile Server Developer's Guide is a great place to start, please look at Chap 2, dealing with publications and publication items. You will need to set up synchronization type (manual, automatic), refresh mode, data subsetting (this is where you can select specific rows for specific users to access).
Have you purchased a license for Database Mobile Server yet? What type of application are you developing? What platforms are you planning on developing on? Do you need assistance in getting in contact with an Oracle sales rep?
in 10gr3 you could do :
open workbench create a publication, then in the publication item enter the e.g. select * from table where mycolumn:=mycolumnvar
mycolumnvar is the data subsetting value.then in webtogo page you go to each user and select datasubsetting and enter the value for the mycolumnvar (e.g. their id). this is how you tell olite how to sync.
if you dont want to create users in olite you could have one user then sync all (so all devices have the same info)
and then from inside your application you make the appropriate select statements so you retrieve the specific results.
i dont recommend this approach because if you are not careful it might be the case that 2 users update the same row and then you will get conflicts.
i guess 11g works pretty much the same on this one
Thanks for the info. I went though the docs and found the way to manage it. Our application is a Sales Force Automation solution for companies to manage their mobile sales force. We currently use MS SQL Server. We are planing to migrate to Oracle. Yes we have installed the necessary components.
there are many things you could do for that.
e.g. if the users are added in a table you could make a trigger each time a new user is entered and enter his info in another table (lets call it NewUsers). Then make a service that watches over this NewUsers table every lets say 5 mins(?) and if it finds a new user then it will go and add it in oracle lite as user. you can see the code in the other thread initiated by gambro2.
if the users are added by the handheld then you can make a web service that executes the code posted in gambro2 question that adds the new users.
if you perform a sync between olite database and another one(perhaps an erp) put the checks there.
i posted the answer in the other thread. ok just bare in mind that the solution is for 10gr3 which is the version we use here.
since you want the 11g you probably need the
code shouldnt be that diffrent (i dont think oracle changed this part much)
for instance about creating user you will look at
188.8.131.52 Create the Mobile Server User
- Create the
MobileResourceManagerobject. A connection is opened to the mobile server. Provide the schema name, password, and JDBC URL for the database the contains the schema (the repository).
- Create one or more users with the
createUsermethod. Provide the user name, password, the user's real name, and privilege, which can be one of the one of the following: "O" for publishing an application, "U" for connecting as user, or "A" for administrator. If NULL, no privilege is assigned.
Note:Always request a drop user before you execute a create, in case this user already exists.
- Commit the transaction, which was opened when you created the
MobileResourceManagerobject, and close the connection.
MobileResourceManager mobileResourceManager = new MobileResourceManager(CONS_SCHEMA, DEFAULT_PASSWORD, JDBC_URL); mobileResourceManager.createUser("S11U1", "manager", "S11U1", "U"); mobileResourceManager.commitTransaction(); mobileResourceManager.closeConnection();
If you do not want to create any users, you do not need to create the
its the same as the 10gr3. please check the other thread also
i also see it says
Use the Resource Manager APIs to..blablabla.. See the
oracle.mobile.admin.MobileResourceManagerin the Oracle Database Mobile Server JavaDoc, which is located off the
so you have all you need in your server already(jars)
- Create the
i can send you a sample project just email me at firstname.lastname@example.org
(your email is private here so i dont see it so i can send it to you)
my sample project is kinda sloppy but it gets the work done (as far as i remember:) )