Oracle History #9

81
http://www.ggola.com 2. Creation & Upgrade (em)...................................2-2 2.1. Database Creation 장장...............................2-3 2.1.1...........................Using dbca (oracle template) 2-3 2.1.2....................Using dbca (user defined template) 2-4 2.1.3...............................................Manual 장장 2-5 2.2. Database Creation..................................2-6 2.2.1.............................................Environment 2-6 2.2.2............................................Parameter 장장 2-7 2.2.3.............................................SQL Scripts 2-9 2.2.3.1.............................................Step 1 2-9 2.2.3.2.............................................Step 2 2-11 2.2.3.3.............................................Step 3 2-12 2.2.3.4.............................................Step 4 2-16 2.3. Upgrade........................................... 2-20 2.3.1.......................................Preparing Upgrade 2-20 2.3.2.............................DataBase Upgrade Assistant 2-21 2.3.3........................................Upgrade Manually 2-42 2.3.3.1......................Gather Optimizer Statistics 2-42 2.3.3.2...........................Upgrade Information 장장 2-46 2.3.3.3........................................Upgrade 장장 2-51 [email protected] 1

description

Oracle10g Database Creattion and upgrade to 10g

Transcript of Oracle History #9

Page 1: Oracle History #9

http://www.ggola.com 장 경 상

2. Creation & Upgrade (em)......................................................................2-2

2.1. Database Creation 유형.............................................................2-3

2.1.1. Using dbca (oracle template)...............................................2-3

2.1.2. Using dbca (user defined template).....................................2-4

2.1.3. Manual 방식..........................................................................2-5

2.2. Database Creation....................................................................2-6

2.2.1. Environment.........................................................................2-6

2.2.2. Parameter 설정.....................................................................2-7

2.2.3. SQL Scripts...........................................................................2-9

2.2.3.1........................................................................................Step 1

2-9

2.2.3.2........................................................................................Step 2

2-11

2.2.3.3........................................................................................Step 3

2-12

2.2.3.4........................................................................................Step 4

2-16

2.3. Upgrade..................................................................................2-20

2.3.1. Preparing Upgrade.............................................................2-20

2.3.2. DataBase Upgrade Assistant..............................................2-21

2.3.3. Upgrade Manually..............................................................2-42

2.3.3.1.....................................................Gather Optimizer Statistics

2-42

2.3.3.2........................................................Upgrade Information 확인

2-46

2.3.3.3.............................................................................Upgrade 진행

2-51

2.3.3.4.....................................................................Upgrade 부가 정보

2-57

2.4. em 설정 및 확인........................................................................2-60

2.4.1. em Repository 생성.............................................................2-60

2.4.2. em Ports.............................................................................2-62

2.5. Initialization Parameters.........................................................2-65

2.5.1. Basic Parameters................................................................2-65

2.5.2. Deprecated(renamed) Parameters.....................................2-66

2.5.3. Obsolete Parameters..........................................................2-67

[email protected] 1

Page 2: Oracle History #9

http://www.ggola.com 장 경 상

[email protected] 2

Page 3: Oracle History #9

http://www.ggola.com 장 경 상

2. Creation & Upgrade (em)

여기서는 oracle10g database를 생성하는 절차와 oracle9i에서 10g로upgrade하는

절차를 다룬다. 가급적 manual한 방법을 소개하려고 하나 oracle10g부터는 em이나

assistant tool을 사용하는 GUI 환경의 방법들이 보다 더 일반화되고 있으며 특히나

oracle은 oracle이 제공하는 GUI tool의 사용을 강조하고 있음을 기억하자.

문자 그대로 oracle document들은 assistant의 사용을 ‘highly recommend’라고

표현하고 있으니 이제 GUI를 사용하여 여러 가지 configuration & management를

하는 작업들을 더 이상 무시할 수 없게 되었다.

몇 가지 assistant들을 테스트를 해보니 이전에 비해 성능이나 interface 측면이 많이

좋아져서 사용상에 무리가 없어 보인다.

CF. 예전에는 GUI를 사용하지 않고 직접 키보드를 두드리면서 작업을 하는 것이 보다

더 고급(?)스러워 보였는지 모르겠지만 시대가 그렇지 않은 것 같다. 좀더 GUI에

익숙해지도록 노력하자.

[email protected] 3

Page 4: Oracle History #9

http://www.ggola.com 장 경 상

2.1. Database Creation 유형

GUI화면을 하나씩 순서대로 dump를 떠서 보여줄 수 있지만 사실 별로 중요하지 않은

화면을 모두 보여주어서 책 두께만 채울 필요는 없을 것이다. 직접 해보면 누구나

이해할 수 있는 화면들임으로 설명상 필요한 부분들만 화면 dump를 하였다.

CF. database creation assistant는 ’$ORACLE_HOME/bin/dbca’ 이 file을

구동하면 된다.

2.1.1.Using dbca (oracle template)

이 방법은 GUI를 통해 오라클이 제공하는 기본적인 몇 가지 database templates

중에서 하나를 선택하거나 ‘Custom Database’를 선택하여 여러분이 필요한 부분들을

수정 혹은 설정한 후 database를 자동으로 만들 수 있도록 해준다.

CF. 위 화면은 최초 구동화면으로 database를 쉽게 생성할 수 있도록 되어있다. 물론,

database를 설정하거나 삭제 또는 template의 수정 등도 위에서 보듯 선택적으로

작업이 가능하다. 여기에서는 creation 부분만을 다루지만 만일 앞서 install시

database를 생성하였다면 위 화면에서 “Delete a Database”를 선택해서 그 결과를

한번 확인해보는 것도 좋겠다. 모든 datafile과 admin directory의 OFA 구조까지

모두 삭제되는 것을 알 수 있을 것이다.

[email protected] 4

그림 2-1

DBCA 실행창

Page 5: Oracle History #9

http://www.ggola.com 장 경 상

CF. Windows환경에서는 registry까지 정리를 해준다고 한다.

2.1.2.Using dbca (user defined template)

기본적으로 첫 번째 소개한 oracle template을 이용하는 방식과 같지만 여러분은

dbca의 마지막 과정에서 database creation을 하지 않고 스스로 적절한 형태의

database 유형을 만들어 이를 여러분이 명명하는 이름의 template로 저장할 수 있다.

아래 그림처럼 맨 마지막 단계에서 “Create Database”의 선택을 해제하고 ‘Save as

a Database Template”을 선택하여 이름을 주면 database는 생성하지 않고

template만 만들 수 있다. 물론, 둘 다 선택해도 무방하다.

CF. 즉, 이렇게 잘 정의해 놓은 template을 가지고 있으면 어느 서버에서나 여러분의

구미에 맞는 database를 쉽게 자동으로 만들 수 있게 된다. 이 template은 다음과

같이 확인할 수 있는데 이를 oracle10g에서 seed database(종자 database)라

부른다. 아래의 예에서 맨 마지막의 CRT10G.dbc는 위에서 직접 만든 seed database

로서 위 방법을 통해 필자가 직접 저장해 놓은 template이다.

[NEWSVC]LIRACLE:/app/oracle> cd

$ORACLE_HOME/assistants/dbca/templates

[NEWSVC]LIRACLE:/app/oracle/product/10.1.0/assistants/dbca/templates> ls

-ltr

[email protected] 5

그림 2-2

DBCA 실행창

Page 6: Oracle History #9

http://www.ggola.com 장 경 상

total 101668

-rwxr-xr-x 1 oracle dba 79699968 Feb 8 2004 Seed_Database.dfb

-rwxr-xr-x 1 oracle dba 2867200 Feb 8 2004 Seed_Database.ctl

-rw-r--r-- 1 oracle dba 5641 Jun 13 14:02

Transaction_Processing.dbc

-rw-r--r-- 1 oracle dba 11981 Jun 13 14:02 New_Database.dbt

-rw-r--r-- 1 oracle dba 5583 Jun 13 14:02 General_Purpose.dbc

-rw-r--r-- 1 oracle dba 5703 Jun 13 14:02 Data_Warehouse.dbc

-rw-r--r-- 1 oracle dba 974848 Jun 13 14:02 example.dmp

-rw-r--r-- 1 oracle dba 20406272 Jun 13 14:03 example01.dfb

-rw-r--r-- 1 oracle dba 5449 Jun 14 13:38 CRT10G.dbc

2.1.3.Manual 방식말 그대로 scripts를 직접 구성해서 database를 만드는 것이다. 여기서는 이 방식으로

database를 직접 만들어 보겠다.

CF. 물론, 이 scripts 역시 dbca를 통해 만들 수 있는데 scripts를 받기 위해선 아래

그림처럼 ‘Custom Database’를 선택한 후 마지막 단계에서 script로 저장한다.

[email protected] 6

그림 2-3

DBCA 실행창

Page 7: Oracle History #9

http://www.ggola.com 장 경 상

2.2. Database Creation

앞서 어떻게 database를 만들 것인가에 대한 이야기를 끝냈다. 지금부터는 그 중에서

manual 방식을 실제로 한번 해보자. 먼저 환경적인 부분을 정의하고 scripts를 수행할

것이다.

2.2.1.Environment

최초 database를 만들기 위해선 기본 환경설정이 필요하다. 앞서 install부분에서

어지간한 환경설정은 이미 끝이 났지만 OFA와 같은 설정과 같은 몇 가지 작업을 먼저

해야 함으로 다음 내역을 잘 따라 하기 바란다. 새로 만들어질 database의 SID를

database를 “CRT10G”라고 가정하고 기본 admin directory를 만든다.

[NEWSVC]LIRACLE:/app/oracle> mkdir -p ./admin/CRT10G

[NEWSVC]LIRACLE:/app/oracle> mkdir -p ./admin/CRT10G/bdump

[NEWSVC]LIRACLE:/app/oracle> mkdir -p ./admin/CRT10G/cdump

[NEWSVC]LIRACLE:/app/oracle> mkdir -p ./admin/CRT10G/create

[NEWSVC]LIRACLE:/app/oracle> mkdir -p ./admin/CRT10G/udump

[NEWSVC]LIRACLE:/app/oracle> mkdir -p ./admin/CRT10G/pfile

[NEWSVC]LIRACLE:/app/oracle> mkdir -p ./oradata/CRT10G

다음으로 ORACLE_SID 환경 변수를 설정하고 /etc/oratab에 database entry를

추가하고 저장하자.

[NEWSVC]LIRACLE:/app/oracle> export ORACLE_SID=CRT10G

[CRT10G]LIRACLE:/app/oracle> vi /etc/oratab

# This file is used by ORACLE utilities. It is created by root.sh

# and updated by the Database Configuration Assistant when creating

# a database.

# A colon, ':', is used as the field terminator. A new line terminates

# the entry. Lines beginning with a pound sign, '#', are comments.

#

# Entries are of the form:

# $ORACLE_SID:$ORACLE_HOME:<N|Y>:

#

# The first and second fields are the system identifier and home

# directory of the database respectively. The third filed indicates

# to the dbstart utility that the database should , "Y", or should not,

[email protected] 7

Page 8: Oracle History #9

http://www.ggola.com 장 경 상

# "N", be brought up at system boot time.

#

# Multiple entries with the same $ORACLE_SID are not allowed.

#

#

CRT10G:/app/oracle/product/10.1.0:Y

~

~

~

~

~

~

:wq

[CRT10G]LIRACLE:/app/oracle> cd temp

[CRT10G]LIRACLE:/app/oracle/temp>

2.2.2.Parameter 설정initial parameter를 설정하자. 현재는 다음과 같이 설정하였다.

[CRT10G]LIRACLE:/app/oracle/temp> cat ../admin/CRT10G/pfile/initCRT10G.ora

# Basic database information parameters

## Database and instance identification

global_names = true

db_domain = ""

db_name = CRT10G

instance_name = CRT10G

## Compatible and other basic information

compatibl = 10.1.0.2.0

os_authent_prefix = ""

nls_date_format = "YYYY/MM/DD"

## Statistics, trace

timed_statistics = TRUE

_trace_files_public = TRUE

## Control file Configuration

[email protected] 8

Page 9: Oracle History #9

http://www.ggola.com 장 경 상

control_files = ( "/app/oracle/oradata/CRT10G/controlCRT10G01.ctl",

"/app/oracle/oradata/CRT10G/controlCRT10G02.ctl",

"/app/oracle/oradata/CRT10G/controlCRT10G03.ctl" )

## Optimizer

optimizer_mode = CHOOSE

query_rewrite_enabled = FALSE # unless using M-View query rewrite

star_transformation_enabled = FALSE # query transformation or not

# UNDO management parameters

undo_management = AUTO # undo(rollback) management mode

undo_retention = 1200 # for flashback query (now 20 minutes)

undo_tablespace = UNDOTBS1

# Memory and I/O 관련 parameters

## Database block cache and I/O

