티스토리 뷰

# reference : http://ethernet0.tistory.com/127

 

[ORACLE] ORACLE 11g EM(Enterprise Manager) 재설치

 

상태 확인

emctl status dbconsole

emctl status agent

 

중지

emctl stop dbconsole

 

제거

emca -deconfig dbcontrol db -repos drop

 

 

 

재설치

emca -config dbcontrol db -repos create

 

 

 

시작

 

emctl start dbconsole

 

---------------------------------------------------------------------------------------------------- ---

재설치 도중 오류가 발생할 경우 아래와 같이 조치

drop user SYSMAN cascade;

drop public synonym SETEMVIEWUSERCONTEXT;

drop role MGMT_USER;

drop PUBLIC SYNONYM MGMT_TARGET_BLACKOUTS;

drop user MGMT_VIEW;

 

그리고 아래 쿼리 실행하여 synonym 모두 삭제해준다.

select 'drop public synonym '||synonym_name||';' from dba_synonyms where table_owner = 'SYSMAN';

 

em config 제거하고

emca -deconfig dbcontrol db

 

재설치 다시 시도

emca -config dbcontrol db -repos create

 

설치 도중 DB 연결이 잘 안되거나 하는 오류가 발생할 경우 $ORACLE_HOME\bin\relink all 실행 한 번 해준다.

그래도 안되면 hostname이 문제가 될 경우가 많으니 hostname을 모두 IP address로 변 경해준다.

(환경변수인 ORACLE_HOSTNAME, 리스너, TNSNAME 포함)

 

 

1. em 재구성을 위해 정보를 입력합니다.
C: \> emca -deconfig dbcontrol db
...
Enter the following information:
Database SID: orcl  (설치할 때 입력한 SID 를 입력합니다~~)

Continue? [Is (Y) / No (N)]: y
...

2. 기존의 정보를 삭제합니다.
C: \> emca -repos drop
...
Enter the following information:
Database SID: orcl (설치할 때 입력한 SID 입력)
Listener port number: 1521 (설치할 때 입력한 Listener 포트 입력)
SYS user's password: (설치할 때 입력 비밀번호 입력)
SYSMAN user password: le 
SYSMAN user passwords: 
Continue? [Is (Y) / No (N)]: y 
...
Information: successfully deleted data repository has successfully completed the
configuration of Enterprise Manager 
...

3. 지금부터 새로 만듭니다.
C: \> emca -config dbcontrol db -repos create
...
Enter the following information:
Database SID: orcl  (새로 만들 SID 를 입력합니다..)
Listener port number: 1521 (Listener 포트를 입력합니다)
Listener ORACLE_HOME [D: \ app \ Administrator \ product \ 11.2.0 \ dbhome_1]:
SYS user's password: (비밀번호를 입력합니다~~~)
DBSNMP user's password: 
SYSMAN user password: 
SYSMAN user password: the email address (optional): (옵션이니깐 패스~~)
Notice copies (SMTP) server (optional): (이것두 패스~~)
...
Continue? [Is (Y) / No (N)]: y
...
Have successfully completed the configuration of Enterprise Manager
EMCA ends at 2010-7-16 9:56:19

4. em 상태를 확인합니다. (ORACLE_UNQNAME 환경에러라고 나오는데 5번에서 입력)
C: \> emctl status dbconsole 
Environment variable ORACLE_UNQNAME not defined.
Please set ORACLE_UNQNAME to database unique name. 

5. ORACLE_UNQNAME 을 설정합니다.
C: \> set ORACLE_UNQNAME = orcl

6. 다시 em 의 상태를 확인합니다.
C: \> emctl status dbconsole 
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0 
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. 
https: / / 192.168.0.228:1158 / em / console / aboutApplication 
Oracle Enterprise Manager 11g is running. 
-------------------------------------------------- ---------------- 
Logs are generated in directory D: \ app \ Administrator \ product \ 11.2.0 \ dbhome_1/192.168.0.228_orcl/sysman/log

7. 완료~~~

 

 

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2025/05   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
글 보관함