Docstoc

152

Document Sample
152 Powered By Docstoc
					Chapter 4


DMSA Module




            You can use DMSA to control access to BASIS, creation of databases, and which
            databases can be accessed. All of this access control information is maintained in the
            Authority Database. The DMSA module is also used to control the Kernel. DMSA can
            be used interactively, or DMSA commands can be placed in command procedures or
            scripts.




Using DMSA
            DMSA is a command-oriented interactive module. Like all interactive BASIS modules,
            DMSA supports an extensive explain feature, command correction, definition of user
            commands and the command procedure language. You must supply a valid UID and
            UPW to use the module. When DMSA has been started, it issues a prompt for further
            commands.

            To use DMSA enter:

                dmsa command_parameters

            The default module command parameters are

            Windows

                uid=id upw=pw, aids=yes, input=$STDIN, output=$STDOUT, vf=$DM_VOC%




                                                                                 DMSA Module  79
              UNIX

                   uid=id upw=pw, aids=yes, input=$STDIN, output=$STDOUT, vf=$DM_VOC

              VMS

                   UID=id, UPW=pw, AIDS=YES, INPUT=SYS$INPUT, +
                      OUTPUT=SYS$OUTPUT, VF=DM$VOC

              Command Parameters
              uid=id

              User identification. If the UID is not entered on the command line, the system will
              prompt for it.

              upw=pw

              User password. If it is not entered on the command line, the system will prompt for it.

              aids=yes | no

              The default is YES. The aids parameter indicates if the user will receive a prompt to
              review the user aids of a BASIS interactive program. If aids=yes the user is prompted
              with the message, “Do you want to review the user aids of this program (YES or NO)? >”
              If the response is yes, BASIS prompts with the option to review these topics:
                               -     The meaning of prompts

                               -     The standard syntax notation

                               -     The explain feature

                               -     How to enter commands

                               -     The mode options

                               -     The break feature




80  DMSA Module
input=fd

The terminal or a sequential file of variable length records. The input file contains
answers to the prompts produced by the program.


            On this operating system           The default is

            Windows                            $STDIN

            UNIX                               $STDIN

            VMS                                SYS$INPUT

output=fd

This will be a standard output file or the terminal. This file is used to list all error
messages, prompts, and program output.


            On this operating system           The default is

            Windows                            $STDOUT

            UNIX                               $STDOUT

            VMS                                SYS$OUTPUT

vf=fd

A valid vocabulary file which contains the DMSA‟s messages.

Note:      The default file descriptor is a “sysgen” parameter, so it may be different at your
site.




                                                                            DMSA Module  81
              Windows

              Type dmsa ? to see the default file descriptor.
                   DMSA ?
                   The default command is:
                   dmsa uid=,upw=,aids=yes,input=$STDIN,

                   output=$STDOUT,VF=$DM_VOC%
                   NORMAL TERMINATION - DMSA

              UNIX

              Type dmsa \? to see the default file descriptor.
                   DMSA \?
                   The default command is:
                   dmsa uid=,upw=,aids=yes,input=$STDIN,
                   output=$STDOUT,VF=$DM_VOC
                   NORMAL TERMINATION - DMSA

              VMS

              Type DMSA ? to see the default file descriptor.
                   $ DMSA ?
                   The default command is:
                   DMSA UID=,UPW=,AIDS=YES,INPUT=SYS$INPUT,
                   OUTPUT=SYS$OUTPUT,VF=DM$:DMVOC.VF
                   NORMAL TERMINATION - DMSA
                   $



                        On this operating system           The default is

                        Windows                            %DM_VOC%

                        UNIX                               $DM_VOC

                        VMS                                DM$VOC




82  DMSA Module
Commands
They are grouped according to their function:

Basic Commands:

    SIGNON
    SIGNOFF
    EXIT{/ABNORMAL}
    ?
    SHOW
    WAIT

User Registration:

    REGISTER
    REREGISTER
    UNREGISTER
    SHOW/USERS

User Authorization:

    AUTHORIZE
    UNAUTHORIZE
    SHOW/AUTHORIZATION

Authority Database Maintenance:

    ASSIGN
    BACKUP/ADB
    ERASE/DB
    RESTORE/ADB
    REORDER/ADB
    SALVAGE/ADB
    SET/SYSGEN
    SHOW/SYSGEN
    SHOW/DATABASES

Monitor Kernel Status:

    SHOW/LINES
    SHOW/SIGNONS
    SHOW/OPENS
    DUMP




                                                DMSA Module  83
              Control Kernels:

                    BEGIN
                    TERMINATE
                    DESTROY

              Control Kernel Users:

                    DISCONNECT
                    DROP




Communicating with a Kernel
              You can use DMSA to send and receive information to and from a Kernel because DMSA
              can connect with a Kernel process. The connection is accomplished by the SIGNON
              command. DMSA needs to know which node is running the Kernel process and an
              identifier.

              When the DMSA command does not have a KERNEL parameter, it uses the
              DM_PRIMARY_KERNEL symbol to determine which Kernel to communicate with.
              DMSA uses this symbol value to search the Kernel Directory to acquire an ordered search
              list. Each entry in the list contains the node name where that Kernel can run and any
              other information required to connect DMSA to that Kernel. If
              DM_PRIMARY_KERNEL has no value, DMSA uses Kernel 1 of the user‟s default
              Kernel set. This Kernel is assumed to be on the user‟s current node.

              Windows

              The default Kernel set is designated by the environment variable
              DM_DEFAULT_KERNEL_SET in the Windows registry.

              UNIX, VMS

              The default Kernel set is designated by the CCF file name derived from the
               UNIX                          environment variable DM_CCF

               VMS                           logical name DM$CCF

              All

              Kernel Number 1 is assumed. For information about environment variables, see BASIS
              Reference, “Environment Variables.”


84  DMSA Module
It is possible for DMSA to be connected with multiple Kernels. The DMSA commands
SIGNON, SIGNOFF, SHOW/LINES, SHOW/SIGNONS, SHOW/OPENS, DUMP,
PEEK, POKE, BEGIN, TERMINATE, DESTROY, DISCONNECT, and DROP have a
KERNEL parameter. The purpose of this parameter is to indicate to which Kernel the
command pertains. The value for this parameter can be either a Kernel Number or a
Kernel Name.
When a Kernel Number is specified, the indicated Kernel is within the Kernel Set of the
user‟s primary Kernel. A user‟s primary Kernel is indicated by the symbol
DM_PRIMARY_KERNEL or it is the corresponding Kernel number of the user‟s default
Kernel set. For example, assume the DMKA1 is the user‟s primary Kernel and is Kernel
Number 1 of the set. Also, assume that DMKA2 is in the same set and is Kernel Number
2. The command SHOW/SIGNONS KERNEL=2 would show the signons for Kernel
DMKA2 since it is Kernel Number 2 of the set containing the user‟s primary Kernel.
Using a Kernel Number allows the user to communicate with Kernels within the set, but
not with Kernels outside the set.
As an alternative to specifying a Kernel Number, you can specify a Kernel Name as a
value for the KERNEL parameter. This type of Kernel specification allows you to
communicate with Kernels outside the set containing the user‟s primary Kernel. The value
specified for the KERNEL parameter is used to search the Kernel Directory to find the
proper Kernel process with which to communicate. For example, assume that the
DMKB1 is the user‟s primary Kernel and that DMKB1 is not in the same set as Kernels
DMKA1 and DMKA2. While in DMSA, it is possible to enter the command
SHOW/SIGNONS KERNEL=DMKA2 to see the signons for Kernel DMKA2 even
though Kernel DMKA2 is not in the same Kernel Set as DMKB1 (the user‟s primary
Kernel).

You don‟t usually need to use the SIGNON command. If a command is entered such that
a connection between DMSA and a Kernel is necessary (most commands require this), a
SIGNON is performed automatically if a connection has not been established. The
connection with a Kernel is maintained until you enter the SIGNOFF command or the
DMSA session ends.

Updating the Authority Database
Certain DMSA commands update the Authority Database (ADB). Kernel Number 1 (of
the Kernel set) must perform all the updates to the ADB. Since DMSA uses the Kernel
referred to by DM_PRIMARY_KERNEL, this symbol must be set to Kernel Number 1 of
the Kernel Set.

The commands requiring DM_PRIMARY_KERNEL to be Kernel Number 1 are:
ASSIGN, AUTHORIZE, UNAUTHORIZE, REGISTER, REREGISTER, and
SET/SYSGEN. This requirement applies only to commands that update the ADB.
DM_PRIMARY_KERNEL need not be set to Kernel Number 1 for the other DMSA
commands.



                                                                     DMSA Module  85
Basic Commands
              SIGNON
              The SIGNON command connects a DMSA session to a Kernel. Because DMSA
              commands (such as SHOW/USERS) automatically connect to the appropriate Kernel, the
              SIGNON command is rarely used.

                   SIGNON Kernel=kernel


               Kernel=knumber              Specifies a Kernel number from 1 to 9 or a Kernel Name
                                           of 1 to 5 characters in length.


              SIGNOFF
              The SIGNOFF command disconnects a DMSA session from a Kernel.

                   SIGNOFF Kernel=kernel


               Kernel=knumber              Specifies a Kernel number from 1 to 9 or a Kernel Name
                                           of 1 to 5 characters in length.


              EXIT
              The EXIT command terminates a DMSA session. All connected Kernels are
              automatically disconnected.

                   EXIT{/Abnormal}


               /Abnormal                   Specifies that the DMSA session is to be terminated
                                           abnormally. This parameter is typically used when the
                                           DMSA module is executed from within a server operating
                                           system command script.




86  DMSA Module
?
The ? displays descriptive information regarding the last prompt or message issued.

    ?{command} | {command parm} | {stem}*


{command}                      Indicates the command for which the explanation is
                               displayed.

{command_parm}                 Indicates the command parameter for which the
                               explanation is displayed.

{stem}*                        Indicates the topic names prefixed by „stem‟ are listed.


SHOW
The SHOW command has several forms. For specific descriptions, please refer to the
individual SHow commands.

    SHow{/showoption}


