1. 程式人生 > >WIN7下安裝Oracle 10g 的詳細過程以及有關問題的解決(轉)

WIN7下安裝Oracle 10g 的詳細過程以及有關問題的解決(轉)

安裝Oracle10的時候出錯

錯誤描述如下:


"無法定位程式輸入點GetProcessImageFileNameW 於動態連結庫PSAPI.DLL上"

"ORA-12546 "


因為oracle 10g暫時沒有與win7相容的版本,我們可以通過對安裝軟體中某些檔案的修改達到安裝的目地。

1:開啟“\Oracle 10G \stage\prereq\db”路徑,找到refhost.xml檔案,開啟,向其中新增如下程式碼並儲存。
  1. <OPERATING_SYSTEM>
  2. <VERSIONVALUE="6.1"/>
  3. </OPERATING_SYSTEM>

2:開啟“\Oracle 10G \install”路徑,找到oraparam.ini檔案,找到:

  1. [Certified Versions]  
  2. #You can customise error message shown for failure, provide value for CERTIFIED_VERSION_FAILURE_MESSAGE  
  3. #Windows=4.0,5.0,5.1,5.2  

在5.2後面加上WIN7的版本號6.1如下:

  1. #Windows=4.0,5.0,5.1,5.2,6.1  

3:開啟“\Oracle 10G \install”路徑,找到oraparam.ini檔案,開啟,向其中新增如下程式碼並儲存。
  1. [Windows-6.1-required]  
  2. #Minimum display colours for OUI to run  
  3. MIN_DISPLAY_COLORS=256
  4. #Minimum CPU speed required for OUI  
  5. #CPU=300
  6. [Windows-6.1-optional]  

4:找到oracle安裝檔案中的setup應用程式,右擊,開啟“相容性疑難解答”,點選“嘗試建議的設定”,選擇“啟動程式”。

5:繼續上一步的安裝,安裝oracle 10g,直到安裝程式結束。

6:根據以上幾步的安裝,oracle很可能無法正常使用,最起碼在我安裝結束後,我的sqlplus無法正常使用,這種情況就涉及到許可權的問題。具體可通過以下措施解決:


7:開啟你已經安裝好的oracle程式的路徑“\oracle\product\10.2.0\db_1\BIN”,點選sqlplus.exe應用程式,右擊—屬性,選擇相容性,點選“以相容模式執行這個程式”單選框,選擇“window xp(service pack3)”,繼續點選“以管理員身份執行此程式”單選框,最後點選應用-確定。如此sqlplus就可以正常使用了。

8:對於一些需要遠端訪問資料庫的使用者,如此配置還會遇到Net Configuration Assistant無法啟動的情況,這就需要找到“\oracle\product\10.2.0\db_1\BIN”路徑下的launch.exe應用程式,具體配置如上6,7。

9:綜合以上的配置,oracle 10g資料庫就可以正常使用了。

10:對於資料庫開發人員來說,有時候需要藉助資料庫工具對資料庫進行操作,比如利用plsql developer工具操作資料庫。如果利用以上oracle的安裝配置,可能無法正常使用plsql developer,這涉及許可權的問題,可以給“plsqldev.exe”應用程式設定相容性和許可權。具體操作,如上6,7。



注意:安裝完Oracle後,肯能會開機啟動變得很慢,那麼沒關係,只要在服務中把所有Oracle的服務都設定成手動的就行了,等你需要用Oracle的時候再去服務中啟動。

控制面板→系統和安全→管理工具→服務。

其中OracleJobSchedulerXSCJ本來就預設的禁用,就不用再設定成手動了。

平時如果只用SQL PLUS的話那就只需要啟動OracleServiceXSCJ和OracleOraDb10g_home1TNSListener就可以了。

如果還需要用網頁版的OEM的話可以再啟動OracleDBConsoleXSCJ。

如果還需要用iSQL*Plus 的話,就可以再啟動OracleOraDb10g_home1iSQL*Plus

第二篇

===================================================================================================================

(2)然後修改以下檔案,第一個就是在disk1\stage\prereq\db\ 下的refhost.xml檔案新增如下內容:

<!--Microsoft Windows 7-->
<OPERATING_SYSTEM>
<VERSION VALUE="6.1"/>
</OPERATING_SYSTEM>

第二個就是\Disk1\stage\prereq\db_prereqs\db下的refhost.xml檔案新增如下內容:

<!--Microsoft Windows 7-->
<OPERATING_SYSTEM>
<VERSION VALUE="6.1"/>
</OPERATING_SYSTEM>

再然後在Disk1\install下的oraparam.ini檔案,新增如下內容:

[Certified Versions]
#You can customise error message shown for failure, provide value for CERTIFIED_VERSION_FAILURE_MESSAGE
#Windows=5.0,5.1,5.2,6.0,6.1 #這裡前面部分內容有的,只新增6.1(win7 的版本號)

[Windows-6.1-required]
#Minimum display colours for OUI to run
MIN_DISPLAY_COLORS=256
#Minimum CPU speed required for OUI
#CPU=300
[Windows-6.1-optional]

(3)WIN7下 Microsoft LoopBack Adapter的安裝問題,因為Oracle 10g要安裝這個才能順利安裝,所以以下為其安裝過程:

1.單擊開始目標,在智慧搜尋中輸入"HDWWIZ",在搜尋結果用以管理員方式執行此軟體。

2.根據作業系統嚮導,選擇“安裝我手動從列表選擇的硬體(高階)”。

3.在硬體列表中選擇“網路介面卡”。

4.選擇"Microsoft"廠商,並在右邊選擇"Microsoft LoopBack Adapter",再按下一步,根據提示完成安裝。

