Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

cm_manual_database


CUBRID Manager :: Database

5. Database



Connecting to Database

To run a database, you need to log into the database first. In the host navigation tree, right-click a database and select Login Database or double-click the database.

Enter a user name and password in the Login Database window. The default user name is dba; no password is required. If you want to save password at local machine, you can check the Save Password in order to log in this database by double-clicking this database node.

After user authorization is verified in the database login process, a tree corresponding to the user's authorization is displayed. To start the database, right-click the database in the left navigation tree and then sent Start Database. While the database is running, you can add a user or change the current password by right-clicking the Users node.

In the CUBRID Manager is not normally running, the following error message will be displayed: Cannot connect to a server. Please check the configuration environment of the CUBRID Manager server and other connection. In this case, you solve the problem by checking the following:

  • Check whether the CUBRID Manager server is running.
  • Open the configuration file of the CUBRID Manager server, and make sure that the value of the cm_port parameter is identical to the registered connection port. See Configuration the CUBRID Manager Server.
  • If a firewall is installed on the system where the Manager client is running, allow all connection ports to be accessed to the Manager client connection (cm_port, cm_port+1). For example, if cm_port is 8001, the port 8002 must also be open.
  • When the same operation is already being executed by the server, the message "Cannot execute the current operation because the previous operation is already running." is displayed. Then, retry the operation.
  • When connecting Broker and a database in the CUBRID Manager client, the IP network between Broker and a database may be seperated. In that case, you must configure different addresses for the database and Broker in the Connection Information of the Database Property. To change connection information, right-click in the navigation tree and then select Properties.


Starting Database

To execute a query in the CUBRID Manager, the database must start or be running. To start a database, select the database to start and click Start Database in the toolbar.


Creating Database

You can create a database by using the shortcut menu, or by clicking Create Database from the toolbar at the top. The Create Database wizard consists of 5 steps.

Only the CUBRID Manager admin account can create a database.


Step 1 : General Information
Enter the basic information such as database name, the generic and log volumes.

  • Database name : The name of a database must be unique in the host. A warning message is displayed when the name already exists. The following rules apply to database names:
    • Only alphanumeric are allowed for the name of the database. Its maximum length is 16 characters.
    • Special characters that cannot be used in file names on Linux/UNIX are not allowed: space, *, &, %, $, |, ^, /, ~,
    • "." and ".." cannot be used in the name of the database.
  • Page size : Select one of the following sizes: 1024, 2048, 4096, 8192, 16384. The default value is 4096. Select an appropriate size for the purpose of the database since the size cannot be changed once the database is created. It is recommended to use the default value unless it is an exceptional case.
  • Generic Volume Information : When the size of generic volume is entered in Mbytes, the number of pages for the volume is automatically calculated and displayed. The default value of a generic volume path is specified in the database location file ($CUBRID_DATABASES/databases.txt). When the database is being created on the server as the CUBRID Manager server, you can select a directory by clicking Browse.
  • Log Volume Information : Enter the size and path of the log volume. The default log volume path is the same as generic volume path.


Step 2 : Additional Volume Information
Enter information of additional volume by type such as generic, data, index, temp. In order to use the Automation of adding volume function for each volume type, you must configure the data volume and index volume.

  • Additional Volume Information : If an additional volume is expected during the database creation, set information about the volume to be added in this step. If you click Add volume after entering the name, path, type and size of the volume to be added, the new volume is added accordingly. You can specify a volume type for each purpose, such as data, index, temp, and generic. You must additionally enter the data volume and index volume of an additional volume.
  • Add volume/Delete volume : If you click Add volume, the volume to be added is displayed on the list. If you click Delete volume after selecting a volume from the list, the volume is not created.
  • Current additional volume list : Displays the list of volumes to be added during database creation.


Step 3 : Automation of Adding Volume
Enter information used for the automatic addition feature when data or index volumes do not have enough space. The automatic addition functionality can be used for a data or an index volume.

  • Using automatic addition volume : When it is selected, the automatic addition functionality is used for the selected volume type.
  • Out of space warning rate : A volume is added automatically when the remaining volume equals to the value set by Out of space warning rate. For example, if this value is set to 15 % and the remaining space of the volume is 15 %, a data volume is added automatically. The minimum value is 15, and the maximum is 30.
  • Volume size : Enter the size of the volume to be added automatically.


Step 4 : Set DBA Password
Enter the password for the DBA account of the database being created. The password cannot contain any spaces, and must be at least 4 characters.

Step 5 : Database Information
Confirm the information entered up to step 4 and create the database. If you need to make a change, click Back to go back to the previous step.

Load Database

To load the unloaded data into the currently selected database, perform one of the following after login to the database.

The load database operation can be performed only when the database server is not running; The Restore Database menu is deactivated while the database is running.

  • Database Information : Displays the name of the target database into which the unloaded data is to be loaded, and the authority of the user who is logged in to the database. You must specify the name of currently logged-in user in the User name field.
  • Unloaded Target : Enter information of the unloaded data. You can either select from the list or directly enter the path where the unloaded file is located.
  • If the CUBRID Manager client and server are running on different systems, unloaded schema, object, index and trigger files must exist on the system running the CUBRID Manager server.If there is already any unloaded data from the CUBRID Manager, you can use unload information to load. Otherwise, manually enter unload information and then load it.
  • Load Option : You can select whether to perform syntax checking before loading data, or perform syntax checking only. For more information, see "Loading Database."

To check the results of the database load operation, set options and then click the OK button in the Database load dialog box.


Unload Database

To unload data of the selected database, perform one of the following after login to the database.

