oracle創建表空間以及用戶授權

sqlplus /nolog
sql 
--創建表空間
create tablespace smpold datafile 'D:/app/Administrator/oradata/orcl/smpold.dbf' size 1000M autoextend on next 10M maxsize unlimited
--創建用戶,並把表空間賦權給用戶
create user smp identified by smp default tablespace smpold quota 10000M on users;
--賦值所有操作給用戶
grant all privileges to smp;
--賦予dba權限
grant imp_full_database to smp;
--導出oracle數據
exp smp_jyl/smp_jyl@smp file=/home/oracle/smp20161021.dmp
--導入oracle數據
imp smp/smp file=E:\document\數據庫腳本\smpold3.dmp full=y  --紅色標註路徑換爲自己的數據庫備份文件
impdp smp_jyl/smp_jyl directory=dir_db_smp dumpfile=smpuser.dmp table_exists_action=append remap_table=auth_user:t_acc_master
--查看錶字段
DESCRIBE talbe_name;
--查看錶空間
select  tablespace_name, file_name,bytes/1024/1024 "size" from  dba_data_files;

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章