alter database Restrictions

Additional considerations for alter database.

Restrictions for using alter database are:
  • Quotes are optional if you do not include a unit specifier. However, you must use quotes if you include a unit specifier.

  • The SAP ASE server reports an error if the total size of all fixed-length columns, plus the row overhead, is greater than the table‚Äôs locking scheme and page size allows.

  • Because the SAP ASE server allocates space for databases for create database and alter database in chunks of 256 logical pages, these commands round the specified size down to the nearest multiple of allocation units.

  • You can specify the size as a float datatype, however, the size is rounded down to the nearest multiple of the allocation unit.

  • Although the SAP ASE server does create tables in the following circumstances, you see errors about size limitations when you perform data manipulation language operations:
    • If the length of a single variable-length column exceeds the maximum column size.

    • For data-only locked tables, if the offset of any variable-length column other than the initial column exceeds the limit of 8191 bytes.

  • If the SAP ASE server cannot allocate the requested space, it comes as close as possible per device and prints a message telling how much space has been allocated on each database device.

  • You must be using the master database, or executing a stored procedure in the master database, to use alter database.

  • You can expand the master database only on the master device. An attempt to use alter database to expand the master database to any other database device results in an error message. For example, use:
    alter database master on master = 1
  • Each time you allocate space on a database device with create database or alter database, that allocation represents a device fragment, and the allocation is entered as a row in sysusages.

  • If you use alter database on a database that is being dumped, alter database cannot complete until the dump finishes. The SAP ASE server locks the in-memory map of database space use during a dump. If you issue alter database while this in-memory map is locked, the SAP ASE server updates the map from the disk after the dump completes. If you interrupt alter database, the SAP ASE server instructs you to run sp_dbremap. If you do not run sp_dbremap, the space you added does not become available to the SAP ASE server until you restart the server.

  • You can use alter database on database_device on an offline database.

See also sp_addsegment, sp_dropsegment, sp_helpdb, sp_helpsegment, sp_logsdevice, sp_renamedb, sp_spaceused in Reference Manual: Procedures.