Create Table space instance analysis in oracle and create instance analysis in oracle
How to create an oracle tablespace?
1. If you open it in PL/SQL or other tools, directly modify the [italic bold part] in the following code to execute
2. Make sure that the path exists, for example, [D: \ oracle \ oradata \ Oracle9i \], that is, the path of the file to be saved exists.
/* Divided into four steps */
/* Step 2: create a temporary tablespace */
Create temporary tablespace user_temp
Tempfile 'd: \ oracle \ oradata \ Oracle9i \ user_temp.dbf'
Size 50 m
Autoextend on
Next 50 m maxsize 20480 m
Extent management local;
/* Step 2: create a data table space */
Create tablespace user_data
Logging
Datafile 'd: \ oracle \ oradata \ Oracle9i \ user_data.dbf'
Size 50 m
Autoextend on
Next 50 m maxsize 20480 m
Extent management local;
/* Step 2: create a user and specify the tablespace */
Create user username identified by password
Default tablespace user_data
Temporary tablespace user_temp;
/* Step 4: grant permissions to users */
Grant connect, resource, dba to username;
Complete code:
/* Divided into four steps */
/* Step 2: create a temporary tablespace */
Create temporary tablespace user_temp
Tempfile 'd: \ oracle \ oradata \ Oracle9i \ user_temp.dbf'
Size 50 m
Autoextend on
Next 50 m maxsize 20480 m
Extent management local;
/* Step 4: create a data table space www.jbxue.com */
Create tablespace user_data
Logging
Datafile 'd: \ oracle \ oradata \ Oracle9i \ user_data.dbf'
Size 50 m
Autoextend on
Next 50 m maxsize 20480 m
Extent management local;
/* Step 2: create a user and specify the tablespace */
Create user username identified by password
Default tablespace user_data
Temporary tablespace user_temp;
/* Step 4: grant permissions to users */
Grant connect, resource, dba to username;
Oracle Creates table space syntax analysis and explains
Create tablespace indx -- CREATE a TABLESPACE named INDX
DATAFILE 'd: \ ORACLE \ ORADATA \ KYSYS \ indx01.dbf' SIZE 3000 M AUTOEXTEND ON
-- The data file and location in the INDX tablespace are 'd: \ ORACLE \ ORADATA \ KYSYS \ indx01.dbf'. The SIZE is 3000 MB and can be automatically expanded (this indicates that when MB is used up)
NEXT 128 M MAXSIZE UNLIMITED
-- Auto scaling is based on MB, and the maximum SIZE is unlimited.
Minimum extent 128 K
-- The minimum range is 128 K.
LOGGING
-- Generate a log, which means to generate a redo log to record these changes during dml operations such as delete and update for recovery.
Default storage (
-- The default storage parameters are as follows:
INITIAL 128 K -- INITIAL allocation of 128 k
NEXT 128 K -- NEXT 128 k
MINEXTENTS 1 -- Minimum number of ranges 1
MAXEXTENTS 4096 -- maximum number of ranges: 4096
PCTINCREASE 0 -- pct increased by 0
)
ONLINE -- ONLINE
PERMANENT -- PERMANENT (tablespaces are classified into PERMANENT and temporary types)
Extent management dictionary; -- dictionary management mode (table space is divided into two MANAGEMENT modes: DICTIONARY and local)
What are the differences between the two oracle tablespaces created on one instance and the two instances respectively)
An oracle instance refers to the memory structure.
For a single instance, the instance corresponds to a database in the standalone status.
For the cluster status (rac), multiple instances correspond to one data.
The table space is not created on the instance.