Oracle® Database Lite Administration and Deployment Guide
10g (10.0.0) Part No. B12262-01 |
|
Previous |
Next |
This document enables the Mobile Server Administrator to grant access privileges to mobile application developers and manage snapshots. Topics include:
The following sections describe the access feature of the Mobile Server. Topics include:
Section 6.1.1, "Granting or Revoking Application Access to Users and Groups"
Section 6.1.2, "Including or Excluding Users from Group Based Access"
This section enables the Administrator to grant or revoke application access to users and groups. Topics include:
Granting Application Access to Users
To grant application access to users, login to the Mobile Server. Using the Mobile Manager, navigate to the Users page and click the User Name link. The User Properties page appears. Click the Access link. As Figure 6-1 displays, the Access page displays a list of available applications. Select the applications that you want to grant access to and click Save.
Revoking Application Access to Users
To revoke application access to users, clear the check box displayed against an application name and click Save.
Note: Granting application access to an entire group gives each user in the group, access to the application. However, you can exclude certain users from accessing the application without removing them from the group. For more information, see the following section. |
This section enables the Administrator to include or exclude users from group based access. Topics include:
Using the Mobile Manager, you can modify group based access privileges to include or exclude users requiring access to mobile applications. To modify group based access privileges, click the Users link. The Users page lists existing groups and individual users.
Granting Group Based Access to Users
To grant group based access to users, navigate to the Users page and click the User Name link. The corresponding User Properties page appears. Click the Groups link. Select the group name that you want to include the user into and click Save.
Note: Existing users with privileges for group based access only can be excluded from group based access. |
Revoking Group Based Access to Users
To revoke group based access to users, navigate to the Users page and click the User Name link. The corresponding User Properties page appears. Click the Groups link. Clear the group name that you want to remove the user from and click Save.
Figure 6-2 displays the Add Group page.
A snapshot is a full set or a subset of rows of a table or view at a pre-determined time. It is created by executing an SQL query against the base table. Snapshots are either read-only or updatable. They vary in complexity.
This section describes how to manage snapshots. Topics include:
Read-only snapshots are used for querying purposes. Changes made to the master table are replicated to the snapshot by the Mobile Client.
Updatable snapshots provide updatable copies of a master table. You can define updatable snapshots to contain a full copy of a master table or a subset of rows in the master table that satisfy a value-based selection criteria. You can make changes to the snapshot which the Mobile Sync propagates back to the master table.
A snapshot can only be updated when all the base tables that the snapshot is based on have a primary key. If the base tables do not have a primary key, a snapshot cannot be updated and becomes read-only.
Your snapshot definition determines whether an updatable snapshot uses the complete or fast refresh method. The complete refresh method recreates the snapshot every time it is refreshed. The fast refresh method refreshes the snapshot's existing data. In general, the simpler your snapshot definition, the faster it is updated. For more information on the fast refresh method, see the Oracle Database Lite Developer’s Guide.
Snapshots are application-based. Every client that goes offline uses the same snapshot definition. As a result, every client downloads the same application data. In some cases, you may want to specify the data that your application downloads for each user. You can accomplish this by using snapshot templates.
A snapshot template is an SQL query that contains data subsetting parameters. A data subsetting parameter is a colon (:),
which is followed by an identifier name. For example:
:var1
When the Mobile Client creates snapshots on the client machine, it replaces the snapshot variables with user-specific values. By specifying different values for different users, you can control the number of rows returned by the query.
You can use the Packaging Wizard to specify a snapshot template variable in the same way that you create a snapshot definition for any platform.
Data subsetting parameters cannot be part of a string and therefore should not be enclosed in single quotation marks (')
. If you want to specify a string as the value of the data subsetting parameter, the string itself must contain single quotation marks. You can specify the values for the template variables using the Mobile Manager.
Examples
The following examples specify a different value for every user. By specifying a different value for every user, the Administrator can control the behavior and output of the snapshot template.
Example 1
Snapshot Template: select * from emp where deptno = :dno
Table 6-1 provides a sample set of snapshot query values specified for separate users.
Table 6-1 Snapshot Query Values for Separate Users
User | Value | Snapshot Query |
---|---|---|
John | 10 | select * from emp where deptno = 10
|
Jane | 20 | select * from emp where deptno = 20
|
Example 2
Snapshot Template: select * from emp where ename = :ename
Table 6-2 provides another sample snapshot query value.
Table 6-2 Snapshot Query Value for User Names
User | Value | Snapshot Query |
---|---|---|
John | 'KING' | select * from emp where ename = 'KING'
|
For more information on specifying data subsetting values using the Mobile Manager, see Chapter 4, "Administering Mobile Applications", Section 4.8, "Modifying Data Subsetting Parameters".