Step 1: Create a tablespace and assign permissions to users in the oracle database
Log on to the oracle database as an administrator
1. Create a temporary tablespace
Select name from v $ tempfile; find the temporary tablespace of the current database, mainly using the storage path in it;
Obtain a record/opt/oracle/oradata/orcl/temp01.dbf.
Create temporary tablespace: create temporary tablespace plncontrol_temp tempfile '/opt/oracle/oradata/orcl/plncontrol_temp.dbf' size 100 m reuse autoextend on next 20 m maxsize unlimited;
2. Create a tablespace
Select name from v $ datafile; query the tablespace of the current database and use the path
Obtain a record/opt/oracle/oradata/orcl/system01.dbf.
Create a tablespace: create tablespace plncontrol datafile '/opt/oracle/oradata/orcl/plncontrol. dbf' size 100 M reuse autoextend on next 40 M maxsize unlimited;
3. Create a user and specify a tablespace
Create user plncontrol identified by plncontrol default tablespace plncontrol temporary tablespace plncontrol_temp;
4. Grant User Permissions
Grant connect, resource, dba to plncontrol;
5. Delete tablespaces and users
Deletion is in the reverse order of creation. Delete the user first and then delete the tablespace:
Drop user plncontrol cascade;
Drop tablespace plncontrol including contents and datafiles;
If the following statement is used to delete a tablespace:
Drop tablespace test1;
You need to manually delete the dbf file in the corresponding path.
6. Change the user password and unlock the user
Log on to sys: sqlplus/as sysdba
Change user password: alter user identify by password
Unlock account: alter user account unlock
7. query the path of the table space
Select * from dba_data_files
8. Import dmp
Imp username/password @ database instance name file = C: \ data \ filename. dmp log = C: \ data \ logname. log fromuser = scott