總網頁瀏覽量

2013年2月5日 星期二

安裝Oracle11 R2 in windows server 2008

安裝環境:
virtual box的windows server 2008安裝oracle11g

去官方網站下載第十一版
官網將檔案分兩個壓縮檔
下載之後務必將第二個壓縮檔放進第一壓縮檔
對應的資料夾

開始安裝:

第一步驟:
要不要給email獲得官網資訊安全更新資料
通常跟垃圾信件差不多
且不想讓他占據資源,我取消打勾。

之後出現
do you wish to remain uniformed of critical security issues in your configuration?

將yes打勾吧!!!


第二步驟:
因為是第一次裝DB就選第一項
create and configuration database
建立並規畫資料庫


第三步驟:system class
desktop class 是輕量(minimal)安裝
server class 當作資料中心用的,電腦當server用的就選這個


第四步驟:grid installation options
因為資料庫只裝在一台電腦
選single instance database installation
(另一個是cluster database用的)


第五步驟:install type(安裝種類)

之後想設定system密碼、字元集、DB語言,選 advance。
選typical type(典型安裝)以上都會採用預設值


第六步驟:如果電腦時區設定是台北,語言就選traditional chinese
第七步驟:instal location
oracle安裝路徑採預設值

第八步驟:configuration type
選一般用途與交易處理
(選資料倉儲用途是要OLAP跟data mining)

第九步驟:database indentifiers
設定全域資料庫名稱
與service identifier(SID)
在global database name打上first

在SID說明他的意思是好像是
"一個資料庫由一個以上oracle instance認領,資料庫要辨認是哪個oracle就是藉由SID"

全域資料庫名稱:配合domainName取資料庫名稱
DomainName名稱不一定要跟DNS網域名稱一樣
全域資料庫名稱在網際網路是獨一無二的。



第十步驟:configuration options
memory設定350    (隨安裝者高興,不要太低ex:給10MB)
字元集選 utf8  (國際通用的)
security:將assert all new security setting打勾
sample schema:第一次建立DB,將建立sample schema打勾
往後建立第二個DB時候可以套用此sample schema


第十一步驟:management options
採用data control

第十二步驟:database storage
資料庫、資料表單存放路徑,採預設值

第十三步驟:backup and recovery
目前還不熟oracle
選不要自動備份還原

第十四步驟:schema passwords
設定sys,system,sysman,dbsmp密碼
sys權限比system高

第二個選項是懶人設定法
將四個帳號密碼設定一模一樣
切記密碼不要有@ /

第十五步驟:prerequiste checks 必要查核
這邊告訴你目前環境設定。


安裝過程依然到45%就慢下來,
這時系統正在創造log file存放路徑






全域資料庫名稱:配合domainName取資料庫名稱
DomainName名稱不一定要跟DNS網域名稱一樣
全域資料庫名稱在網際網路是獨一無二的。



最後出現enterprise manager configuration fiail
監視器程序未啟動或資料庫未註冊到監視程序
啟動監視器並註冊資料庫服務,之後重新啟動EN Configuration Assistant
有關資料請參考D:\Oracle\cfigtoologs\dbca\first\enConfig.log 中的日志文件。
之後可以手動 D:\Oracleproduct\11.2.0\dbhome_1\bin\emca脚本,重新使用Enterprise Management

網路說大可不必重裝

目前初步排除密碼的問題
排除時差的問題


去cfigtoologs\emca\first
查log檔案
出現多次socket read timeout
(初步判斷可能是IP設定有問題)




找到解答是說:
只要將OracleOraDb11g_home1TNSLitener、OracleRemExecService和OracleServiceORCL
這三個service precess 啟動即可

不過我無法啟動OracleRemExecService
因為service表單裡面找不到


enterprise manager configuration assistant(emca)
在cmd打下面指令重新設定
組態變數
emca -config dbcontrol db -repos recreate
仍然無法安裝成功em

監聽器port要設1521
如果設定1158系統不給過
會找不到監聽器service




之後在其他網站又查到
Cause: The windows Server 2008 machine is in an active directory and is using IPv6. When the short hostname is pinged, it is resolved via the fully qualified hostname to an IPv6

I was able to fix the issue by following these steps:

Add entries into the host file, to force IPv4 style resolution:-

1) edit the windows\system32\drivers\etc\hosts file

2) add an entry for the machine of the format:-

<ipaddress> <fully qualified hostname> <short hostname>

Document ID: Error Uploading Configuration Data To The Repository" when configuring dbconsole [ID 1233913.1]


另一位是說:

I have checked the hosts file under system32/drivers/etc. There is no setting in it.
So I changed the configure in it with below:
127.0.0.1 localhost
172.16.1.37 windows-a
And I try to create the EM setting again.

It works.
So for windows 2008, you need to do two things:
1. configure the hosts file;
2. close the firewall;
Thank you so much for your help.


另一個網站說:

windows server 默認使用IPV6協議解析,在命令提式字元ping電腦主機,他通過完整主機名稱解析到IPV6地址

ping localhost 
結果秀出
IPV6格式的 "  ::1: "
 
DBconsole 11.2圍繞網格控制(grid control)10.2.0.4,所以不支持IPv6兼容。
網格控制11.1.0.1是IPv6兼容。

也就是說操作系統使用IPV6解析地址,而EM需要IPV4解析地址。
解決方法:強行使用IPV4解析地址

1.編輯windows\system32\drivers\etc\hosts.file
2.添加一個ip 與 主機名稱解析的格式

<ipaddress> <fully qualified hostname> <short hostname> <ip地址><完整主機名稱> <短主機名稱>

eg.例如。

192.168.77.1 swspor.oraclemachine.com oraclemachine

127.0.0.1  localhost
10.0.2.2    first



再去cmd
ping localhost
變成IPv4解析了


之後手動建立em


更改host.file終於成功建立emca
可以打開
http://localhost:1158/em
但是是空白的網頁

且service看不到OracleRemExecService



空白網頁問題
有人說是環境變數路徑衝到

新建path为SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
不行就重新安装IIS系统组件



有人說是安全性的問題
http://localhost:1158/em加入到信任網站



事實上就是安全性的問題。
之後可以開啟網頁
並且在service 找到oracleremexecservice以及oracledbconsoleOOXX


心得:
這問題卡了三天才解決。
重裝了四五次左右。
很多事情就是江湖一點訣
需要靠經驗才能處理

網路上爬文看了許多論壇
發現很多人習慣跟發問者講模模糊糊的題示(大多數有講跟沒講一樣)。
乍看之下是讓網友有學習機會
但這只是讓人重新發明輪子(Reinventing the Wheel)而已
花很多時間在解決別人很久以前就解決的問題
其實只要知道輪子怎樣做出來就夠了



圖形介面管理工具網址:
https://first:1158/em/console/logon/logon

沒有留言:

張貼留言