Oracle重建企業管理器
1.首先建立監聽
[root@primary ~]# xhost +
access control disabled, clients can connect from any host
[root@primary ~]# su - oracle
[oracle@primary ~]$ netca
[root@primary ~]# xhost +
access control disabled, clients can connect from any host
[root@primary ~]# su - oracle
[oracle@primary ~]$ netca
批註:此處建立的監聽名字LISTENER,database_ID=orcl
檢視企業管理器的網頁瀏覽方式所在目錄參考,如下:
[root@primary ~]# su - oracle
[oracle@primary ~]$ cd $ORACLE_HOME
[oracle@primary db_1]$ cd install
[oracle@primary install]$ more readme.txt
The following J2EE Applications have been deployed and are accessible at the URL
s listed below.
iSQL*Plus URL:
http://primary:5560/isqlplus
iSQL*Plus DBA URL:
http://primary:5560/isqlplus/dba
http://primary:1158/em
http://primary:1158/em
2.開啟資料庫
[oracle@primary install]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jun 17 08:33:17 2014
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> select instance_name,status from V$instance;
INSTANCE_NAME STATUS
---------------- ------------
orcl OPEN
[oracle@primary install]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jun 17 08:33:17 2014
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> select instance_name,status from V$instance;
INSTANCE_NAME STATUS
---------------- ------------
orcl OPEN
3.檢視監聽狀態,必須是執行狀態
[oracle@primary install]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 17-JUN-2014 08:35:40
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=primary)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 17-JUN-2014 08:29:31
Uptime 0 days 0 hr. 6 min. 8 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/oracle/db_1/network/admin/listener.ora
Listener Log File /u01/oracle/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=primary)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orcl_XPT" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@primary install]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 17-JUN-2014 08:35:40
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=primary)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 17-JUN-2014 08:29:31
Uptime 0 days 0 hr. 6 min. 8 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/oracle/db_1/network/admin/listener.ora
Listener Log File /u01/oracle/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=primary)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orcl_XPT" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
檢視監聽埠號,如下:
[oracle@primary install]$ cd $ORACLE_HOME/network/admin/
[oracle@primary install]$ cd $ORACLE_HOME/network/admin/
[oracle@primary admin]$ ls
listener.ora samples shrept.lst tnsnames.ora
[oracle@primary admin]$ more listener.ora
# listener.ora Network Configuration File: /u01/oracle/db_1/network/admin/listen
er.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/oracle/db_1)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = primary)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
listener.ora samples shrept.lst tnsnames.ora
[oracle@primary admin]$ more listener.ora
# listener.ora Network Configuration File: /u01/oracle/db_1/network/admin/listen
er.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/oracle/db_1)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = primary)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
4.檢視/etc/hosts裡邊的IP地址和主機名必須與實際一致
[root@primary ~]# hostname
primary
[root@primary ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:29:DA:7E:F0
inet addr:192.168.10.10 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:feda:7ef0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6392 errors:0 dropped:0 overruns:0 frame:0
TX packets:10621 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:458467 (447.7 KiB) TX bytes:1665793 (1.5 MiB)
Interrupt:59 Base address:0x2024
[root@primary ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost
192.168.10.10 primary
#::1 localhost6.localdomain6 localhost6
[root@primary ~]# hostname
primary
[root@primary ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:29:DA:7E:F0
inet addr:192.168.10.10 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:feda:7ef0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6392 errors:0 dropped:0 overruns:0 frame:0
TX packets:10621 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:458467 (447.7 KiB) TX bytes:1665793 (1.5 MiB)
Interrupt:59 Base address:0x2024
[root@primary ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost
192.168.10.10 primary
#::1 localhost6.localdomain6 localhost6
5.關閉企業管理器 emctl stop dbconsole
[oracle@primary ~]$ 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://primary:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
... Stopped.
[oracle@primary ~]$ 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://primary:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
... Stopped.
6.刪除em資料庫 emca –repos drop
[oracle@primary ~]$ emca -repos drop
STARTED EMCA at Jun 17, 2014 8:44:08 AM
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
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]: y
Jun 17, 2014 8:44:19 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/oracle/db_1/cfgtoollogs/emca/orcl/emca_2014-06-17_08-44-08-AM.log.
Jun 17, 2014 8:44:20 AM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
Jun 17, 2014 8:46:27 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jun 17, 2014 8:46:28 AM
[oracle@primary ~]$ emca -repos drop
STARTED EMCA at Jun 17, 2014 8:44:08 AM
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
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]: y
Jun 17, 2014 8:44:19 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/oracle/db_1/cfgtoollogs/emca/orcl/emca_2014-06-17_08-44-08-AM.log.
Jun 17, 2014 8:44:20 AM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
Jun 17, 2014 8:46:27 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jun 17, 2014 8:46:28 AM
7.建立em資料庫 emca -repos create
[oracle@primary ~]$ emca -repos create
STARTED EMCA at Jun 17, 2014 8:47:23 AM
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
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]: y
Jun 17, 2014 8:47:34 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/oracle/db_1/cfgtoollogs/emca/orcl/emca_2014-06-17_08-47-23-AM.log.
Jun 17, 2014 8:47:34 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Jun 17, 2014 8:50:33 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jun 17, 2014 8:50:33 AM
[oracle@primary ~]$ emca -repos create
STARTED EMCA at Jun 17, 2014 8:47:23 AM
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
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]: y
Jun 17, 2014 8:47:34 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/oracle/db_1/cfgtoollogs/emca/orcl/emca_2014-06-17_08-47-23-AM.log.
Jun 17, 2014 8:47:34 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Jun 17, 2014 8:50:33 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jun 17, 2014 8:50:33 AM
8.配置em :emca –config
dbcontrol db
首先在實體機上新增一塊網路卡:

