Alters the file location, transaction control option or size of a databank.
If the ADD ... PAGES clause is specified, the databank file is extended by the number of Mimer SQL pages given by the integer parameter.
If the INTO clause is specified, the databank location stored in the data dictionary is changed to the location given in the filename-string parameter. The file specified by filename-string must exist when the ALTER DATABANK statement is executed.
The new file must be identifiable as a copy of the databank created for the current Mimer SQL database. The first page of the databank file is read to verify that the data in the databank can be accessed and that the file was closed correctly the last time it was used.
If the file is flagged internally as not being closed correctly, a full DBC check is effectively done on it, see the Mimer SQL System Management Handbook for details on the DBC functionality.
The ALTER DATABANK statement will fail if the new file does not verify correctly against the checks performed.
If the timestamp information in the databank file indicates that additional information must be restored to it to bring it up to date, an information message is written to the database server log file (this message will be returned to the user if the database is being accessed in single user mode).
This situation will not cause the ALTER DATABANK statement to fail, but any attempt to subsequently access the databank will raise an error indicating that additional information must be restored to the databank. Once the additional information has been restored, the databank can be used normally.
If the databank is OFFLINE, however, the new file will be accepted by the ALTER DATABANK statement without any verification. In this case the file is validated when the databank is next set ONLINE and the SET DATABANK statement will fail if the file does not verify correctly against the checks performed.
If the TO ... OPTION clause is specified, the transaction control option of the databank is changed.
The possible options are:
All operations on the databank are performed without transaction control (even if they are requested within a transaction) and are not logged. Set operations (DELETE, UPDATE and INSERT on several rows) which are interrupted will not be rolled back. All secondary indexes contained in the databank are flagged as "not consistent" (a secondary index that is flagged as "not consistent" will not offer optimal performance when used in a query).
Only the creator of the databank may alter it.
The databank option may only be set to TRANS or LOG for a databank that is shadowed or contains a table defined with foreign or unique keys, a table referenced in a foreign key context or a table on which a UNIQUE index or trigger has been created.
The ADD ... PAGES clause may not be used if the databank is OFFLINE.
If the extension of the databank exceeds the available disk space, the databank is extended as much as possible.
If a databank is full, it will be extended automatically on operating systems supporting dynamic file extension (provided that there is free space on the disk). However, such incremental extensions may lead to the disk becoming fragmented, so the use of explicit ALTER DATABANK ... ADD can help avoid disk fragmentation.
Changing the location of a databank with the ALTER DATABANK ... INTO statement only changes the file location stored in the data dictionary, it does not move any physical files in the host operating system. You must first copy or move the databank file to its new location using operating system commands and then use the ALTER DATABANK statement to correct the location stored in the data dictionary.
The value of filename-string must 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 filename-string.
When the databank option is altered to NULL, all secondary indexes contained in the databank will be flagged as "not consistent".
It is not possible to update primary key columns if the table is located in a databank with the NULL option.
MIMER EXTENSION The ALTER DATABANK statement is a Mimer SQL extension.
Upright Database Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40