Untuk mengaktifkan database sybase yang baru direstore kita dapat melakukannya dengan cara menjalankan fungsi online database. Adapun penjelasan mengenai fungsi online database sybase dapat dilihat pada penjelasan berikut ini :
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
- 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
- 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 database
- load transaction (there may be
more than one load transaction)
- online database
- load database
- If you execute online database against
a currently online database, no processing occurs and no error messages
are generated.
- You can only use online database...for
standby_access 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.
Upgrading databases
- 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 you upgrade Adaptive Server
to a new version, all databases associated with that server are
automatically upgraded.
- online database only upgrades
version 11.9 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.