Oracle Create user and IMP specify table space

Source: Internet
Author: User

To create a user:1,sqlplus sys/pwd as sysdba;2, create userusernameIdentified byPassword; 3, Grant Dba,connect,resource tousername;To View table space usage:

Select UPPER (f.tablespace_name) "Table space name",

D.TOT_GROOTTE_MB "Table space size (M)",

D.tot_grootte_mb-f.total_bytes "used Space (M)",

To_char (ROUND ((d.tot_grootte_mb-f.total_bytes)/d.tot_grootte_mb * 100,2), ' 990.99 ') | | '% ' "use ratio",

F.total_bytes "free Space (M)",

F.max_bytes "Max Block (M)"

From (SELECT Tablespace_name,

ROUND (SUM (BYTES)/(1024x768 * 1024x768), 2) Total_bytes,

ROUND (MAX (BYTES)/(1024x768), 2) max_bytes

From SYS. Dba_free_space

GROUP by Tablespace_name) F,

(SELECT DD.) Tablespace_name,

ROUND (SUM (DD). BYTES)/(1024x768 * 1024x768), 2) TOT_GROOTTE_MB

From SYS. Dba_data_files DD

GROUP by DD. Tablespace_name) D

WHERE D.tablespace_name = F.tablespace_name

ORDER by 1;

Exp Export DMP file:EXP System/manager buffer=64000 file=d:\full. DMP full=yIMP System/manager buffer=64000 file=d:\full. DMP full=yimp Specifies tablespace:1. Create a table spaceCreate TablespaceExample_tablespaceDataFile ' d:\****.dmp ' size 1024mReuse autoextend on Next 4m MaxSize Unlimited ;

2. Create user, specify Tablespace, temp table space

Create userusernameIdentified byPasswordDefault Tablespace example_tablespace Temporary tablespaceTemp;3.IMP Importing database files NoteGrant DBA tousername;DBA Authority is requiredtypically the default imported tablespace is the table space at the time of exportRevoke unlimited tablespace fromusername;//REVOKE this permission alter userusernameQuota 0 onUsers; The user inUsersTable space quota is set to 0 alter userusernameQuota Unlimited onExample_tablespace;//settings in the user'sExample_tablespaceThe tablespace quota is not limited. Impusername/PasswordFile= ' D:\***.dmp ' tablespaces=Example_tablespacelog= ' D:\imp_log.txt ' Oracle Exp/imp Character set

Oracle Create user and IMP specify table space

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.