系統(tǒng)使用的后臺進程Li" />

日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

使用OEM,SQL*Plus,iSQL*Plus 管理Oracle實例

系統(tǒng) 2406 0

--==========================================

-- 使用 OEM,SQL*Plus,iSQL*Plus 管理 Oracle 實例

--==========================================

/*

一、管理組件

??? Oracle 10g 數(shù)據(jù)庫管理包含三個組件 , 本文主要介紹 Database Control,SQL*Plus iSQL*Plus

??? ?? Database instance( 數(shù)據(jù)庫實例 ) ? --> 系統(tǒng)使用的后臺進程

??? ?? Listener ( 監(jiān)聽器 ) ???? ????????? --> 監(jiān)聽客戶端連接到數(shù)據(jù)庫

??? ?? Management interfance

??? ?????? Database Control ?????????? -->OEM

?????? ?? Management agent (when using Grid Control) ? -- 網(wǎng)格管理

二、使用 OEM 管理 Oracle ????? ??

??? 1. 關(guān)于 OEM Oracle i 開始就隨軟件提供企業(yè)管理器( OEM

??? ??? g 中, oracle dbca 建庫過程中會出現(xiàn)四個用戶: sys,system,dbsnap,sysman

?????? (--dbsnap 用戶用于 OEM 智能代理管理工作, sysman 用戶則是 OEM 的管理員帳號)

?????? 如果在 dbca 建庫過程中沒有選擇安裝 OEM, 則沒有 dbsnap sysman 用戶,如果在 dbca 建庫時選擇啟用 database control 管理數(shù)據(jù)庫,

?????? 則需要在數(shù)據(jù)庫中建立一個 sysman schema ,用于保存 OEM 的一些數(shù)據(jù),這個就是 OEM 的資料檔案庫( repository) ,在 G 版本中,

?????? 這個庫存儲在 sysaux 表空間中

??????

??? 2.OEM 的啟動和關(guān)閉

??? 啟動: emctl start dbconsole ?? 啟動后用瀏覽器 http://IP:1158/em ?? 來登陸 OEM ,進行圖形化操作數(shù)據(jù)庫

?????? 關(guān)閉: emctl stop dbconsole

?????? 狀態(tài): emctl status dbconsole ???????????????????? */

?????? -- 下面演示 EM 啟動到停止的過程

?????? [oracle@robinson scripts]$ emctl start dbconsole ? -- 啟動

??????? TZ set to PRC

??????? Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 ?

??????? Copyright (c) 1996, 2005 Oracle Corporation. ? All rights reserved.

??????? http://robinson.com:1158/em/console/aboutApplication

??????? Starting Oracle Enterprise Manager 10g Database Control ...................... started.

??????? ------------------------------------------------------------------

??????? Logs are generated in directory /u01/app/oracle/10g/robinson.com_orcl/sysman/log

??????? [oracle@robinson scripts]$ emctl status dbconsole ??? -- 查看狀態(tài)

??????? TZ set to PRC

??????? Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 ?

??????? Copyright (c) 1996, 2005 Oracle Corporation. ? All rights reserved.

??????? http://robinson.com:1158/em/console/aboutApplication

??????? Oracle Enterprise Manager 10g is running.

??????? ------------------------------------------------------------------

??????? Logs are generated in directory /u01/app/oracle/10g/robinson.com_orcl/sysman/log

??????? [oracle@robinson scripts]$ emctl stop dbconsole ????? -- 停止

??????? TZ set to PRC

??????? Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 ?

??????? Copyright (c) 1996, 2005 Oracle Corporation. ? All rights reserved.

??????? http://robinson.com:1158/em/console/aboutApplication

??????? Stopping Oracle Enterprise Manager 10g Database Control ...

??????? ... ? Stopped.

??????? /*

???????

??? 3. 重建 OEM

    由于 EM 需要 J2EE 環(huán)境支持,正常創(chuàng)建后,在 $ORACLE_HOME 目錄下將會建立一個

    類似 $ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_<hostname>_<sid> 的目錄,如果此目錄不存在,則 EM 將無法啟動。

    另外,如果服務器修改過主機名等信息,導致 OEM 可能無法啟動,此時需要重新配置 EM ???

??????? 使用 emca 命令來重建 EM 檔案庫,關(guān)于 emca 的用戶,使用 emca -h 來查看詳細說明 */

??????

?????? [oracle@robinson scripts]$ emca - config dbcontrol db - repos recreate

?

?????? STARTED EMCA at Apr 21, 2010 3:09:04 PM

?????? EM Configuration Assistant, Version 10.2.0.1.0 Production