db_block_size = 8192 # 8K

db_cache_size = 209715200 # 200M

## Redo log buffer size

log_buffer = 5242880 # 5M

## Shared and other pools

shared_pool_size = 104857600 # 100M

java_pool_size = 52428800 # 50M

large_pool_size = 8388608 # 8M

## PGA, Sort, Hash Joins, Bitmap Indexes and others

pga_aggregate_target = 104857600 # 100M

workarea_size_policy = AUTO # oracle will control server process memory

## Cursors and Library Cache

cursor_sharing = SIMILAR # setting for unbinded SQL and histogram

open_cursors = 500

session_cached_cursors = 200

[email protected] 9

Page 10: Oracle History #9

http://www.ggola.com 장 경 상

cursor_space_for_time = FALSE

# Process, transactions, files, dump dest and parallel 관련 parameters

## db file and multi io

db_files = 1000

db_file_multiblock_read_count = 32

## utl file and dump file dest

background_dump_dest = /app/oracle/admin/CRT10G/bdump

core_dump_dest = /app/oracle/admin/CRT10G/cdump

user_dump_dest = /app/oracle/admin/CRT10G/udump

background_core_dump = partial

shadow_core_dump = partial

## Job Queues

job_queue_processes = 5

## Processes, sessions, transactions, links and distributed tx

processes = 500 # setting roughly

open_links = 4 # default

distributed_lock_timeout = 60 # default

# Log and Recovery parameters

## Redo log and recovery

fast_start_parallel_rollback = FALSE

fast_start_mttr_target = 120

log_checkpoint_timeout = 1800 # default

# miscellaneous parameters

## Security, auditing and queuing monitor

remote_login_passwordfile = NONE # check password file or not

[CRT10G]LIRACLE:/app/oracle/temp>

[email protected] 10

Page 11: Oracle History #9

http://www.ggola.com 장 경 상

2.2.3.SQL Scripts

2.2.3.1. Step 1

database를 nomount로 올리고 creation을 시작한다.

아래 scripts를 보면 database생성과 동시에 sys 및 system user의 password를

변경하는 부분이 있다. 작업 편이를 위해 모두 ‘manager’로 설정하였지만 여러분은

여러분만의 것으로 수정하여 작업을 진행하기 바란다. 또한 character set 설정 역시

default 값 “WE8ISO8859P1”로 설정되어 있다. 이 부분 역시 여러분이 원하는 것으로

바꾸어 설정해야 하는데 현재 한국어를 사용함으로 이 부분을 “KO16KSC5601”로

바꾸는 것이 적절할 것으로 생각된다.

[CRT10G]LIRACLE:/app/oracle/temp> cat CreateDB.sql

connect sys/change_on_install as sysdba

set echo on

spool CreateDB.log

startup nomount pfile="/app/oracle/admin/CRT10G/pfile/initCRT10G.ora";

CREATE DATABASE "CRT10G"

MAXINSTANCES 8

MAXLOGHISTORY 1

MAXLOGFILES 16

MAXLOGMEMBERS 3

MAXDATAFILES 100

DATAFILE '/app/oracle/oradata/CRT10G/system01.dbf' SIZE 300M

REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL

SYSAUX DATAFILE '/app/oracle/oradata/CRT10G/sysaux01.dbf' SIZE 120M

REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED

DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '/app/oracle/oradata/CRT10G/temp01.dbf'

SIZE 20M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED

UNDO TABLESPACE "UNDOTBS1" DATAFILE '/app/oracle/oradata/CRT10G/undotbs01.dbf'

SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED

CHARACTER SET WE8ISO8859P1

NATIONAL CHARACTER SET AL16UTF16

LOGFILE

GROUP 1 ('/app/oracle/oradata/CRT10G/redo01.log') SIZE 10240K,

GROUP 2 ('/app/oracle/oradata/CRT10G/redo02.log') SIZE 10240K,

GROUP 3 ('/app/oracle/oradata/CRT10G/redo03.log') SIZE 10240K

[email protected] 11

Page 12: Oracle History #9

http://www.ggola.com 장 경 상

USER SYS IDENTIFIED BY manager USER SYSTEM IDENTIFIED BY manager;

spool off

[CRT10G]LIRACLE:/app/oracle/temp> sqlplus /nolog

SQL*Plus: Release 10.1.0.2.0 - Production on Wed Jun 15 14:04:04 2005

Copyright (c) 1982, 2004, Oracle. All rights reserved.

SQL> @CreateDB.sql

Connected to an idle instance.

……..

……..

Database created.

……..

SQL>

CF. 위 작업을 하기 위해 여러분이 character set을 따로 결정할 때에는 해당

database가 어떤 문자 또는 언어를 지원할 것이냐에 따르도록 한다. 즉 한글 data를

처리하는 database라면 한글 character set을, 중국어를 처리할 것이라면 중국어

character set을, 만약 다국어를 처리한다면 UTF8 과 같은 unicode character set을

사용하도록 한다.

2.2.3.2. Step 2

Default tablespace 생성 및 system dictionary등 catalog를 생성한다.

Catalog는 상당한 시간이 소요될 것이니 특별한 error가 나타나는지를 꾸준히 보면서

작업을 진행한다.

SQL> !cat CreateDBFiles.sql

connect sys/manager as sysdba

set echo on

spool CreateDBFiles.log

CREATE TABLESPACE "USERS" LOGGING DATAFILE

'/app/oracle/oradata/CRT10G/users01.dbf' SIZE 5M REUSE AUTOEXTEND

ON NEXT 1280K MAXSIZE UNLIMITED

EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ;

ALTER DATABASE DEFAULT TABLESPACE "USERS";

spool off

[email protected] 12

Page 13: Oracle History #9

http://www.ggola.com 장 경 상

SQL> @CreateDBFiles.sql

……..

Tablespace created.

……..

Database altered.

……..

SQL> !cat CreateDBCatalog.sql

connect sys/manager as sysdba

set echo on

spool CreateDBCatalog.log

@/app/oracle/product/10.1.0/rdbms/admin/catalog.sql;

@/app/oracle/product/10.1.0/rdbms/admin/catblock.sql;

@/app/oracle/product/10.1.0/rdbms/admin/catproc.sql;

@/app/oracle/product/10.1.0/rdbms/admin/catoctk.sql;

@/app/oracle/product/10.1.0/rdbms/admin/owminst.plb;

connect system/manager

@/app/oracle/product/10.1.0/sqlplus/admin/pupbld.sql;

spool off

connect system/manager

set echo on

spool sqlPlusHelp.log

@/app/oracle/product/10.1.0/sqlplus/admin/help/hlpbld.sql helpus.sql;

spool off

SQL> @CreateDBCatalog.sql

……..

……..

SQL>

이제 기본 database 생성작업이 완료되었다.

2.2.3.3. Step 3

이제 여러 가지 오라클 기능을 사용할 수 있는 features를 설치한다.

SQL> !cat JServer.sql

connect sys/manager as sysdba

[email protected] 13

Page 14: Oracle History #9

http://www.ggola.com 장 경 상

set echo on

spool JServer.log

@/app/oracle/product/10.1.0/javavm/install/initjvm.sql;

@/app/oracle/product/10.1.0/xdk/admin/initxml.sql;

@/app/oracle/product/10.1.0/xdk/admin/xmlja.sql;

@/app/oracle/product/10.1.0/rdbms/admin/catjava.sql;

@/app/oracle/product/10.1.0/rdbms/admin/catexf.sql;

spool off

SQL> @JServer.sql

……..

……..

SQL> !cat ordinst.sql

connect sys/manager as sysdba

set echo on

spool ordinst.log

@/app/oracle/product/10.1.0/ord/admin/ordinst.sql SYSAUX SYSAUX;

spool off

SQL> @ordinst.sql

……..

……..

SQL> !cat interMedia.sql

connect sys/manager as sysdba

set echo on

spool interMedia.log

@/app/oracle/product/10.1.0/ord/im/admin/iminst.sql;

spool off

SQL> @interMedia.sql

……..

……..

SQL> !cat odmmetadata.sql

connect sys/manager as sysdba

set echo on

[email protected] 14

Page 15: Oracle History #9

http://www.ggola.com 장 경 상

spool odmmetadata.log

@/app/oracle/product/10.1.0/dm/admin/dminst1.sql SYSAUX TEMP

/app/oracle/product/10.1.0/dm/admin;

spool off

SQL> @odmmetadata.sql

……..

……..

SQL> !cat context.sql

connect sys/manager as sysdba

set echo on

spool context.log

@/app/oracle/product/10.1.0/ctx/admin/catctx change_on_install SYSAUX

TEMP NOLOCK;

connect CTXSYS/change_on_install

@/app/oracle/product/10.1.0/ctx/admin/defaults/dr0defin.sql AMERICAN;

spool off

SQL> @context.sql

……..

……..

SQL> !cat xdb_protocol.sql

connect sys/manager as sysdba

set echo on

spool xdb_protocol.log

@/app/oracle/product/10.1.0/rdbms/admin/catqm.sql change_on_install

SYSAUX TEMP;

connect sys/manager as sysdba

@/app/oracle/product/10.1.0/rdbms/admin/catxdbj.sql;

spool off

SQL> @xdb_protocol.sql

……..

……..

SQL> !cat cwmlite.sql

[email protected] 15

Page 16: Oracle History #9

http://www.ggola.com 장 경 상

set echo on

spool cwmlite.log

connect sys/manager as sysdba

@/app/oracle/product/10.1.0/olap/admin/olap.sql SYSAUX TEMP;

spool off

SQL> @cwmlite.sql

……..

……..

SQL> !cat spatial.sql

connect sys/manager as sysdba

set echo on

spool spatial.log

@/app/oracle/product/10.1.0/md/admin/mdinst.sql;

spool off

SQL> @spatial.sql

……..

……..

SQL> !cat odm.sql

connect sys/manager as sysdba

set echo on

spool odm.log

@/app/oracle/product/10.1.0/dm/admin/dminst2.sql;

spool off

SQL> @odm.sql

……..

……..

SQL> !cat ultraSearch.sql

connect sys/manager as sysdba

set echo on

spool ultraSearch.log

@/app/oracle/product/10.1.0/ultrasearch/admin/wk0install.sql SYS manager

change_on_install SYSAUX TEMP "" PORTAL false;

[email protected] 16

Page 17: Oracle History #9

http://www.ggola.com 장 경 상

spool off

SQL> @ultraSearch.sql

……..

……..

SQL> !cat emRepository.sql

connect sys/manager as sysdba

set echo off

spool emRepository.log

@/app/oracle/product/10.1.0/sysman/admin/emdrep/sql/emreposcre

/app/oracle/product/10.1.0 SYSMAN manager TEMP ON;

spool off

SQL> @emRepository.sql

……..

……..

SQL> !cat ultraSearchCfg.sql

connect sys/manager as sysdba

set echo on

spool ultraSearchCfg.log

alter user WKSYS account unlock identified by change_on_install;

@/app/oracle/product/10.1.0/ultrasearch/admin/wk0config.sql

change_on_install (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)

(HOST=LIRACLE)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)

(SERVICE_NAME=CRT10G))) false " ";

spool off

SQL> @ultraSearchCfg.sql

……..

……..

SQL> exit

2.2.3.4. Step 4

이제 마지막 작업으로 symbolic link를 만들어 database를 restart하고 listener를

띄우자. Database가 restart되면 database내의 object의 recompile작업이

마지막으로 수행된다.

[email protected] 17

Page 18: Oracle History #9

http://www.ggola.com 장 경 상

[CRT10G]LIRACLE:/app/oracle/temp> cd $ORACLE_HOME/dbs

[CRT10G]LIRACLE:/app/oracle/product/10.1.0/dbs> ln -s

/app/oracle/admin/CRT10G/pfile/initCRT10G.ora initCRT10G.ora

SQL> !cat postDBCreation.sql

connect sys/manager as sysdba

set echo on

spool postDBCreation.log

connect sys/manager as sysdba

shutdown immediate;

connect sys/manager as sysdba

startup ;

select 'utl_recomp_begin: ' || to_char(sysdate, 'HH:MI:SS') from dual;

execute utl_recomp.recomp_serial();

select 'utl_recomp_end: ' || to_char(sysdate, 'HH:MI:SS') from dual;

spool off

exit;

SQL> @postDBCreation.sql

……..

……..

SQL> spool off

SQL> exit;

Disconnected from Oracle Database 10g Enterprise Edition Release

10.1.0.2.0 - Production

With the Partitioning, OLAP and Data Mining options

[CRT10G]LIRACLE:/app/oracle/temp> cat

../product/10.1.0/network/admin/listener.ora

# listener.ora Network Configuration File:

#/app/oracle/product/10.1.0/network/admin/listener.ora

LSN10G =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 21.111.200.84)(PORT = 1521)

(QUEUESIZE = 1024))

)

