(Silent 패치) Oracle10g Patchset 10.2.0.5.0


http://tawool.tistory.com/184 포스팅에서는 처음부터 설치를 진행하고 패치적용 후에 DB를 생성했었다.
이 글에서는 이미 DB가 생성되어 구동중인 상태에서 10.2.0.5.0 patchset를 적용하는 시나리오다.

일단 DB가 생성되어 서비스중이라면 데이터 백업과  현재 Oracle Home 의 제품까지 백업하는것이 좋다.
시간은 좀 걸리겠지만. 상황이 발생했을 경우 최소한 처음 상태로 돌아갈 수는 있다.


주의 사항
1. 이해의 정확성을 위해 대부분 절대경로로 표시한다. (즉 상대경로로 실행해도 무방하다.)
2.사용자의 입력이 필요한 곳에서는 빨간 굵은으로 표시한다.
3. 과정명의 (..) 안에는 진행시 필요한 권한(계정)을 뜻한다. (생략은 관계없다)


기본 환경
1. RHEL 4
2. 관련 파일 : /home/oracle/install/
3. ORACLE_BASE : /home/oracle/
4. ORACLE_HOME : /home/oracle/product/10g
5. dba 권한 사용자 : oracle


관련 파일 목록
1. 10.2.0.5.0 patchset : p8202632_10205_LINUX

문서진행

1. Oracle 서비스 중지
  - 1.1 EM control 중지
  - 1.2 DB shutdown 
 

2. patchset 설치
  - 2.1 패치파일 압축 해제
  - 2.2 response 파일 편집
  - 2.3 설치 진행 로그 확인
  - 2.4 스크립트 실행
  - Trouble Shooting

3. DB 접속
  - 3.1 패치 적용 확인
 
- 3.2 catupgrd.sql 실행 
  - 3.3 utlrp.sql 실행
 

 

  
1. Oracle 서비스 중지 

EM Control 중지
$ emctl stop agent

DB Shutdown
$ sqlplus / as sysdba
SQL> shutdown immediate



2. patchset 설치 

패치 파일 압축 해제
# unzip /home/oracle/install/p8202632_10205_LINUX.zip
해당 디렉토리에 Disk1 디렉토리가 생성된다.

response 파일 편집
vi /home/oracle/install/Disk1/response/patchset.rsp

설치 진행 로그 확인
$ tail -f /home/oracle/oraInventory/logs/silentInstallYYYY-MM-DD_XX-XX-XXAM.log

스크립트 실행
아래 문장은 로그를 모니터링 하고 있으면 뜬다. 

The following configuration scripts need to be executed as the "root" user.
#!/bin/sh
#Root script to run
/home/oracle/product/10g/root.sh
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as "root"
    3. Run the scripts

다음과 같이 root 계정으로 접속하여 실행한다.

/home/oracle/product/10g/root.sh
Running Oracle 10g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /home/oracle/product/10g

Enter the full pathname of the local bin directory: [/usr/local/bin]: 엔터
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

만약 무슨 여부를 묻는다면 y 를 입력한다.



- patchset 10.2.0.5.0 적용 Trouble Shooting -

1. 환경변수 DISPLAY 문제
-- Solution --
관련 프로세서가 구동중이라서 더이상 진행을 못한 상태이다.
1. Oracle 서비스 중지 항목을 살펴보고 runInstaller 를 다시 실행한다.
-- Error Message --
Oracle Universal Installer has detected that there are processes running in the currently selected Oracle Home. The following processes need to be shutdown before continuing:
 oracle sqlplus
Oracle Universal Installer has detected that there are processes running in the currently selected Oracle Home. The following processes need to be shutdown before continuing:
 oracle sqlplus
This silent installation was unsuccessful..



 


3. DB 접속 

패치 적용 확인
아래처럼 Release 10.2.0.5.0 으로 표시되면 패치는 성공적으로 적용이 된 상태이다.



현재 DB 상태를 보면 정상적일때는 OPEN 으로 뜨겠지만 패치를 적용하고 쿼리를 날리면 'OPEN MIGRATE' 라고 표시되는 것을 확인 할 수있다.
SQL> SELECT status FROM v$instance;



catupgrd.sql 실행 (약 30분 소요)
외부 sql 파일을 실행하자.
SQL> @?/rdbms/admin/catupgrd.sql

아래와 같은 화면이 뜨면서 작업이 진행된다. 시간이 좀 걸린다.



SQL> shutdown immediate
SQL> startup

utlrp.sql 실행
SQL> @?/rdbms/admin/utlrp.sql

약간만 기다리면 금방 끝난다.
끝나고 제대로 인스탄스가 올라왔는지 확인해보자.