Alters the file location or the size of a shadow, or switches a databank shadow to be the master databank.
Alters an existing databank shadow, see the Mimer SQL Programmer's Manual, Mimer SQL Shadowing, for details on databank shadowing.
ADD integer PAGESclause is specified, the shadow file is extended by the number of Mimer SQL pages given by the
INTOclause is specified, the shadow file location stored in the data dictionary is changed to the location specified in the
filename-stringparameter. The file specified by
filename-stringmust exist when the
ALTER SHADOWstatement is executed.
The new file must be identifiable as a copy of the databank shadow created for the current Mimer SQL database. The first page of the databank file is read to verify that it was closed correctly the last time it was used and that the internal timestamp information is consistent with the current contents of LOGDB.
If the file is flagged internally as not being closed correctly, a full databank check is effectively done on it, see the Mimer SQL System Management Handbook, Databank Check Functionality, for details on the DBC functionality.
ALTER SHADOWstatement will fail if the new file does not verify correctly against the checks performed.
If the shadow is
OFFLINE, however, the new file will be accepted by the
ALTER SHADOWstatement without any verification. In this case the file is validated when the shadow is next set
SET SHADOWstatement will fail if the file does not verify correctly against the checks performed.
TO MASTERclause is specified, the data dictionary is changed so that the file location stored for the shadow file is set for the databank file and vice versa, i.e. the shadow becomes the master and the master becomes a shadow. If the shadow is
TO MASTERclause is specified, it is automatically set
ONLINEbefore the data dictionary is updated.
ALTER SHADOWis only for use with the optional Mimer SQL Shadowing module.
Only an ident with
SHADOWprivilege may use the
ALTER SHADOWmay not be used if the master databank is
ADD integer PAGESclause may not be used if the shadow is
The databank for which the shadow exists cannot be used by any other user while the shadow is being altered.
Shadows for the system databanks
LOGDBcannot be altered with the
ALTER SHADOWstatement. These shadows must be altered by the Mimer SQL BSQL program, see Mimer SQL System Management Handbook, Restoring System Databanks.
If the extension of the shadow exceeds the available disk space, the shadow is expanded as much as possible.
A shadow will be extended automatically in systems supporting dynamic file extension (provided that there is space on the disk). However, such incremental extensions may lead to the file becoming fragmented and use of explicit
ALTER SHADOW... ADDis generally recommended (used at the same time as
ALTER DATABANK... ADDis used to extend the master databank).
Changing the location of a shadow with the
ALTER SHADOW... INTOstatement only changes the location as stored in the data dictionary, it does not move any physical files in the host operating system. You must first copy or move the shadow file to its new location using operating system commands and then use the
ALTER SHADOWstatement to correct the location stored in the data dictionary.
The value of
filename-stringmust always be enclosed in string delimiters. The maximum length of the filename string is 256 characters.
Refer to Specifying the Location of User Databanks for details concerning the specification of path name components in
TO MASTERoption is used when the original databank file has been lost or is inaccessible for any reason. Since this option swaps the information about the shadow and the master databank stored in the data dictionary, the command may be followed by a
DROP SHADOWcommand to dispose of the original databank.
The following example alters
USRDB_S, a shadow of the
USRDBdatabank, to the
USRDBmaster databank:ALTER SHADOW USRDB_S TO MASTER
For more information, see the Mimer SQL System Management Handbook, Creating and Managing Shadows.
Mimer SQL extension The ALTER SHADOW statement is a Mimer SQL extension.
Mimer Information Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40