2013년 7월 30일 화요일

Enterprise Manager 설치시 확인사항 및 에러발생시 조치내용

1. Test 환경
  1) Oracle Version : 11g r2 Enterprise Edition
  2) OS : Centos 6.4 (Final)  ※ Virtual Box에 설치됨
  3) DB생성 옵션 : 수동생성 (Self Training 오라클 관리 참조)
2. 설치전 확인사항
  1) remote_login_passwordfile 설정여부
     ※remote_login_passwordfile 설정이 NONE 이거나 패스워드 파일을 생성하지 않았다면 EM에
      서 sysdba 권한으로 접속할 수 없다.
      (1) 시스템 파라미터 변경 : alter system set remote_login_passwordfile=exclusive scope=spfile;
         ※ 참고사항
           ① sysdba 권한으로 파라미터를 수정할 것
           ② 데이터베이스를 재기동해야만 반영된다.
           ③ 파라미터를 변경했는데도 설정값이 'NONE' 이라면 pfile를 생성하여 중복 설정이 있
               는지 확인한다.
                   확인) show parameter remote_login_passwordfile
                   PFILE생성) create pfile from spfile
      (2) 패스워드 파일 생성 : orapwd file=$ORACLE_HOME/dbs/orapw인스턴스명
         ※ 참고사항
           ① 인스턴스명은 대소문자를 구분한다 대소문자가 정확하지 않으면 인식안됨!
      (3) 인스턴스 재기동
  2) 리스너 설정여부
      (1) listener.ora 파일 생성
          ① 파일경로: $ORACLE_HOME/network/admin/listener.ora
          ② sample :
              SID_LIST_LISTENER=
                  (SID_LIST=
                      (SID_DESC=
                          (SID_NAME=orcl)
                          (ORACLE_HOME=/app/ora11g/11g)
                       )
                   )
              LISTENER =
                  (DESCRIPTION_LIST =
                      (DESCRIPTION =
                          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
                          (ADDRESS = (PROTOCOL = TCP)(HOST = oracle.install.co.kr)(PORT = 1521))
                       )
                   )
               ADR_BASE_LISTENER = /app/ora11g

      (2) 리스너 기동 : lsnrctl start
        ※ 기동후 반드시 제대로 동작하는지 확인해야 한다.(lsnrctl status, service)
      (3) 테이블스페이스 공간정보
          ※ EM 설치시에 SYSTEM, SYSAUX, UNDO 테이블스페이스의 공간이 부족하다면
             인스톨 실패한다. 공간이 부족하다면 데이터 파일을 추가하거나 기존 데이터 파일의
             가용량을 늘린다.(Auto Extend on을 추천함)

3. 설치시 발생할 수 있는 에러
    1) ora-01653 unable to extend table in tablespace  
           해결방법 : 해당 테이블스페이스 공간을 늘림(System)
    2) ora-01658: unable to create INITIAL extent for segment in tablespace string
         해결방법 : 해당 테이블스페이스 공간을 늘림(Sysaux)
    3) ora-00955: name is already used by an existing object
          해결방법 : emca로 저장소 삭제 후 sysman 계정 수동 삭제
              (1) emca -deconfig dbcontrol db -repos drop
              (2) sysdba 계정으로 접속 후 sysman  계정 수동 삭제
                  ① drop user sysman cascade
                  ② drop public synonym setemviewusercontext
                  ③ drop role mgmt_user
                  ④ drop public synonym mgmt_target_blackouts
                  ⑤ drop user mgmt_view
          ※ 참고사항
           ① EM 설치시 실패를 할 경우 emca를 사용하여 저장소를 반드시 drop 시킨다.
           ② 저장소 drop후 sysman 계정이 삭제되었는지 여부를 확인한다.

참고자료:
   ①  http://blog.mclaughlinsoftware.com/oracle-architecture-configuration/changing-windows-hostname-and-oracle-enterprise-manager/
   ② http://rance18.egloos.com/3984 (위의 방법으로 sysman 계정이 삭제되지 않을 경우 참고)

2013년 7월 21일 일요일

2013년 7월 15일 월요일

우연히 발견한 Java 기본클래스 java.awt.Robot

무심코 자바 api를 보다가 발견한 클래스
마우스와 키보드 입력을 자동으로 동작하기 위해 만들어진 듯 하다.
하지만 특정 플랫폼에서 권한관련 문제로 AWTException이 발생할 수 있다고 함
(클래스의 인스턴스 생성시 익셉션 발생함)
매소드 구성을 보니  마우스 매크로 프로그램을 보는 것이 아닌가 싶을 정도로 사용법이 간단하다.

BufferedImagecreateScreenCapture(Rectangle screenRect)
          Creates an image containing pixels read from the screen.
 voiddelay(int ms)
          Sleeps for the specified time.
 intgetAutoDelay()
          Returns the number of milliseconds this Robot sleeps after generating an event.
 ColorgetPixelColor(int x, int y)
          Returns the color of a pixel at the given screen coordinates.
 booleanisAutoWaitForIdle()
          Returns whether this Robot automatically invokes waitForIdle after generating an event.
 voidkeyPress(int keycode)
          Presses a given key.
 voidkeyRelease(int keycode)
          Releases a given key.
 voidmouseMove(int x, int y)
          Moves mouse pointer to given screen coordinates.
 voidmousePress(int buttons)
          Presses one or more mouse buttons.
 voidmouseRelease(int buttons)
          Releases one or more mouse buttons.
 voidmouseWheel(int wheelAmt)
          Rotates the scroll wheel on wheel-equipped mice.
 voidsetAutoDelay(int ms)
          Sets the number of milliseconds this Robot sleeps after generating an event.
 voidsetAutoWaitForIdle(boolean isOn)
          Sets whether this Robot automatically invokes waitForIdle after generating an event.
 StringtoString()
          Returns a string representation of this Robot.
 voidwaitForIdle()
          Waits until all events currently on the event queue have been processed.

간단하긴 하지만 상황에 따라 유용한 클래스라고 생각함!

2013년 7월 6일 토요일

Toad DBA Suite 신청

2013 상반기 TOAD TRAINING 신청
이런 교육이 있다는 것을 저번달에서야 알아서 기본 과정은 못 듣고 고급 과정만 신청하게 되었습니다. 
하루 교육이지만 교육시간이 6시간이나 되고 중요한 것은 무료! 
아쉽게도 상반기 교육 신청은 마감되었으나 하반기에 동일하게 진행될 것 같습니다.
아쉬운 점은  교육이 금요일에만 진행하기 때문에 휴가 등 평일 일정을 비워야 합니다



2013-07-06 Blog 이전 http://blog.naver.com/lratm -> http://database-stories.blogspot.kr/

네이버 블로그도 관리하기 귀찮아서 블로그를 운영했다고도 볼 수 없는 수준이었지만
자리를 옮겼으니 새로운 마음으로 시작!