[email protected] 18

Page 19: Oracle History #9

http://www.ggola.com 장 경 상

)

SID_LIST_LSN10G =

(SID_LIST =

(SID_DESC =

(ORACLE_HOME = /app/oracle/product/10.1.0)

(SID_NAME = CRT10G)

)

)

[CRT10G]LIRACLE:/app/oracle/temp> lsnrctl start lsn10g

LSNRCTL for Linux: Version 10.1.0.2.0 - Production on 15-JUN-2005 18:21:15

Copyright (c) 1991, 2004, Oracle. All rights reserved.

Starting /app/oracle/product/10.1.0/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.1.0.2.0 - Production

System parameter file is

/app/oracle/product/10.1.0/network/admin/listener.ora

Log messages written to /app/oracle/product/10.1.0/network/log/lsn10g.log

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)

(HOST=21.111.200.84)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)

(HOST=21.111.200.84)(PORT=1521)(QUEUESIZE=1024)))

STATUS of the LISTENER

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

Alias lsn10g

Version TNSLSNR for Linux: Version 10.1.0.2.0 - Production

Start Date 15-JUN-2005 18:21:15

Uptime 0 days 0 hr. 0 min. 0 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

[email protected] 19

Page 20: Oracle History #9

http://www.ggola.com 장 경 상

Listener Parameter File

/app/oracle/product/10.1.0/network/admin/listener.ora

Listener Log File /app/oracle/product/10.1.0/network/log/lsn10g.log

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=21.111.200.84)

(PORT=1521)))

Services Summary...

Service "CRT10G" has 1 instance(s).

Instance "CRT10G", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

[CRT10G]LIRACLE:/app/oracle/temp>

CF. 현재 여러분이 필자가 수행한 위 step들을 그대로 따라 했다면 여러분의 profile에

ORACLE_SID가 ‘NEWSVC’로 되어 있을 것이고 따라서 다음에도 계속 이 database를

사용하려면 여러분의 profile을 수정해서 ‘CRT10G’로 바꾸어야 할 것이다. 여기서는

다음 장에서 설명하는 upgrade를 통한 database를 사용할 것이고 그 이름이

‘NEWSVC’임으로 ‘CRT10G’ database를 계속 사용하려는 분은 헛갈리지 않도록

한다.

이제 database 생성 작업이 모두 종료되었다. 이제부터 oracle10g를 사용할 수 있게

된 셈이니 자못 기쁘기도 하다. 그러나, 가장 중요한 것은 oracle10g database를

만들어서 그 이하 버전과 똑같이 사용하면 안 된다는 것이다. 10g를 쓰려면 10g의

기능을 알아야 하는 법이니 정말 제대로 10g를 써보자.

CF. database 버전만 upgrade해 놓고 큰일 치른 듯 착각하지 말자. Upgrade해

놓고서 멀 어찌할 것인가. 항상 이야기 하지만 버전의 upgrade는 향상된 기능을

수반하지 않는 한 알게 모르게 진행되는 patch 수준에 불과한 것이다. 아무리 어렵고

힘들게 작업을 했다 할지라도 이는 이유에 상관없이 DBA로서 별로 한 것도 없는 작은

업무일 뿐이며 경우에 따라선 upgrade가 더 나쁜 결과를 초래할 수도 있다.

CF. Oracle version의 각 부분별 의미는 다음과 같다.

Oracle Release Number

10.1.0.4.0(1) Major database release number

[email protected] 20

Page 21: Oracle History #9

http://www.ggola.com 장 경 상

(2) Database maintenance release number

(3) Application server release number

(4) Component specific release number

(5) Platform specific release number

[email protected] 21

Page 22: Oracle History #9

http://www.ggola.com 장 경 상

2.3. Upgrade

이전 버전의 database를 oracle10g로 upgrade하는 방법은 크게 말해 3가지다.

Oracle10g로 database를 생성한 후 구 data를 옮기는 방법, 오라클이 제공하는

dbua assistants를 이용하는 방법, 마지막으로 직접 manual 방식으로 처리하는

방법이 그것이다.

물론, 구 버전의 database에서 export와 같은 utility를 통해 data를 받아서 data를

옮기는 방법이 가장 쉽고 간단하겠지만 실제 환경에서 그럴 정도의 작은 용량의

database를 upgrade하는 문제는 별 issue가 될 것이 없다. 머 여기서 굳이 소개할

것도 없을 것이다. 다음은 data copy 수준으로 upgrade가 불가한 대용량 database

를 upgrade하는데 대한 설명이다.

2.3.1.Preparing Upgrade

Upgrade Steps

일반적인 upgrade는 다 아시겠지만 다음의 절차를 통해 이루어진다.

“upgrade 준비 upgrade process test upgrade test database

production upgrade 준비 upgrade production database tuning and

adjust new database”

그러나 무엇보다 가장 우선하는 것은 최초 upgrade준비 시 new database의 new

features에 대한 전반적인 이해를 높이는 것이다. 그 과정에서 대상이 되는 database

의 특성을 파악하고 upgrade와 함께 병행 해야 할 자신만의 database upgrade

절차가 추가될 수 있기 때문이다. 물론, 그 누구도 upgrade가 진행되는 동안 대상

database에 access를 해서는 안 된다. 반드시 listener를 내리고 모든 다른 접근을

막아야 한다.

Direct upgrade

Oracle 8.0.6, 8.1.7, 9i(9.0.1, 9.2.0) 만이 oracle10g로 직접 upgrade가

가능함으로 그 이하 버전은 먼저 직접 upgrade가 가능한 버전으로 upgrade를 진행한

후 작업을 해야 할 것이다.

CF. 사실 제대로 database를 upgrade를 하려면 기존 database를 backup하고

application test항목의 추출, 더불어 타 시스템과의 통합 및 성능측면의 점검요소

등도 확인을 해야 한다. 물론, upgrade에 대한 스케쥴 관리도 해야 하니 정말 많은

시간이 소요될 수 있는 것이다. 그러나 여기서는 그런 시스템마다 다른 상황들을 다

다룰 수는 없음으로 database의 upgrade측면만을 설명한다.

[email protected] 22

Page 23: Oracle History #9

http://www.ggola.com 장 경 상

Reduce downtime

여러분이 oracle9i에서 oracle10g로 upgrade를 진행하는 동안의 downtime을

최소화 하고 싶다면 현재 upgrade 대상이 되는 database에 대해서 통계치

수집작업을 미리 수행하는 것도 좋은 방법이 될 수 있다. 이는 upgrade 방식과

무관하게 따로 진행이 가능하다. 이 부분은 나중에 “Upgrade Manually” 부분에서

따로 예시할 것이며 다음에 보여주는 “dbua”를 통한 upgrade의 예는 이 작업이 미리

수행이 되었다는 가정에서 출발한다.

2.3.2.DataBase Upgrade Assistant

Oracle10g의 문서 그대로 ‘highly recommend’한다는 GUI를 통한 upgrade를

알아보자. Oracle9i에서 10g로의 upgrade를 위해 이 tool을 사용하기 위해선

‘$ORACLE_HOME/bin/dbua’를 구동해야 한다. 대부분의 작업은 GUI 환경에서 다

check를 해주지만 작업 전에 ‘SYSTEM’ tablespace내의 여유공간이 500MB이상이

되도록 datafile을 조절한 후 upgrade 진행 중 생성되는 oracle10g의 새로운 기본

tablespace인 ‘SYSAUX’를 위해 file system 500MB이상의 공간을 미리 확보해야

한다.

다음은 앞서 본인이 직접 만들었던 database를 먼저 down시키고 기존에 존재하던

oracle9i database를 upgrade하는 과정이다. 여러분은 각자의 상황에 맞게 아래

상황을 유추해서 작업을 진행하기 바란다.

[CRT10G]LIRACLE:/app/oracle/temp> sqlplus "/as sysdba"

SQL*Plus: Release 10.1.0.2.0 - Production on Thu Jun 16 13:49:43 2005

Copyright (c) 1982, 2004, Oracle. All rights reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production

With the Partitioning, OLAP and Data Mining options

SQL> shutdown

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> exit

[email protected] 23

Page 24: Oracle History #9

http://www.ggola.com 장 경 상

Disconnected from Oracle Database 10g Enterprise Edition Release

10.1.0.2.0 - Production

With the Partitioning, OLAP and Data Mining options

[CRT10G]LIRACLE:/app/oracle/temp> lsnrctl stop lsn10g

LSNRCTL for Linux: Version 10.1.0.2.0 - Production on 16-JUN-2005 13:52:49

Copyright (c) 1991, 2004, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)

(HOST=21.111.200.84)(PORT=1521)(QUEUESIZE=1024)))

The command completed successfully

[CRT10G]LIRACLE:/app/oracle/temp> more /etc/oratab

# This file is used by ORACLE utilities. It is created by root.sh

# and updated by the Database Configuration Assistant when creating

# a database.

# A colon, ':', is used as the field terminator. A new line terminates

# the entry. Lines beginning with a pound sign, '#', are comments.

#

# Entries are of the form:

# $ORACLE_SID:$ORACLE_HOME:<N|Y>:

#

# The first and second fields are the system identifier and home

# directory of the database respectively. The third filed indicates

# to the dbstart utility that the database should , "Y", or should not,

# "N", be brought up at system boot time.

#

# Multiple entries with the same $ORACLE_SID are not allowed.

#

#

#NEWSVC:/app/oracle/product/9.2.0:N

OMFSVR:/app/oracle/product/9.2.0:N

#CRT10G:/app/oracle/product/10.1.0:N

[CRT10G]LIRACLE:/app/oracle/temp>

[email protected] 24

Page 25: Oracle History #9

http://www.ggola.com 장 경 상

위에서 보듯이 ‘/etc/oratab’ 에는 총 3개의 database가 등록되어 있다. 마지막 한

개는 앞서 만든 oracle10g이고 나머지 두 개는 과거에 있던 oracle9i이다. 현재 ‘#’을

통해 모두 주석처리를 하고 ‘OMFSVR’ database만을 남겨 두었다. 여기에 등록이

되어 있지 않으면 “dbua”를 구동해서 볼 수가 없을 것이다.

이제 upgrade대상이 되는 oracle9i database를 구동하자. Profile을 변경해서

ORACLE_HOME, ORACLE_SID등 필요한 모든 변수들을 oracle9i 환경으로 변경을 한

후 database를 start한다.

[CRT10G]LIRACLE:/app/oracle/temp> cd

[CRT10G]LIRACLE:/app/oracle> vi .bash_profile

# oracle os home

ORACLE_BASE=/app/oracle; export ORACLE_BASE

# oracle product home

ORACLE_HOME=/app/oracle/product/9.2.0; export ORACLE_HOME

# specify terminal and temp space

ORACLE_TERM=vt100; export ORACLE_TERM

TMPDIR=$ORACLE_BASE/tmp; export TMPDIR

TEMP=$ORACLE_BASE/tmp; export TEMP

# default character set

NLS_LANG=American_America.KO16KSC5601; export NLS_LANG

# general path

PATH=$PATH:.:$ORACLE_HOME/bin

export LANG=en_US

export DISPLAY=21.111.21.189:0.0

# instance name

ORACLE_SID=OMFSVR; export ORACLE_SID

PS1='[${ORACLE_SID}]'`hostname`':$PWD> '

[email protected] 25

Page 26: Oracle History #9

http://www.ggola.com 장 경 상

~

~

~

~

~

~

:wq

[CRT10G]LIRACLE:/app/oracle> su - oracle

Password:

[OMFSVR]LIRACLE:/app/oracle> sqlplus "/as sysdba"

SQL*Plus: Release 9.2.0.1.0 - Production on Thu Jun 16 16:40:13 2005

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to an idle instance.

SQL> startup

ORACLE instance started.

Total System Global Area 238620792 bytes

Fixed Size 450680 bytes

Variable Size 150994944 bytes

Database Buffers 83886080 bytes

Redo Buffers 3289088 bytes

Database mounted.

Database opened.

SQL> exit

Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 - Production

[OMFSVR]LIRACLE:/app/oracle>

이제 “dbua”를 구동하기 위해 다시 profile을 oracle10g 환경으로 변경하여 저장하자.

[email protected] 26

Page 27: Oracle History #9

http://www.ggola.com 장 경 상

[OMFSVR]LIRACLE:/app/oracle> exit

[CRT10G]LIRACLE:/app/oracle> vi .bash_profile

# oracle os home

ORACLE_BASE=/app/oracle; export ORACLE_BASE

# oracle product home

ORACLE_HOME=/app/oracle/product/10.1.0; export ORACLE_HOME

# specify terminal and temp space

ORACLE_TERM=vt100; export ORACLE_TERM

TMPDIR=$ORACLE_BASE/tmp; export TMPDIR

TEMP=$ORACLE_BASE/tmp; export TEMP

