empadm
EMPADM(1) EMPADM(1)
NAME
empadm - Performs administrative functions for a database.
SYNOPSIS
empadm [option] database command
DESCRIPTION
The empadm utility provides a number of tools for the Database Adminis-
trator to manage databases.
The options is -help which will print all the available commands and
their brief description.
The command is one of the following:
coordinfo
Reports on all clients registered with the coordinator and the
current status of On-line Backup.
coordclear [-f] [EID ...]
Removes the coordinator information for the specified Empress
IDs. You should determine the Empress ID by examining the out-
put from the coordinfo option. If no Empress IDs are provided,
all non-active clients will be removed from the coordinator. -f
will force to remove the coordinator information regardless pro-
cess is still active. Use this option with caution.
dbamode [on] [-i N|-q]
Allows multiple DBA processes to access the database. All non-
DBA processes will be restricted from accessing the database.
While empadm is waiting for all non-DBA processes signed off
from the database, it prints a list of users who are currently
accessing the database every N seconds. The number of seconds is
defined by the -i option. The default is 10 seconds. empadm will
not notify users to sign off from the database, the DBA has to
inform the users manually or choose to wait.
Although the reporting interval is N seconds, empadm checks for
non-DBA processes every second. If N is 0 or -q is specified,
empadm will not print the user list.
dbamode off
Removes the restriction of a database access to the DBA only.
dblocation
Provides the physical location of the database including its
full path and the node it resides on. Also a status code is
reported as follows:
OK - the database is accessible
NO_SV - the database is inaccessible since server is not
responding.
NO_DB - the physical database is inaccessible.
lockbrief [table ...]
Provides active locks information, plus active process informa-
tion. Information on the Lock Manager is not listed.
lockclear [-f] [EID ...]
Removes the locks pertaining to the specified process IDs
whether in shared memory or on file. The Empress ID is deter-
mined by examining the output from the lockinfo option. If no
Empress IDs are provided, all locks of non-active clients will
be cleared, both on file and in shared memory. If -f is speci-
fied, all locks will be cleared. Use this option with caution.
lockinfo [table ...]
Provides locking information. Tables which have locks on them
are listed and the Lock Manager identified whether in a shared
memory partition or on file. All current locks, whether in
shared memory or on file, are detailed.
lockmanagers [table ...]
Lock Manager information is provided plus a list of all active
locks. Active process information is not given.
lockremove
Removes locks and associated lock files in the data dictionary
directory.
lockrststats
This will reset the lock statistics. New lock statistics will
be gathered from this point onwards. This is relevent only if
the variable MSDBLOCKSTATS is set within the tabzero file of the
database.
locksactive [table ...]
A snapshot of active locks is provided. Information about the
Lock Managers and active processes is not given.
lockstats [table ...]
Provides a detailed report of lock manager statistics. The DBA
may use this information to examine the performance of the lock
manager. Note that statistics gathering is turned off by
default. To enable statistics,the MSDBLOCKSTATS variable in the
database's tabzero file should be set to any value.
maxprocs [-f]
Change maximum number of simultaneous process of a database.
When maxprocs command is executed, other then setting the maxi-
mum number of simultaneous process to a database, it will also
remove the lock files under the database _lock directory, remove
(if exist) and re-create shared memory partitions, remove and
re-create the database coordinator file.
If nothing is specified, the maximum number of simultaneous pro-
cess of the database will be set to the lower value of the sys-
tem variable MSDBMAXPROCS (defined in the $EMPRESSPATH/con-
fig/initfile or environment) or the value of the license key
allows.
This command can only be executed when there is no active
process. If empadm detects active process exists, it will print
an error message and exit. If -f (force to execute) is used,
empadm will print a warning message and proceed to make the
changes. Use this option with caution.
maxprocs license [-f]
Change maximum number of simultaneous process of a database.
The process limit will set to whatever license key allows.
This command can only be executed when there is no active pro-
cess. If empadm detects active process exists, it will print an
error message and exit. If -f (force to execute) is used, empadm
will print a warning message and proceed to make the changes.
Use this option with caution.
macprocs license [-f]
Change maximum number of simultaneous process of a database.
The process limit will set to whatever licence key allows.
This command can only be executed when there is no active pro-
cess. If empadm detects active process exists, it will print an
error message and exit. If -f (force to execute) is used, empadm
will print a warning message and proceed to make the changes.
Use this option with caution.
maxprocs N [-f]
Change maximum number of simultaneous process of a database.
The number N must less or equal to the number that license key
allows, the maximum number of simultaneous process of the
database will set to N. Otherwise, empadm prints an error mes-
sage and exit.
This command can only be executed when there is no active pro-
cess. If empadm detects active process exists, it will print an
error message and exit. If -f (force to execute) is used, empadm
will print a warning message and proceed to make the changes.
Use this option with caution.
maxprocs keep [-f]
Change maximum number of simultaneous process of a database.
Whenever the process limit is changed, the value of MSDBMAXPROCS
in the data dictionary tabzero file will also be changed to
reflect the current value. The keep option will refresh the set-
ting of the maximum number of simultaneous process of the
database to the value of MSDBMAXPROCS in the data dictionary
tabzero file.
params filename table
Maps database files to particular partitions in shared memory.
The parameter files will have been created with empshm params.
This command will apply the parameter file to the table so that
Empress will correctly use the shared memory partitions when
accessing and/or locking this table.
recompile [table ...]
Recompiles the data dictionary information for tables whose com-
piled entry in the data dictionary is null. If a list of tables
is specified, only the entries for those tables are recompiled.
recompile_all
Recompiles the data dictionary information for all tables in the
database. The name of each table is displayed as it is recom-
piled.
shmclear
Clears the shared memory contents for the database. This option
will not work on partitions which have the Empress variable
MSSHMPROTECTION set.
shmcreate
Creates shared memory segments. The shared memory segments will
be created according to the information found in the tabzero
file.
The tabzero file must have the partition file (created by empshm
partitions) appended to it. This identifies the Global Buffers,
Mapped Files and Lock Managers in the shared memory segment.
shminfo
Provides key configuration details about the partitions in
shared memory and statistics such as percentage I/O, read hit
rate and read rates.
shmrefresh
Recreates shared memory segments. The shared memory segments
will be created according to the information found in the
tabzero file.
shmremove
Removes shared memory segments defined for that database.
Shared memory must be removed before it can be modified (re-cre-
ated). After running this command, shared memory information in
tabzero must be deleted before the database can be used. This
option will not remove shared memory segments on partitions
which have the Empress variable MSSHMPROTECTION set.
shmrmall
Removes all shared memory segments defined for the database.
This option works even if the variable MSSHMPROTECTION is set.
shmrststats
This resets the statistics for mapped file partitions and global
buffer partitions on the database. New statistics will be gath-
ered from this point onwards.
shmstats
Provides basic configuration details about the partitions in
shared memory as well as a short summary of the statistics gath-
ered.
shmzap
Removes all shared memory definitions from a database. This
will clear all mappings that were done using the params option,
remove all shared memory segments even if the variable MSSHMPRO-
TECTION is set, and, it will clear tabzero of all shared memory
definitions.
singlemode [singlemode_option] ["shell_command"]
Database access is restricted to a single DBA process. If
"shell_command" is not specified an interactive shell command
will be invoked.
[singlemode_option]
-i N | -q
While empadm is waiting for all processes to sign off from the
database, it prints a list of users who are currently accessing
the database every N seconds. The number of seconds is defined
by the -i option. The default is 10 seconds. empadm will not
notify users to sign off from the database, the DBA has to
inform the users manually, take another 'singlemode' action or
choose to wait.
Although the reporting interval is N seconds, empadm checks for
processes every second. If N is 0 or -q is specified, empadm
will not print the user list.
-terminate [-force]
If -terminate is specified, empadm will try to gracefully termi-
nate all processes using a database. Note: option is supported
only on unix style platforms.
If -force is specified, empadm will try to gracefully terminate
all processes using a database before it forces them to termi-
nate.
-wait M
If -wait M is specified and empadm cannot achieve empadm will
exit.
-clean
If -clean is specified, empadm will clean the database upon
achieving 'singlemode' before invoking a shell command. If will
not be invoked.
SEE ALSO
empclean(1)
Empress: Database Administrator's Guide
HISTORY
Written by Empress Software Inc.. All material is copyrighted and
licensed. Use on non-licensed CPUs is prohibited.
Empress 8.62 Empress Software Inc. EMPADM(1)