{/showoption}                  Specifies one of the following options: Authorization
                               Databases, Lines, Opens, Signons, SYSgen, Users


WAIT
The WAIT command causes a pause in command execution for a specified number of
seconds.

WAIT seconds


seconds                        Specifies the number of seconds to pause. The seconds
                               value is a real or integer number from 0 to 300.




                                                                       DMSA Module  87
User Registration
              REGISTER
              The REGISTER command establishes a new BASIS user identification by creating a user
              record in the Authority Database. Each user ID is assigned a unique user number.

              Windows

              REGister UID=id, UPW=pw
                      {, UAC=uac}
                      {, PRIVileges=(priv_list)}
                      {, SIGNonquota=signon}

              UNIX, VMS

              REGister UID=id, UPW=pw
                      {, UAC=uac}
                      {, TERMinal=term}
                      {, PRIVileges=(priv_list)}
                      {, SIGNonquota=signon}

              UID=id

              User identification. A user name can be up to 32 characters in length and may be an
              integer, literal, or identifier. Identifiers must start with a letter, and then may contain
              letters and numbers. If the UID is not entered, the system will prompt you for it.

              UPW=pw

              User password. The password can be up to 64 characters in length and may be an integer
              literal (from 3 to 64 characters), or identifier. UPW identifiers must start with a letter, and
              then may contain letters, numbers, and if registered as a literal, special characters.

              WARNING: Open Text recommends that you use caution when using special characters
                       in a UPW, as certain characters could prevent you from entering the UPW
                       on the command line because of a conflict with the operating system you are
                       using.

              If you enter the password in uppercase characters, the system will recognize the password
              if the user enters it in uppercase or lowercase characters. If you enter the password in
              lowercase letters, the system will recognize the password only if the user enters the
              password in lowercase characters. Also, you can control password case-sensitivity by
              modifying the UPWEXACTCASE Sysgen parameter.



88  DMSA Module
Note: When you enter the UPW as a literal, you must use single quotes. Double quotes
      are not permitted.

UAC=uac

Indicates the user account number. The uac must be in one of these forms:
         *
         integer
         identifier literal of 1 to 12 characters

If not specified, the * is used to indicate the default site account number.

TERMinal=term

Windows

Not applicable.

UNIX

Indicates the user terminal. The term must be of the form * or VT100.

If not specified, the * is used to indicate the default site terminal.

VMS

Indicates the user terminal. The term must be in one of the forms:


        *                VT100           VT52             EDT100         EDT52

If not specified, the * is used to indicate the default site terminal.

PRIVileges=(priv_list)

Indicates the user signon privileges. There are no default signon privileges. The priv_list
must include one or more of:


ALL           Assigns all signon privileges.

CREATE        Allows the user to create a database.

REG           Allows a user to use the DMSA module to REGISTER new users and to
              REREGISTER and UNREGISTER old users.



                                                                          DMSA Module  89
               OP          Allows a user to perform OPERATOR functions with the DMSA module.

               SA          Allows use of the DMSA module to perform special tasks related to the
                           use of BASIS at a site. Users with this privilege are System
                           Administrators.

               WIZ         Allows BASIS system programmers to perform special functions.

              SIGNonquota=signon

              Indicates the number of times the same UID may be simultaneously signed on to a Kernel.
              The signon must be a value from 1 to 511. The default is 1.

              Required privileges: SA or REG

              See Example 1.

              REREGISTER
              The REREGISTER command modifies the password, account number, terminal and/or
              signon privileges and quota of an already registered user identification by updating the
              record in the Authority Database. See the “Command Parameters” section above for
              descriptions of the UID and UPW parameters. The REREGISTER command allows the
              PRIVILEGES parameter to have a value of “NONE”, which indicates that the user is to
              have no signon privileges.

              Windows

              REREGister UID=id
                    {, UPW=pw}
                    {, UAC=uac}
                    {, PRIVileges=(priv_list)}
                    {, SIGNonquota=signon}

              UNIX, VMS

              REREGister UID=id
                    {, UPW=pw}
                    {, UAC=uac}
                    {, TERMinal=term}
                    {, PRIVileges=(priv_list)}
                    {, SIGNonquota=signon}

              Required privileges: SA or REG. See Example 2.




90  DMSA Module
UNREGISTER
The UNREGISTER command removes an already registered user identification by
deleting the record from the Authority Database. The unique user number is released.

UNREGister UID=id

UID=id

Indicates the user identification.

Required privileges: SA or REG

See Example 3.

SHOW/USERS
The SHOW/USERS command displays the registration parameters associated with user
identifiers.

SHow/Users {UID=}id | *

id

Indicates the user identification of a single user.

*

Indicates all users.

Required privileges: SA or REG

See Examples 1, 2, and 3.




                                                                     DMSA Module  91
User Authorization
              AUTHORIZE
              The AUTHORIZE command assigns and reassigns user access to database models. The
              access entry includes a priority level, privileges, and read and write access codes.

              AUthorize UID=id, DB=database.model
                      {,PRIVileges=(priv_list)}
                      {,PRIORity=prior}
                      {,READ=read_access}
                      {,WRITE=write_access}

              UID=id

              Indicates the user identification.




92  DMSA Module
DB=database.model

Indicates the database and model name(s) the user may access. The database.model must
be in one of the forms:


db.model             Assign and reassign access to a specific database and model.

db.$ALL              Assign and reassign access to all models of a specific database.

$ALL.$ALL            Assign and reassign access to all models of all databases.

db.*                 Reassign (only) access to all models of a specific database.

*.*                  Reassign (only) access to all models of all databases.

PRIVileges=(priv_list)

Indicates the user‟s privileges for the database model. The privileges are


GET                  Allows a user to read view records by using the GET and
                     OBTAIN commands and to perform FIND commands.

ADD                  Allows a user to add new records to the database with the ADD
                     command.

MOD                  Allows a user to change an existing record with the REPLACE
                     command.

DEL                  Allows a user to delete a record with the DELETE command.

ASSIgn               Allows a user to change or delete a field value in the database with
                     the DELETE or ASSIGN commands.

HOLD                 Allows a user to put a “hold” on a view record for an indefinite
                     period of time with the HOLD command.

UNHOLD               Allows a user to “unhold” a record put on hold by someone else.
                     Normally, the user who put the record on hold must release it.
                     This privilege allows a user to use the UNHOLD command to
                     release any view record.




                                                                       DMSA Module  93
               EXCL                  Allows a user to OPEN the database with INTENT=EXCLUSIVE
                                     or to specify an EX view list on a START command.

               PROT                  Allows a user to specify a PR or PW view list on a START
                                     command.

               DBA                   Allows use of the DMDBA module to perform special tasks
                                     related to the database including authorizing new users and
                                     changing the definition of the database.

               BYPASS                Allows a user to override all security and view restrictions. It
                                     should be granted sparingly.

               ALL                   Allows a user to have all the above privileges.

              The default privileges are ADD, ASSIGN, GET HOLD, MOD and DEL.

              PRIORity=prior

              Indicates the processing priority level. The prior must be from 0 to 15. If not specified, 8
              is used. Note: The DM_SCHEDULE_PRIORITY environment variable must be set
              before the user priority can take effect. For more information, see “Priority Scheduling,”
              page 259.

              READ=read_access

              Indicates the user read access code used in privacy tests. If not specified, 0 is used.

              WRITE=write_access

              Indicates the user write access code used in privacy tests. If not specified, 0 is used.

              Required Privileges: DBA

              See Examples 4a to 5b.

              UNAUTHORIZE
              The UNAUTHORIZE command revokes user authorization that was granted by the
              AUTHORIZE command.

              UNAUthorize UID=id, DB=database.model

              UID=id

              Indicates the user identification.


94  DMSA Module
DB=database.model

Indicates the database and model name(s). The database.model must be in one of the
forms:


db.model               Revoke access to a specific database and model.

db.$ALL                Revoke access to any model of a specific database. User may still
                       be authorized for specific models of the named database.

$ALL.$ALL              Revoke access to any model of any database. User may still be
                       authorized for specific databases and models.

db.*                   Revoke access to all models of the specified database.

*.*                    Revoke access to all databases and models.

Required privileges: DBA

See Examples 6a to 6f.

SHOW/AUTHORIZATION
The SHOW/AUTHORIZATION command displays the authorization parameters
associated with user identifications.

SHow/Authorization UID=id, DB=database{,MODEL=model}

UID=id

Indicates the user identification of a single user or “*”. An id of “*” indicates all user
identifications for a specific database. If UID=* is used, DB=* cannot be used.

DB=database

Indicates the database name or “*”. A database of “*” indicates all databases for a
specific user. If DB=* is used, UID=* cannot be used.




                                                                          DMSA Module  95
              MODEL=model

              Indicates the model name or “*”. A model of “*” indicates all models for a specific
              database.

              Required privileges: None

              See Examples 4a to 6f.




Authority Database Maintenance
              ASSIGN
              The ASSIGN command changes the attributes associated with a database by updating the
              database record in the Authority Database. The Kernel and DDB parameter values are
              not actually changed until the database is reopened. The SHOW/DB command displays
              the status CHANGEPEND if such changes are pending for a database.

              ASSIgn{/DB} {DB=}database_name
                     {,OWNer=id}
                     {,ACcount=account}
                     {,DDB=„ddb_fd‟}
                     {,PRIORity=prior}
                     {,Kernel=kernel}
                     {,SALOCK=NO | YES}
                     {,DEACTivate=NO | YES}
                     {,REMOTE=NO | YES}
                     {,DMRLOCK=NO | YES}
                     {,READonly=NO | YES}

              DB=database_name

              Indicates the database name.

              OWNer=id

              Indicates the identification of the user who created the database. Only the current owner
              can change the ownership.

              Account=account

              Indicates the database account number. Either DBA or SA privilege is required.




96  DMSA Module
DDB=„ddb_fd‟

Indicates the file descriptor of the Definition Database File associated with the database.
Either DBA or SA privilege is required.

PRIORity=prior