批註:此處設定的第二塊網路卡應與虛擬機器中的網路卡在同一個網段,然後雖然實體機的IP和虛擬機器不在同一個網段,也能夠通過剛剛設定的第二塊網路卡和之相通。
[oracle@primary ~]$ emca -config dbcontrol db
STARTED EMCA at Jun 17, 2014 8:55:23 AM
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/oracle/db_1
Database hostname ................ primary
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
Jun 17, 2014 8:55:43 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/oracle/db_1/cfgtoollogs/emca/orcl/emca_2014-06-17_08-55-23-AM.log.
Jun 17, 2014 8:55:44 AM oracle.sysman.emcp.DatabaseChecks performReposChecks
WARNING: 'shared_pool_size' must be greater than or equal to 80 MB.
Jun 17, 2014 8:55:46 AM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Jun 17, 2014 8:55:56 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jun 17, 2014 8:57:33 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Jun 17, 2014 8:57:33 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://primary:1158/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jun 17, 2014 8:57:33 AM
首先在實體機上新增一塊網路卡:

批註:此處設定的第二塊網路卡應與虛擬機器中的網路卡在同一個網段,然後雖然實體機的IP和虛擬機器不在同一個網段,也能夠通過剛剛設定的第二塊網路卡和之相通。
[oracle@primary ~]$ emca -config dbcontrol db
STARTED EMCA at Jun 17, 2014 8:55:23 AM
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/oracle/db_1
Database hostname ................ primary
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
Jun 17, 2014 8:55:43 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/oracle/db_1/cfgtoollogs/emca/orcl/emca_2014-06-17_08-55-23-AM.log.
Jun 17, 2014 8:55:44 AM oracle.sysman.emcp.DatabaseChecks performReposChecks
WARNING: 'shared_pool_size' must be greater than or equal to 80 MB.
Jun 17, 2014 8:55:46 AM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Jun 17, 2014 8:55:56 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jun 17, 2014 8:57:33 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Jun 17, 2014 8:57:33 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://primary:1158/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jun 17, 2014 8:57:33 AM
9.檢視em狀態emctl status dbconsole
[oracle@primary ~]$ 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://primary:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
------------------------------------------------------------------
Logs are generated in directory /u01/oracle/db_1/primary_orcl/sysman/log
[oracle@primary ~]$ 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://primary:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
------------------------------------------------------------------
Logs are generated in directory /u01/oracle/db_1/primary_orcl/sysman/log
10.簡單測試
測試前的準備工作,如下:
1)檢測實體機能否ping通虛擬機器(虛擬機器能ping通實體機,這個沒得說)

2)檢測虛擬機器中設定的埠能否連線:

出現如下介面表示能夠連通:

3)瀏覽器中輸入 http://192.168.10.10:1158/em 測試

成功登陸之後顯示如下介面表示em重置成功:

測試前的準備工作,如下:
1)檢測實體機能否ping通虛擬機器(虛擬機器能ping通實體機,這個沒得說)

2)檢測虛擬機器中設定的埠能否連線:

出現如下介面表示能夠連通:

3)瀏覽器中輸入 http://192.168.10.10:1158/em 測試

成功登陸之後顯示如下介面表示em重置成功:

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29634949/viewspace-1184425/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle重建ocrOracle
- oracle重建索引(一)Oracle索引
- oracle重建索引(三)Oracle索引
- oracle DBA 角色重建Oracle
- oracle重建索引(二)Oracle索引
- 八 企業管理器 GBaseDataStudioAST
- Oracle 11g刪除庫重建Oracle
- 【TUNE_ORACLE】索引定期重建的利與弊Oracle索引
- oracle快速拿到重建控制檔案語句的方法二Oracle
- [重慶思莊每日技術分享]-重建 oracle Bootstrap IndexesOraclebootIndex
- 使用資源管理器優化Oracle效能AQ優化Oracle
- 幽默:重建模、重建和重構
- 【SQL】Oracle資料庫通過job定期重建同步表資料SQLOracle資料庫
- 記一次Oracle分割槽表全域性索引重建的過程Oracle索引
- 重建索引索引
- 索引重建索引
- 【SPM】Oracle計劃管理器SPM介紹及用例Oracle
- 重建共享(db或asm)密碼檔案 in Oracle 19c RAC-20220209ASM密碼Oracle
- Oracle Java警察首次敲開財富200強企業大門OracleJava
- 企業何以為企業?
- Part I CDB中的Oracle資源管理器概述07-Oracle多租戶管理員指南Oracle
- Oracle開發:構建強大企業級應用的關鍵Oracle
- laradock mariadb 重建容器
- 重建GRUB選單
- MSSQL Rebuild(重建)索引SQLRebuild索引
- 為什麼企業CIO普遍不看好Oracle,卻鍾情於微軟?Oracle微軟
- 重建二叉樹二叉樹
- 匿名類 與 索引重建索引
- mysql xtracbakup 重建從庫 .MySql
- 蘋果企業簽名多少錢-ios企業簽名-企業簽名蘋果iOS
- 企業雲盤:企業雲盤的功能
- 企業為什麼需要企業雲盤
- 哪些企業網盤適合企業使用?
- 專業的帶三維重建技術醫學影像PACS系統
- 企業雲盤是如何管理企業檔案
- 企業辦公的新工具-企業網盤
- 重建二叉樹[by Python]二叉樹Python
- P4198 樓房重建
- 重建Windows引導分割槽Windows