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