[Oracle Notes] Create tablespaces, users, and authorize users

Source: Internet
Author: User

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;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.