# default character set

NLS_LANG=American_America.KO16KSC5601; export NLS_LANG

# general path

PATH=$PATH:.:$ORACLE_HOME/bin

export LANG=en_US

export DISPLAY=21.111.21.189:0.0

# instance name

ORACLE_SID=OMFSVR; export ORACLE_SID

PS1='[${ORACLE_SID}]'`hostname`':$PWD> '

~

~

~

~

~

~

:wq

[CRT10G]LIRACLE:/app/oracle>

[email protected] 27

Page 28: Oracle History #9

http://www.ggola.com 장 경 상

이제 install 또는 “dbca” tool을 사용할 때처럼 다른 창에서 xmanager를 통해

“dbua”를 구동하자. 다음은 최초 구동화면이다.

“Next”를 누르면 다음과 같이 upgrade 대상이 되는 database를 보여준다.

[email protected] 28

그림 2-4

DBUA 실행창

그림 2-5

DBUA 실행창

Page 29: Oracle History #9

http://www.ggola.com 장 경 상

지금 upgrade하려는 database를 check하고 “Next”를 진행한다. 사실 1개만 있으면

위와 같이 저절로 선택이 되고 두 개 이상인 경우에만 선택을 할 수 있다. “Next”를

누른다.

CF. 여러 개가 있다 하더라도 1개밖에 선택이 되지 않는다. 즉, 두 개 이상의 database

를 동시에 upgrade할 수는 없다.

[email protected] 29

Page 30: Oracle History #9

http://www.ggola.com 장 경 상

잠깐 동안 database로부터 정보를 취합한 후 위와 같은 화면이 나온다. Oracle10g

부터 ‘SYSTEM’ tablespace와 같이 default로 반드시 필요한 ‘SYSAUX’ tablespace

를 만들기 위한 화면이다. 위치나 size정보 등을 확인 후 “Next”를 진행하자.

[email protected] 30

그림 2-6

DBUA 실행창

Page 31: Oracle History #9

http://www.ggola.com 장 경 상

위 화면은 upgrade가 종료된 후 invalid objects를 recompile할 것인가를 묻는

화면이다. 안 하는 것 보다는 시간이 더 걸리겠지만 어차피 필요한 작업 임으로

recompile을 check하고 “Next”를 누른다.

[email protected] 31

그림 2-7

DBUA 실행창

그림 2-8

DBUA 실행창

Page 32: Oracle History #9

http://www.ggola.com 장 경 상

이제 upgrade를 하려는 database의 backup여부를 묻는 화면이다. 이미 backup이

되어 있다면 첫 번째 option을 선택하면 되고 upgrade작업과 동시에 backup을

진행하려면 두 번째 option을 선택하면 된다. 현재는 upgrade test를 위해 만든 작은

용량의 database임으로 두 번째 option을 선택하였다. “Next”를 누른다.

CF. 사실 upgrade 작업을 한다면 당연히 벌써 backup이 되어 있어야 한다. 그리고

대용량 database를 많이 사용하는 요즘 위와 같이 upgrade 중간에 backup을 동시에

진행하는 일은 거의 없을 것이다.

[email protected] 32

Page 33: Oracle History #9

http://www.ggola.com 장 경 상

Upgrade 작업이 끝나면 database의 관리를 enterprise manager에서 어떻게

관리를 할 것인가를 묻는 화면이다. “Next”를 진행한다.

[email protected] 33

그림 2-9

DBUA 실행창

그림 2-10

DBUA 실행창

Page 34: Oracle History #9

http://www.ggola.com 장 경 상

여기서는 “DBSNMP, SYSMAN” 계정의 password를 설정하는 화면이다. Password를

설정한 후 “Next”를 누른다.

CF. 만일 여러분이 이미 “DBSNMP” 계정을 따로 사용하고 있다면 두 번째 option을

선택하여 현재 사용하고 있는 password를 입력해야 한다. 그렇지 않으면 새로 입력한

password로 기존의 password가 변경된다. 물론, 편의상 첫 번째 option을 통해 모든

password를 동일한 이름으로 설정하도록 한 후 나중에 변경해도 좋다. 각자 편한

방법을 선택한다.

이제 upgrade를 위한 모든 준비가 끝나고 사용자로 하여금 설정이 제대로 되었는가를

종합적으로 점검하도록 정보를 보여준다. 무엇보다 좋은 점은 없어지는(deprecated &

obsolete) parameter의 정보와 oracle10g의 기본 값이 증가로 인한 parameter

value의 변화까지도 한꺼번에 보여줌으로써 나중에 후속작업의 어려움을 모두

덜어준다는 것이다. 이제 “Finish”를 선택하자.

CF. 이 시점에서 다시 다른 창으로 login하여 upgrade와 관련된 log 정보들을 확인할

수 있다. 다음과 같은 upgrade라는 directory에 종류별 log가 생성됨으로 upgrade가

진행되는 동안 각자 이 log들을 지속적으로 살펴보도록 하자.

[email protected] 34

그림 2-11

DBUA 실행창

Page 35: Oracle History #9

http://www.ggola.com 장 경 상

[CRT10G]LIRACLE:/app/oracle> cd /app/oracle/admin/OMFSVR

[CRT10G]LIRACLE:/app/oracle/admin/OMFSVR> ls -l upgrade

total 36

-rw-r--r-- 1 oracle dba 14643 Jun 17 10:10 sqls.log

-rw-r--r-- 1 oracle dba 19058 Jun 17 10:10 trace.log

[CRT10G]LIRACLE:/app/oracle/admin/OMFSVR> cd upgrade

[CRT10G]LIRACLE:/app/oracle/admin/OMFSVR/upgrade>

이제 upgrade가 진행되면서 step별 상태가 나타난다.

CF. upgrade 진행 중 문제가 발생하여 메시지가 나올 수 있다. 이 경우 ignore 또는

abort가 나오게 되는데 ignore button을 선택하는 경우엔 upgrade 종료 후 dbua를

통해 재 작업을 하지만 abort button을 선택하게 되면 backup받은 datafiles을 다시

restore하여 upgrade를 재 진행해야 한다.

[email protected] 35

그림 2-12

DBUA 실행창

Page 36: Oracle History #9

http://www.ggola.com 장 경 상

이제 upgrade 작업이 모두 수행되었다. “OK”를 선택하면 다음과 같이 작업결과를

보여주는 화면이 나타난다.

[email protected] 36

그림 2-13

DBUA 실행창

Page 37: Oracle History #9

http://www.ggola.com 장 경 상

위 화면에서는 전체적인 작업결과와 함께 변경된 parameter와 parameter file정보

등을 보여주며 upgrade step별 정상적 성공여부를 알려준다. 이제 “Close”를 통해

작업을 완전히 종료하자. database upgrade가 완료되었다.

이제 터미널 작업 창에서 다음과 같이 parameter를 확인 한 후 listener도 올려서 접속

테스트를 해보자

다음을 보면 새로 upgrade된 database “OMFSVR”은 spfile을 사용하도록 되어있다.

필요하다면 이를 변경하면 될 것이다.

[CRT10G]LIRACLE:/app/oracle> cd $ORACLE_HOME/dbs

[CRT10G]LIRACLE:/app/oracle/product/10.1.0/dbs> ls -ltr

total 60

-rw-r--r-- 1 oracle dba 8385 Jun 13 13:57 init.ora

[email protected] 37

그림 2-14

DBUA 실행창

Page 38: Oracle History #9

http://www.ggola.com 장 경 상

-rw-r--r-- 1 oracle dba 12920 Jun 13 13:57 initdw.ora

-rw-r----- 1 oracle dba 1544 Jun 15 14:05 hc_CRT10G.dat

lrwxrwxrwx 1 oracle dba 45 Jun 15 17:40 initCRT10G.ora ->

/app/oracle/admin/CRT10G/pfile/initCRT10G.ora

-rw-r----- 1 oracle dba 24 Jun 20 14:01 lkCRT10G

-rw-rw---- 1 oracle dba 1544 Jun 20 18:00 hc_OMFSVR.dat

-rw-r----- 1 oracle dba 3584 Jun 20 18:58 spfileOMFSVR.ora

-rw-r--r-- 1 oracle dba 975 Jun 20 18:58 initOMFSVR.ora

-rw-rw---- 1 oracle dba 24 Jun 20 18:59 lkOMFSVR

[CRT10G]LIRACLE:/app/oracle/product/10.1.0/dbs> cd

$ORACLE_HOME/network/admin

[CRT10G]LIRACLE:/app/oracle/product/10.1.0/network/admin> vi listener.ora

LSN10G =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 21.111.200.84)(PORT = 1521)

(QUEUESIZE = 1024))

)

)

LSNOMF =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 21.111.200.84)(PORT = 1523)

(QUEUESIZE = 1024))

)

)

SID_LIST_LSN10G =

(SID_LIST =

(SID_DESC =

(ORACLE_HOME = /app/oracle/product/10.1.0)

(SID_NAME = CRT10G)

)

)

[email protected] 38

Page 39: Oracle History #9

http://www.ggola.com 장 경 상

SID_LIST_LSNOMF =

(SID_LIST =

(SID_DESC =

(ORACLE_HOME = /app/oracle/product/10.1.0)

(SID_NAME = OMFSVR)

)

)

~

~

~

~

~

~

:wq

[CRT10G]LIRACLE:/app/oracle/product/10.1.0/network/admin> cd

[CRT10G]LIRACLE:/app/oracle> lsnrctl start lsnomf

LSNRCTL for Linux: Version 10.1.0.4.0 - Production on 21-JUN-2005 09:42:29

Copyright (c) 1991, 2004, Oracle. All rights reserved.

Starting /app/oracle/product/10.1.0/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.1.0.4.0 - Production

System parameter file is

/app/oracle/product/10.1.0/network/admin/listener.ora

Log messages written to /app/oracle/product/10.1.0/network/log/lsnomf.log

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)

(HOST=21.111.200.84)(PORT=1523)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)

(HOST=21.111.200.84)(PORT=1523)(QUEUESIZE=1024)))

STATUS of the LISTENER

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

[email protected] 39

Page 40: Oracle History #9

http://www.ggola.com 장 경 상

Alias lsnomf

Version TNSLSNR for Linux: Version 10.1.0.4.0 - Production

Start Date 21-JUN-2005 09:42:30

Uptime 0 days 0 hr. 0 min. 0 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File

/app/oracle/product/10.1.0/network/admin/listener.ora

Listener Log File /app/oracle/product/10.1.0/network/log/lsnomf.log

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=21.111.200.84)

(PORT=1523)))

Services Summary...

Service "OMFSVR" has 1 instance(s).

Instance "OMFSVR", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

[CRT10G]LIRACLE:/app/oracle>

이제 여러분의 client에서 다음의 그림처럼 접속을 해보자.

[email protected] 40

그림 2-15

SQL*Plus 접속확인

Page 41: Oracle History #9

http://www.ggola.com 장 경 상

확인을 선택하면…

[email protected] 41

Page 42: Oracle History #9

http://www.ggola.com 장 경 상

CF. 아직 tnsnames.ora설정이 안되어 있으면 먼저 oracle client를 설정하자. 위의

경우 port 1523을 사용하고 있다. 차후로 chapter 10에서는 이런 client의 설정이

없이도 database에 접속할 수 있는 방법을 설명할 것이다.

이제 테스트가 완료되었다. listener 및 database를 모두 내린 후 다음 작업을 위해

profile에서 ORACLE_SID와 ORACLE_HOME을 oratab file에서 instance정보를

수정한 후 터미널을 완전히 닫자. 다음 테스트에서는 새로 접속을 한 후 작업을 시작할

것이다. 이 작업은 여러분이 oracle9i database를 manually upgrade할 예정인

경우만 유용하다. 만일 그러하다면 ORACLE_HOME, ORACLE_SID, oratab정보 등을

여러분이 현재 사용하고 있는 것으로 바꾸어야 한다.

[CRT10G]LIRACLE:/app/oracle> export ORACLE_SID=OMFSVR

[OMFSVR]LIRACLE:/app/oracle> lsnrctl stop lsnomf

LSNRCTL for Linux: Version 10.1.0.4.0 - Production on 21-JUN-2005 09:50:18

Copyright (c) 1991, 2004, Oracle. All rights reserved.

[email protected] 42

그림 2-16

SQL*Plus 접속확인

Page 43: Oracle History #9

http://www.ggola.com 장 경 상

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)

(HOST=21.111.200.84)(PORT=1523)(QUEUESIZE=1024)))

The command completed successfully

[OMFSVR]LIRACLE:/app/oracle> sqlplus "/as sysdba"

SQL*Plus: Release 10.1.0.4.0 - Production on Tue Jun 21 09:50:29 2005

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

Connected to:

Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - Production

With the Partitioning, OLAP and Data Mining options

SQL> shutdown

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> exit