?????? Copyright (c) 2003, 2005, Oracle. ? All rights reserved.

?

?????? Enter the following information:

?????? Database SID: orcl

?????? Database Control is already configured for the database orcl

?????? You have chosen to configure Database Control for managing the database orcl

?????? This will remove the existing configuration and the default settings and perform a fresh configuration

?????? Do you wish to continue? [yes(Y)/no(N)]: y

?????? Listener port number: 1521

?????? Password for SYS user: ?

?????? Password for DBSNMP user: ?

?????? Password for SYSMAN user: ?

?????? Email address for notifications (optional):

?????? Outgoing Mail (SMTP) server for notifications (optional):

?????? -----------------------------------------------------------------

?

?????? You have specified the following settings

?

?????? Database ORACLE_HOME ................ /u01/app/oracle/10g

?

?????? Database hostname ................ robinson.com

?????? Listener port number ................ 1521

?????? Database SID ................ orcl

?????? Email address for notifications ...............

?????? Outgoing Mail (SMTP) server for notifications ...............

?

?????? -----------------------------------------------------------------

?????? Do you wish to continue? [yes(Y)/no(N)]: y

?????? Apr 21, 2010 3:09:24 PM oracle.sysman.emcp.EMConfig perform

?????? INFO: This operation is being logged at /u01/app/oracle/10g/cfgtoollogs/emca/orcl/emca_2010-04-21_03-09-04-PM.log.

?????? Apr 21, 2010 3:09:25 PM oracle.sysman.emcp.util.DBControlUtil stopOMS

?????? INFO: Stopping Database Control (this may take a while) ...

?????? Apr 21, 2010 3:09:32 PM oracle.sysman.emcp.EMReposConfig dropRepository

?????? INFO: Dropping the EM repository (this may take a while) ...

?????? Apr 21, 2010 3:11:41 PM oracle.sysman.emcp.EMReposConfig invoke

?????? INFO: Repository successfully dropped

?????? Apr 21, 2010 3:11:41 PM oracle.sysman.emcp.EMReposConfig createRepository

?????? INFO: Creating the EM repository (this may take a while) ...

?????? Apr 21, 2010 3:16:01 PM oracle.sysman.emcp.EMReposConfig invoke

?????? INFO: Repository successfully created

?????? Apr 21, 2010 3:16:08 PM oracle.sysman.emcp.util.DBControlUtil startOMS

?????? INFO: Starting Database Control (this may take a while) ...

?????? Apr 21, 2010 3:17:55 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration

?????? INFO: Database Control started successfully

?????? Apr 21, 2010 3:17:55 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration

?????? INFO: >>>>>>>>>>> The Database Control URL is http://robinson.com:1158/em <<<<<<<<<<<

?????? Enterprise Manager configuration completed successfully

?????? FINISHED EMCA at Apr 21, 2010 3:17:55 PM

?????? [oracle@robinson scripts]$ emctl status dbconsole

?????? TZ set to PRC

?????? Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 ?

?????? Copyright (c) 1996, 2005 Oracle Corporation. ? All rights reserved.

?????? http://robinson.com:1158/em/console/aboutApplication

?????? Oracle Enterprise Manager 10g is running.

?????? ------------------------------------------------------------------

?????? Logs are generated in directory /u01/app/oracle/10g/robinson.com_orcl/sysman/log

?????? /*

?????? 注意:如果啟動 EM 有問題,確保監(jiān)聽器已經(jīng)啟動

?????? 打開瀏覽器,使用 sysman 用戶登陸,也可以使用 sys 用戶登陸,當使用 sys 用戶登陸時,注意幾點:

?????? a. 口令文件存在并配置正常

?????? b. 監(jiān)聽啟動

?????? c.remote_login_passwordfile 設置不能為 NONE

?????? 重建 EM 成功后, ORACLE 主要創(chuàng)建的相關(guān)目錄有個,分別是 :

??????? a.$ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_<hostname>_<sid>

??????? b.$ORACLE_HOME/<hostname>_<sid>

??????

??? 4. 查看默認的端口號 ?? ?? */

??? ?? [oracle@robinson scripts]$ cat $ORACLE_HOME/install/portlist.ini

??????? iSQL*Plus HTTP port number =5560

??????? Enterprise Manager Console HTTP Port (orcl) = 1158

??????? Enterprise Manager Agent Port (orcl) = 3938

