oracle中,建立資料表空間、使用者,為使用者賦許可權
阿新 • • 發佈:2019-01-03
在cmd中輸入
sqlplus/nolog
使用者oracle超級管理員使用者登入
SQL>conn / as sysdba;
建立表空間(刪除表空間語句:drop tablespace test;)
SQL> create tablespace test
2 datafile 'E:/app/test/oradata/orcl/test.dbf'
3 size 1m autoextend on;
--查詢資料庫表空間select distinct TABLESPACE_NAME from tabs;
--檢視你能管理的所有使用者select * from all_users;
--刪除使用者建立使用者並指定表空間drop user test cascade;
create user test identified by test123
default tablespace test
--temporary tablespace rmdb_temp;
給使用者授予許可權grant connect,resource,dba to test;
匯入資料
imp test/[email protected]/資料庫名稱 file=資料庫dmp檔案目錄 full=y