Disconnected from Oracle Database 10g Enterprise Edition Release

10.1.0.4.0 - Production

With the Partitioning, OLAP and Data Mining options

[OMFSVR]LIRACLE:/app/oracle> vi .bash_profile

# oracle os home

ORACLE_BASE=/app/oracle; export ORACLE_BASE

# oracle product home

ORACLE_HOME=/app/oracle/product/9.2.0; export ORACLE_HOME

# specify terminal and temp space

ORACLE_TERM=vt100; export ORACLE_TERM

TMPDIR=$ORACLE_BASE/tmp; export TMPDIR

TEMP=$ORACLE_BASE/tmp; export TEMP

[email protected] 43

Page 44: Oracle History #9

http://www.ggola.com 장 경 상

# default character set

NLS_LANG=American_America.KO16KSC5601; export NLS_LANG

# general path

PATH=$PATH:.:$ORACLE_HOME/bin

export LANG=en_US

export DISPLAY=21.111.21.189:0.0

# instance name

ORACLE_SID=NEWSVC; export ORACLE_SID

PS1='[${ORACLE_SID}]'`hostname`':$PWD> '

. .alias

umask 022

~

~

~

~

~

~

:wq

[OMFSVR]LIRACLE:/app/oracle> vi /etc/oratab

# This file is used by ORACLE utilities. It is created by root.sh

# and updated by the Database Configuration Assistant when creating

# a database.

# A colon, ':', is used as the field terminator. A new line terminates

# the entry. Lines beginning with a pound sign, '#', are comments.

#

# Entries are of the form:

# $ORACLE_SID:$ORACLE_HOME:<N|Y>:

#

[email protected] 44

Page 45: Oracle History #9

http://www.ggola.com 장 경 상

# The first and second fields are the system identifier and home

# directory of the database respectively. The third filed indicates

# to the dbstart utility that the database should , "Y", or should not,

# "N", be brought up at system boot time.

#

# Multiple entries with the same $ORACLE_SID are not allowed.

#

#

NEWSVC:/app/oracle/product/9.2.0:N

#CRT10G:/app/oracle/product/10.1.0:N

#OMFSVR:/app/oracle/product/10.1.0:N

~

~

~

~

~

~

~

:wq

[OMFSVR]LIRACLE:/app/oracle> exit

이제 “dbua” upgrade 작업이 모두 종료되었다.

사실 upgrade를 진행하던 중 마지막 upgrade가 시작되는 “upgrade step별 진행”

과정에서 이상하게도 “Upgrading Oracle Server” step에서 더 이상 작업이 진행이

되지 않는 현상이 나타났다. 보기에는 progress 진행 율이 변하고 있어 더디게 진행이

되는 것 같으나 log를 살펴보면 database start를 하지 않고 멈추어 있었다. 확인 결과

이 문제는 BUG “3980572“과 연관이 있어 보이며 다음과 같은 결론을 얻었다.

본 현상은 “Upgrading to Oracle 10.1.0.2 on RHEL3” 에서 나타나고 있는 문제로

현재 작업환경과 일치한다. 즉, RedHat Enterprise Linux V3 platform에서 dbua로

upgrade하는 작업과정에서 “Oracle 10G (java v1.4.2_02) 와 RHEL3 에서 native

threads 수행”문제라고 알려져 있다. 구체적인 내용은 “java process waiting on a

'futex' system call and the sqlplus process waiting on a 'read' system call”

로서 일종의 deadlock waiting현상이다.

[email protected] 45

Page 46: Oracle History #9

http://www.ggola.com 장 경 상

이는 다음과 같은 방식으로 현상을 확인할 수 있다. 먼저 ps 명령으로 dbua process를

찾고 이 dbua가 수행하는 java process를 찾는다. 그리고 현재의 이 process id를

가지고 상태를 확인한다

[CRT10G]LIRACLE:/app/oracle/admin/OMFSVR/upgrade> ps -ef | grep dbua

oracle 16407 16378 0 15:06 pts/2 00:00:00 /bin/sh ./dbua

oracle 16576 16230 0 15:10 pts/0 00:00:00 grep dbua

[CRT10G]LIRACLE:/app/oracle/admin/OMFSVR/upgrade> ps -ef | grep 16407

oracle 16407 16378 0 15:06 pts/2 00:00:00 /bin/sh ./dbua

oracle 16408 16407 6 15:06 pts/2 00:00:15

/app/oracle/product/10.1.0/jdk/jre//bin/java -

Dsun.java2d.font.DisableAlgorithmicS

tyles=true -DORACLE_HOME=/app/oracle/product/10.1.0 -mx64m -classpath

/app/oracle/product/10.1.0/assistants/dbma/jlib/dbma.jar:/ap

p/oracle/product/10.1.0/jdk/jre//lib/rt.jar:/app/oracle/prod

oracle 16578 16230 0 15:10 pts/0 00:00:00 grep 16407

[CRT10G]LIRACLE:/app/oracle/admin/OMFSVR/upgrade> strace -p 16408

Process 16408 attached - interrupt to quit