The unload operation can be performed even when the database server is running.

  • Database Information : The name of the database to be unloaded is displayed. Specify the directory in which a file is to be created after the unload operation.
  • Unload Target : Select the schema and data of the database to be unloaded.
  • Unload Option : You can specify whether to use delimited identifiers (“”) or how many LO files are to be stored in a single directory. For more information, see "Unloading Database."

To check the results of the database unload operation, set options and then click the OK button in the Unload Database dialog box.


Backup Database

To backup a database, perform one of the following after login to the database.

The backup operation can be performed even when the database server is running. For more information, see "Database Backup" in the CUBRID online manual.

  • Database name : The name of the database to backup.
  • Volume name : Specifies the name of the backup volume. The default volume name is in the form of database name_backup_backup level. However, you can change the name.
  • Backup level : Specifies the backup level. Level0 is a full backup, Level1 is a backup that saves changes made only after the Level0 backup. Level2 is a backup that saves changes made only after the level 1 backup.
    For example, if there is a backup volume displayed as Level0, the administrator can choose only Level0 or Level1. If there are no previously performed backups, the administrator can choose only Level0.
  • Backup directory : Specifies the directory where backup files are to be saved. The default is set to the CUBRID/databases/DBNAME/backup directory.
  • Checking consistency of the database : Checks consistency of the database to backup before the backup process. It is recommended to select this option.
  • Delete unnecessary log-archives : Deletes unnecessary archive log files while restoring a database. Note that archive log files might be required if database restore does not go well due to backup file errors. When this option is selected while the database is set to the master server in the replication environment, the Maintain replication log option is checked automatically.
  • Number thread : Specifies the number of threads to be used concurrently during the database backup. It is recommended to set the maximum number of threads to be the same as the number of CPUs. The default value is 0, in which case the number of threads is automatically determined.
  • Compress backup volumes : Compresses the database backup. It is recommended to select this option.

If a backup has been executed for the target database, you can check the backup history from the Backup History Information tab. You can also check information such as the backup level, last backup date, size of the backup file, backup file path as well as free space of the disk where the current database volume exists.


Restore Database

To restore a database, perform one of the following after login to the database.

Loading data to restore database can be performed only when the database server is not running; The Restore Database menu is deactivated while the database is running.

For more information, see "Database Backup" in the CUBRID online manual.

  • Database name : The name of the target database to be restored.
  • Restored Date and Time : Specifies to which point of time the database is to be restored back to. If you select Backup time, a restore is performed with the backuptime keyword in the restore utility. This means that the database is restored to the point when the backup was complete. If you select Specify a restore date, you can enter date and time you want.
  • Available Backup Information : You can select the restore level after checking which levels of backing up have been performed on the target database. The specified file path is the path to the directory where the files for the back up for the selected level are located.
  • Perform partial restore if any log archive is absent : Performs a partial restore if the case of incomplete log information. That is, database restore can be performed even without archive or active logs created after the backup point.
  • Restore to a path specified by the user : Restores the database to the path specified in the database location file (databases.txt).
  • Show backup information : Shows the information of the file backed up to the selected backup level.


Rename Database

To rename a database, perform one of the following after login to the database.

The rename database operation can be performed only when the database server is not running. Therefore, the Rename Database menu is deactivated while the database is running.

For more information about renaming databases, see "Renaming Database."

  • New database name : Enter a new name for the database to be renamed.
  • Force to delete backup volumes : Delete backup volumes of the database before the rename operation.
  • Extended volume path : An option that specifies the path in which volumes to be added to the new database are stored.
  • Rename individual volumes : If there are multiple volumes before renaming the database, you can rename individual database volumes and specify a new directory in which each database volume is stored.


Copy Database

To copy the database, perform one of the following after login to the database.

The copy database operation can be performed only when the database server is not running. Therefore, the Copy Database menu is deactivated while the database is running.

  • Source database : A database name to be copied and a directory path where the volume and log file saved are shown.
  • Destination database : Enter a database name to be created and a directory path where the volume, extended volume, and log file to be stored.
  • Copy individual volumes : If there is more than one volume of the source database, you can rename each database volume and specify a new directory path to which each database volume is to be copied.
  • Replace an existing database : Overwrites an existing database of the same name as the destination database.
  • Delete a source database : Deletes the source database after copying.


Optimize Database

To optimize the database, perform one of the following after login to the database.

In the Optimize table dialog box, you can perform optimization for all or some tables in the database. Select the target to optimize and click OK to start database optimization. If you select See Detailed Progress, detailed information is displayed when the compact database operation is completed.


Compact Database

To compact the database, perform one of the following after login to the database.

The compact database operation can be performed only when the database server is not running; The Compact Database menu is deactivated while the database is running.


Check Database

To check the database, perform one of the following after login to the database.


Database Lock Information

To view the lock information of the database, perform one of the following after login to the database.

Note that this function is activated only while the database server is running; this is deactivated while the server is not running.

The Lock Information dialog box consists of two tabs.

The Lock setting/client information tab provides information of the clients currently connected to the database.

In the Object lock table tab, you can check the lock information of the database objects.

You can view detailed lock information by clicking Detail in the Object lock table tab.


Database Transaction Information

To view the transaction information of the database, perform one of the following after login to the database.

Note that this function is activated only while the database server is running; this is deactivated while the server is not running.

  • Refresh : Recollects and shows information of the transactions currently being performed by the CUBRID Manager server.
  • Kill transaction : Forces termination of the transaction selected in the transaction list. One of the following four options can be selected.


Delete Database

To delete a database, perform one of the following after login to the database.

The delete database operation can be performed only when the database server is not running; The Delete Database menu is deactivated while the database is running.

If you click OK, the database is deleted after checking the dba password. Only the dba user can delete a database.

comments powered by Disqus
Page info
viewed 2349 times
translations en
Author
posted 3 years ago by
newpcraft
Contributors
updated 2 years ago by
View revisions
tagged
Share this article