Indicates the processing priority level from 1 to 15 associated with the database. When a
database is originally created, the priority level 8 is assigned. SA privilege is required.
Note: The DM_SCHEDULE_PRIORITY environment variable must be set before the
user priority can take effect. For more information, see “Priority Scheduling,” page 259.

Kernel=kernel

Indicates a Kernel number from 1 to 9 or a Kernel Name of 1 to 5 characters in length to
which the database is assigned. When a database is created, it is assigned to Kernel 1 of
the Kernel Set containing the user‟s primary Kernel (indicated by the symbol
DM_PRIMARY_KERNEL). The keyword $ALL indicates the database is available for
read-only usage by all Kernels of the Kernel Set. The database must be a read-only
database to use the keyword $ALL (see the READonly parameter below). It is not
possible to assign a database to a Kernel that is outside the Kernel Set currently
controlling the database. SA privilege is required.

SALOCK= NO | YES

Locks all files for the specified database, even to DBAs. The files cannot be opened.
Use this before manually restoring or moving database files. SA privilege is required.
NO           Unlocks the database. This is the default when the database is initially
             created.

YES          Locks the database.

DEACTivate= NO | YES

Deactivates the RDB files for the specified database from general use; it allows the DBA
to update the DDB. When the database is deactivated, the actions allowed are
    DMDBA, DMDDBE, and DMDDBR to update or work with the DDB (DMDDBR
     is not applicable to BASIS on Windows.)
    DMJ to replay journals
    HVU to update with OPEN/DIRECT
    DMR to drop or create indexes




                                                                         DMSA Module  97
              Valid values for DEACTIVATE are
               NO         Activate the database. This is the default when the database is initially
                          created.

               YES        Deactivate the database. The deactivation occurs after all users are out of the
                          database. DEACTIVATE=YES does not prevent users from logging in to
                          the database.

              You can deactivate selected files with DMDBA ADMINISTRATIVE TASKS, leaving
              part of the database available for general use.

              DMRLOCK= NO | YES

              Indicates if the database is locked by the DMR utility.


               NO       The database is not locked by DMR. When the database is originally created,
                        the value NO is assigned. Requires database ownership to change.

               YES      The database is locked by DMR.

              REMOTE= NO | YES

              Indicates whether the database is opened for remote update by another BASIS utility
              (HVU, for example).

               NO       The database is not open. When the database is originally created, the value
                        NO is assigned. Requires database ownership to change.

               YES      The database is open.

              READonly= NO | YES

              Indicates if the database may be opened for reading or updating.
               NO       The database may be opened for reading or updating purposes. When the
                        database is originally created, the value NO is assigned. Either DBA or SA
                        privilege is required.

               YES      The database may be opened for reading but not for updating purposes.

              Required signon or database privileges: SA or DBA
              See Example 11.


98  DMSA Module
BACKUP/ADB
The BACKUP/ADB command creates a second copy of the Authority Database. Note
that the production Authority Database cannot be copied while Kernel Number 1 is
running.

BACKUP/ADB {,OLD=„old_fd‟} {,NEW=„new_fd‟}

OLD=„old_fd‟

Indicates the file descriptor of the Authority Database File to be copied. If not supplied,
the file descriptor defined by the SET/SYSgen ADB parameter is used.

NEW=„new_fd‟

Indicates the file descriptor of the file to be created. If not supplied, the file descriptor
defined by the SET/SYSgen BAKADB parameter is used.

Required signon privileges: SA

See Example 13.

ERASE
The ERASE command allows the System Administrator or a Database Administrator to
delete a database from the Authority Database. All authorizations to all models of the
database are also revoked. The files for the database ARE NOT deleted.

ERASE{/DB} {DB=}database_name

DB=database_name

Indicates that the database is to be erased.

Required signon privileges: SA or DBA

See Example 11b.




                                                                            DMSA Module  99
              REGISTER/DB
              The REGISTER/DB command is used to create a database record in the Authority
              Database.

              REGister/DB DB=database_name
                      ,DDB=„ddb_fd‟
                      ,OWNer=id
                      {,THESaurus=NO | YES}


              DB=database_name

              Indicates the database name.

              DDB=„ddb_fd‟

              Indicates the file descriptor of the Definition Database File associated with the database.

              OWNer=id

              Indicates the identification of the user who will own the database.

              THESaurus = NO | YES

              Indicates whether or not the database is a thesaurus.
               NO       The database is not a thesaurus.

               YES      The database is a thesaurus.

              Required signon or database privileges: SA or CREATE

              See Example 11c.

              RESTORE/ADB
              The RESTORE/ADB command replaces a compromised Authority Database with the last
              backup copy. Any changes made to the Authority Database since the last backup are lost.
              Note that the production Authority Database cannot be restored while Kernel Number 1 is
              running.

              RESTore/ADB {,OLD=„old_fd‟} {,NEW=„new_fd‟}




100  DMSA Module
OLD=„old_fd‟

Indicates the file descriptor of the backup Authority Database File. If not supplied, the
file descriptor defined by the SET/SYSgen BAKADB parameter is used.

NEW=„new_fd‟

Indicates the file descriptor of the file to be created. If not supplied, the file descriptor
defined by the SET/SYSgen ADB parameter is used.

Required signon privilege: SA

See Example 14.

REORDER/ADB
The REORDER/ADB command removes deleted records from the old Authority
Database and copies the remaining records to a new Authority Database File. The new
Authority Database is rebuilt and the records are reordered in the most efficient order.
Note that the production Authority Database cannot be reordered while Kernel Number 1
is running.

The Kernel does not automatically reclaim deleted ADB space when you delete databases
and users. If you do many updates (adding/deleting users and/or databases) you can
eventually “fill up” the ADB space allocation. When this happens, you‟ll need to
REORDER the ADB. REORDER will compress the ADB and remove the “dead” space.

REORder/ADB
      {,OLD=„old_fd‟}
      {,NEW=„new_fd‟}
      {,REGSA=id}

OLD=„old_fd‟

Indicates the file descriptor of the Authority Database File to be reordered. If not
supplied, the file descriptor defined by the SET/SYSgen ADB parameter is used.




                                                                          DMSA Module  101
              NEW=„new_fd‟

              Indicates the file descriptor of the reordered Authority Database File. If not supplied,


                        On this operating system           This file descriptor is used

                        Windows                            %DM_RUNDMK%\newadb.dm

                        UNIX                               DM_RUNDMK/newadb.dm

                        VMS                                DM$RUNDMK:NEWADB.DM;0

              REGSA=id

              Indicates the user identification of the user to be granted SA privilege in the reordered
              ADB.

              Required signon privilege: SA

              See Example 14.

              SALVAGE/ADB
              The SALVAGE/ADB command recreates an Authority Database File when both the
              production Authority Database File and its backup have been compromised. BASIS
              attempts to read records from one of the compromised files and copy “good” records to
              the new file. Next the index structures are rebuilt and the Authority Database is
              reordered. Note the Kernels cannot run with a compromised ADB. Once the ADB has
              been salvaged and placed back into production, the BEGIN command is used to begin
              Kernel Number 1.

              SALVage/ADB
                    {,OLD=„old_fd‟}
                    {,NEW=„new_fd‟}
                    {,REGSA=id}

              OLD=„old_fd‟

              Indicates the file descriptor of the compromised Authority Database. If not supplied, the
              file descriptor defined by the SET/SYSgen ADB parameter is used.




102  DMSA Module
NEW=„new_fd‟

Indicates the file descriptor of the salvaged Authority Database File. If not supplied,


          On this operating system           This file descriptor is used

          Windows                            %DM_RUNDMK%\newadb.dm

          UNIX                               DM_RUNDMK/newadb.dm

          VMS                                DM$RUNDMK:NEWADB.DM;0

REGSA=id

Indicates the user identification of the user to be granted SA privilege in the salvaged
ADB.

Required signon privilege: SA

SET/SYSGEN
The SET/SYSGEN command changes the values of some of the System Generation
parameters. (Not all System Generation parameters can be changed dynamically.)

SET/SYSgen keyword=value_{,keyword=value}0:59

keyword=value

Indicates a System Generation parameter and an appropriate value. (See the chart below.
The values of the parameters preceded with a “*” can be changed using the SET/SYSgen
command.)

Required signon privilege: SA

See Example 12.

SHOW/SYSGEN
The SHOW/SYSGEN command displays the values of the System Generation
parameters. The MAJOR parameter (SHOW/SYSGEN MAJOR) displays the parameters
that can be changed by using the SET/SYSGEN command.

SHow/SYSgen {parameter_name}0:60



                                                                        DMSA Module  103
              parameter_name

              Indicates the name of one or more parameters listed on the chart in the section below.

              See Examples 12, 13, and 14.

              SHOW/DATABASE
              The SHOW/DATABASES command displays the status of a database and some of its
              attributes that are stored in a database record in the Authority Database.

              SHow/Databases {DB=}database | * {,DDB=NO | YES}

              or

              SHow/DB {DB=}database | * {,DDB= NO | YES}

              database

              Indicates the database name or “*”. A database of “*” indicates all databases.

              DDB= NO | YES

              Indicates if the file descriptor of the Definition Database is displayed.


               YES         The file descriptor is displayed.

               NO          The file descriptor is not displayed (default).

              See Example 11.

              SHOW/SYSGEN and SET/SYSGEN (*) Parameters
              The parameters prefaced by (*) can be changed with the SET/SYSGEN command. You
              must restart the Kernel to make the changes effective.

              ACTIVE_SETS

              Number of active result sets per user.

              *CACHE_A_LW

              Length in words of the Kernel‟s major cache.




104  DMSA Module
*CACHE_B_LW

Length in words of the Kernel‟s minor cache.

*CACHE_C_LE

Root node pointer cache length in entries.

*CACHE_I_LE

Number of entries in the Kernel‟s index descriptor cache.

*CACHE_L_LC

Legal list cache length in characters.

*CACHE_L_LE

Legal list cache length in entries.

*CACHE_R_LE

Record area distribution cache length in entries.

*CURSORS

Number of obtain cursors.

*DBS_PER_KM

Number of databases that can be opened per Kernel.

DBS_PER_USER

