Step 1: Create a tablespace and assign permissions to users in the oracle database

Source: Internet
Author: User

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

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.