futex(0x8640028, FUTEX_WAIT, 10, NULL

CTRL + C

CF. 이런 상황에서는 수 차례 반복 테스트를 해보아도 도저히 해결이 되지 않았다.

따라서 보다 자세하게 “dbua”관련자료를 찾는 중에 version “10.1.0.4” patchset

에서 dbua와 관련하여 특정 upgrade patch가 존재하였음을 확인할 수 있었고 현재의

engine을 앞서 소개한 oracle install과 같은 방식으로 patchset 10.1.0.4를 적용한

후 “dbua”를 다시 수행하여 문제를 해결할 수 있었다. 만일, 여러분이 위와 같은 동일한

문제를 겪는다면 최신의 patchset을 적용한 후 다시 수행하거나 다음 장에서 소개하는

“Upgrade Manually”를 참조하여 직접 upgrade를 진행하자.

2.3.3.Upgrade Manually

2.3.3.1. Gather Optimizer Statistics

다음은 oracle9i에서 upgrade를 수행하기 전에 downtime을 줄이기 위해 먼저

진행하는 선 작업을 설명한다. 이러한 통계작업을 미리 수행함으로써 upgrade 시간을

단축 시킬 수 있음으로 upgrade plan을 만들 때에는 이점을 미리 참고해야 할 것이다.

물론, 통계작업 과정에서 몇몇 schema들은 error가 날 수도 있다. 여러분이 oracle9i

database를 만들 때 설정하지 않은 components가 있다면 그 schema가 없을 수

[email protected] 46

Page 47: Oracle History #9

http://www.ggola.com 장 경 상

있기 때문임으로 이런 error는 무시하도록 하자.

현재의 작업 과정은 oracle 계정으로 새로운 연결 창을 통해 oracle9i database를

startup하여 step별로 작업을 시작하는 것을 보여준다.

CF. 단, 아래의 통계작업은 “dbua”를 사용하는 경우에도 적용이 가능한 것이다.

[NEWSVC]LIRACLE:/app/oracle> cd temp

[NEWSVC]LIRACLE:/app/oracle/temp> sqlplus "/as sysdba"

SQL*Plus: Release 9.2.0.1.0 - Production on Wed Jun 22 10:52:02 2005

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to an idle instance.

SQL> startup

ORACLE instance started.

Total System Global Area 374935832 bytes

Fixed Size 450840 bytes

Variable Size 150994944 bytes

Database Buffers 218103808 bytes

Redo Buffers 5386240 bytes

Database mounted.

Database opened.

SQL> !cat imp_stat.sql

spool imp_stat.lst

grant analyze any to sys;

exec dbms_stats.gather_schema_stats('WMSYS',options=>'GATHER',

estimate_percent => dbms_stats.auto_sample_size, method_opt => 'FOR ALL

COLUMNS SIZE AUTO', cascade => TRUE);

exec dbms_stats.gather_schema_stats('MDSYS',options=>'GATHER',

estimate_percent => dbms_stats.auto_sample_size, method_opt => 'FOR ALL

COLUMNS SIZE AUTO', cascade => TRUE);

[email protected] 47

Page 48: Oracle History #9

http://www.ggola.com 장 경 상

exec dbms_stats.gather_schema_stats('CTXSYS',options=>'GATHER',

estimate_percent => dbms_stats.auto_sample_size, method_opt => 'FOR ALL

COLUMNS SIZE AUTO', cascade => TRUE);

exec dbms_stats.gather_schema_stats('XDB',options=>'GATHER', estimate_percent

=> dbms_stats.auto_sample_size, method_opt => 'FOR ALL COLUMNS SIZE AUTO',

cascade => TRUE);

exec dbms_stats.gather_schema_stats('WKSYS',options=>'GATHER',

estimate_percent => dbms_stats.auto_sample_size, method_opt => 'FOR ALL

COLUMNS SIZE AUTO', cascade => TRUE);

exec dbms_stats.gather_schema_stats('LBACSYS',options=>'GATHER',

estimate_percent => dbms_stats.auto_sample_size, method_opt => 'FOR ALL

COLUMNS SIZE AUTO', cascade => TRUE);

exec dbms_stats.gather_schema_stats('OLAPSYS',options=>'GATHER',

estimate_percent => dbms_stats.auto_sample_size, method_opt => 'FOR ALL

COLUMNS SIZE AUTO', cascade => TRUE);

exec dbms_stats.gather_schema_stats('DMSYS',options=>'GATHER',

estimate_percent => dbms_stats.auto_sample_size, method_opt => 'FOR ALL

COLUMNS SIZE AUTO', cascade => TRUE);

exec dbms_stats.gather_schema_stats('ODM',options=>'GATHER', estimate_percent

=> dbms_stats.auto_sample_size, method_opt => 'FOR ALL COLUMNS SIZE AUTO',

cascade => TRUE);

exec dbms_stats.gather_schema_stats('ORDSYS',options=>'GATHER',

estimate_percent => dbms_stats.auto_sample_size, method_opt => 'FOR ALL

COLUMNS SIZE AUTO', cascade => TRUE);

exec dbms_stats.gather_schema_stats('ORDPLUGINS',options=>'GATHER',

estimate_percent => dbms_stats.auto_sample_size, method_opt => 'FOR ALL

COLUMNS SIZE AUTO', cascade => TRUE);

exec dbms_stats.gather_schema_stats('SI_INFORMTN_SCHEMA',options=>'GATHER',

estimate_percent => dbms_stats.auto_sample_size, method_opt => 'FOR ALL

COLUMNS SIZE AUTO', cascade => TRUE);

exec dbms_stats.gather_schema_stats('OUTLN',options=>'GATHER',

estimate_percent => dbms_stats.auto_sample_size, method_opt => 'FOR ALL

COLUMNS SIZE AUTO', cascade => TRUE);

exec dbms_stats.gather_schema_stats('DBSNMP',options=>'GATHER',

estimate_percent => dbms_stats.auto_sample_size, method_opt => 'FOR ALL

[email protected] 48

Page 49: Oracle History #9

http://www.ggola.com 장 경 상

COLUMNS SIZE AUTO', cascade => TRUE);

exec dbms_stats.gather_schema_stats('SYSTEM',options=>'GATHER',

estimate_percent => dbms_stats.auto_sample_size, method_opt => 'FOR ALL

COLUMNS SIZE AUTO', cascade => TRUE);

exec dbms_stats.gather_schema_stats('SYS',options=>'GATHER', estimate_percent

=> dbms_stats.auto_sample_size, method_opt => 'FOR ALL COLUMNS SIZE AUTO',

cascade => TRUE);

spool off

SQL> @imp_stat.sql

Grant succeeded.

PL/SQL procedure successfully completed.

……………….

PL/SQL procedure successfully completed.

SQL> !cat exp_stat.sql

spool exp_stat.lst

grant analyze any to sys;

exec dbms_stats.create_stat_table('SYS','dictstattab');

exec dbms_stats.export_schema_stats('WMSYS','dictstattab',statown =>

'SYS');

exec dbms_stats.export_schema_stats('MDSYS','dictstattab',statown =>

'SYS');

exec dbms_stats.export_schema_stats('CTXSYS','dictstattab',statown =>

'SYS');

exec dbms_stats.export_schema_stats('XDB','dictstattab',statown => 'SYS');

exec dbms_stats.export_schema_stats('WKSYS','dictstattab',statown =>

'SYS');

exec dbms_stats.export_schema_stats('LBACSYS','dictstattab',statown =>

'SYS');

exec dbms_stats.export_schema_stats('OLAPSYS','dictstattab',statown =>

[email protected] 49

Page 50: Oracle History #9

http://www.ggola.com 장 경 상

'SYS');

exec dbms_stats.export_schema_stats('DMSYS','dictstattab',statown =>

'SYS');

exec dbms_stats.export_schema_stats('ODM','dictstattab',statown =>

'SYS');

exec dbms_stats.export_schema_stats('ORDSYS','dictstattab',statown =>

'SYS');

exec dbms_stats.export_schema_stats('ORDPLUGINS','dictstattab',statown

=> 'SYS');

exec

dbms_stats.export_schema_stats('SI_INFORMTN_SCHEMA','dictstattab',stato

wn => 'SYS');

exec dbms_stats.export_schema_stats('OUTLN','dictstattab',statown =>

'SYS');

exec dbms_stats.export_schema_stats('DBSNMP','dictstattab',statown =>

'SYS');

exec dbms_stats.export_schema_stats('SYSTEM','dictstattab',statown =>

'SYS');

exec dbms_stats.export_schema_stats('SYS','dictstattab',statown => 'SYS');

spool of

SQL> @exp_stat.sql

Grant succeeded.

PL/SQL procedure successfully completed.

……………….

PL/SQL procedure successfully completed.

SQL> exit

Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 - Production

[email protected] 50

Page 51: Oracle History #9

http://www.ggola.com 장 경 상

[NEWSVC]LIRACLE:/app/oracle/temp>

2.3.3.2. Upgrade Information 확인이제 oracle10g의 home directory로 이동하여 upgrade를 하기 전에 필요한

정보수집 절차를 진행한다. 먼저 “ORACLE10g_HOME/rdbms/admin/utlu101i.sql”

을 작업 directory로 copy한 후 수행한다. 주의할 점은 아직 여러분은 upgrade가

되기 전 즉, oracle9i database 환경에서 작업 중이며 단지 위 SQL file만 oracle10g

product home에서 가져왔다는 것이다.

이 utility(SQL file)는 다음과 같은 조건들을 check한다.

1. database name, version, compatibility

2. redo logfile의 size (4MB 이상)

3. system, temp등 upgrade와 관련한 tablespace의 공간점검

4. 현재 database에 존재하는 partitioning, spatial과 같은 options

5. parameter value의 변경이 필요한 사항 (shared_pool_size, java_pool_size등)

6. oracle10g부터 이름이 바뀐 parameters 정보

7. oracle10g부터 없어진 parameters 정보

8. 현재 database에 존재하는 components 정보

9. 새로운 tablespace SYSAUX에 대한 정보

10. optimizer등 upgrade대한 종합적인 정보내역

CF. 오라클 문서에 의하면 위 사항 외에도 clustering 구성여부, 현재 database의

character set, upgrade가 수행되는 예측시간 등이 포함된다고 하나 실제로 수행하여

결과를 보면 이런 사항들은 나타나지 않았다.

[NEWSVC]LIRACLE:/app/oracle/temp> cd

/app/oracle/product/10.1.0/rdbms/admin

[NEWSVC]LIRACLE:/app/oracle/product/10.1.0/rdbms/admin> cp

utlu101i.sql /app/oracle/temp/

[NEWSVC]LIRACLE:/app/oracle/product/10.1.0/rdbms/admin> cd

/app/oracle/temp/

[NEWSVC]LIRACLE:/app/oracle/temp> sqlplus "/as sysdba"

SQL*Plus: Release 9.2.0.1.0 - Production on Wed Jun 22 14:16:06 2005

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to an idle instance.

[email protected] 51

Page 52: Oracle History #9

http://www.ggola.com 장 경 상

SQL> spool upgrade_info.lst

SQL> @utlu101i.sql

………………………

PL/SQL procedure successfully completed.

SQL> spool off

SQL> !cat upgrade_info.lst

.

*************************************************************************

Update Parameters: [Update Oracle Database 10.1 init.ora or spfile]

*************************************************************************

WARNING: --> "shared_pool_size" needs to be increased to at least

"150944944"

--> "pga_aggregate_target" is already at "104857600" calculated new value

is

"104857600"

--> "large_pool_size" is already at "16777216" calculated new value is

"16777216"

WARNING: --> "java_pool_size" needs to be increased to at least

"50331648"

.

*************************************************************************

Deprecated Parameters: [Update Oracle Database 10.1 init.ora or spfile]

*************************************************************************

-- No deprecated parameters found. No changes are required.

.

*************************************************************************

Obsolete Parameters: [Update Oracle Database 10.1 init.ora or spfile]

*************************************************************************

--> "hash_join_enabled"

--> "undo_suppress_errors"

--> "parallel_automatic_tuning"

[email protected] 52

Page 53: Oracle History #9

http://www.ggola.com 장 경 상

.

*************************************************************************

……………………

……………………

……………………

……………………

*************************************************************************

--> New "SYSAUX" tablespace

.... minimum required size for database upgrade: 500 MB

Please create the new SYSAUX Tablespace AFTER the Oracle Database

10.1 server is started and BEFORE you invoke the upgrade script.

*************************************************************************

……………………

……………………

……………………

SQL> exit

Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 – Production

[NEWSVC]LIRACLE:/app/oracle/temp>

이제 위에서 만들어진 log file “upgrade_info.lst”를 확인하여 upgrade를 위해

필요한 작업정보가 있는지를 확인하여 변경, 삭제 등의 지시사항을 따른다. 단, 새로운

tablespace인 “SYSAUX” tablespace는 차후 직접 진행할 것이니 log file에서 이

내용은 무시해도 좋다. 본 작업 대상이 되는 database의 경우 위에서처럼 몇몇

parameter의 수정을 요구하는 사항만 나와 있었다. 다음은 이런 수정작업을 진행한

후의 과정이다.

먼저 환경과 관련된 file을 조정한다. 새로운 oracle10g home으로 parameter file

관련 조정을 한다. 현재 작업은 “$ORACLE_HOME/dbs”의 parameter file을

사용함으로 oracle10g home으로 새로운 symbolic link를 만들자. (RAC라면 모든

nodes에 이 작업이 진행되어야 할 것이며 upgrade는 1 node에서만 작업을

[email protected] 53

Page 54: Oracle History #9

http://www.ggola.com 장 경 상

진행한다. 물론, parameter “CLUSTER_DATABASE”는 upgrade를 진행하는 동안은

“FALSE”로 되어 있어야 한다.) 조정이 끝나면 database를 down하고 oracle10g

환경으로 database를 upgrade mode로 start한다.

CF. 여러분이 password file을 사용하고 있다면 역시 이 file도 oracle10g환경으로

copy해야 하고 parameter file의 compatibility도 각자의 oracle10g version에

맞게 설정한다. 물론, 이 값이 “9.2.0”보다 작으면 error가 return될 것이다.

CF. upgrade 작업을 위해 oracle9i로 되어 있는 환경변수를 모두 oracle10g로 바꾼

후 다음 작업을 진행한다. 일반적으로 “ORACLE_HOME”, “PATH”, “ORA_NLS33”,

“LD_LIBRARY_PATH”등이 수정될 것이다.

[NEWSVC]LIRACLE:/app/oracle/temp> cd ../product/10.1.0/dbs

[NEWSVC]LIRACLE:/app/oracle/product/10.1.0/dbs> ln -s

/app/oracle/admin/NEWSVC/pfile/initNEWSVC.ora initNEWSVC.ora

[NEWSVC]LIRACLE:/app/oracle/product/10.1.0/dbs> cd /app/oracle/temp

[NEWSVC]LIRACLE:/app/oracle/temp> sqlplus "/as sysdba"

SQL*Plus: Release 9.2.0.1.0 - Production on Wed Jun 22 15:41:40 2005

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:

Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 - Production

SQL>shutdown

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> exit

Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 - Production

[NEWSVC]LIRACLE:/app/oracle/temp> cd

[email protected] 54

Page 55: Oracle History #9

http://www.ggola.com 장 경 상

[NEWSVC]LIRACLE:/app/oracle> vi .bash_profile

# oracle os home

ORACLE_BASE=/app/oracle; export ORACLE_BASE

# oracle product home

ORACLE_HOME=/app/oracle/product/10.1.0; export ORACLE_HOME

# specify terminal and temp space

ORACLE_TERM=vt100; export ORACLE_TERM

TMPDIR=$ORACLE_BASE/tmp; export TMPDIR

TEMP=$ORACLE_BASE/tmp; export TEMP

# default character set

NLS_LANG=American_America.KO16KSC5601; export NLS_LANG

# general path

PATH=$PATH:.:$ORACLE_HOME/bin

export LANG=en_US

export DISPLAY=21.111.21.189:0.0

# instance name

ORACLE_SID=NEWSVC; export ORACLE_SID

PS1='[${ORACLE_SID}]'`hostname`':$PWD> '

~

~

~

~

~

~

:wq

[NEWSVC]LIRACLE:/app/oracle> exit

2.3.3.3. Upgrade 진행앞서, 새로운 환경으로 접속을 하기 위하여 연결을 종료하였다. 이제 새로운 연결을

[email protected] 55

Page 56: Oracle History #9

http://www.ggola.com 장 경 상

통해 다음 작업을 진행한다. 먼저 upgrade mode로 database를 start한 후

oracle10g의 새로운 기본 tablespace를 만들고 upgrade script를 수행한 후 check

script를 수행하여 결과를 알아볼 것이다.

[NEWSVC]LIRACLE:/app/oracle> cd temp

[NEWSVC]LIRACLE:/app/oracle/temp> sqlplus "/as sysdba"

SQL*Plus: Release 10.1.0.4.0 - Production on Wed Jun 22 16:42:30 2005

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

Connected to an idle instance.

SQL> startup upgrade

ORACLE instance started.

Total System Global Area 427819008 bytes

Fixed Size 779516 bytes

Variable Size 212081412 bytes

Database Buffers 209715200 bytes

Redo Buffers 5242880 bytes

Database mounted.

Database opened.

SQL> create tablespace sysaux datafile

‘/app/oracle/oradata/NEWSVC/sysaux01.dbf'

2 size 500M extent management local

3 segment space management auto online;

Tablespace created.

SQL> spool upgrade.log

SQL> @$ORACLE_HOME/rdbms/admin/u0902000.sql

……………………

……………………

[email protected] 56

Page 57: Oracle History #9

http://www.ggola.com 장 경 상

……………………

PL/SQL procedure successfully completed.

……………………

……………………

TIMESTAMP

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

COMP_TIMESTAMP DBUPG_END 2005-06-22 18:30:03

1 row selected.

SQL> spool off

SQL> @$ORACLE_HOME/rdbms/admin/utlu101s.sql TEXT

PL/SQL procedure successfully completed.

Oracle Database 10.1 Upgrade Status Tool 23-JUN-2005 09:13:12

--> Oracle Database Catalog Views Normal successful completion

--> Oracle Database Packages and Types Normal successful completion

--> JServer JAVA Virtual Machine Normal successful completion

--> Oracle XDK Normal successful completion

--> Oracle Database Java Packages Normal successful completion

--> Oracle XML Database Normal successful completion

--> Oracle Workspace Manager Normal successful completion

--> Oracle interMedia Normal successful completion

--> Spatial Problem(s) detected

WARNING: ----> component status is not valid

----> version is correct

----> check upgrade log for errors

----> script="?/md/admin/sdodbmig.sql"

--> Oracle Text Normal successful completion

--> Oracle Ultra Search Normal successful completion

PL/SQL procedure successfully completed.

[email protected] 57

Page 58: Oracle History #9

http://www.ggola.com 장 경 상

SQL>

위에서 upgrade check 결과를 보면 “Spatial”을 제외한 다른 부분은 문제가 없는

것으로 보인다. 사실 upgrade 대상이 되는 database에서 “Spatial” component는

원래 install하지도 않았었기 때문에 당연한 결과로 보이며 upgrade와는 상관이

없음으로 다음 작업을 계속 진행한다.

CF. upgrade script는 대상이 되는 database의 version에 따라 다름으로 반드시

“$ORACLE_HOME/rdbms/admin/u0*.sql”을 확인하여 적절한 script를 선택하여야

한다.

Upgrade script가 완료 되었으니 database를 normal mode로 restart하고

recompile script를 수행함으로써 이제 database upgrade 작업이 종료된다.

SQL> shutdown

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

Total System Global Area 427819008 bytes

Fixed Size 779516 bytes

Variable Size 212081412 bytes

Database Buffers 209715200 bytes

Redo Buffers 5242880 bytes

Database mounted.

Database opened.

SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql

TIMESTAMP

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

COMP_TIMESTAMP UTLRP_BGN 2005-06-23 09:19:09

1 row selected.

[email protected] 58

Page 59: Oracle History #9

http://www.ggola.com 장 경 상

PL/SQL procedure successfully completed.

TIMESTAMP

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

COMP_TIMESTAMP UTLRP_END 2005-06-23 09:21:29

1 row selected.

PL/SQL procedure successfully completed.

Invoking Ultra Search Install/Upgrade validation procedure VALIDATE_WK

Ultra Search VALIDATE_WK done with no error

PL/SQL procedure successfully completed.

SQL> shutdown

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> exit

Disconnected from Oracle Database 10g Enterprise Edition Release

10.1.0.4.0 - Production

With the Partitioning, OLAP and Data Mining options

[NEWSVC]LIRACLE:/app/oracle/temp>

CF. recompile 작업이 끝나면 다음과 같은 SQL을 통해 문제가 있는 objects가

존재하는지를 직접 확인하여 필요한 작업들을 진행할 필요가 있다.

“ SQL> select distinct object_name FROM dba_objects WHERE status=

'INVALID'; “

이제 network 설정을 하여 database를 다시 restart하여 완전한 접속 테스트를

[email protected] 59

Page 60: Oracle History #9

http://www.ggola.com 장 경 상

해보자. 향후 테스트의 원활함을 위해 아래 내역처럼 listener port설정을 그대로 설정

하도록 하자.

[NEWSVC]LIRACLE:/app/oracle/temp> cd $ORACLE_HOME/network/admin

[NEWSVC]LIRACLE:/app/oracle/product/10.1.0/network/admin> vi

listener.ora

# listener.ora Network Configuration File:

/app/oracle/product/10.1.0/network/admin/listener.ora

LSN10G =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 21.111.200.84)(PORT = 1523)

(QUEUESIZE = 1024))

)

)

LSNSVC =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 21.111.200.84)(PORT = 1521)

(QUEUESIZE = 1024))

)

)

SID_LIST_LSN10G =

(SID_LIST =

(SID_DESC =

(ORACLE_HOME = /app/oracle/product/10.1.0)

(SID_NAME = CRT10G)

)

)

SID_LIST_LSNSVC =

(SID_LIST =

(SID_DESC =

(ORACLE_HOME = /app/oracle/product/10.1.0)

[email protected] 60

Page 61: Oracle History #9

http://www.ggola.com 장 경 상

(SID_NAME = NEWSVC)

)

)

~

~

~

~

:wq

[NEWSVC]LIRACLE:/app/oracle/product/10.1.0/network/admin> cd

[NEWSVC]LIRACLE:/app/oracle> lsnrctl start lsnsvc

LSNRCTL for Linux: Version 10.1.0.4.0 - Production on 23-JUN-2005 09:32:21

Copyright (c) 1991, 2004, Oracle. All rights reserved.

Starting /app/oracle/product/10.1.0/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.1.0.4.0 - Production

System parameter file is

/app/oracle/product/10.1.0/network/admin/listener.ora

Log messages written to /app/oracle/product/10.1.0/network/log/lsnsvc.log

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)

(HOST=21.111.200.84)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)

(HOST=21.111.200.84)(PORT=1521)(QUEUESIZE=1024)))

STATUS of the LISTENER

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

Alias lsnsvc

Version TNSLSNR for Linux: Version 10.1.0.4.0 - Production

Start Date 23-JUN-2005 09:32:21

Uptime 0 days 0 hr. 0 min. 0 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File

[email protected] 61

Page 62: Oracle History #9

http://www.ggola.com 장 경 상

/app/oracle/product/10.1.0/network/admin/listener.ora

Listener Log File /app/oracle/product/10.1.0/network/log/lsnsvc.log

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=21.111.200.84)

(PORT=1521)))

