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