Number of databases that can be opened per user.

DUMPFILE

File descriptor of the DMK Dump File skeleton.

*EXPIRE_DAYS

Number of days until deleted record‟s header expires.




                                                            DMSA Module  105
              *FILES_PER_KM

              Number of files that can be opened per Kernel.

              KMUWF

              User Work File skeleton for BASIS Kernel.

              *KM_ACC

              BASIS accounting indicator.

              *KM_DBFP_LE

              Number of entries in the Kernel‟s database file pool.

              *KM_KS_LC

              Key space length in characters.

              *KM_LS_LE

              Lock space length in entries.

              *KM_LTH_EXTLC

              Length in characters of an extent in the long term heap.

              *KM_LTH_NREXT

              Maximum number of extents in the long term heap.

              *KM_PP_LE

              Number of pages in the Kernel‟s page pool.

              *KM_STH_EXTLC

              Length in characters of an extent in the short term heap.

              *KM_STH_NREXT

              Maximum number of extents in the short term heap.




106  DMSA Module
*KM_THREADS

The number of threads per Kernel. This parameter controls the number of requests that
the Kernel can process simultaneously.

*KM_TS_LW

Length in words of each thread stack.

*KM_TT_LE

Number of entries in the Kernel‟s translation table.

*KM_TTBUF_LC

Length in characters of the Kernel‟s translation buffer.

*KM_VALBUF_LC

Code translation cache length in characters.

*KM_WS_LW

Kernel‟s work space length in words.

MAX_KM

Number of Kernels that can be used.

MDDB

File descriptor of the Master Definition Database File.

*OPEN_INDEXES

Number of CBCD entries.

RUNSTEM

Prefix of a RUN command.

RW_IN_FQM

Make RW callable from FQM.




                                                                   DMSA Module  107
              *SIGNON_LIMIT

              Maximum number of communication lines allocated for each kernel in the kernel set.

              SYSLOG

              DMK System Log File skeleton.

              UNIX, VMS

              TERM_DEFAULT

              Default terminal name for the site.

              VMS

              TERM_EDT100

              Support the EDT100 keypad (YES | NO).

              TERM_EDT52

              Support the EDT52 keyboard (YES | NO).

              TERM_VT52

              Support the VT52 terminal (YES | NO).

              UNIX, VMS

              TERM_VT100

              Support the VT100 terminal (YES | NO).

              All

              *TRAN_PER_MIN
              Expected number of transaction per minute per Kernel.

              *UID_SDIR_LP
              Length in pages of a UID subdirectory in the ADB.

              *USERS_PER_KM
              Number of users allowed to be connected to each Kernel.



108  DMSA Module
Monitoring Kernel Status
          SHOW/LINES
          The SHOW/LINES command displays the status of the Inter-Process Communication
          (IPC) lines for a Kernel.

          SHow/Lines_Kernel=kernel

          Kernel=kernel

          Indicates a Kernel number from 1 to 9 or a Kernel name of 1 to 5 characters in length.

          See Examples 7, 8, 9, and 10b.

          SHOW/SIGNONS
          The SHOW/SIGNONS command displays the status of all users currently signed on to a
          Kernel.

          SHow/Signons Kernel=kernel

          Kernel=kernel

          Indicates a Kernel number from 1 to 9 or a Kernel name of 1 to 5 characters in length.

          See Examples 10a and 10b.

          SHOW/OPENS
          The SHOW/OPENS command displays the status of all the databases a Kernel has
          opened.

          SHow/Opens Kernel=kernel

          Kernel=kernel

          Indicates a Kernel number from 1 to 9 or a Kernel name of 1 to 5 characters in length.




                                                                               DMSA Module  109
              DUMP
              The DUMP command causes a Kernel to write its system tables to a dump file and then
              create a new dump file for future use. The dump file can be displayed using the DMAD
              utility.

              DUMP Kernel=kernel

              Kernel=kernel

              Indicates a Kernel number from 1 to 9 or a Kernel name of 1 to 5 characters in length.

              Required signon privileges: SA or OP.




Controlling Kernels
              BEGIN
              The BEGIN command starts the execution of the Kernel module. Expect a short pause
              when the BEGIN command is used. Although the DMSA> prompt is returned in
              response to the BEGIN command, it may take additional time for the Kernel to begin
              execution.

              Windows

              The BEGIN command does not use the value of DM_PRIMARY_KERNEL when a
              number is specified for the KERNEL parameter. Rather, the node is assumed to be the
              user‟s current node and the environment variable DM_DEFAULT_KERNEL_SET
              designates the Kernel set of the given Kernel number. Any user can BEGIN a Kernel.
              Using the BEGIN command is the equivalent of starting a Kernel service from the
              Windows Control Panel.

              UNIX

              The BEGIN command does not use the value of DM_PRIMARY_KERNEL when a
              number is specified for the KERNEL parameter. Rather, the node is assumed to be the
              user‟s current node and the CCF file name is derived from the environment variable
              DM_CCF. You must know the Kernel‟s password to use this command.




110  DMSA Module
VMS

The BEGIN command does not use the value of DM_PRIMARY_KERNEL when a
number is specified for the KERNEL parameter. Rather, the node is assumed to be the
user‟s current node and the CCF file name is derived from the environment variable
DM$CCF. You must know the Kernel‟s password to use this command.

All

For information about environment variables, see BASIS Reference, “Environment
Variables.”

DMSA must be running on the node on which the Kernel is to execute. You cannot start
a Kernel on another node.
                                   1
BEGin Kernel=kernel, PW=kpw

Kernel=kernel

Indicates a Kernel number from 1 to 9 or a Kernel name of 1 to 5 characters in length.
          1
PW=kpw

Indicates the Kernel‟s password.

See Example 7.
      1
      The Kernel‟s password is not required on Windows operating systems. Ignore
PW=kpw.

TERMINATE
The TERMINATE command is the recommended method for stopping a Kernel. It stops
the execution of the Kernel module. The command requests a Kernel shutdown, prevents
additional signons and waits for all users to signoff. Expect a short pause when this
command is used.

TERMinate Kernel=kernel

Kernel=kernel

Indicates a Kernel number from 1 to 9 or a Kernel name of 1 to 5 characters in length.

Required signon privilege: SA or OP

See Example 8.



                                                                     DMSA Module  111
              DESTROY
              The DESTROY command mimics a Kernel crash. It should be used only in cases when
              DMSA TERMINATE won‟t work. TERMINATE is a more orderly way than DESTROY
              to shut down the Kernel. Use DESTROY instead of TERMINATE only if the Kernel is
              non-responsive to TERMINATE or if it is looping and TERMINATE does not stop the
              Kernel. Before issuing the command, make sure no users are using the database (you can
              use DMSA SHOW/SIGNONS to find out whether anyone is using the database).

              The DESTROY command performs a “forced exit” on the Kernel, which causes a
              shutdown of the Kernel‟s exit handler and disconnects all user processes connected to the
              Kernel. Expect a short pause when this command is used. DMSA must be running on the
              same node as the Kernel being destroyed. You cannot destroy a Kernel on another node.
              It may be necessary to log in under another id of DMK to successfully destroy a Kernel.



              Windows

              You must be operating under the DMPROD user account or have administrator privileges
              to use this command. A password is not required. Using the DESTROY command is the
              equivalent of stopping the Kernel service from the Windows Control Panel.

              DESTroy Kernel=kernel

              UNIX, VMS

              You must know the Kernel‟s password to use this command.

              DESTroy Kernel=kernel, PW=kpw

              Kernel=kernel

              Indicates a Kernel number from 1 to 9 or a Kernel name of 1 to 5 characters in length.

              PW=kpw

              Indicates the Kernel‟s password.




112  DMSA Module
DISCONNECT
All

The DISCONNECT command eliminates the connection between one or more users and a
Kernel. The DISCONNECT command must be used once for each Kernel a user is
connected with. Use caution when you use UID parameter. If the user signon quota is
greater than 1, a single DISCONNECT command can disconnect several users.
Supplying the LINE parameter is recommended as the safer method of disconnecting a
user.

DISConnect Kernel=kernel, UID=id | LINE=lnumber | DB=database

Kernel=kernel

Indicates a Kernel number from 1 to 9 or a Kernel name of 1 to 5 characters in length.
This parameter is required.

UID=id

Indicates the user identification of the user to disconnect. The special value of “*” is used
to indicate all users.

LINE=lnumber

Indicates the Kernel line number to disconnect. May be from 1 to 511. Users that have
multiple databases open on the same Kernel will also be disconnected from those
databases, because only one line is allocated per user for a Kernel.

DB=database

Indicates that all lines to the specified database should be disconnected. Users that have
multiple databases open on the same Kernel will also be disconnected from those
databases.

There are several situations that may require use of the DISCONNECT command:
     Disconnecting a currently executing program
     Disconnecting all users prior to system shutdown
     Disconnecting all users who have a particular database open (in order to back it up,
      for example)
     Disconnecting an abnormally terminated program




                                                                       DMSA Module  113
              If more than one of the target parameters is specified, the precedence is LINE > UID >
              DB. For example:


               DISCONNECT DB = db_name                              DB = is used

               DISCONNECT DB = db_name, UID = *                     UID = is used

               DISCONNECT DB = db_name, LINE = line                 LINE = is used

              A DBA without SA or OP signon privileges can only use the DB = option. The DBA
              cannot selectively disconnect users/lines.

              Required signon privilege: SA, OP, or DBA

              See Examples 10a to 10d.

              Currently Executing Programs

              The DISCONNECT command can eliminate the connection between a currently
              executing program and a Kernel. Once the command is executed, the connection is
              immediately eliminated but the program continues to run until the next BASIS command
              is encountered. An attempt to execute a BASIS command within the program causes an
              error indicating the program is not connected to a Kernel. SA or OP privilege is required
              to perform this operation.

              UNIX, VMS

              Abnormally Terminated Programs

              When programs are terminated abnormally, the BASIS exit handler may have been
              circumvented thereby leaving the program connected to a Kernel. The DISCONNECT
              command eliminates the connection. SA or OP privilege is required to perform this
              operation.

              VMS

              Programs can be terminated via two [CTRL]/[Y]s or a [CTRL]/[Y] and a STOP.

              System Shutdown

              Specifying UID=* disconnects all users connected to a Kernel. For normal shutdown, the
              DISCONNECT command should be followed immediately by a TERMINATE command.
              SA or OP privilege is required to perform this operation.




