Open or Close a Database
Options
ttAdmin
has these options for opening or closing a database:
Option | Description |
---|---|
|
Closes a database to user connections. When a database is closed to user connections, new connection attempts will fail, but existing connections are unaffected. |
|
An ODBC connection string that specifies a database location, driver, and optionally other connection attribute settings. |
|
An ODBC data source name of the database to be administered. |
|
Opens a database to user connections. A database is open to user connections by default upon creation. |
|
Valid only when |
Examples
To open the database1
DSN:
% ttAdmin -open database1
To load and open the database1
DSN from an unloaded and closed state:
% ttAdmin -ramLoad -open database1
To close the database1
DSN:
% ttAdmin -close database1
To load and close the database1
DSN from an unloaded and open state:
% ttAdmin -ramLoad -close database1
Notes
A database remains closed or open to user connections regardless of its loaded state or RAM policy, unless its closed or open state is modified through ttAdmin
or other utilities like ttRestore
or ttRepAdmin
.
If the -open
or -close
options are used in conjunction with any option other than -ramLoad
, ttAdmin
returns an error.
Trying to close a closed database or open an open database returns an error.