1、安裝
Oracle 版本:Oracle Database 10g Release 2 (10.2.0.1)
下載地址:
http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201winsoft.html
安裝設(shè)置:
1)這里的全局?jǐn)?shù)據(jù)庫(kù)名即為你創(chuàng)建的數(shù)據(jù)庫(kù)名,以后在訪(fǎng)問(wèn)數(shù)據(jù),創(chuàng)建“本地Net服務(wù)名”時(shí)用到;
2)數(shù)據(jù)庫(kù)口令在登錄和創(chuàng)建“本地Net服務(wù)名”等地方會(huì)用到。
2、創(chuàng)建“本地Net服務(wù)名”
1)通過(guò)【程序】-》【Oracle - OraDb10g_home1】-》【配置和移植工具】-》【Net Configuration Assistant】,運(yùn)行“網(wǎng)絡(luò)配置助手”工具:

2)選擇“本地 Net 服務(wù)名配置”:

3)這里的“Net 服務(wù)名”我們輸入安裝數(shù)據(jù)庫(kù)時(shí)的“全局?jǐn)?shù)據(jù)庫(kù)名”:

4)主機(jī)名我們輸入本機(jī)的IP地址:

5)測(cè)試數(shù)據(jù)庫(kù)連接,用戶(hù)名/密碼為:System/數(shù)據(jù)庫(kù)口令(安裝時(shí)輸入的“數(shù)據(jù)庫(kù)口令”):
默認(rèn)的用戶(hù)名/密碼錯(cuò)誤:
更改登錄,輸入正確的用戶(hù)名/密碼:
測(cè)試成功:
3、PLSQL Developer 連接測(cè)試
輸入正確的用戶(hù)名/口令:
成功登陸:
4、創(chuàng)建表空間
打開(kāi)sqlplus工具:
sqlplus /nolog
連接數(shù)據(jù)庫(kù):
conn /as sysdba
創(chuàng)建表空間:
create tablespace camds datafile 'D:\oracle\product\10.2.0\oradata\camds\camds.dbf' size 200m autoextend on next 10m maxsize unlimited;
5、創(chuàng)建新用戶(hù)
運(yùn)行“P/L SQL Developer”工具,以DBA(用戶(hù)名:System)的身份登錄:1)新建“User(用戶(hù)):

2)設(shè)置用戶(hù)名、口令、默認(rèn)表空間(使用上面新建的表空間)和臨時(shí)表空間:

3)設(shè)置角色權(quán)限:

4)設(shè)置”系統(tǒng)權(quán)限“:

5)點(diǎn)擊應(yīng)用后,【應(yīng)用】按鈕變灰,新用戶(hù)創(chuàng)建成功:

6)新用戶(hù)登錄測(cè)試:
輸入新用戶(hù)的“用戶(hù)名/口令”:
新用戶(hù)“testcamds”成功登陸:

6、導(dǎo)入導(dǎo)出數(shù)據(jù)庫(kù)
先運(yùn)行cmd命令,進(jìn)入命令行模式,轉(zhuǎn)到下面的目錄:D:"oracle"product"10.2.0"db_1"BIN【該目錄下有exp.exe文件】1)導(dǎo)入
命令語(yǔ)法:
imp userid / pwd @sid file = path / file fromuser = testcamds touser = userid
命令實(shí)例:
imp testcamds / 123 @camds file = c:"testcamds fromuser = testcamds touser = testcamds
導(dǎo)入結(jié)果:

2)導(dǎo)出:
命令語(yǔ)法:
exp userid / pwd @sid file = path / file owner = userid
命令實(shí)例:
exp testcamds / 123 @camdsora file = c:"testcamds owner = testcamds
導(dǎo)入結(jié)果:
posted on 2009-10-18 20:13 CoderDream 閱讀(20359) 評(píng)論(1) 編輯 收藏 所屬分類(lèi): 數(shù)據(jù)庫(kù) 、學(xué)習(xí)筆記