114  DMSA Module
Database

Specifying DB=database causes the DISCONNECT command to identify all users who
have the indicated database open and disconnect them from the specified Kernel. For
example, given the scenario


User                        Database(s) Open           Kernel

USER1                       TESTA1.FQM                 DMKA1

USER2                       TESTA1.FQM                 DMKA1 DMKA1
                            TESTA2.FQM

the following DISCONNECT commands would function as indicated:
      DISCONNECT KERNEL=DMKA1,DB=TESTA1

      Disconnects both USER1 and USER2 from DMKA1 since both have the TESTA1
      database open. The fact that USER2 also has the TESTA2 database open is
      irrelevant to the operation of the DISCONNECT command since the DB parameter is
      used only to specify users to be disconnected from a Kernel. Thus, USER2‟s line to
      TESTA1 would also be disconnected.
      DISCONNECT KERNEL=DMKA1,DB=TESTA2

      Disconnects only USER2 from DMKA1 since only that user has the TESTA2
      database open.

DROP
All

The DROP command stops a program that is hung. (A “hung” program is executing but
is not performing useful work; possibly a program in an infinite loop.) The DROP
command performs a “forced exit” causing the BASIS exit handler to be executed. The
BASIS exit handler aborts any active transaction, closes all databases, and performs a
SIGNOFF to drop the communication line between the program and the Kernel.

Windows, UNIX

The hung program must communicate with the Kernel after the DROP command is issued
for the DROP command to take effect.




                                                                    DMSA Module  115
              UNIX

              The BASIS signon privilege SA (System Administrator) is required to use the DROP
              command.

              A UNIX kill command can be used to terminate a “hung” program. The kill command
              causes the BASIS exit handler to execute. However, if the “hung” program has kill
              trapped, the DROP command is needed to perform a “forced exit”. In either case, the
              Kernel will detect that the program connected to a particular line no longer exists and will
              clear that line.

              VMS

              The BASIS signon privilege SA (System Administrator) and the VMS GROUP or
              WORLD privilege are required to use the DROP command.

              A [CTRL]/[Y] and EXIT can be used to terminate a “hung” program. The [CTRL]/[Y]
              and EXIT combination causes the BASIS exit handler to execute. However, if the hung
              program has [CTRL]/[Y] disabled, the DROP command is needed to perform a “forced
              exit.”

              All

              DROP Kernel=kernel, LINE=lnumber

              Kernel=kernel

              Indicates a Kernel number from 1 to 9 or a Kernel name of 1 to 5 characters in length.

              LINE=lnumber

              Indicates a Kernel line number from 1 to 511 to drop.

              Required signon privilege: SA or OP

              See Example 9.




116  DMSA Module
Examples
           Registration and Authorization
           1.   Show the registration parameters for users. Add (or “register”) a new BASIS user to
                the Authority Database.

           Note:    The terminal column does not appear on Windows operating systems.
                DMSA> SHOW/USERS *

                                     Signon                              Signon
                User     User ID     Quota     Account     Terminal      Privileges
                ----     -------     ------    -------     --------      ----------
                   41    MARTEL         2         *        VT100         CREATE
                   42    MAXWELL        2         *        VT100         CREATE
                   43    MINGO          5         *        VT100         SA,CREATE
                   40    IDI          511         *        VT100         REG,OP,SA,
                                                                         WIZ,CREATE

                DMSA> REGISTER
                UID= REINER
                UPW= _________
                Change defaults (Y/N)? > Y
                UAC=
                TERMinal= VT100
                PRIVileges= REG,CREATE
                SIGNonquota= 2
                DMSA> SHOW/USERS REINER

                                     Signon                              Signon
                User     User ID     Quota     Account     Terminal      Privileges
                ----     -------     ------    -------     --------      ----------
                  48     REINER         2         *        VT100         REG,CREATE
                DMSA>

                The SHOW/USERS command displays the registration parameters for all registered
                users (*) or a specific user (REINER). To register a new BASIS user, the
                REGISTER command is entered. BASIS prompts for the registration parameters.
                Note the password does not display on the terminal for security reasons. In this
                example, a user account number (UAC) is not applicable so a carriage return is
                entered in response to the UAC= prompt. A user number is assigned to the REINER
                user identification by the system.




                                                                               DMSA Module  117
              2.    Change the registration parameters for a user.

                    The SHOW/USERS command displays the current registration parameters for the
                    REINER user identification. The SIGNONQUOTA and PRIVILEGES parameters
                    of the REREGISTER command are used to change the current signon quota and
                    privileges associated with the REINER user identification. Note the other
                    registration parameters‟ values remain unchanged.

              Note:     The Terminal column does not appear on Windows operating systems.


                    DMSA> SHOW/USERS REINER

                                         Signon                             Signon
                    User     User ID     Quota      Account      Terminal   Privileges
                    ----     -------     ------     -------      --------   ----------
                      48     REINER         2          *         VT100      REG,CREATE

                    DMSA> REREGISTER UID=REINER,SIGNONQUOTA=4,+
                    ... PRIVILEGES=(SA,CREATE)

                    DMSA> SHOW/USERS REINER

                                         Signon                             Signon
                    User     User ID     Quota      Account      Terminal   Privileges
                    ----     -------     ------     -------      --------   ----------
                      48     REINER         4          *         VT100      SA,CREATE




118  DMSA Module
3.   Remove (or “unregister”) a BASIS user from the Authority Database.

     The UNREGISTER command deletes the REINER user record from the Authority
     Database. The user number is retired and is not reassigned until 65500 users have
     been registered. Subsequent requests that include the REINER user identification
     produce the user error 846. This message indicates the REINER user identification is
     no longer associated with a user number, so the record for this user cannot be found.
     DMSA> UNREGISTER UID=REINER
     DMSA> SHOW/USERS REINER

                     Signon                    Signon
     User   User ID Quota   Account Terminal Privileges
     ----   ------- ------ ------- -------- ----------
     USER ERROR(846). Unable to translate the UID to a user number.
4a. Authorize a user to access ANY model of a specific database (db.$ALL).

     The first SHOW/AUTHORIZATION command returns a DMSA> prompt indicating
     the MARTEL user identifier is not authorized to use any databases. The DB
     parameter of the AUTHORIZE command names the database and model(s) the user
     may access. The “db.$ALL” DB value form indicates all models of the named
     database may be accessed.
     DMSA> SHOW/AUTHORIZATION UID=MARTEL,DB=*

     DMSA> AUTHORIZE UID=MARTEL,DB=TOUR0.$ALL,PRIORITY=8,+
     ...READ=11,WRITE=11,PRIVILEGES=(GET,ADD,MOD,ASSIGN, +
        DEL)

     DMSA> AUTHORIZE UID=MARTEL,DB=TOUR.$ALL,PRIORITY=8,+
     ...READ=11,WRITE=11,PRIVILEGES=(GET,ADD,MOD,ASSIGN, +
        DEL)

     DMSA> SHOW/AUTHORIZATION UID=MARTEL,DB=*

     Userid    Database.Model        Prior     Read     Write     Privileges
     ------    --------------        ------    ----     ------    --------------
     MARTEL    TOUR0.$ALL                8      11        11      GET,ADD,MOD,
                                                                  DEL,ASSIGN
               TOUR.$ALL                  8      11       11      GET,ADD,MOD,
                                                                  DEL,ASSIGN




                                                                     DMSA Module  119
              4b. Authorize a user to access ANY database and model ($ALL.$ALL).
                    DMSA> AUTHORIZE UID=MINGO,DB=$ALL.$ALL,PRIV=(DBA)

                    DMSA> SHOW/A UID=MINGO,DB=*

                    Userid    Database.Model        Prior      Read    Write      Privileges
                    ------    --------------        ------     ----    ------     --------------
                    MINGO     $ALL.$ALL                 8        0        0       DBA

                    The “$ALL.$ALL” indicates any model of any database may be accessed.
              4c. Authorize a user to access a specific database and model (db.model).
                    DMSA> AU UID=ROUTY,DB=TOUR.COBA,PRIOR=8,+
                    ...READ=11,WRITE=11,PRIV=(GET)

                    DMSA> SHOW/A UID=ROUTY,DB=TOUR

                    Userid    Database.Model        Prior      Read    Write      Privileges
                    ------    --------------        ------     ----    ------     --------------
                    ROUTY     TOUR.COBA                 8        11        11     GET

                    The “db.model” DB value form indicates a specific model of a specific database may
                    be accessed.
              4d. Authorize an unregistered user.

                    User error 846 is issued if an attempt is made to authorize a user who has not been
                    registered as a BASIS user in the Authority Database. To correct this problem, the
                    REGISTER command must be used prior to the AUTHORIZE command.
                    DMSA> AU UID=REINER,DB=TOUR0.FQMA,PRIV=(GET,ADD)
                    USER ERROR( 846). The specified user is not registered.
              4e. Authorize a user as database administrator for the TOUR Definition Database.
                    DMSA> AUTHORIZE UID=DBA1,DB=XTOUR.$ALL,PRIV=(DBA)

                    DMSA> SHOW/A       UID=DBA1,DB=*

                    Userid    Database.Model        Prior     Read    Write    Privileges
                    ------    --------------        -----     ----    -----    ----------
                    DBA1      XTOUR.$ALL            8         0       0        DBA

                    The X preceding the database name indicates that this is the Definition Database, not
                    the Record Database.




