在命令行提示符(cmd)中輸入 sqlplus /nolog
,
出現SQL> 提示輸入
# 使用system用戶連接,Admin123爲密碼,數據庫爲orcl
conn system/Admin123@orcl
# 創建user1用戶並設置密碼123
create user user1 identified by 123;
# 授權user1爲數據庫管理員
grant dba to user1;
# 刪除用戶
drop user user1;
# 退出鏈接
exit;
# 導入數據file爲數據的路徑
imp db/user1@orcl file=d:/expdata1.dmp full=y
# 導出自己的方案
exp db/user1@orcl owner=user1 file=d:\tdt.dmp
# 查看錶空間
select tablespace_name,status from dba_tablespaces;
# 創建表空間
create tablespace ittbank datafile 'd:/oracle/oradata/ORCL/ittbank.dbf' size 300m autoextend on;