建立表空間:
create tablespace 空間名稱
建立使用者:
create user 使用者名稱 identified by 密碼;
授權:
grant dba to 使用者名稱
dmp檔案匯出:
1 將資料庫test完全匯出,使用者名稱system 密碼manager, 例項名test 匯出到d:\daochu.dmp中
exp system/manager@test file=d:\daochu.dmp full=y
2 將資料庫中system使用者與sys使用者的表匯出
exp system/manager@test file=d:\daochu.dmp owner=(system,sys)
3 將資料庫中的表table1 、table2匯出
exp system/manager@test file=d:\daochu.dmp tables=(table1,table2)
4 將資料庫中的表table1中的字段filed1以」00」打頭的資料匯出
exp system/manager@test file=d:\daochu.dmp tables=(table1) query=\」 where filed1 like 『00%』\」
dmp檔案匯入:
1 將d:\daochu.dmp 中的資料匯入 test資料庫中。
imp system/manager@test file=d:\daochu.dmp
上面可能有點問題,因為有的表已經存在,然後它就報錯,對該錶就不進行匯入。
在後面加上 ignore=y 就可以了。
2 將d:\daochu.dmp中的表table1 匯入
imp system/manager@test file=d:\daochu.dmp tables=(table1)
oracle學習筆記1
oracle安裝會自動的生成sys 使用者 和 system使用者 1 sys使用者是 超級使用者,具有最高許可權,具有sysdba角色,有create database 的許可權,預設密碼manager 2 system使用者是 管理操作員,許可權也非常大,具有sysoper角色,沒有create...
oracle 學習筆記1
1 oracle常見約束 primary key 主鍵 foreigh key 外來鍵 check 檢查 unique 唯一 not null 非空 default 預設 2 概念 主鍵 表中能夠用於唯一標識某行資料的某一列或多列的組合,通過主鍵在表中能找到唯一的一條記錄,主鍵預設具有唯一非空的特性...
oracle 學習筆記 1
第一天 1.為什麼要學oracle 2.介紹oracle 和 oracle 公司的背景 3.oracle的安裝,啟動和解除安裝 4.oracle開發工具介紹 5.sql plus的常用命令 6.oracle使用者的管理 效能優越 市面上的主流資料庫 mysql 開發者為 瑞典 mysqlab公司,在...