120  DMSA Module
5a. Change the authorization parameters associated with ALL models of a specific
    database for a user (db.*).

    The AUTHORIZE command‟s second use is to change a user‟s authorization
    parameters. In this example, the “db.*” DB value form is used to change the
    authorization parameters associated with all models of a specific database for which

    the user is authorized already. This DB value form may be used to change
    authorization parameters only (as opposed to originally authorizing a user). Compare
    this example to example 4a.
    DMSA> SHOW/AUTHORIZATION UID=MARTEL,DB=*

    Userid     Database.Model        Prior      Read    Write      Privileges
    ------     --------------        ------     ----    ------     --------------
    MARTEL     TOUR0.FQMA                8       11       11       GET,ADD
               TOUR.PERS                 8       11       11       GET,ADD,MOD,
                                                                   DEL,ASSIGN
               TOUR.$ALL                  8      11        11      DBA

    DMSA> AUTHORIZE UID=MARTEL,DB=TOUR.*,+
    ...PRIV=(EXCL,GET,ADD)

    DMSA> SHOW/A UID=MARTEL,DB=*

    Userid     Database.Model        Prior      Read    Write      Privileges
    ------     --------------        ------     ----    ------     --------------
    MARTEL     TOUR0.FQMA                8        11       11      GET,ADD
               TOUR.PERS                 8        11       11      GET,ADD,EXCL
               TOUR.$ALL                 8        11       11      GET,ADD,EXCL
5b. Change a user‟s authorization associated with all models of all databases (*.*).

    The “*.*” changes the authorization parameters associated with all models of all
    databases for which the user is authorized already. This form may be used to change
    authorization parameters only (as opposed to originally authorizing a user). Compare
    this example to example 4b.
    DMSA> SHOW/A UID=MARTEL,DB=*

    Userid     Database.Model        Prior      Read    Write      Privileges
    ------     --------------        ------     ----    ------     --------------
    MARTEL     TOUR0.$ALL                8       11       11       GET,ADD,MOD,
                                                                   DEL,ASSIGN
               TOUR.$ALL                  8      11        11      GET,ADD,MOD,
                                                                   DEL,ASSIGN
               TOUR.PERS                  8      11        11      GET,ADD,MOD,
                                                                   DEL,ASSIGN

    DMSA> AU UID=MARTEL,DB=*.*,PRIV=(PROT,GET,ADD)

    DMSA> SHOW/A UID=MARTEL,DB=*



                                                                      DMSA Module  121
                    Userid    Database.Model       Prior      Read    Write      Privileges
                    ------    --------------       ------     ----    ------     --------------
                    MARTEL    TOUR0.$ALL               8       11       11       GET,ADD,PROT
                              TOUR.$ALL                8       11       11       GET,ADD,PROT
                              TOUR.PERS                8       11       11       GET,ADD,PROT
              6a. Unauthorize a user‟s access to a specific database and model ($ALL.$ALL).

                    The UNAUTHORIZE command is used to eliminate a user‟s authorization for one or
                    more models and databases. The “db.model” DB value form indicates the user‟s
                    privilege to access a specific model of a specific database is revoked.
                    DMSA> SHOW/A UID=MARTEL,DB=*

                    Userid    Database.Model       Prior      Read    Write      Privileges
                    ------    --------------       ------     ----    ------     --------------
                    MARTEL    TOUR0.FQMA               8        0        0       GET,ADD
                              TOUR.PERS                8        0        0       GET,ADD,MOD,
                                                                                 DEL,ASSIGN
                              $ALL.$ALL                  8       0       0       DBA

                    DMSA> UNAUTHORIZE UID=MARTEL,DB=TOUR0.FQMA

                    DMSA> SHOW/A UID=MARTEL,DB=*

                    Userid    Database.Model       Prior      Read    Write      Privileges
                    ------    --------------       ------     ----    ------     --------------
                    MARTEL    TOUR.PERS               8         0        0       GET,ADD,MOD,
                                                                                 DEL,ASSIGN
                              $ALL.$ALL                8         0           0   DBA
              6b. Unauthorize a user‟s access to a specific database and model (db.model).

                    When the “$ALL.$ALL” was originally used to authorize a user‟s access to any
                    database and model, the privilege to access a specific database and model cannot be
                    revoked. To revoke authorization for the TOUR0.FQMA database model, the
                    UNAUTHORIZE command must be used with the “$ALL.$ALL” to revoke
                    authorization for any database and model. Next the AUTHORIZE command must be
                    used with the “db.model” or “db.$ALL” to authorize the user for specific databases
                    and models.
                    DMSA> SHOW/A UID=MARTEL,DB=*
                    Userid Database.Model Prior               Read    Write      Privileges
                    ------ -------------- ------              ----    ------     --------------
                    MARTEL $ALL.$ALL           8                0        0       DBA

                    DMSA> UNAUTHORIZE UID=MARTEL,DB=TOUR0.FQMA

                    USER ERROR( 1712).        Access entry not found.




122  DMSA Module
    DMSA> SHOW/A UID=MARTEL,DB=*
    Userid Database.Model Prior                Read     Write     Privileges
    ------ -------------- ------               ----     ------    --------------
    MARTEL $ALL.$ALL           8                 0         0      DBA
6c. Unauthorize a user‟s access to any database and model ($ALL.$ALL).

    The “$ALL.$ALL” indicates the user‟s privileges for any model of any database are
    revoked. This does not revoke the user‟s privilege to access specific models and
    databases.
    DMSA> SHOW/A UID=MARTEL,DB=*
    Userid Database.Model Prior                Read     Write     Privileges
    ------ -------------- ------               ----     ------    --------------
    MARTEL TOUR0.FQMA          8                 0         0      GET,ADD
            TOUR.PERS          8                 0         0      GET,ADD,MOD,
                                                                  DEL,ASSIGN
              $ALL.$ALL                 8         0         0     DBA

    DMSA> UNAUTHORIZE UID=MARTEL,DB=$ALL.$ALL

    DMSA> SHOW/A UID=MARTEL,DB=*
    Userid Database.Model Prior                Read     Write     Privileges
    ------ -------------- ------               ----     ------    --------------
    MARTEL TOUR0.FQMA          8                 0         0      GET,ADD
            TOUR.PERS          8                 0         0      GET,ADD,MOD,
                                                                  DEL,ASSIGN
6d. Unauthorize a user‟s access to ANY model of a specific database (db.$ALL).

    The “db.$ALL” indicates the user‟s privilege to access any model of the named
    database is revoked. This does not revoke the user‟s privilege to access specific
    models of the named database.
    DMSA> SHOW/A UID=MARTEL,DB=*
    Userid Database.Model Prior                Read     Write     Privileges
    ------ -------------- ------               ----     ------    --------------
    MARTEL TOUR.COBA           8                 0         0      GET,ADD
            TOUR.PERS          8                 0         0      GET,ADD,MOD,
                                                                  DEL,ASSIGN
              TOUR.$ALL                 8         0         0     DBA

    DMSA> UNAU UID=MARTEL,DB=TOUR.$ALL

    DMSA> SHOW/A UID=MARTEL,DB=*
    Userid Database.Model Prior                Read     Write     Privileges
    ------ -------------- ------               ----     ------    --------------
    MARTEL TOUR.COBA           8                 0         0      GET,ADD
            TOUR.PERS          8                 0         0      GET,ADD,MOD,
                                                                  DEL,ASSIGN




                                                                     DMSA Module  123
              6e. Unauthorize a user‟s access to ALL models of a specific database (db.*).

                    The “db.*” DB value form indicates the user‟s access to any and all models of the
                    named database is revoked. Note the DB=TOUR.* parameter of the
                    UNAUTHORIZE command revoked the user‟s access to TOUR.COBA,
                    TOUR.FQMA, and TOUR.$ALL.
                    DMSA> SHOW/A UID=MARTEL,DB=*
                    Userid Database.Model Prior               Read     Write     Privileges
                    ------ -------------- ------              ----     ------    --------------
                    MARTEL TOUR0.FQMA          8                0         0      GET,ADD
                            TOUR.COBA          8                0         0      GET,ADD
                            TOUR.PERS          8                0         0      GET,ADD,MOD,
                                                                                 DEL,ASSIGN
                              TOUR.$ALL                 8        0         0     DBA

                    DMSA> UNAU UID=MARTEL,DB=TOUR.*

                    DMSA> SHOW/A UID=MARTEL,DB=*
                    Userid Database.Model Prior               Read     Write     Privileges
                    ------ -------------- ------              ----     ------    --------------
                    MARTEL TOUR0.FQMA          8                0         0      GET,ADD
              6f. Unauthorize a user‟s access to ALL models of ALL databases (*.*).

                    The “*.*” DB value form indicates the user‟s access to any and all models of any and
                    all databases is revoked. Note the DB=*.* parameter of the UNAUTHORIZE
                    command revoked the users access to all models of the TOUR (including .$ALL) and
                    TOUR0 databases.
                    DMSA> SHOW/A UID=MARTEL,DB=*
                    Userid Database.Model Prior               Read     Write     Privileges
                    ------ -------------- ------              ----     ------    --------------
                    MARTEL TOUR0.FQMA          8                0         0      GET,ADD
                            TOUR.COBA          8                0         0      GET,ADD
                            TOUR.PERS          8                0         0      GET,ADD,MOD,
                                                                                 DEL,ASSIGN
                              TOUR.$ALL                 8        0         0     DBA

                    DMSA> UNAU UID=MARTEL,DB=*.*

                    DMSA> SHOW/A UID=MARTEL,DB=*




124  DMSA Module
6g. Register and authorize a group of users, for example, all users moving from VMS to
    UNIX.
     1. First, create a proc file (for example, autoreg.prc) that has a line for every user:
     register    uid=tjones, upw=tom
     register    uid=wsmith, upw=will
     register    uid=dba, upw=dba1, priv=create
     register    uid=sa, upw=sa1, priv=(reg,op)
     ...
     2. At the DMSA prompt, run this proc file:
     DMSA> @autoreg.prc

     3. Create a file (for example, auths) that contains the following command to extract
     the authorizations stored in the current Authority Database:
     perform/task extract/auth, uid=*, model=*, +
        ddb=yes, extract='auths';

     4. At the system prompt use DMDBA to extract the authorizations. For the GET
     parameter, specify the name of the file created in the previous step.

     => dmdba uid=id upw=pw action=admin db=db get='auths' +
        mode=statement

     5. Use DMDBA action=admin to enter the authorization information extracted from
     the old into the new operating system.
     => dmdba uid=id upw=pw action=admin db=db get='auths' +
        mode=statement

