Welcome to the Oracle community forum and interact with 2 million technical staff to enter the General Oracle database as a large relational database. It has many personality things compared with other relational databases, the following is a simple description, including the knowledge we may use in daily operation and maintenance. I hope to help you.
Welcome to the Oracle community forum, and interact with 2 million technical staff> enter the General Oracle database as a large relational database. It has many personality things compared with other relational databases, the following is a simple description, including the knowledge we may use in daily operation and maintenance. I hope to help you.
Welcome to the Oracle community forum and interact with 2 million technical staff> enter
Overview
As a large relational database, Oracle database has many characteristics compared with other relational databases. The following is a simple description, this includes the knowledge we may use in daily operation and maintenance, and we hope to help you.
I. Basic Knowledge
1. The tablespace is unique to the database, and each database must have at least one tablespace.
Tablespaces can be divided into system tablespaces, non-system tablespaces, and rollback segments. They can also be divided into user tablespaces and non-user tablespaces. They only have different classification methods, but they are actually similar;
Temporary tablespace: the temporary tablespace does not contain real data. The restoration method is to delete the temporary tablespace and recreate it .. System tablespace: If the backup is unavailable, the database must be rebuilt.
The size of the tablespace can be set as needed and as required by the device.
The tablespace can be simply understood as the space for storing information. We generally create a database system in the following order: create a tablespace --- modify a tablespace --- create a rollback segment --- create a user and authorize --- create a user table --- create a table index, users can build their own database systems in this order. As to whether the created database has the best performance, I will discuss it in future articles. The creation of tablespaces can be easily created using a graphical user interface. I believe everyone will. I will not go into details here.
2. The control file is essential to each database. To improve the database performance, we recommend that you create several more control files on different disks. The ORACLE database consists of three types of files: data files, control files, and online log files. The database administrator may consider moving database files due to disk space changes or adjustments based on database disk I/O performance. The following uses the UNIX platform as an example to describe how to move three types of database files.
Database Log Files that cannot be ignored
Note that log files are important when restoring the database.
Logs can be divided into online logs and offline logs. Online logs can record all modifications made in each Oracle database. An online log is composed of multiple online log files. Each running Oracle database instance has an online log, which works with the Oracle background process LGWR, record all modifications made to the instance immediately. What are the options for offline logs? When ORACLE fills up online log files, it will be archived.
Ii. syntax for creating tablespaces, rollback segments, users, and tables
1. Create a tablespace (this is the first step in the database creation process. The tablespace is like a container that contains all kinds of data in the database)
CREATE TABLESPACE test DATAFILE '/dev/test_name1' SIZE1000M, '/dev/test_name2' SIZE 1000M , '/dev/test_name3' SIZE 1000M DEFAULT STORAGE ( INITIAL 64K NEXT 64K MAXEXTENTS UNLIMITED PCTINCREASE 50 );
|
Note: There is no limit on table space expansion.
2. Modify the tablespace
alter TABLESPACE ts_name1 add DATAFILE '/dev/name4' SIZE 1000M;
|
3. rollback segments
CREATE ROLLBACK SEGMENT "RStest" TABLESPACE "Test_name" STORAGE ( INITIAL 16M NEXT 16M MAXEXTENTS UNLIMITED);
|
Do not create rollback segments of different sizes, because ORACLE does not select the rollback segments that best match the requirements.
4. Create a user and authorize the user
CREATE USER test_user IDENTIFIED BY test_user DEFAULT TABLESPACE Test_name1 TEMPORARY TABLESPACE Test_name2; GRANT CONNECT TO test_user; GRANT DBA TO test_user; GRANT resource TO test_user;
|
[1] [2]