Services Summary...

Service "NEWSVC" has 1 instance(s).

Instance "NEWSVC", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

[NEWSVC]LIRACLE:/app/oracle> sqlplus "/as sysdba"

SQL*Plus: Release 10.1.0.4.0 - Production on Thu Jun 23 09:32:49 2005

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

Connected to an idle instance.

SQL> startup

ORACLE instance started.

Total System Global Area 427819008 bytes

Fixed Size 779516 bytes

Variable Size 212081412 bytes

Database Buffers 209715200 bytes

Redo Buffers 5242880 bytes

Database mounted.

Database opened.

SQL> exit

Disconnected from Oracle Database 10g Enterprise Edition Release

10.1.0.4.0 - Production

With the Partitioning, OLAP and Data Mining options

[NEWSVC]LIRACLE:/app/oracle> exit

이제 upgrade 작업이 모두 종료되었다. 각자 SQL*Plus나 그 밖의 tool등으로 접속

테스트를 진행해 보자.

[email protected] 62

Page 63: Oracle History #9

http://www.ggola.com 장 경 상

2.3.3.4. Upgrade 부가 정보oracle10g로 upgrade가 되면 database내의 components와 그 정보들이 table로

관리되며 components의 dependency도 이를 통해 이루어진다. 이 table에는

version정보까지 표시되어 upgrade 상태도 확인할 수 있다.

SQL> select * from dba_server_registry;

Oracle은 upgrade가 완료되면 components의 상태를 확인하는 scripts를

제공하는데 이는 다음과 같이 “$ORACLE_HOME/rdbms/admin/utlu101s.sql” 을

call함으로써 수행할 수 있다. 이 script를 수행하면 출력 format을 입력 받게 되는데

“XML, TEXT/TERM, BOTH”의 3가지 형태를 제공한다.

SQL> conn sys/manager

Connected.

SQL> @$ORACLE_HOME/rdbms/admin/utlu101s.sql

PL/SQL procedure successfully completed.

Enter value for 1: TEXT

Oracle Database 10.1 Upgrade Status Tool 12-JUL-2005 01:22:09

Oracle Database Catalog Views Normal successful completion

Oracle Database Packages and Types Normal successful completion

JServer JAVA Virtual Machine Normal successful completion

Oracle XDK Normal successful completion

Oracle Database Java Packages Normal successful completion

Oracle XML Database Normal successful completion

Oracle Workspace Manager Normal successful completion

Oracle interMedia Normal successful completion

Spatial Normal successful completion

Oracle Text Normal successful completion

Oracle Ultra Search Normal successful completion

Oracle Enterprise Manager Normal successful completion

No problems detected during upgrade

PL/SQL procedure successfully completed.

CF. 출력 format을 한번에 처리하기 위하여 다음과 같이 argument로 입력할 수도

[email protected] 63

Page 64: Oracle History #9

http://www.ggola.com 장 경 상

있다.

SQL> @$ORACLE_HOME/rdbms/admin/utlu101s.sql TEXT

[email protected] 64

Page 65: Oracle History #9

http://www.ggola.com 장 경 상

OCP point

==============================================

=================

1. direct upgrade를 위한 oracle version 4가지

참조

==============================================

=================

spfile : o9i 153, 540p

[email protected] 65

Page 66: Oracle History #9

http://www.ggola.com 장 경 상

2.4. em 설정 및 확인

2.4.1.em Repository 생성앞서 “dbua”로 upgrade를 진행하였을 때에는 중간에 해당 database를 em으로

관리할 것인가를 묻고 이를 선택하는 화면이 있었다. 그러나 manual upgrade는 그런

과정이 없기 때문에 em으로 관리를 하고자 한다면 다음과 같은 방식으로 repository를

만들어 주어야 한다. 물론, 어떤 경우라도(굳이 upgrade가 아니더라도) oracle10g를

사용하면서 em을 통한 관리를 하고자 하는데 repository가 없다면 이 부분은

필수작업이다.

CF. em repository는 oracle10g의 new tablespace인 “SYSAUX”에 위치한다.

작업은 interactive하게 묻고 답하는 형식으로 이루어 짐으로 적절한 값을 넣어주도록

하자. 다음의 예를 보라.

CF. 이 말은 곧 em으로 관리하고자 하는 instance는 각각 자신의 repository를 필요로

한다는 말이 됨으로 한 서버에서 여러 개의 instance를 가지고 있다면 각각에 대하여

em을 start해야 된다는 뜻이다.

[NEWSVC]LIRACLE:/app/oracle> cd $ORACLE_HOME/bin

[NEWSVC]LIRACLE:/app/oracle/product/10.1.0/bin> emca

STARTED EMCA at Fri Jun 24 17:28:10 KST 2005

Enter the following information about the database to be configured

Listener port number: 1521

Database SID: NEWSVC

Service name: NEWSVC

Email address for notification:

Email gateway for notification:

Password for dbsnmp:

Password for sysman:

Password for sys:

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

You have specified the following settings

[email protected] 66

Page 67: Oracle History #9

http://www.ggola.com 장 경 상

Database ORACLE_HOME ................ /app/oracle/product/10.1.0

Enterprise Manager ORACLE_HOME ................ /app/oracle/product/10.1.0

Database host name ................ LIRACLE

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

Database SID ................ NEWSVC

Service name ................ NEWSVC

Email address for notification ...............

Email gateway for notification ...............

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

Do you wish to continue? [yes/no]: yes

Jun 24, 2005 5:39:05 PM oracle.sysman.emcp.EMConfig updateReposVars

INFO: Updating file

/app/oracle/product/10.1.0/sysman/emdrep/config/repository.variables ...

Jun 24, 2005 5:51:21 PM oracle.sysman.emcp.EMConfig createRepository

INFO: Creating repository ...

Jun 24, 2005 5:51:21 PM oracle.sysman.emcp.EMConfig perform

INFO: Repository was created successfully

Jun 24, 2005 5:51:35 PM oracle.sysman.emcp.EMConfig addPortEntries

INFO: Updating file /app/oracle/product/10.1.0/install/portlist.ini ...

Jun 24, 2005 5:51:35 PM oracle.sysman.emcp.EMConfig updateEmdProps

INFO: Updating file

/app/oracle/product/10.1.0/sysman/config/emd.properties ...

Jun 24, 2005 5:51:37 PM oracle.sysman.emcp.EMConfig updateConfigFiles

INFO: targets.xml file is updated successfully

Jun 24, 2005 5:51:37 PM oracle.sysman.emcp.EMConfig updateEmomsProps

INFO: Updating file

/app/oracle/product/10.1.0/sysman/config/emoms.properties ...

Jun 24, 2005 5:51:37 PM oracle.sysman.emcp.EMConfig updateConfigFiles

INFO: emoms.properties file is updated successfully

Jun 24, 2005 5:51:39 PM oracle.sysman.emcp.EMConfig startOMS

INFO: Starting the DBConsole ...

[email protected] 67

Page 68: Oracle History #9

http://www.ggola.com 장 경 상

Jun 24, 2005 5:53:26 PM oracle.sysman.emcp.EMConfig perform

INFO: DBConsole is started successfully

Jun 24, 2005 5:53:27 PM oracle.sysman.emcp.EMConfig perform

INFO: >>>>>>>>>>> The Enterprise Manager URL is

http://LIRACLE:5501/em <<<<<<<<<<<

Enterprise Manager configuration is completed successfully

FINISHED EMCA at Fri Jun 24 17:53:27 KST 2005

[NEWSVC]LIRACLE:/app/oracle/product/10.1.0/bin>

맨 마지막에 나타나는 URL을 사용하여 web browser로 연결을 할 수 있다.

새로 등록된 repository를 이용하여 dbconsole의 stop/start가 원활이 이루어지는지

확인을 해보자.

[NEWSVC]LIRACLE:/app/oracle/product/10.1.0/bin> emctl stop dbconsole

TZ set to ROK

Oracle Enterprise Manager 10g Database Control Release 10.1.0.4

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

http://LIRACLE:5501/em/console/aboutApplication

Stopping Oracle Enterprise Manager 10g Database Control ...

... Stopped.

[NEWSVC]LIRACLE:/app/oracle/product/10.1.0/bin> emctl start dbconsole

TZ set to ROK

Oracle Enterprise Manager 10g Database Control Release 10.1.0.4

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

http://LIRACLE:5501/em/console/aboutApplication

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

started.

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

Logs are generated in directory

/app/oracle/product/10.1.0/LIRACLE_NEWSVC/sysman/log

[NEWSVC]LIRACLE:/app/oracle/product/10.1.0/bin>

2.4.2.em Ports

위에서 설정한 em repository와 관련하여 port등의 환경설정과 관련된 부분들은

다음과 같이 $ORACLE_HOME/hostname_sid/ 위치에 있는 구조 중에서 특정 file

“emoms.properties “ 에 저장이 되어있음으로 이를 확인하도록 한다.

[email protected] 68

Page 69: Oracle History #9

http://www.ggola.com 장 경 상

[NEWSVC]LIRACLE:/app/oracle> cd $ORACLE_HOME/LIRACLE_NEWSVC

[NEWSVC]LIRACLE:/app/oracle/product/10.1.0/LIRACLE_NEWSVC> cd sysman/config

[NEWSVC]LIRACLE:/app/oracle/product/10.1.0/LIRACLE_NEWSVC/sysman/config> ls -

ltr

total 76

-rw-r----- 1 oracle dba 4986 Jun 24 17:51 OUIinventories.add

-rw-r----- 1 oracle dba 1303 Jun 24 17:51 emoms.properties

-rw-r----- 1 oracle dba 1165 Jun 24 17:51 emomslogging.properties

-rw-r----- 1 oracle dba 7074 Jun 24 17:51 emomsintg.xml