Kernel Monitoring and Control
7.   Start the Kernel.

     The BEGIN command starts Kernel DMKA1. Although the DMSA> prompt is
     issued in response to the BEGIN command, the Kernel may not be started. The
     SHOW/LINES command can be used to determine if the Kernel has started. In this
     example, the user error 120 is issued in response to the first SHOW/LINES command
     indicating the Kernel has not yet started. The result of the second SHOW/LINES
     command indicates the Kernel has started.
     DMSA> BEGIN KERNEL=DMKA1

     PW=_______

     DMSA> SHOW/LINES KERNEL=DMKA1

     USER ERROR(120). The control module that you are trying to
        use is not available.



                                                                          DMSA Module  125
                    DMSA> SHOW/LINES K=DMKA1

                    LINE# LINE STATUS     PID
                    ----- ------------- ------
                    1      Waiting/Hiber H#4003B
                    2      Idle           H#30042
                    For a more complete description of the line status type
                       ?LINE_STATUS.

                    DMSA>
              8.    Terminate the Kernel.

                    The TERMINATE command stops the execution of a Kernel. Although the DMSA>
                    prompt is issued in response to the TERMINATE command, the terminate process
                    may not be complete. The SHOW/LINES command can be used to determine if the
                    Kernel has stopped. In this example, the user error 114 is issued in response to the
                    first SHOW/LINES command indicating the terminate process has not finished. The
                    result of the second SHOW/LINES command indicates the Kernel has stopped. Only
                    when the TERMINATE command is not successful in stopping a Kernel, should the
                    DESTROY command be used.
                    DMSA> TERMINATE KERNEL=DMKA1

                    DMSA> SHOW/LINES K=DMKA1

                    USER ERROR( 114). The communication line was released after
                       the request was sent and before the answer was received.
                    DMSA> SHOW/LINES K=DMKA1

                    USER ERROR(120). The control module that you are trying to
                       use is not available.

                    DMSA>
              9.    Show the status of the communication lines and drop the program that is “hung.”

                    The SHOW/LINES command displays the status of the Inter-Process Communication
                    (IPC) lines. The DROP command stops a “hung” program that is connected to the
                    Kernel on line number 3.
                    DMSA> SHOW/LINES KERNEL=DMKA1

                    LINE# LINE STATUS     PID
                    ----- ------------- -------
                    1      Waiting/Hiber H#10037
                    2      Request/Hiber H#11003A
                    3      Idle           H#E0035
                    4      Idle           H#70031
                    For a more complete description of the line status
                       type ?LINE_STATUS.




126  DMSA Module
    DMSA> ?LINE_STATUS

    Free                The line is free.
    Idle                The line is connected but idle.
    Request             A Request is pending on the line.
    Waiting             The user is waiting for an answer
                        from the control module.
    Answer              An answer is on the line.
    Request/Hiber       A request is pending on the line and
                        the connected process is hibernating
                        while waiting for an answer.
    Waiting/Hiber       The user is waiting for an answer
                        from the control module and the
                        connected process is hibernating.
    Answer/Hiber        An answer is on the line and the
                        connected process is hibernating.
                        (This is only a transient state
                        because the process was already
                        awakened.)
    Disabled            This line has been disabled. Use
                        DISConnect LINE= to release the line
                        and the UID that is associated with it.
    Logged Out          The user has logged out without
                        disconnecting the line. Use
                        DISConnect LINE= to release the line
                        and the UID that is associated with it.

    DMSA> DROP KERNEL=DMKA1,LINE=3

    DMSA> SHOW/LINES K=DMKA1

    LINE# LINE STATUS     PID
    ----- ------------- ------
    1      Waiting/Hiber H#10037
    2      Idle           H#11003A
    4      Idle           H#70031
    For a more complete description of the line status type
    ?LINE_STATUS.
10a. Show the users currently connected to the Kernel and disconnect a user.

    The SHOW/SIGNONS command displays the status of the users currently connected
    to the Kernel. The DISCONNECT command eliminates the connection between the
    user and the Kernel. Note the user identification MARTEL is connected on lines
    number 2 and number 3. When the UID=MARTEL parameter is used on the
    DISCONNECT command, both users are disconnected. To disconnect only one of
    the MARTEL processes, the LINE parameter of the DISCONNECT command must
    be used. See example 10b.
    DMSA> SHOW/SIGNONS KERNEL=DMKA1




                                                                     DMSA Module  127
                    USER# LINE# LINE STATUS     PID     USER NAME KRU #OPENS THREAD
                    ----- ----- -----------     ---     --------- --- ------ ------
                    65501   1   Waiting/Hiber   H#10037 ( sort ) 0       0
                    41      2   Idle            H#11003A MARTEL    0     1
                    41      3   Request/Hiber   H#E0035 MARTEL     0     1
                    11      4   Waiting/Hiber   H#70031 RISCHARD 0       0
                    4 Users on Kernel DMKA1

                    DMSA> DISCONNECT KERNEL=DMKA1,UID=MARTEL

                    DMSA> SHOW/SIGNONS K=DMKA1

                    USER# LINE# LINE STATUS     PID     USER NAME KRU #OPENS THREAD
                    ----- ----- -----------     ---     --------- --- ------ ------
                    65501   1   Waiting/Hiber   H#10037 ( sort ) 0       0
                    11      4   Waiting/Hiber   H#70031 RISCHARD 0       0
                    2 Users on Kernel DMKA1

                    DMSA>




128  DMSA Module
All

10b. Show the users currently connected to the Kernel and disconnect a user.

      Both the SHOW/SIGNONS and SHOW/LINES commands display information
      regarding the status of the Inter-Process Communication (IPC) lines. The
      SHOW/SIGNONS command provides the user identification, Kernel resource units
      (KRU), number of opened databases and thread. Note the user identification
      MARTEL is connected on lines number 2 and number 3. When the LINE=2
      parameter is used on the DISCONNECT command, only one MARTEL process is
      disconnected. Compare this to the use of the UID parameter demonstrated in
      example 10a.
      DMSA> SHOW/SIGNONS KERNEL=DMKA1

      USER# LINE# LINE STATUS          PID     USER NAME KRU #OPENS THREAD
      ----- ----- -----------          ---     --------- --- ------ ------
      65501   1   Waiting/Hiber        H#10037 ( sort ) 0       0
      41      2   Idle                 H#11003A MARTEL    0     1
      41      3   Request/Hiber        H#E0035 MARTEL     0     1

      11      4   Waiting/Hiber H#70031            RISCHARD      0       0
      4 Users on Kernel DMKA1

      DMSA> SHOW/LINES KERNEL=DMKA1

      LINE#     LINE STATUS      PID
      ------    -------------    ---
        1       Waiting/Hiber    H#10037
        2       Idle             H#11003A
        3       Waiting/Hiber    H#E0035
        4       Idle             H#70031
      For a more complete description of the line status type
      ?LINE_STATUS.

      DMSA> DISCONNECT K=DMKA1,LINE=2

      DMSA> SHOW/SIGNONS K=DMKA1

      USER# LINE# LINE STATUS          PID     USER NAME KRU #OPENS THREAD
      ----- ----- -----------          ---     --------- --- ------ ------
      65501   1   Waiting/Hiber        H#10037 ( sort ) 0       0
      41      3   Request/Hiber        H#E0035 MARTEL     0     1
      11      4   Waiting/Hiber        H#70031 RISCHARD 0       0
      3 Users on Kernel DMKA1




                                                                     DMSA Module  129
              10c. Perform a system shutdown.
                    DMSA> SHOW/SIGNONS KERNEL=DMKA1

                    USER# LINE# LINE STATUS              PID     USER NAME KRU #OPENS THREAD
                    ----- ----- -----------              ---     --------- --- ------ ------
                    65501   1   Waiting/Hiber            H#10037 ( sort ) 0       0
                    41      2   Idle                     H#11003A MARTEL    0     1
                    41      3   Idle                     H#E0035 MARTEL     0     1
                    11      4   Waiting                  H#70031 RISCHARD 0       0
                    4 Users on Kernel DMKA1

                    DMSA> DISCONNECT KERNEL=DMKA1,UID=*

                    DMSA> SHOW/SIGNONS K=DMKA1

                    USER# LINE# LINE STATUS   PID     USER NAME KRU #OPENS THREAD
                    ----- ----- -----------   ---     --------- --- ------ ------
                    65501   1   Waiting/Hiber H#10037 ( sort ) 0       0
                    1 Users on Kernel DMKA1

                    DMSA> TERMINATE KERNEL=1

                    Specifying UID=* causes all users to be disconnected (except for the sort module).
                    The TERMinate command then causes the Kernel to shutdown normally.
              10d. Disconnect all users of a database.

                    This causes all users that have TOUR open to be disconnected. To use this
                    command, DBA privilege for the TOUR database is required. Note that if a user has
                    TOUR and another database open, the user will be disconnected from both
                    databases.
                    DMSA> DISCONNECT KERNEL=DMKA1,DB=TOUR

              Authority Database Maintenance
              11a. Show the status of the databases and assign new parameters.
                    DMSA> SHOW/DB *,DDB=YES

                    Database Owner       Account Prior Kernel    DBNR Status
                    --------- --------- -------- ------ -------- ----- ------
                    TOUR0      REINER    *            8 DMKA1      17
                         DDBFD: $BASIS_DB/reiner/dm_tour0/ddb
                    TOUR       SPC       *            8 DMKA1       3
                         DDBFD: $BASIS_DB/reiner/dm_tour/ddb




