:meta-keywords: cubrid databases.txt, cubrid users, cubrid volume
:meta-description: How to manage CUBRID Databases, Users and Volumes.
Database Management
===================
Database Users
--------------
A CUBRID database user can have members with the same authorization. If authorization **A** is granted to a user, the same authorization is also granted to all members belonging to the user. A database user and its members are called a "group."; a user who has no members is called a "user."
CUBRID provides **DBA** and **PUBLIC** users by default.
* **DBA** can access every object in the database, that is, it has authorization at the highest level. Only **DBA** has sufficient authorization to add, alter and delete the database users.
* All users including **DBA** are members of **PUBLIC**. Therefore, all database users have the authorization granted to **PUBLIC** . For example, if authorization **B** is added to **PUBLIC** group, all database members will automatically have the **B** authorization.
.. _databases-txt-file:
databases.txt File
------------------
CUBRID stores information on the locations of all existing databases in the **databases.txt** file. This file is called the "database location file". A database location file is used when CUBRID executes utilities for creating, renaming, deleting or replicating databases; it is also used when CUBRID runs each database. By default, this file is located in the **databases** directory under the installation directory. The directory is located through the environment variable **CUBRID_DATABASES**.
::
db_name db_directory server_host logfile_directory
The format of each line of a database location file is the same as defined by the above syntax; it contains information on the database name, database path, server host and the path to the log files. The following example shows how to check the contents of a database location file.
::
% more databases.txt
dist_testdb /home1/user/CUBRID/bin d85007 /home1/user/CUBRID/bin
dist_demodb /home1/user/CUBRID/bin d85007 /home1/user/CUBRID/bin
testdb /home1/user/CUBRID/databases/testdb d85007 /home1/user/CUBRID/databases/testdb
demodb /home1/user/CUBRID/databases/demodb d85007 /home1/user/CUBRID/databases/demodb
By default, the database location file is stored in the **databases** directory under the installation directory. You can change the default directory by modifying the value of the **CUBRID_DATABASES** environment variable. The path to the database location file must be valid so that the **cubrid** utility for database management can access the file properly. You must enter the directory path correctly and check if you have write permission on the file. The following example shows how to check the value configured in the **CUBRID_DATABASES** environment variable.
::
% set | grep CUBRID_DATABASES
CUBRID_DATABASES=/home1/user/CUBRID/databases
An error occurs if an invalid directory path is set in the **CUBRID_DATABASES** environment variable. If the directory path is valid but the database location file does not exist, a new location information file is created. If the **CUBRID_DATABASES** environment variable has not been configured at all, CUBRID retrieves the location information file in the current working directory.
.. _database-volume:
Database Volume
----------------
The volumes of CUBRID database are classified as permanent volume, temporary volume and backup volume.
* In the permanent volumes,
* there are data volumes, that usually store permanent data, but can also store temporary data.
* there are log volumes, that can be further classified as: one active log, archive logs and one background archiving log.
* In the temporary volumes, only temporary data is stored.
For more details on volumes, see :ref:`database-volume-structure`.
The following is an example of files related to the database when *testdb* database operates.
+----------------+-------+-----------------+----------------+------------------------------------------------------------------------------------------------------+
| File name | Size | Purpose | Classification | Description |
+================+=======+=================+================+======================================================================================================+
| testdb | 512MB | | permanent | | Database | | The firstly created volume when DB is created. |
| | | | data | | volume | | This volume stores permanent data (system, heap and index files). |
| | | | | | This volume includes database meta information. |
| | | | | | **cubrid createdb** uses by default the size specified by **db_volume_size** in **cubrid.conf**. |
+----------------+-------+-----------------+ +------------------------------------------------------------------------------------------------------+
| testdb_perm | 512MB | | permanent | | | Manually added volume using **cubrid addvoldb** utility |
| | | | data | | | This volume stores permanent data (system, heap and index files). |
+----------------+-------+-----------------+ +------------------------------------------------------------------------------------------------------+
| testdb_temp | 512MB | | temporary | | | Manually added volume using **cubrid addvoldb** utility |
| | | | data | | | This volume stores temporary data (query results, list files, sort files, join object hashes). |
+----------------+-------+-----------------+ +------------------------------------------------------------------------------------------------------+
| testdb_x003 | 512MB | | permanent | | | Automatically created when database requires more space. |
| | | | data | | | This volume stores permanent data (system, heap and index files). |
+----------------+-------+-----------------+ +------------------------------------------------------------------------------------------------------+
| testdb_x004 | 512MB | | permanent | | | Automatically created when database requires more space. |
| | | | data | | | This volume stores permanent data (system, heap and index files). |
+----------------+-------+-----------------+ +------------------------------------------------------------------------------------------------------+
| testdb_x005 | 512MB | | permanent | | | Automatically created when database requires more space. |
| | | | data | | | This volume stores permanent data (system, heap and index files). |
+----------------+-------+-----------------+ +------------------------------------------------------------------------------------------------------+
| testdb_x006 | 64MB | | permanent | | | Automatically created when database requires more space. |
| | | | data | | | This volume stores permanent data (system, heap and index files). |
| | | | | | The size of volume is not maximized (yet). |
+----------------+-------+-----------------+----------------+------------------------------------------------------------------------------------------------------+
| testdb_t32766 | 512MB | | temporary | | Temporary | | Automatically created when database requires more space. |
| | | | data | | Volume | | This volume stores temporary data (query results, list files, sort files, join object hashes). |
+----------------+-------+-----------------+----------------+------------------------------------------------------------------------------------------------------+
| testdb_lgar_t | 512MB | | background | | Log | | A log file which is related to the background archiving feature. |
| | | | archiving | | volume | | This is used when storing the archiving log. |
+----------------+-------+-----------------+ +------------------------------------------------------------------------------------------------------+
| testdb_lgar224 | 512MB | | archive | | | Archiving logs are continuously archived and the files ending with three digits are created. |
| | | | | | At this time, archiving logs from 001~223 seem to be removed normally by **cubrid backupdb** -r |
| | | | | | option or the setting of **log_max_archives** in **cubrid.conf**. When archiving logs are removed, |
| | | | | | you can see the removed archiving log numbers in the REMOVE section of lginf file. |
| | | | | | See :ref:`managing-archive-logs`. |
+----------------+-------+-----------------+ +------------------------------------------------------------------------------------------------------+
| testdb_lgat | 512MB | | active | | | Active log file |
+----------------+-------+-----------------+----------------+------------------------------------------------------------------------------------------------------+
* Database volume file
* In the table above, *testdb*, *testdb_perm*, *testdb_temp*, *testdb_x003* ~ *testdb_x006* are classified as the database volume files.
* File size is determined by **db_volume_size** in **cubrid.conf** or the **--db-volume-size** option of **cubrid createdb** and **cubrid addvoldb**.
* When database remains out of space, it automatically expands existing volumes and creates new volumes.
* Temporary volume
* Temporary volumes are usually used to store temporary data. They are automatically created and destroyed by database.
* File size is determined by **db_volume_size** in **cubrid.conf**.
* Log volume file
* In the above, *testdb_lgar_t*, *testdb_lgar224* and *testdb_lgat* are classified as the log volume files.
* File size is determined by **log_volume_size** in **cubrid.conf** or the **--log-volume-size** option of **cubrid createdb**.
.. note::
Any data that has to be persistent over database restart and crash is stored in the database volumes created for permanent data purpose. The volumes store table rows (heap files), indexes (b-tree files) and several system files.
Intermediate and final results of query processing and sorting need only temporary storage. Based on the size of required temporary data, it will be first stored in memory (the space size is determined by the system parameter **temp_file_memory_size_in_pages** specified in **cubrid.conf**). Exceeding data has to be stored on disk.
Database will usually create and use temporary volumes to allocate disk space for temporary data. Administrator may however assign permanent database volumes with the purpose of storing temporary data using by running **cubrid addvoldb -p temp** command. If such volumes exist, they will have priority over temporary volumes when disk space is allocated for temporary data.
The examples of queries that can use temporary data are as follows:
* Queries creating the resultset like **SELECT**
* Queries including **GROUP BY** or **ORDER BY**
* Queries including a subquery
* Queries executing sort-merge join
* Queries including the **CREATE INDEX** statement
To have complete control on the disk space used for temporary data and to prevent it from consuming all system disk space, our recommendation is to:
* create permanent database volumes in advance to secure the required space for temporary data
* limit the size of the space used in the temporary volumes when a queries are executed by setting **temp_file_max_size_in_pages** parameter in **cubrid.conf** (there is no limit by default).
They went down to the water-side to try the effects of a bath in the surf as it rolled in from the Pacific Ocean. They found it refreshing, and were tempted to linger long in the foam-crested waves. Near by there was a fishing-place, where several Japanese were amusing themselves with rod and line, just as American boys and men take pleasure in the same way. Fish seemed to be abundant, as they were biting freely, and it took but a short time to fill a basket. In the little harbor formed between the island and the shore several junks and boats were at anchor, and in the foreground some smaller boats were moving about. There was not an American feature to the scene, and the boys were thoroughly delighted at this perfect picture of Japanese life. It was sea-life, too; and they had island and main, water and mountain, boats and houses, all in a single glance. "For our sick soldiers!" "Yes, I'm going to take that away with me to-day." "I destroyed it. There was no object in keeping it. I tore it up then and there and pitched it on the pavement. The motor was driven by a dumb man, who conveyed me to the corner house. It struck me as strange, but then the owner might have returned. When I got there I found the man subsequently murdered suffering from a combination of alcoholic poisoning and laudanum. It was hard work, but I managed to save him. A Spanish woman--the only creature besides my patient I saw--paid me a fee of three guineas, and there ends the matter." fatherly letter--but frank! He said he saw from the address that I ¡°Who are you, please?¡± Sandy shot the question out suddenly. He had gone back. "You'll come through all right," said the Surgeon smiling. "You're the right kind to live. You've got grit. I'll look at your partner now." 'he Took Another Look at his Heavy Revolver.' 254 But after the gun was gone, and after Shorty had written a laborious letter, informing Sammy of the shipment of the gun and its history, which letter inclosed a crisp greenback, and was almost as urgent in injunctions to Sammy to write as Sammy had been about his piece of ordnance, Shorty sat down in sadness of heart. He was famishing for information from Maria, and at the lowest calculation he could not hope for a letter from Sammy for two weeks. The firing and stone-throwing lasted an hour or more, and then seemed to die down from sheer exhaustion. Odiam had triumphed at last. Just when Reuben's unsettled allegiance should have been given entirely to the wife who had borne him a son, his farm had suddenly snatched from him all his thought, all his care, his love, and his anxiety, all that should have been hers. It seemed almost as if some malignant spirit had controlled events, and for Rose's stroke prepared a counter-stroke that should effectually drive her off the field. The same evening that Rose had gone weeping and shuddering upstairs, Reuben had interviewed the vet. from Rye and heard him say "excema epizootica." This had not conveyed much, so the vet. had translated brutally: "I don't ask for that to-night¡ªall I ask is food and shelter, same as you'd give to a dog." "Yes, yes, we will consider of some more fitting answer," said Leicester fiercely;¡ªand after consulting earnestly for a few minutes with Jack Straw, Thomas Sack, and other leaders, he returned to De Vere, and said¡ª HoMEÃâ·ÑÍøÕ¾Ò»¼¶ÊÓÆµ²¤ÂÜÃÛ
ENTER NUMBET 0018www.rootpaper.com.cn
szniuyan.com.cn
www.pigame.com.cn
smh0706.com.cn
bianyimin.com.cn
www.tzth.com.cn
www.jnjsqc.com.cn
www.vixr.com.cn
www.lyxssnc.com.cn
ccuaedu.net.cn