Skip Headers
Oracle® Database Lite Administration and Deployment Guide
10g (10.0.0)
Part No. B12262-01
  Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

D Scripting Language for the Mobile Server

This document describes the scripting language for the Mobile Server. You can use scripting to perform batch processing tasks that are performed frequently by the administrator. You can write scripts for the Mobile Server in an INI text file and use the WSH tool to run your INI script. Topics include:

D.1 Description of the Syntax

This section describes the requisite parameters and syntax to enable you to accomplish the following tasks. Topics include:

Creating a User

Using the following syntax, you can create users to be included in a group.

[USER]NAME=<User's Name>PASSWORD=<User's Password>ENCRYPTED=<True or False; True if the password is encrypted, False if not>FULLNAME=<User's Full Name>PRIVILEGE=<User's privilege level as P, C,S, or null>

There are four options for setting the PRIVILEGE value for users. They are:

Creating a Group

Using the [GROUP] script, you can create a new group (if this group does not already exist) and add listed users to the group. If you use this entry and specify the name of a group that exists, all the users in the existing group will be removed and users who are listed will be added to this group.

The following syntax enables you to create a group.

[GROUP]NAME=<Group Name>USER=<User's name you want to add to this group>USER=<User's name you want to add to this group>USER=<User's name you want to add to this group>

Adding Users to a Group

Using the [ADDUSERTOGROUP] script, you can create a new group (if this group does not already exist) and add listed users to this group. You can also use this entry to add users to an existing group.

[ADDUSERTOGROUP]NAME=<Group Name>USER=<User's name you want to add to this group>USER=<User's name you want to add to this group>

Removing Users from a Group

Using the [REMOVEUSERFROMGROUP] script, you can remove listed users from a specified group.

NAME=<Group Name>USER=<User's name you want to remove from this group>USER=<User's name you want to remove from this group>

Creating Access Privileges

Using the [ACL] script, you can create a new ACL (if this ACL does not already exist). After creating the ACL, all the existing users will be removed and all the listed users will be added to this ACL.

Using the [GRANTACCESS] script, you can add users to the existing ACL.

The following syntax enables you to create access privileges for users and groups.

[ACL]APPLICATION=<Name of the application you want to creat ACL for>ROLE=<Role of the user; set the value as DEFAULT ROLE or ADMINISTRATIVE ROLE>USER=<User's name>ACCESS=<Set access status as ENABLED>ROLE=<Role of the user>USER=<User's name>ACCESS=<Set access status as ENABLED>ROLE=<Role of the group>GROUP=<Groups's name>ACCESS=<Set access status as ENABLED>

Granting Access

Using the [GRANTACCESS] script, you can create a new ACL (if this ACL does not already exist) and add listed users to this ACL.

[GRANTACCESS]APPLICATION=<Name of the application you want to add ACL for>ROLE=<Role of the user>USER=<User's name>ACCESS=<Access Status ENABLED/DISABLED>ROLE=<Role of the group>GROUP=<Groups's name>

Revoking Access

Using the [REVOKEACCESS] script, you can remove users that are listed in the specified ACL.

[REVOKEACCESS]APPLICATION=<Name of the application you want to revoke ACL for>ROLE=<Role of the user>USER=<User's name>ACCESS=<Access Status>ROLE=<Role of the group>GROUP=<Groups's name>

Creating Registries

Using the [REGISTRY] script, you can create registries.

[REGISTRY]APPLICATION=<Name of the application>NAME=<Registry Variable Name>VALUE=<Value for this variable>

Creating Snapshot Variables

Using the [SNAPSHOTVAR] script, you can create snapshot variables.

[SNAPSHOTVAR]NAME=<Name of the publication item>PLATFORM=<Platform for which this publication item is>VIRTUALPATH=<Virtual path of the application this publication itembelongs to>USER=<Name of the user who subscribes to this application>VAR=<Name of the Data Subsetting parameter, value of this parameter>USER=<Name of the user who subscribes to this application>VAR=<Name of the Data Subsetting parameter, value of this parameter>GROUP=<Name of the group which subscribes to this application>VAR=<Name of the Data Subsetting parameter, value of this parameter>

Deleting a User

Using the [DROPUSER] script, you can delete a user.

[DROPUSER]NAME=<User's Name>

Deleting a Group

Using the [DROPGROUP] script, you can delete a group.

[DROPGROUP]NAME=<Group's Name>

Deleting Access Privileges

Using the [DROPACL] script, you can delete access privileges provided to users.

[DROPACL]APPLICATION=<Name of the application you want to delete ACL for>ROLE=<Role of the user; set the value as DEFAULT ROLE or ADMINISTRATIVE ROLE>USER=<User's name>ACCESS=<Set access status as DISABLED>ROLE=<Role of the group; set the value as DEFAULT ROLE or ADMINISTRATIVE ROLE>GROUP=<Groups's name>ACCESS=<Set access status as DISABLED>

