Marks a database available for public use after a normal load sequence; if needed, upgrades a loaded database to the current version of Adaptive Server; brings a database online after loading a transaction log dumped with the for standby_access option.
online database database_name [for standby_access]
specifies the name of the database to be brought online.
brings the database online on the assumption that the database contains no open transactions.
Makes the pubs2 database available for public use after a load sequence completes:
online database pubs2
Brings the database inventory_db online. Used after loading inventory_db with a transaction-log dump obtained through dump tran...with standby_access:
online database inventory_db for standby_access
online database brings a database online for general use after a normal database or transaction log load sequence.
When load database is issued, the database’s status is set to “offline.” The offline status is set in the sysdatabases system table and remains set until online database completes.
Do not issue online database until all transaction logs are loaded. The command sequence is:
load transaction (there may be more than one load transaction)
If you execute online database against a currently online database, no processing occurs and no error messages are generated.
online database...for standby_access can only be used with a transaction log that was dumped using dump transaction...with standby_access. If you use online database...for standby_access after loading a transaction log that was dumped without using dump transaction...with standby access, online database generates an error message and fails.
You can use sp_helpdb to find out whether a database is currently online, online for standby access, or offline.
online database initiates, if needed, the upgrade of a loaded database and transaction log dumps to make the database compatible with the current version of Adaptive Server. After the upgrade completes, the database is made available for public use. If errors occur during processing, the database remains offline.
online database is required only after a database or transaction log load sequence. It is not required for new installations or upgrades. When Adaptive Server is upgraded to a new version, all databases associated with that server are automatically upgraded.
online database only upgrades version 10.0 or later user databases.
After you upgrade a database with online database, dump the newly upgraded database to create a dump that is consistent with the current version of Adaptive Server. You must dump the upgraded database before you can issue a dump transaction command.
SQL92 – Compliance level: Transact-SQL extension.
Only a System Administrator, Database Owner, or user with the Operator role can execute online database.
Commands dump database, dump transaction, load database, load transaction
System procedures sp_helpdb