-rw-r----- 1 oracle dba 11290 Jun 24 17:51 emd.properties.tzbak

-rw-r----- 1 oracle dba 1265 Jun 24 17:51 emagentlogging.properties

-rw-r----- 1 oracle dba 9892 Jun 24 17:51 b64InternetCertificate.txt

-rw-r----- 1 oracle dba 11290 Jun 24 17:53 emd.properties.2005-06-

24-17-53-19

-rw-r----- 1 oracle dba 11308 Jun 24 17:53 emd.properties

현재 사용중인 database server전체에 대하여 즉, 현재 설정된 instance를 기준으로

확인하는 것이 아니라 oracle10g가 install되어 있는 서버에서 전체 database를

대상으로 각종 em관련 port를 확인하기 위해서는 다음과 같이한다.

[NEWSVC]LIRACLE:/app/oracle/temp> cat $ORACLE_HOME/install/portlist.ini

Ultra Search HTTP port number =5620

iSQL*Plus HTTP port number =5560

Enterprise Manager Agent Port =

Enterprise Manager Console HTTP Port (OMFSVR) = 5500

Enterprise Manager Agent Port (OMFSVR) = 1830

Enterprise Manager Console HTTP Port (NEWSVC) = 5501

Enterprise Manager Agent Port (NEWSVC) = 1831

앞으로 이 책에서 설명하는 em 화면은 대부분 “NEWSVC”의 port를 사용함으로

여러분은 각자 테스트하는 database와 port를 이 file에서 확인한 후 해당 port를

사용해야 한다.

[email protected] 69

Page 70: Oracle History #9

http://www.ggola.com 장 경 상

OCP point

==============================================

=================

1. emca의 역할

[email protected] 70

Page 71: Oracle History #9

http://www.ggola.com 장 경 상

2.5. Initialization Parameters

Initialization parameters는 크게 두 가지로 나뉘어진다. 그 하나는 basic

parameters로서 database 생성, 관리와 연관된 가장 기초적인 parameters이고 그

나머지들은 advanced parameters로서 주로 database의 성능이나 기능과 관련된

것들이다.

Deprecated parameters나 obsolete parameters를 사용하게 되면 instance start

시 warning message와 함께 alert log에 그 내용들이 기록된다. 그러나 deprecated

parameter는 정상적인 parameter처럼 작동한다. 이름이 바뀐 parameters는

가급적 빨리 바꾸어 사용하도록 하자.

2.5.1.Basic Parameters

다음의 parameters는 모두 oracle10g에서 사용하는 basic parameters이다.

Oracle이 사용하는 parameters는 너무나 많고 또한 basic parameters 모두를

반드시 설정해야 하는 것은 아니지만 말 그대로 아래의 기본 parameters은 항상

유의해야 한다.

Parameter Description (default : modification)

CLUSTER_DATABASE RAC enable을 결정 (FALSE : N)

COMPATIBLE Oracle release 사용범위 (10.0.0 : N)

CONTROL_FILES Control file정보 (OS dependent : N)

DB_BLOCK_SIZE Oracle DB block size (8192 : N)

DB_CREATE_FILE_DEST OMF datafile location (X : Y)

DB_CREATE_ONLINE_LOG_DEST_n OMF controlfile, redo log location (X :

Y)

DB_DOMAIN 분산환경에서의 논리적인 database 위치

(X : N)

DB_NAME Database identifier로 DB 생성시

지정하며 8자리까지 가능 (X : N)

DB_RECOVERY_FILE_DEST Flash recovery area 위치 (X : Y)

DB_RECOVERY_FILE_DEST_SIZE Flash recovery area 크기 (X : Y)

DB_UNIQUE_NAME 30자리까지 지정이 가능한 database의

unique한 이름을 보장하는 값

(DB_NAME or +ASM : N)

INSTANCE_NUMBER RAC내 instance number (derived from

instance start order : N)

[email protected] 71

표 2-1

기본 Paramet

er 와 설명

Page 72: Oracle History #9

http://www.ggola.com 장 경 상

JOB_QUEUE_PROCESSES Job을 수행하는 최대 processes 수 (0 : Y)

LOG_ARCHIVE_DEST_n Archive log 위치 (NULL : Y)

LOG_ARCHIVE_DEST_STATE_n Archive log 위치의 valid check 및

action을 지정 (ENABLE : Y)

NLS_LANGUAGE 일, 월등의 이름 및 message등을 display

하는 기본 언어를 설정 (NLS_LANG

환경변수 : Y)

NLS_TERRITORY 날짜, 숫자, 화폐기호 등의 지역적인 관습을

설정 (OS dependent : Y)

OPEN_CURSORS Session이 open할 수 있는 최대 cursor의

수 (50 : Y)

PGA_AGGREGATE_TARGET PGA memory의 총 량 (10M 과 SGA의

20%중 큰 값 : Y)

PROCESSES Oracle에 동시에 연결 가능한 최대 OS

processes의 수 (derived from

PARALLEL_MAX_SERVERS : N)

REMOTE_LISTENER Server instance와 다른 machine에 있는

listener의 network 이름 (X : Y)

REMOTE_LOGIN_PASSWORDFILE Password file을 check하고 얼마나 많은

수의 database가 password file을 사용할

것인가를 설정 (NONE : N)

ROLLBACK_SEGMENTS Rollback segment 지정 (public RBS :

N)

SESSIONS 연결 가능한 최대 session의 수 ((1.1 *

PROCESSES) + 5 : N)

SGA_TARGET SGA의 최대 size (0 : Y)

SHARED_SERVERS Shared server환경에서 최초 start되는

server processes의 수 (0 : Y)

STAR_TRANSFORMATION_ENABLED Cost-based query변환을 start query에

적용할 것인가를 결정 (FALSE : Y)

UNDO_MANAGEMENT Undo 관리를 자동화할 것인가를 결정

(MANUAL : N)

UNDO_TABLESPACE Instance start시 최초 사용할 undo

tablespace의 이름 (처음 사용 가능한

undo tablespace : Y)

[email protected] 72

Page 73: Oracle History #9

http://www.ggola.com 장 경 상

2.5.2.Deprecated(renamed) Parameters

database에서 이 정보를 알아내려면 다음과 같은 SQL을 사용하면 된다.

SQL> select name from v$parameter where isdeprecated = 'TRUE';

(1) Release 10.1

BUFFER_POOL_KEEP (변경 DB_KEEP_CACHE_SIZE)

BUFFER_POOL_RECYCLE (변경 DB_RECYCLE_CACHE_SIZE)

GLOBAL_CONTEXT_POOL_SIZE

LOCK_NAME_SPACE

LOG_ARCHIVE_START

MAX_ENABLED_ROLES

PARALLEL_AUTOMATIC_TUNING

PLSQL_COMPILER_FLAGS (변경 PLSQL_CODE_TYPE and PLSQL_DEBUG)

(2) Release 9.2

DRS_START (변경 DG_BROKER_START)

(3) Release 9.0.1

FAST_START_IO_TARGET (변경 FAST_START_MTTR_TARGET)

MTS_CIRCUITS (변경 CIRCUITS)

MTS_DISPATCHERS (변경 DISPATCHERS)

MTS_MAX_DISPATCHERS (변경 MAX_DISPATCHERS)

MTS_MAX_SERVERS (변경 MAX_SHARED_SERVERS)

MTS_SERVERS (변경 SHARED_SERVERS)

MTS_SESSIONS (변경 SHARED_SERVER_SESSIONS)

PARALLEL_SERVER (변경 CLUSTER_DATABASE)

PARALLEL_SERVER_INSTANCES (변경 CLUSTER_DATABASE_INSTANCES)

2.5.3.Obsolete Parameters

(1) Release 10.1

DBLINK_ENCRYPT_LOGIN

HASH_JOIN_ENABLED

LOG_PARALLELISM

MAX_ROLLBACK_SEGMENTS

MTS_CIRCUITS

MTS_DISPATCHERS

[email protected] 73

Page 74: Oracle History #9

http://www.ggola.com 장 경 상

MTS_LISTENER_ADDRESS

MTS_MAX_DISPATCHERS

MTS_MAX_SERVERS

MTS_MULTIPLE_LISTENERS

MTS_SERVERS

MTS_SERVICE

MTS_SESSIONS

OPTIMIZER_MAX_PERMUTATIONS

ORACLE_TRACE_COLLECTION_NAME

ORACLE_TRACE_COLLECTION_PATH

ORACLE_TRACE_COLLECTION_SIZE

ORACLE_TRACE_ENABLE

ORACLE_TRACE_FACILITY_NAME

ORACLE_TRACE_FACILITY_PATH

PARTITION_VIEW_ENABLED

PLSQL_NATIVE_C_COMPILER

PLSQL_NATIVE_LINKER

PLSQL_NATIVE_MAKE_FILE_NAME

PLSQL_NATIVE_MAKE_UTILITY

ROW_LOCKING

SERIALIZABLE

TRANSACTION_AUDITING

UNDO_SUPPRESS_ERRORS

(2) Release 9.2

DISTRIBUTED_TRANSACTIONS

MAX_TRANSACTION_BRANCHES

PARALLEL_BROADCAST_ENABLED

STANDBY_PRESERVES_NAMES

(3) Release 9.0.1

ALWAYS_ANTI_JOIN

ALWAYS_SEMI_JOIN

DB_BLOCK_LRU_LATCHES

DB_BLOCK_MAX_DIRTY_TARGET

[email protected] 74

Page 75: Oracle History #9

http://www.ggola.com 장 경 상

DB_FILE_DIRECT_IO_COUNT

GC_DEFER_TIME

GC_RELEASABLE_LOCKS

GC_ROLLBACK_LOCKS

HASH_MULTIBLOCK_IO_COUNT

INSTANCE_NODESET

JOB_QUEUE_INTERVAL

OPS_INTERCONNECTS

OPTIMIZER_PERCENT_PARALLEL

SORT_MULTIBLOCK_READ_COUNT

TEXT_ENABLE

(4) Release 8.1

ALLOW_PARTIAL_SN_RESULTS

ARCH_IO_SLAVES

B_TREE_BITMAP_PLANS

BACKUP_DISK_IO_SLAVES

CACHE_SIZE_THRESHOLD

CLEANUP_ROLLBACK_ENTRIES

CLOSE_CACHED_OPEN_CURSORS

COMPATIBLE_NO_RECOVERY

COMPLEX_VIEW_MERGING

DB_BLOCK_CHECKPOINT_BATCH

DB_BLOCK_LRU_EXTENDED_STATISTICS

DB_BLOCK_LRU_STATISTICS

DB_FILE_SIMULTANEOUS_WRITES

DELAYED_LOGGING_BLOCK_CLEANOUTS

DISCRETE_TRANSACTIONS_ENABLED

DISTRIBUTED_RECOVERY_CONNECTION_HOLD_TIMEFAST_FULL_SCAN_ENABLED

ENT_DOMAIN_NAME

FREEZE_DB_FOR_FAST_INSTANCE_RECOVERY

GC_LATCHES

GC_LCK_PROCS

JOB_QUEUE_KEEP_CONNECTIONS

LARGE_POOL_MIN_ALLOC

[email protected] 75

Page 76: Oracle History #9

http://www.ggola.com 장 경 상

LGWR_IO_SLAVES

LM_LOCKS

LM_PROCS

LM_RESS

LOCK_SGA_AREAS

LOG_ARCHIVE_BUFFER_SIZE

LOG_ARCHIVE_BUFFERS

LOG_BLOCK_CHECKSUM

LOG_FILES

LOG_SIMULTANEOUS_COPIES

LOG_SMALL_ENTRY_MAX_SIZE

MTS_RATE_LOG_SIZE

MTS_RATE_SCALE

OGMS_HOME

OPS_ADMIN_GROUP

OPTIMIZER_SEARCH_LIMIT

PARALLEL_DEFAULT_MAX_INSTANCES

PARALLEL_MIN_MESSAGE_POOL

PARALLEL_SERVER_IDLE_TIME

PARALLEL_TRANSACTION_RESOURCE_TIMEOUT

PUSH_JOIN_PREDICATE

REDUCE_ALARM

ROW_CACHE_CURSORS

SEQUENCE_CACHE_ENTRIES

SEQUENCE_CACHE_HASH_BUCKETS

SHARED_POOL_RESERVED_MIN_ALLOC

SNAPSHOT_REFRESH_KEEP_CONNECTIONS

SNAPSHOT_REFRESH_PROCESSES

SORT_DIRECT_WRITES

SORT_READ_FAC

SORT_SPACEMAP_SIZE

SORT_WRITE_BUFFER_SIZE

SORT_WRITE_BUFFERS

SPIN_COUNT

TEMPORARY_TABLE_LOCKS

[email protected] 76

Page 77: Oracle History #9

http://www.ggola.com 장 경 상

USE_ISM

[email protected] 77