5.在控制面板裡的網路和共享中心中,選擇更改介面卡配置,多了一個本地連線2

再然後右鍵點選狀態->屬性->Internet協議版本IPV4->使用指定的IP地址如:10.71.16.88,子網掩碼為:255.255.0.0,預設閘道器為:10.71.16.254。這樣就完成了整個操作的流程了。

以上3個問題是安裝過程中經常遇到的,修改之後點選steup.exe進行安裝,再完成安裝。

安裝之後還可能遇到以下問題:

(1)當你進入SQL*PLUS的時候會選擇使用者名稱以及密碼的時候會產生,connection as SYS should be as SYSDBA or SYSOPER這個結果。

解決方案為:使用者名稱為;System 密碼(口令)為你設定的那個口令。

而以下為Oracle 使用者名稱的詳解:

安裝ORACLE時,若沒有為下列使用者重設密碼,則其預設密碼如下:

使用者名稱/密碼
登入身份
說明

以下的格式是按照上面的格式安排的:

sys/change_on_install
SYSDBA或SYSOPER
不能以NORMAL登入,可作為預設的系統管理員

system/manager
SYSDBA或NORMAL
不能以SYSOPER登入,可作為預設的系統管理員

sysman/oem_temp
sysman 為oms的使用者名稱

scott/tiger
NORMAL
普通使用者

aqadm /aqadm
SYSDBA或NORMAL
高階佇列管理員

Dbsnmp/dbsnmp
SYSDBA或NORMAL
複製管理員

(2)Oracle :the account is locked 的解決方法。

第一種

ORA-28000: the account is locked
第一步:使用PL/SQL,登入名為system,資料庫名稱不變,選擇型別的時候把Normal修改為Sysdba;
第二步:選擇myjob,檢視users;
第三步:選擇system,右擊點選“編輯”;
第四步:修改密碼,把“帳戶被鎖住”的勾去掉;
第五步:點選“應用”再點選“關閉”;
第六步:重新登入就可以通過驗證了;

第二種

ALTER USER username ACCOUNT UNLOCK;


第三種

在plsql developer中要是以scott/tiger登入時提示ora-28000 the account is locked。

解決辦法:

新裝完Oracle10g後,用scott/tiger測試,會出現以下錯誤提示:
oracle10g the account is locked
oracle10g the password has expired
原因:預設Oracle10g的scott不能登陸。
解決:
(1)conn sys/sys as sysdba; //以DBA的身份登入
(2)alter user scott account unlock;// 然後解鎖
(3)conn scott/tiger //彈出一個修改密碼的對話方塊,修改一下密碼就可以了

在執行裡面輸入cmd在DOS模式下輸入sqlplus,以system使用者名稱登入,密碼是剛裝oracle時自己填寫的密碼orcl,登入進去以後。

SQL> conn sys/sys as sysdba; (分號是必須的但是我是以system登入的所在這不應該寫conn sys/sys as sysdba應該寫conn system/orcl as sysdba;)
Connected.
SQL> alter user scott account unlock;
User altered.
SQL> commit;
Commit complete.
SQL> conn scott/tiger//請輸入新密碼,並確認後OK
Password changed
Connected.

這時再到plsql developer裡面以scott/tiger登入就可以了。。。。。

Oracle 10g 預設安裝帶來的使用者名稱/密碼
Username
Password
Description
See Also

CTXSYS
CTXSYS
The Oracle Text account
Oracle Text Reference

DBSNMP
DBSNMP
The account used by the Management Agent component of Oracle Enterprise Manager to monitor and manage the database
Oracle Enterprise Manager Grid Control Installation and Basic Configuration

LBACSYS
LBACSYS
The Oracle Label Security administrator account
Oracle Label Security Administrator's Guide

MDDATA
MDDATA
The schema used by Oracle Spatial for storing Geocoder and router data
Oracle Spatial User's Guide and Reference

MDSYS
MDSYS
The Oracle Spatial and Oracle interMedia Locator administrator account
Oracle Spatial User's Guide and Reference

DMSYS
DMSYS
The Oracle Data Mining account.
Oracle Data Mining Administrator's Guide

Oracle Data Mining Concepts

OLAPSYS
MANAGER
The account used to create OLAP metadata structures. It owns the OLAP Catalog (CWMLite).
Oracle OLAP Application Developer's Guide

ORDPLUGINS
ORDPLUGINS
The Oracle interMedia user. Plug-ins supplied by Oracle and third party format plug-ins are installed in this schema.
Oracle interMedia User's Guide

ORDSYS
ORDSYS
The Oracle interMedia administrator account
Oracle interMedia User's Guide

OUTLN
OUTLN
The account that supports plan stability. Plan stability enables you to maintain the same execution plans for the same SQL statements. OUTLN acts as a role to centrally manage metadata associated with stored outlines.
Oracle Database Performance Tuning Guide

SI_INFORMTN_SCHEMA
SI_INFORMTN_SCHEMA
The account that stores the information views for the SQL/MM Still Image Standard
Oracle interMedia User's Guide

SYS
CHANGE_ON_INSTALL
The account used to perform database administration tasks
Oracle Database Administrator's Guide

SYSMAN
CHANGE_ON_INSTALL
The account used to perform Oracle Enterprise Manager database administration tasks. Note that SYS and SYSTEM can also perform these tasks.
Oracle Enterprise Manager Grid Control Installation and Basic Configuration

SYSTEM
MANAGER
Another account used to perform database administration tasks

(3)WIN7下處理在SQL命令列中用EDIT指令產生SP2-0110: 無法建立儲存檔案 "afiedt.buf"的問題。

解決辦法為將SQL*PLUS設定為以管理員許可權執行,因為其許可權不足以開啟NOTEPAD。