With the DBFORCE tool, the product now provides a more structured and controlled approach to removing active or inactive users from the database when necessary work or maintenance must be processed. The features are as follows:
The DBFORCE tool, found on product's code disk, includes parameters that can be customized, depending on a site's local requirements. Those parameters include:
The NOVmforce (NOV) option only removes ACTIVE users from the database (using the SQL FORCE command), while the VMForce (VMF) option is used to remove INACTIVE database users. The NOVmforce is the default option.
NOTE: DBFORCE was designed to run on a support Machine and should NOT be run from the primary product service ID.
DBFORCE can be executed immediately from a user machine with Control Center Database Administrator authority, or it can be scheduled to run at a later time from a support machine.
To use DBFORCE, the product support ID will require the following authority:
The DBFORCE routine can be invoked directly from CMS, or it can be set up to run as a scheduled job on a product support machine.
An authorized service machine userid (DBA authority or higher) can directly issue the DBFORCE command from CMS. Either command format that follows is correct:
DBFORCE Command Format 1 >>-DBFORCE--database_name----+-VMForce----+--(--SENDTO=userid-->< '-NOVmforce--'
DBFORCE Command Format 2 >>-DBFORCE--database_name--(----+-VMForce----+--SENDTO=userid-->< '-NOVmforce--'
The required parameters and options are below:
DBFORCE Options |--+-VMForce---+------------------------------------------------| '-NOVmforce-'
To execute DBFORCE from a product support machine, the following statement must be included in the SQLMSTR profile found on the 191-disk of the support machine.
MESSAGE DBFORCE 5 ( EXEC DBFORCE .MS
The example in Figure 251 illustrates how DBFORCE can be scheduled to run on a disconnected support machine (SQSUPPD1).
Figure 251. Scheduled DBFORCE Job
:Nick.FORCEUSE
:Jobname.FORCEUSE
:Server_machine.SQSUPPD1
:Job_status.A
:Priority.5
:Next_start.19970312 12:10
:Window_end.19970312 12:30
:Schedule_interval.ONCE
:Required_database.SQDB4PD1
:Required_dbstatus.A
:Dependent_jobname.
:Dependent_jobresult.
:Average_runtime.00:02
:Last_jobstart.19970311 16:53
:Last_jobend.19970311 16:55
:Notify.DBA_USER_ID
:Execute.DBFORCE SQDB4PD1 NOV ( SENDTO=DBA_USER_ID
When the DBFORCE routine is executed, a logfile is generated by using the SENDTO= option. The example logfile, shown in Figure 252, will be sent to the requesting userid (in this example, DBA_USER_ID).
Figure 252. DBFORCE Logfile
DBFORCE SQDB4PD1 NOV ( SENDTO=DBA_USER_ID
Executed by: SQMSUPT
Started: 11 Mar 1997 16:53:15
-------------------------------------------------------------
The previous connection was to the SQDB4PD1 database.
Active user SQMDEMO2 has been asked to exit the database.
----------------------------------------------------------------
Sleeping for 2 minutes...
----------------------------------------------------------------
SQL FORCE ROLLBACK DISABLE has been issued on user SQMDEMO2,
agent 1
1 user forced using "SQL FORCE" command...
----------------------------------------------------------------
0 users forced using "VM FORCE" command...
-----------------------------------------------------------------
DBFORCE completed with return code = 0