Deleting a Registry

Using the [DROPREGISTRY] script, you can delete a registry.

[DROPREGISTRY]APPLICATION=<Name of the application>NAME=<Registry Variable Name>VALUE=<Value for this variable>

Deleting Snapshot Variables

Using the following [DROPSNAPSHOTVAR] script, you can delete snapshot variables.

[DROPSNAPSHOTVAR]NAME=<Name of the publication item>PLATFORM=<Platform for which this publication item is>VIRTUALPATH=<Virtual path of the application this publication itembelongs to>USER=<Name of the user who subscribes to this application>VAR=<Name of the Data Subsetting parameter, value of this parameter>USER=<Name of the user who subscribes to this application>VAR=<Name of the Data Subsetting parameter, value of this parameter>GROUP=<Name of the group which subscribes to this application>VAR=<Name of the Data Subsetting parameter, value of this parameter>

D.2 Running a Script INI File

To run a script INI file using the wsh tool, use the following command.

WSH -c <filename.ini> mobileadmin/manager@webtogo.world

D.3 Examples

This section enables you to accomplish the following tasks and describes examples from a script file in INI format. Topics include:

D.3.1 Creating, Adding, and Granting Access

The following examples illustrate how to create users, groups, registries, access privileges, snapshotvar template variables, add users to a group, and add users to an ACL.

[DATABASE]TYPE=ORACLE#Creation or modification of users, groups, access privileges, registry,and snapshot variable entries using the following entries in the INI file:#[USER], [GROUP], [ACL], [REGISTRY],[SNAPSHOTVAR].# Create user JOHN#[USER]NAME=JOHNPASSWORD=johnENCRYPTED=falseFULLNAME=Sample1 User JohnPRIVILEGE=C## Create group 'Sample Users' contaning JANE, JOHN, JACK#[GROUP]NAME=Sample UsersUSER=JANEUSER=JOHNUSER=JACK## Set the ACL on the Sample3 application.# The following gives John, Jane, and Jack, plus all the users in thegroup# Sample Users access to the application#[ACL]APPLICATION=/sample3ROLE=Default RoleUSER=JOHNACCESS=ENABLEDROLE=Default RoleUSER=JANEACCESS=ENABLEDROLE=Default RoleUSER=JACKACCESS=ENABLEDROLE=Default RoleGROUP=Sample UsersACCESS=ENABLED## Add registry entry for user JOHN and a default value for the Sample3application to the Web-to-go Repository#[REGISTRY]APPLICATION=/sample3USER=JOHNNAME=USERCODEVALUE=1111## Add template variables.# You can specify user/group specific values for these variables#[SNAPSHOTVAR]NAME=RECORDINGSPLATFORM=WIN32VIRTUALPATH=/sample3USER=JOHNVAR=CODE, 1111USER=JACKVAR=CODE, 1111USER=JANEVAR=CODE, 2222GROUP=Sample UsersVAR=CODE, 2222##Add users to a group.#[ADDUSERTOGROUP]NAME=Sample UsersUSER=USER1USER=USER2##Grant Access to users.#[GRANTACCESS]APPLICATION=/sample3ROLE=Default RoleUSER=USER1ACCESS=ENABLEDROLE=Default RoleUSER=USER2ACCESS=ENABLEDROLE=Default RoleGROUP=Sample Users

D.3.2 Deleting, Removing, and Revoking Access

The following examples illustrate how to delete a user, group, registry and snapshotvar, remove users from a group, and revoke access.

#Deletion of users, groups, access privileges, registry and snapshotvariable entries using the following entries in#the INI file:#[DROPUSER], [DROPGROUP], [DROPACL], [DROPREGISTRY],[DROPSNAPSHOTVAR].## Dropuser JOHN#[DROPUSER]NAME=JOHN## Drop group 'Sample Users'#[DROPGROUP]NAME=Sample Users## Drop the ACL on the sample3 application.#[DROPACL]APPLICATION=/sample3ROLE=Default RoleUSER=JOHNACCESS=DISABLEDROLE=Default RoleGROUP=Sample UsersACCESS=DISABLED## Drop registry entriy for user JOHN from Sample3 application.#[DROPREGISTRY]APPLICATION=/sample3USER=JOHNNAME=USERCODE## Drop template variables for user JOHN and group 'Sample Users'#[DROPSNAPSHOTVAR]NAME=RECORDINGSPLATFORM=WIN32USER=JOHNVAR=CODE, 1111GROUP=Sample UsersVAR=CODE, 2222##Remove users from a group.#[REMOVEUSERFROMGROUP]NAME=Sample UsersUSER=USER1USER=USER2##Revoke access.#[REVOKEACCESS]APPLICATION=/sample3ROLE=Default RoleUSER=USER1ACCESS=DISABLEDROLE=Default RoleUSER=USER2ACCESS=DISABLEDROLE=Default RoleGROUP=Sample Users