130  DMSA Module
    DMSA> ASSIGN DB=TOUR0,OWNER=MARTEL, +
    ... DDB=$BASIS_DB/martel/dm_tour/ddb

    DMSA> SHOW/DB TOUR0,DDB=YES

    Database Owner      Account Prior Kernel     DBNR Status
    --------- --------- -------- ------ -------- ----- ------
    TOUR0     MARTEL    *           8   DMKA1      17 CHANGEPEND
        DDBFD:$BASIS_DB/martel/dm_tour0/ddb

    DMSA>

    The SHOW/DB command displays the database name, owner, account, processing
    priority, the assigned Kernel Name, unique database number, and status. The
    DDB=YES parameter causes the name of the Definition Database file to be
    displayed. The ASSIGN command changes the database parameters. Note the
    second SHOW/DB command output. The database owner is changed to Martel
    immediately but the Definition Database name is not changed. The “Status” column
    indicates a change is pending. The Definition Database name is not changed until the
    database is reopened.
11b. Show the status of the database, show the authorization of a user, and erase the
     database.
    DMSA> SHOW/DB *,DDB=YES

    Database Owner        Account Prior    Kernel                      DBNR     Status
    --------- --------- -------- ------ --------                       -----    ------
    TOUR0      REINER     *         8      1                             17
         DDBFD: $BASIS_DB/reiner/dm_tour0/ddb
    TOUR       SPC        *         8      1                               3
         DDBFD: $BASIS_DB/reiner/dm_tour/ddb

    DMSA> SHOW/AU UID=MARTEL,DB=*

    Userid  Database.Model           Prior      Read     Write      Privileges
    ------  --------------           ------     ----     ------     ----------
    MARTEL  TOUR0.FQMA                  8         0         0       GET,ADD
            TOUR.COBA                   8         0         0       GET,ADD
            TOUR.PERS                   8         0         0
    GET,ADD,MOD,DEL,ASS
            TOUR.$ALL                    8         0         0      DBA

    DMSA> ERASE/DB TOUR

    DMSA> SHOW/DB *,DDB=YES




                                                                       DMSA Module  131
                    Database Owner       Account   Prior Kernel                      DBNR     Status
                    --------- --------- -------- ------ --------                     -----    ------
                    TOUR0     REINER     *          8     1                            17
                        DDBFD: $BASIS_DB/reiner/dm_tour0/ddb

                    DMSA> SHOW/AU UID=MARTEL,DB=*

                    Userid    Database.Model        Prior      Read    Write      Privileges
                    ------    --------------        ------     ----    ------     ----------
                    MARTEL    TOUR0.FQMA               8         0        0       GET,ADD

                    The ERASE/DB command deletes the TOUR database record and revokes all
                    authorization to all models of TOUR from the Authority Database.
              11c. Register a database.
                    DMSA> REGISTER/DB DB=TOUR1,DDB=$BASIS_DB/reiner/dm_tour1/ddb +
                    ... OWNER=REINER, THESAURUS=NO

                    DMSA> SHOW/DB TOUR1,DDB=YES

                    Database Owner       Account Prior    Kernel                     DBNR     Status
                    --------- --------- -------- ------ --------                     -----    ------
                    TOUR1     REINER     *         8      1                            18
                        DDBFD: $BASIS_DB/reiner/dm_tour1/ddb

                    The REGister/DB command creates a database record in the Authority Database.
                    Having been entered in the ADB, a database can now be accessed using any of the
                    BASIS tools. It is important to note however that a database must have originally
                    been created with the database name and definition database file descriptor specified
                    in the REGister/DB command.
              12. Show the major System Generation parameters and change selected ones.

                    The MAJOR parameter of the SHOW/SYSGEN command causes the System
                    Generation parameters that can be changed to be displayed. Note the current,
                    default, minimum, and maximum values are displayed. The SET/SYSGEN command
                    resets the values of System Generation parameter values. The changes are
                    immediately seen in the following SHOW/SYSGEN command.
                    DMSA> SHOW/SYSGEN MAJOR

                    Symbol      Current Value          Default Value       Min Value      Max Value
                    ---------- -------------           -------------       ---------      ---------
                    ACTIVE_SETS          1000                   1000               1           1000
                    CACHE_A_LW          12000                  12000            8000          32000
                    CACHE_B_LW           4000                   4000            4000          32000
                    CACHE_C_LE            200                    200              40           1000
                    CACHE_I_LE            100                    100              20           2048
                    CACHE_L_LC           5000                   5000             500          65535
                    CACHE_L_LE            500                    500              20           1023
                    CACHE_R_LE             50                     50              10            100
                    CURSORS                75                     75              50          10000



132  DMSA Module
DBS_PER_KM   40   40   1          255




                       DMSA Module  133
                    DBS_PER_USER          100           100          1        100
                    EXPIRE_DAYS             7             7          1         90
                    FILES_PER_KM          128           128         60       2047
                    KM_ACC                  0             0          0          0
                    KM_DBFP_LE            200           200         20       1000
                    KM_KS_LC            24000         24000       4000      65535
                    KM_LS_LE                0          3000       1000      65535
                    KM_LTH_EXTLC      200000         200000      50000   32000000
                    KM_LTH_NREXT           10            10          1         50
                    KM_PP_LE             4095          4095       1023      32767
                    KM_STH_EXTLC      800000         800000      50000   32000000
                    KM_STH_NREXT           10            10          1         50
                    KM_THREADS              4             4          2         99
                    KM_TS_LW            65535         65535      32000      65535
                    KM_TTBUF_LC          2000          2000        500      16000
                    KM_TT_LE              128           128         32       1024
                    KM_VALBUF_LC          500           500        500      65535
                    KM_WS_LW             8000          8000       4000      65535
                    MAX_KM                  9             9          1          9
                    OPEN_INDEXES          100           100         20       1000
                    SIGNON_LIMIT           32            32          1        511
                    TRAN_PER_MIN          300           300          1       6000
                    UID_SDIR_LP             1             1          1          4
                    USERS_PER_DB           32            32          1        511
                    USERS_PER_KM           50            64          1        511
                    NOTE: All of the above parameters can be changed using the
                    SET/SYSgen command.

                    DMSA> SET/SYSGEN DBS_PER_KM=10

                    DMSA> SHOW/SYSGEN DBS_PER_KM

                    Symbol       Current Value Default Value Min Value Max Value
                    ----------- ------------- ------------- --------- ---------
                    *DBS_PER_KM           50            64         1         511
                    NOTE: The * indicates a parameter that may be changed using
                    SET/SYSgen.

                    DMSA>

              UNIX

              13. Back up the Authority Database with a script.
                    :
                    #
                    dmsa uid=sauid upw=saupw aids=no <<!
                    *
                    * Shutdown Kernel 1
                    terminate kernel=1
                    exit
                    !
                    #
                    # Wait for the Kernel to come down. It should be
                    # noted that the terminate kernel command will only



134  DMSA Module
# request termination of the kernel. If there is a
# user logged on, the kernel will wait until that
# user logs off. This proc assumes that there are no




                                               DMSA Module  135
                    # other users and that kernel shutdown will begin
                    # immediately.
                    #
                    echo "Waiting 100 seconds for the kernel to +
                      shutdown..."
                    sleep 100
                    #
                    dmsa uid=sauid upw=saupw aids=no <<!
                    *
                    *
                    * OLD parameter of the BACKUP command uses the file
                    * named by the environment variable DM_ADB or the default
                    * value $DM_RUNDMK/sysa.dm
                    * NEW parameter of the BACKUP command uses the file
                    * named by the environment variable DM_BAKADB or the default
                    * value $DM_RUNDMK/sysabak.dm
                    backup/adb
                    *
                    * Restart Kernel 1
                    begin kernel=1,pw=PW
                    exit
                    !
                    #
                    # If error during BACKUP, send mail
                    if test $? -ne 0
                    then
                       mailx -s "Unsuccessful Backup" mckenna
                    fi
                    exit

              VMS

              14. Reorder and restore the Authority Database using a command procedure.

                    When the OLD and NEW parameters of the REORDER/ADB and RESTORE/ADB
                    commands are not supplied, the values of the environment variables DM_ADB and
                    DM_BAKADB or their defaults are used. The REORDER/ADB command removes
                    deleted records from the Authority Database and copies the remaining records to a
                    second file. The global variable DMSTAT is used to determine the success
                    (DMSTAT=0) or failure (DMSTAT ^= 0) of the reorder. If the reorder is successful,
                    DMSA is terminated using the EXIT command, the VMS status variable $STATUS
                    is assigned the value 1 (one), and the RESTORE/ADB command is executed in
                    another DMSA session to move the reordered Authority Database back into
                    production. If the reorder is not successful, DMSA is terminated using the
                    EXIT/ABNORMAL command, $STATUS is assigned a value other than 1 (one), and
                    the VMS MAIL facility is used to report the reorder failure.
                    $ SET NOON
                    $ DMSA,UID=SPC,UPW=GODM,AIDS=NO
                    *
                    REORDER/ADB REGSA=SPC




136  DMSA Module
IF (DMSTAT EQ 0)
   *
   * SUCCESSFUL REORDER
   EXIT
ELSE
   *
   * ERROR DURING REORDER
   EXIT/ABNORMAL
ENDIF
$!
$! IF ERROR DURING REORDER, SEND MAIL AND EXIT
$ IF $STATUS.EQ.1 THEN $GOTO COPYADB
   $ MAIL/SUBJECT="Unsuccessful Reorder"
     BADREORD.DAT SPC
   $ EXIT
$!
$ COPYADB:
$!
$! IF SUCCESSFUL REORDER, MOVE ADB INTO PRODUCTION
$ DMSA,UID=SPC,UPW=GODM,AIDS=NO
* NEW PARAMETER OF THE RESTORE COMMAND USES THE
* BAKADB FILE
RESTORE/ADB OLD=DM$RUNDMK:NEWADM.DM.0
IF (DMSTAT EQ 0)
   *
   * SUCCESSFUL RESTORE
   EXIT
ELSE
   *
   * ERROR DURING RESTORE
   EXIT/ABNORMAL
ENDIF
$!
$! IF ERROR DURING RESTORE, SEND MAIL
$ IF $STATUS.NE.1 THEN -
   $ MAIL/SUBJECT="Unsuccessful Restore"
     BADREST.DAT SPC
$ SET ON
$ EXIT




                                                DMSA Module  137
138  DMSA Module

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:7
posted:6/12/2011
language:English
pages:60