online database

Description

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.

Syntax

online database database_name [for standby_access]

Parameters

database_name

specifies the name of the database to be brought online.

for standby_access

brings the database online on the assumption that the database contains no open transactions.

Examples

Example 1

Makes the pubs2 database available for public use after a load sequence completes:

online database pubs2

Example 2

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

Usage


Upgrading databases

Standards

SQL92 – Compliance level: Transact-SQL extension.

Permissions

Only a System Administrator, Database Owner, or user with the Operator role can execute online database.

See also

Commands dump database, dump transaction, load database, load transaction

System procedures sp_helpdb