Oracle Learning Note _05_ A complete process for creating table spaces, creating users, and authorizing

Source: Internet
Author: User
Tags dba

First, complete command

Su-//'/u01/app/oracle/oradata/mas/scaninvoice.dbf ' size 200M autoextend on next 100m   '/u01/app/oracle/oradata/mas/scaninvoice_tmp.dbf ' size 50m autoextend on next 50m maxsize 20480m extent Management Local;create User  username  default  tablespace scaninvoice temporary tablespace scaninvoice_tmp;        Grant DBA to TRAINHEC; Grant Dba,create session,resource,connect to Trainhec; exit;  

Ii. complete process 1. Log in to Linux as the root user, and then switch to the Oracle user to log on to Oracle as SYSDBA
# Su-/nologsql> Conn/as sysdba

2. Creating table spaces and temporary table spaces

2.1 table Space : Generally in the development situation, we certainly do not use the user's default tablespace, so we need to create a table space.

Create tablespace scaninvoice logging datafile '/u01/app/oracle/oradata/mas/scaninvoice.dbf ' size 200M autoextend on Next 100m  extent management local;

Note: The datafile is followed by the physical storage path of the tablespace, and the suffix of the file name can be arbitrarily. If there is no DBF file, the system is created automatically.

2.2 Temporary table space

' /u01/app/oracle/oradata/mas/scaninvoice_tmp.dbf ' Next local;

3. Create a user
Create user  username  identified by password;    // using the default tablespace user Create user  username  default  tablespace scaninvoice temporary tablespace scaninvoice_tmp;             // Specify default tablespace and temporary table space  (recommended)

4. Authorized Users
Grant DBA to TRAINHEC, Grant Dba,create session,resource,connect to TRAINHEC;
Exit

Iii. additional commands 1. Modify User Password
Alter user username  

2. View the tablespace where all users are located

By default, the user is assigned a table space (users) by default when created. We can use the following SQL statement to look at the tablespace where all the users are located.

Select Username,default_tablespace from Dba_users;  

3. Assigning a tablespace to a user
default tablespace scaninvoice;  

Iv. references

1. Oracle creates table spaces, creates users, and authorizes

Oracle Learning Note _05_ A complete process for creating table spaces, creating users, and authorizing

Related Article

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.