??? ? /* ???

??????

??? 5. 建議

??? ??? OEM 管理和維護直觀簡單,但并不建議使用 OEM 來進行管理,因為 JAVA 的界面通常消耗的資源較多,

?????? 加上網(wǎng)絡連接的因素, OEM 界面很容易失去響應,從而可能導致很多意外,通過命令行操作可以讓

?????? 我們更加熟悉 ORACLE 的本質(zhì),又可以減少低級的意外錯誤。

?

三、使用 SQL*Plus iSQL*Plus 管理 Oracle

??? SQL*Plus iSQL*Plus 同樣可以完成 Oracle 的管理工作,能夠通過命令的方式來執(zhí)行查詢,更新,刪除等操作

??????

??? 1.SQL*Plus 使用相關(guān)賬戶登陸到到實例,啟動數(shù)據(jù)庫,完成相關(guān)的管理任務 ? */

? ?? ? [oracle@robinson scripts]$ sqlplus / as sysdba

?

????? SQL*Plus: Release 10.2.0.1.0 - Production on Wed Apr 21 15:38:54 2010

?

????? Copyright (c) 1982, 2005, Oracle. ? All rights reserved.

?

???? Connected to:

???? Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

???? With the Partitioning, OLAP and Data Mining options

?

???? SQL> ?

??? ? /*

??? ?

??? 2.iSQL*Plus( i 開始出現(xiàn)的基于 web sqlplus 工具 )

????? 10g iSQL*Plus 的啟動與關(guān)閉

????? 啟動: isqlplusctl start

??? ? 關(guān)閉: isqlplusctl stop ??????????????????? */

??? ? [oracle@robinson scripts]$ isqlplusctl start

????? perl: warning: Setting locale failed.

????? perl: warning: Please check that your locale settings:

????????? LANGUAGE = (unset),

????????? LC_ALL = (unset),

????????? LANG = "en"

????? are supported and installed on your system.

????? perl: warning: Falling back to the standard locale ("C").

????? iSQL*Plus 10.2.0.1.0

????? Copyright (c) 2003, 2005, Oracle. ? All rights reserved.

????? Starting iSQL*Plus ...

????? iSQL*Plus started.

?

??? ? [oracle@robinson scripts]$ isqlplusctl stop

????? perl: warning: Setting locale failed.

????? perl: warning: Please check that your locale settings:

????????? LANGUAGE = (unset),

????????? LC_ALL = (unset),

????????? LANG = "en"

????? are supported and installed on your system.

???? perl: warning: Falling back to the standard locale ("C").

???? iSQL*Plus 10.2.0.1.0

???? Copyright (c) 2003, 2005, Oracle. ? All rights reserved.

???? Stopping iSQL*Plus ...

???? iSQL*Plus stopped.

?

????? /*

??? ? 修改 iSQL*Plus 默認端口號

??? ? [oracle@robinson scripts]$ cat $ORACLE_HOME/oc4j/j2ee/isqlplus/config/http-web-site.xml |grep 5560

????? <web-site port="5560" display-name="OC4J Java HTTP Web Site"> ? -- 將改為其他端口號即可

??? ?

??? ? 啟動 isqlplus, 然后通過瀏覽器登陸 http://IP:5560/isqlplus

??? ? 注意:默認情況下, sysdba 用戶無法通過 isqlplus 登陸 ?

??? ?

四、更多 ??????? */

?

??? SQL/PLSQL 基礎

???

??? Oralce 10g 使用 DBCA 創(chuàng)建數(shù)據(jù)庫

???

??? 使用 Uniread 實現(xiàn) SQLplus 翻頁功能

???

??? Linux (RHEL 5.4) 下安裝 Oracle 10g R2

???

??? VmWare6.5.2 下安裝 RHEL 5.4 (配置 Oracle 安裝環(huán)境)

???

??? Oracle 相關(guān)

?

??? Oracle 實例和 Oracle 數(shù)據(jù)庫 (Oracle 體系結(jié)構(gòu) )

??? ??

?

?

使用OEM,SQL*Plus,iSQL*Plus 管理Oracle實例


更多文章、技術(shù)交流、商務合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯(lián)系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發(fā)表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 丹棱县| 卓尼县| 珠海市| 北安市| 亚东县| 玉树县| 长垣县| 麻江县| 龙泉市| 运城市| 沁水县| 沙雅县| 汨罗市| 唐河县| 阿合奇县| 恭城| 东安县| 新和县| 麻阳| 长寿区| 平舆县| 临海市| 平远县| 平阴县| 交城县| 江口县| 通河县| 荃湾区| 佳木斯市| 新宁县| 确山县| 伽师县| 深水埗区| 吕梁市| 佛冈县| 卢湾区| 海安县| 黄冈市| 广灵县| 卢湾区| 景洪市|