1 07/15/86  adjust_mrds_db, amdb
 2 
 3 
 4 Syntax as a command:  amdb path {-control_args}
 5 
 6 
 7 Function:  This DBA tool handles special problems that may arise
 8 involving the data base concurrency control segment.  It may be used to
 9 re-establish consistency in concurrency control after an incomplete
10 data base operation has put the data base in a potentially invalid
11 state.  It may also be used to remove dead process information from the
12 control segment or to change the setting of the concurrency control
13 trouble switch.
14 
15 
16 Arguments:
17 path
18    is the relative or absolute pathname of the data base whose
19    concurrency control segment is to be manipulated.  The .db suffix
20    need not be given for new version data bases.  This cannot be a
21    submodel pathname.
22 
23 
24 Control arguments:
25 -dead_procs, -dpr
26    the data base control segment removes any information pertaining to
27    dead processes (data base openers whose processes terminated without
28    closing the data base).  Non-passive dead processes (processes with
29    some form of update scope set) may leave the data base in an
30    inconsistent state.
31 -force, -fc
32    suppresses the query given for the -reset control argument.
33 -no_force, -nfc
34    allows the query for the -reset control argument to be given.
35    (Default)
36 
37 
38 -reset, -rs
39    the data base control segment is re-established in a consistent
40    state.  If there are active users of the data base, the command
41    queries the user whether to continue, since other active users
42    lose concurrency control protection if this invocation proceeds.
43    (Default)
44 -trouble_switch state, -tsw state
45    where state may be either "on" or "off".  This sets the data base
46    concurrency control trouble switch to on or off.  If the switch
47    is on, attempts to open the data base fail.  This can be used to
48    lock out users when there is a question about the data base
49    integrity.  The DBA can then restore damaged segments or rollback
50    the data base to a consistent state.
51 
52 
53 Notes:  The user must be a DBA to use this command.
54 
55 
56 The -reset and -dead_proc options may not be used together.  The -force
57 and -no_force control arguments, given without -reset, imply -reset.
58 
59 
60 The -reset option (default) should be used only after
61 display_mrds_db_status is invoked, to determine if there are open users
62 and to notify those users to close their opening of the data base.  If
63 open users are active during use of this option, they lose concurrency
64 control protection and later inconsistencies may arise.
65 
66 
67 The use of the -reset option causes version 4 concurrency control,
68 using the read-update scope modes, to be updated to version 5
69 concurrency control using the scope modes read_attr, modify_attr,
70 append_tuple, and delete_tuple.  Version 5 concurrency control uses a
71 segment named db.control rather than dbc.  Version 4 concurrency
72 control cannot be used with the current version of MRDS, and
73 adjust_mrds_db with the -reset option must be used on the data base in
74 order to convert it to version 5 concurrency control.  The current
75 version of concurrency control may be displayed via
76 display_mrds_db_status using the -long option.
77 
78 
79 Current users of r-s-m-d scope mode encodings do not have to change
80 their application programs to use version 5 concurrency control.
81 Application programs calling dsl_$set_scope or dsl_$set_scope_all which
82 use the old r-u scope mode encodings need to be changed to the
83 encodings described in the MRDS manual (e.g., 2 no longer means s-m-d,
84 just s).