初始化表空间账号表

--登陆sys
sqlplus /nolog;   
connect / as sysdba; 
--alter user sys identified by Jacjqwl123;

create user user_Name identified by pass;
create tablespace tablespace_name datafile 
	'd:\oracle\admin\orcl\fdj_data.dbf' size 6000M;
alter user user_Name default tablespace tablespace_name;
grant create session,create table,create view,create sequence,
	unlimited tablespace to user_Name;

select * from dba_directories
grant read,write on directory DATA_PUMP_DIR to user_Name;

--cmd:
expdp user_Name/pass directory=DATA_PUMP_DIR 
	dumpfile=database_001.dmp logfile=database_001.log
impdp user_Name/pass directory=DATA_PUMP_DIR dumpfile=database_001.DMP

 

你可能感兴趣的:(初始化表空间账号表)