1. Name of the planned tablespace: yourname
Tablespace data file storage location:/u01/app/oracle/oradata/orcl/(select file_name from dba_data_files ;)
Username/password: yourname/yourname
Note: The tablespace name, user name, and password are generally the same in memory. The default value is the project name.
* ************** Replace the following yourname ****************
2. Create a temporary tablespace
CREATE TEMPORARY TABLESPACE "temp_yourname" TEMPFILE '/u01/app/oracle/oradata/orcl/temp_yourname.dbf' SIZE 20MAUTOEXTEND ONNEXT 32M MAXSIZE 2048MEXTENT MANAGEMENT LOCAL;
Note 1: After the general database instance is installed, the temporary tablespace "TEMP" is available by default. If a small database uses this temporary tablespace, you can.
NOTE 2: Temporary tablespace is mainly used to query and store some buffer data. The main reason for consumption is that the intermediate query results need to be sorted. Main functions: Index create/rebuild/Order by/group by/Distinct/Union/intersect/minus/Sort-merge/joins.
NOTE 3: TEMPFILE is single quotes; otherwise, "ORA-00972: identifier is too long" is reported ".
NOTE 4: The names in the double quotation marks of TABLESPACE must be all uppercase characters, otherwise "ORA-00959: tablespace 'temp _ yourname' does not exist" will be reported when creating the user ".
3. Create a user tablespace
CREATE TABLESPACE "yourname" LOGGING DATAFILE '/u01/app/oracle/oradata/orcl/yourname.dbf' SIZE 20MAUTOEXTEND ONNEXT 32M MAXSIZE UNLIMITEDEXTENT MANAGEMENT LOCAL;
Note 1: DATAFILE is single quotes; otherwise, "ORA-00972: identifier is too long" is reported ".
Note 2: The names in the double quotation marks of TABLESPACE must be all uppercase characters, otherwise "ORA-00959: tablespace 'yourname' does not exist" will be reported when creating the user ".
4. Create a user (specify the default tablespace)
CREATE USER yourname IDENTIFIED BY yournameDEFAULT TABLESPACE yournameTEMPORARY TABLESPACE temp_yourname;
5. Authorize the user
GRANT connect, resource, dba TO yourname;