Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagesql
MOUNT	 DATABASE	 'backup_database_path'	 TO	 mount_name;

Example:

Code Block
languagesql
MOUNT	 DATABASE	 '/home/machbase/backup'	 TO	 mountdb;

UNMOUNT

Ifthemounteddatabaseisnolongerrequired,deleteitbyexecutingUNMOUNT command. 

...

Code Block
languagesql
UNMOUNT	 DATABASE	 mount_name;

Example:

Code Block
languagesql
UNMOUNT	 DATABSE	 mountdb;

Retrieve Data from Mounted Database

When you run a query against data from the backup database, the same SQL statements are used for querying data from currently operating database.
It only allows SYS user to retrieve data from the mounted database. When you retrieve the data from a table, it is required to input both mount_name and user_name in front of table_name by using "." as a delimiter. mount_name refers to a specified database from the mounted databases and user_name indicates the information of the user who has the authentication over the table of the mounted database.

Syntax:

Example:

Code Block
languagesql
SELECT	 column_name	 FROM	 mount_name.user_name.table_name;

Example:


Code Block
languagesql
SELECT	 *	 FROM	 mountdb.sys.backuptable;