/***********************************************************************/ /* Document : Oracle 8i,9i,10g queries, information, and tips */ /* Doc. Versie : 59 */ /* File : oracle9i10g.

txt */ /* Date : 30-06-2008 */ /* Content : Just a series of handy DBA queries. */ /* Compiled by : Albert van der Sel */ /***********************************************************************/

CONTENTS: 0. Common data dictionary queries for sessions, locks, perfoRMANce etc.. 1. DATA DICTIONARY QUERIES m.b.t. files, tablespaces, logs: 2. NOTES ON PERFORMANCE: 3. Data dictonary queries m.b.t perfoRMANce: 4. IMP and EXP, 10g IMPDB and EXPDB, and SQL*Loader Examples 5. Add, Move AND Size Datafiles,logfiles, create objects etc..: 6. Install Oracle 92 on Solaris: 7. install Oracle 9i on Linux: 8. Install Oracle 9.2.0.2 on OpenVMS: 9. Install Oracle 9.2.0.1 on AIX 9. Installation Oracle 8i - 9i: 10. CONSTRAINTS: 11. DBMS_JOB and scheduled Jobs: 12. Net8,9,10 / SQLNet: 13. Datadictionary queries Rollback segments: 14. Data dictionary queries m.b.t. security, permissions: 15. INIT.ORA parameters: 16. Snapshots: 17. Triggers: 19. BACKUP RECOVERY, TROUBLESHOOTING: 20. TRACING: 21. Overig: 22. DBA% and v$ views 23 TUNING: 24 RMAN: 25. UPGRADE AND MIGRATION 26. Some info on Rdb: 27. Some info on IFS 28. Some info on 9iAS rel. 2 29 - 35 9iAS configurations and troubleshooting 30. BLOBS 31. BLOCK CORRUPTION 32. iSQL*Plus and EM 10g 33. ADDM 34. ASM and 10g RAC 35. CDC and Streams 36. X$ Tables

================================================================================ ============ 0. QUICK INFO/VIEWS ON SESSIONS, LOCKS, AND UNDO/ROLLBACK INFORMATION IN A SING LE INSTANCE: ================================================================================ ===========

SINGLE INSTANCE QUERIES: ======================== -- ---------------------------- 0.1 QUICK VIEW ON SESSIONS: -- --------------------------SELECT substr(username, 1, 10), osuser, sql_address, to_char(logon_time, 'DD-MMYYYY;HH24:MI'), sid, serial#, command, substr(program, 1, 30), substr(machine, 1, 30), su bstr(terminal, 1, 30) FROM v$session; SELECT sql_text, rows_processed from v$sqlarea where address='' -- ------------------------- 0.2 QUICK VIEW ON LOCKS: (use the sys.obj$ to find ID1:) -- -----------------------First, lets take a look at some important dictionary views with respect to locks : SQL> desc v$lock; Name Null? ----------------------------- -------ADDR KADDR SID TYPE ID1 ID2 LMODE REQUEST CTIME BLOCK Type -------------------RAW(8) RAW(8) NUMBER VARCHAR2(2) NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER

This view stores all information relating to locks in the database. The interest ing columns in this view are sid (identifying the session holding or aquiring the lock), type, and the lmode/request pair. Important possi ble values of type are TM (DML or Table Lock), TX (Transaction), MR (Media Recovery), ST (Disk Space Transaction). Exactly one of the lmode, request pair is either 0 or 1 while the other indicates the lock mode. If lmode is not 0 or 1, then the sessio n has aquired the lock, while it waits to aquire the lock if request is other than 0 or 1. The possible values for lmode and request are: 1: 2: 3: 4: 5: 6: null, Row Share (SS), Row Exclusive (SX), Share (S), Share Row Exclusive (SSX) and Exclusive(X)

If the lock type is TM, the column id1 is the object's id and the name of the ob ject can then be queried like so:

select name from sys.obj$ where obj# = id1 A lock type of JI indicates that a ma terialized view is being SQL> desc v$locked_object; Name Null? ----------------------------- -------XIDUSN XIDSLOT XIDSQN OBJECT_ID SESSION_ID ORACLE_USERNAME OS_USER_NAME PROCESS LOCKED_MODE SQL> desc dba_waiters; Name Null? ----------------------------- -------WAITING_SESSION HOLDING_SESSION LOCK_TYPE MODE_HELD MODE_REQUESTED LOCK_ID1 LOCK_ID2 SQL> desc v$transaction; Name Null? ----------------------------- -------ADDR XIDUSN XIDSLOT XIDSQN UBAFIL UBABLK UBASQN UBAREC STATUS START_TIME START_SCNB START_SCNW START_UEXT START_UBAFIL START_UBABLK START_UBASQN START_UBAREC SES_ADDR FLAG SPACE RECURSIVE NOUNDO PTX NAME PRV_XIDUSN PRV_XIDSLT PRV_XIDSQN

Type -------------------NUMBER NUMBER NUMBER NUMBER NUMBER VARCHAR2(30) VARCHAR2(30) VARCHAR2(12) NUMBER

Type -------------------NUMBER NUMBER VARCHAR2(26) VARCHAR2(40) VARCHAR2(40) NUMBER NUMBER

Type -------------------RAW(8) NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER VARCHAR2(16) VARCHAR2(20) NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER RAW(8) NUMBER VARCHAR2(3) VARCHAR2(3) VARCHAR2(3) VARCHAR2(3) VARCHAR2(256) NUMBER NUMBER NUMBER

PTX_XIDUSN PTX_XIDSLT PTX_XIDSQN DSCN-B DSCN-W USED_UBLK USED_UREC LOG_IO PHY_IO CR_GET CR_CHANGE START_DATE DSCN_BASE DSCN_WRAP START_SCN DEPENDENT_SCN XID PRV_XID PTX_XID

NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER DATE NUMBER NUMBER NUMBER NUMBER RAW(8) RAW(8) RAW(8)

Queries you can use in investigating locks: =========================================== SELECT XIDUSN,OBJECT_ID,SESSION_ID,ORACLE_USERNAME,OS_USER_NAME,PROCESS from v$l ocked_object; SELECT d.OBJECT_ID, substr(OBJECT_NAME,1,20), l.SESSION_ID, l.ORACLE_USERNAME, l .LOCKED_MODE from v$locked_object l, dba_objects d where d.OBJECT_ID=l.OBJECT_ID; SELECT ADDR, KADDR, SID, TYPE, ID1, ID2, LMODE, BLOCK from v$lock; SELECT a.sid, a.saddr, b.ses_addr, a.username, b.xidusn, b.used_urec, b.used_ubl k FROM v$session a, v$transaction b WHERE a.saddr = b.ses_addr; SELECT s.sid, l.lmode, l.block, substr(s.username, 1, 10), substr(s.schemaname, 1, 10), substr(s.osuser, 1, 10), substr(s.program, 1, 30), s.command FROM v$session s, v$lock l WHERE s.sid=l.sid; SELECT p.spid, s.sid, p.addr,s.paddr,substr(s.username, 1, 10), substr(s.schema name, 1, 10), s.command,substr(s.osuser, 1, 10), substr(s.machine, 1, 10) FROM v$session s, v$process p WHERE s.paddr=p.addr SELECT sid, serial#, command,substr(username, 1, 10), osuser, sql_address,LOCKWA

IT, FROM to_char(logon_time, 'DD-MM-YYYY;HH24:MI'), substr(program, 1, 30) v$session;

SELECT sid, serial#, username, LOCKWAIT from v$session; SELECT v.SID, v.BLOCK_GETS, v.BLOCK_CHANGES, w.USERNAME, w.OSUSER, w.TERMINAL FROM v$sess_io v, V$session w WHERE v.SID=w.SID ORDER BY v.SID; SELECT * from dba_waiters; SELECT waiting_session, holding_session, lock_type, mode_held FROM dba_waiters; SELECT p.spid s.sid p.addr, s.paddr, substr(s.username, 1, 10) substr(s.schemaname, 1, 10) s.command substr(s.osuser, 1, 10) substr(s.machine, 1, 25) FROM v$session s, v$process WHERE s.paddr=p.addr ORDER BY p.spid;

unix_spid, sid, username, schemaname, command, osuser, machine p

Usage of v$session_longops: =========================== SQL> desc v$session_longops; SID SERIAL# OPNAME TARGET NUMBER NUMBER VARCHAR2(64) VARCHAR2(64) Session identifier Session serial number Brief description of the operation The object on which the operation is carried out Description of the target The units of work done so far The total units of work The units of measurement The starting time of operation Time when statistics last updated Timestamp Estimate (in seconds) of time remaining for the The number of elapsed seconds from the start of Statistics summary message User ID of the user performing the operation Used with the value of the SQL_HASH_VALUE column

TARGET_DESC VARCHAR2(32) SOFAR NUMBER TOTALWORK NUMBER UNITS VARCHAR2(32) START_TIME DATE LAST_UPDATE_TIME DATE TIMESTAMP DATE TIME_REMAINING NUMBER operation to complete ELAPSED_SECONDS NUMBER operations CONTEXT NUMBER Context MESSAGE VARCHAR2(512) USERNAME VARCHAR2(30) SQL_ADDRESS RAW(4 | 8)

to identify the SQL statement associated with the operation SQL_HASH_VALUE NUMBER Used with the value of the SQL_ADDRESS column to identify the SQL statement associated with the operation SQL_ID VARCHAR2(13) SQL identifier of the SQL statement associated w ith the operation QCSID NUMBER Session identifier of the parallel coordinator This view displays the status of various operations that run for longer than 6 s econds (in absolute time). These operations currently include many backup and recovery functions, statistics gathering, and query exec ution, and more operations are added for every Oracle release. To monitor query execution progress, you must be using the cost-based optimizer and you must: Set the TIMED_STATISTICS or SQL_TRACE parameter to true Gather statistics for your objects with the ANALYZE statement or the DBMS_STATS package You can add information to this view about application-specific long-running ope rations by using the DBMS_APPLICATION_INFO.SET_SESSION_LONGOPS procedure. Select 'long', to_char (l.sid), to_char (l.serial#), to_char(l.sofar), to_char (l.totalwork), to_char(l.start_time, 'DD-Mon-YYYY HH24:MI:SS' ), to_char ( l.last_update_time , 'DD-Mon-YYYY HH24:MI:SS'), to_char(l.time_remaini ng), to_char(l.elapsed_seconds), l.opname,l.target,l.target_desc,l.message,s.username,s.osuser,s.lockwait from v $session_longops l, v$session s where l.sid = s.sid and l.serial# = s.serial#; Select 'long', to_char (l.sid), to_char (l.serial#), to_char(l.sofar), to_char (l.totalwork), to_char(l.start_time, 'DD-Mon-YYYY HH24:MI:SS' ), to_char ( l.last_update_time , 'DD-Mon-YYYY HH24:MI:SS'), s.username,s.osuser,s. lockwait from v$session_longops l, v$session s where l.sid = s.sid and l.serial# = s.serial#; select substr(username,1,15),target,to_char(start_time, 'DD-Mon-YYYY HH24:MI:SS' ), SOFAR,substr(MESSAGE,1,70) from v$session_longops; select USERNAME, to_char(start_time, 'DD-Mon-YYYY HH24:MI:SS' ),substr(message,1 ,90),to_char(time_remaining) from v$session_longops;

9i and 10G note: ================ Oracle has a view inside the Oracle data buffers. The view is called v$bh, and while v$bh was originally developed for Oracle Parallel Server (OPS), the v$bh view can be used to show th e number of data blocks in the data buffer for every object type in the database. The following query is especially exciting because you can now see what objects are consuming

the data buffer caches. In Oracle9i, you can use this information to segregate tables to separate RAM buffers with different blocksizes. Here is a sample query that shows data buffer utilization for individual objects in the database. Note that this script uses an Oracle9i scalar sub-query, and will not work in pr e-Oracle9i systems unless you comment-out column c3. column column column column c0 c1 c2 c3 heading heading heading heading 'Owner' 'Object|Name' 'Number|of|Buffers' 'Percentage|of Data|Buffer' format format format format a15 a30 999,999 999,999,999

select owner c0, object_name c1, count(1) c2, (count(1)/(select count(*) from v$bh)) *100 c3 from dba_objects o, v$bh bh where o.object_id = bh.objd and o.owner not in ('SYS','SYSTEM','AURORA$JIS$UTILITY$') group by owner, object_name order by count(1) desc ; -- ------------------------------ 0.3 QUICK VIEW ON TEMP USAGE: -- ----------------------------select total_extents, used_extents, total_extents, current_users, tablespace_nam e from v$sort_segment; select username, user, sqladdr, extents, tablespace from v$sort_usage; SELECT b.tablespace, ROUND(((b.blocks*p.value)/1024/1024),2), a.sid||','||a.serial# SID_SERIAL, a.username, a.program FROM sys.v_$session a, sys.v_$sort_usage b, sys.v_$parameter p WHERE p.name = 'db_block_size' AND a.saddr = b.session_addr ORDER BY b.tablespace, b.blocks; -- --------------------------------- 0.4 QUICK VIEW ON UNDO/ROLLBACK: -- --------------------------------

SELECT substr(username, 1, 10), substr(terminal, 1, 10), substr(osuser, 1, 10), t.start_time, r.name, t.used_ublk "ROLLB BLKS", log_io, phy_io FROM sys.v_$transaction t, sys.v_$rollname r, sys.v_$session s WHERE t.xidusn = r.usn AND t.ses_addr = s.saddr; SELECT substr(n.name, 1, 10), s.writes, s.gets, s.waits, s.wraps, s.extents, s.s tatus, s.optsize, s.rssize FROM V$ROLLNAME n, V$ROLLSTAT s WHERE n.usn=s.usn; SELECT substr(r.name, 1, 10) "RBS", s.sid, s.serial#, s.taddr, t.addr, substr(s.username, 1, 10) "USER", t.status, t.cr_get, t.phy_io, t.used_ublk, t.noundo, substr(s.program, 1, 15) "COMMAND" FROM sys.v_$session s, sys.v_$transaction t, sys.v_$rollname r WHERE t.addr = s.taddr AND t.xidusn = r.usn ORDER BY t.cr_get, t.phy_io; SELECT substr(segment_name, 1, 20), substr(tablespace_name, 1, 20), status, INITIAL_EXTENT, NEXT_EXTENT, MIN_EXTENTS, MAX_EXTENTS, PCT_INCREASE FROM DBA_ROLLBACK_SEGS; select 'FREE',count(*) from sys.fet$ union select 'USED',count(*) from sys.uet$; -- Quick view active transactions SELECT NAME, XACTS "ACTIVE TRANSACTIONS" FROM V$ROLLNAME, V$ROLLSTAT WHERE V$ROLLNAME.USN = V$ROLLSTAT.USN; SELECT to_char(BEGIN_TIME, 'DD-MM-YYYY;HH24:MI'), to_char(END_TIME, 'DD-MM-YYYY ;HH24:MI'), UNDOTSN, UNDOBLKS, TXNCOUNT, MAXCONCURRENCY AS "MAXCON" FROM V$UNDOSTAT WHERE trunc(BEGIN_TIME)=trunc(SYSDATE); select TO_CHAR(MIN(Begin_Time),'DD-MON-YYYY HH24:MI:SS') "Begin Time", TO_CHAR(MAX(End_Time),'DD-MON-YYYY HH24:MI:SS') "End Time", SUM(Undoblks) "Total Undo Blocks Used", SUM(Txncount) "Total Num Trans Executed", MAX(Maxquerylen) "Longest Query(in secs)", MAX(Maxconcurrency) "Highest Concurrent TrCount", SUM(Ssolderrcnt), SUM(Nospaceerrcnt) from V$UNDOSTAT; SELECT used_urec FROM v$session s, v$transaction t WHERE s.audsid=sys_context('userenv', 'sessionid') and s.taddr = t.addr; (used_urec = Used Undo records)

SELECT a.sid, a.username, b.xidusn, b.used_urec, b.used_ublk FROM v$session a, v$transaction b WHERE a.saddr = b.ses_addr; SELECT v.SID, v.BLOCK_GETS, v.BLOCK_CHANGES, w.USERNAME, w.OSUSER, w.TERMINAL FROM v$sess_io v, V$session w WHERE v.SID=w.SID ORDER BY v.SID;

-- --------------------------------- 0.5 SOME EXPLANATIONS: -- --------------------------------

-- explanation of "COMMAND": 1: CREATE TABLE 2: INSERT 3: SELECT 4: CREATE CLUSTER 5: ALTER CLUSTER 6: UPDATE 7: DELETE 8: DROP CLUSTER 9: CREATE INDEX 10: DROP INDEX 11: ALTER INDEX 12: DROP TABLE 13: CREATE SEQUENC E 14: ALTER SEQUENCE 15: ALTER TABLE 16: DROP SEQUENCE 17: GRANT 18: REVOKE 19: CREATE SYNONYM 20: DR OP SYNONYM 21: CREATE VIEW 22: DROP VIEW 23: VALIDATE INDEX 24: CREATE PROCEDURE 25: ALTER PROCEDURE 26: LO CK TABLE 27: NO OPERATION 28: RENAME 29: COMMENT 30: AUDIT 31: NOAUDIT 32: CREATE DATABASE LINK 33: DROP D ATABASE LINK 34: CREATE DATABASE 35: ALTER DATABASE 36: CREATE ROLLBACK SEGMENT 37: ALTER ROLLBACK SEGMENT 38: DR OP ROLLBACK SEGMENT 39: CREATE TABLESPACE 40: ALTER TABLESPACE 41: DROP TABLESPACE 42: ALTER SESSION 43: ALTER USE 44: COMMIT 45: ROLLBACK 46: SAVEPOINT 47: PL/SQL EXECUTE 48: SET TRANSACTION 49: ALTER SYST EM SWITCH LOG 50: EXPLAIN 51: CREATE USER 25: CREATE ROLE 53: DROP USER 54: DROP ROLE 55: SET ROLE 56: CRE ATE SCHEMA 57: CREATE CONTROL FILE 58: ALTER TRACING 59: CREATE TRIGGER 60: ALTER TRIGGER 61: DROP TRIGGER 62: ANAL YZE TABLE 63: ANALYZE INDEX 64: ANALYZE CLUSTER 65: CREATE PROFILE 66: DROP PROFILE 67: ALTER PROFILE 68: DR OP PROCEDURE 69: DROP PROCEDURE 70: ALTER RESOURCE COST 71: CREATE SNAPSHOT LOG 72: ALTER SNAPSHOT LOG 73: DROP SNAPSHOT LOG 74: CREATE SNAPSHOT 75: ALTER SNAPSHOT 76: DROP SNAPSHOT 79: ALTER ROLE 85: TRUNCATE TABLE 86: TRUNC ATE COUSTER 88: ALTER VIEW 91: CREATE FUNCTION 92: ALTER FUNCTION 93: DROP FUNCTION 94: CREATE PACKAGE 95: ALTER PACKAGE 96: DROP PACKAGE 97: CREATE PACKAGE BODY 98: ALTER PACKAGE BODY 99: DROP PACKAGE BODY -- explanation of locks: Locks: 0, 'None', 1, 'Null', 2, 'Row-S (SS)', 3, 'Row-X (SX)', 4, 'Share', 5, 'S/Row-X (SRX)', 6, 'Exclusive', to_char(b.lmode) /* /* /* /* /* /* /* Mon Lock equivalent */ N */ L */ R */ S */ C */ X */

TX: enqueu, waiting TM: DDL on object MR: Media Recovery A TX lock is acquired when a transaction initiates its first change and is held until the transaction does a COMMIT or ROLLBACK. It is used mainly as a queuing mechanism so that other sessions can wait for the transaction to complete. TM Per table locks are acquired during the execution of a transaction when referencing a table with a DML statement so that the object is not dropped or altered during the execution of the transaction, if and only if the dml_locks parameter is non-zero. LOCKS: locks op user objects, zoals tables en rows LATCH: locks op system objects, zoals shared data structures in memory en data d ictionary rows LOCKS - shared of exclusive LATCH - altijd exclusive UL= user locks, geplaats door programmatuur m.b.v. bijvoorbeeld DBMS_LOCK packag e DML LOCKS: data manipulatie: table lock, row lock DDL LOCKS: preserves de struktuur van object (geen simulane DML, DDL statements) DML locks: row lock (TX): voor rows (insert, update, delete) row lock plus table lock: row lock, maar ook voorkomen DDL statements table lock (TM): automatisch bij insert, update, delete, ter voorkoming DDL op t able table lock: S: share lock RS: row share RSX: row share exlusive RX: row exclusive X: exclusive (ANDere tansacties kunnen alleen SELECT..) in V$LOCK lmode column: 0, 1, 2, 3, 4, 5, 6, None Null (NULL) Row-S (SS) Row-X (SX) Share (S) S/Row-X (SSX) Exclusive (X)

Internal Implementation of Oracle Locks (Enqueue) Oracle server uses locks to provide concurrent access to shared resources wherea s it uses latches to provide exclusive and short-term access to memory structures inside the SGA. Latches als o prevent more than one process to execute the same piece of code, which other process might be executing. Latch

is also a simple lock, which provides serialize and only exclusive access to the memory area in SGA. Or acle doesn t use latches to provide shared access to resources because it will increase CPU usage. Latches a re used for big memory structure and allow operations required for locking the sub structures. Shared resources c an be tables, transactions, redo threads, etc. Enqueue can be local or global. If it is a single instance th en enqueues will be local to that instance. There are global enqueus also like ST enqueue, which is held befo re any space transaction can be occurred on any tablespace in RAC. ST enqueues are held only for dictiona ry-managed tablespaces. These oracle locks are generally known as Enqueue, because whenever there is a s ession request for a lock on any shared resource structure, it's lock data structure is queued to one of t he linked list attached to that resource structure (Resource structure is discussed later). Before proceeding further with this topic, here is little brief about Oracle loc ks. Oracle locks can be applied to compound and simple objects like tables and the cache buffer. Locks can be he ld in different modes like shared, excusive, null, sub-shared, sub-exclusive and shared sub-exclusive. Depending on the type of object, different modes are applied. Foe example, a compound object like a table with ro ws, all above mentioned modes could be applicable whereas for simple objects only the first three will be appl icable. These lock modes don t have any importance of their own but the importance is how they are being used b y the subsystem. These lock modes (compatibility between locks) define how the session will get a lock on that object.

-- Explanation of Waits: SQL> desc v$system_event; Name -----------------------EVENT TOTAL_WAITS TOTAL_TIMEOUTS TIME_WAITED AVERAGE_WAIT TIME_WAITED_MICRO v$system_event This view displays the count (total_waits) of all wait events since startup of t he instance. If timed_statistics is set to true, the sum of the wait times for all events are also displayed in the column time_waited. The unit of time_waited is one hundreth of a second. Since 10g, an additional column (time_waited_micro) measures wait times in milli onth of a second. total_waits where event='buffer busy waits' is equal the sum of count in v$waits tat. v$enqueue_stat can be used to break down waits on the enqueue wait event. While this view totals all

events in an instance, v$session select event, total_waits, time_waited from v$system_event where event like '%file%' Order by total_waits desc; column column column column column c1 c2 c3 c4 c5 heading heading heading heading heading 'Event|Name' 'Total|Waits' 'Seconds|Waiting' 'Total|Timeouts' 'Average|Wait|(in secs)' format format format format format a30 999,999,999 999,999 999,999,999 99.999

ttitle 'System-wide Wait Analysis|for current wait events' select event c1, total_waits c2, time_waited / 100 c3, total_timeouts c4, average_wait /100 c5 from sys.v_$system_event where event not in ( 'dispatcher timer', 'lock element cleanup', 'Null event', 'parallel query dequeue wait', 'parallel query idle wait - Slaves', 'pipe get', 'PL/SQL lock timer', 'pmon timer', 'rdbms ipc message', 'slave wait', 'smon timer', 'SQL*Net break/reset to client', 'SQL*Net message from client', 'SQL*Net message to client', 'SQL*Net more data to client', 'virtual circuit status', 'WMON goes to sleep' ) AND event not like 'DFS%' and event not like '%done%' and event not like '%Idle%' AND event not like 'KXFX%' order by c2 desc ; Create table beg_system_event as select * from v$system_event Run workload through system or user task Create table end_system_event as select * from v$system_event Issue SQL to determine true wait events drop table beg_system_event;

drop table end_system_event; SELECT b.event, (e.total_waits - b.total_waits) total_waits, (e.total_timeouts - b.total_timeouts) total_timeouts, (e.time_waited - b.time_waited) time_waited FROM beg_system_event b, end_system_event e WHERE b.event = e.event; Cumulative info, after startup: ------------------------------SELECT * FROM v$system_event WHERE event = 'enqueue'; SELECT * FROM v$sysstat WHERE class=4; select c.name,a.addr,a.gets,a.misses,a.sleeps, a.immediate_gets,a.immediate_misses,a.wait_time, b.pid from v$latch a, v$latchholder b, v$latchname c where a.addr = b.laddr(+) and a.latch# = c.latch# order by a.latch#; -- ---------------------------------------------------------------- 0.6. QUICK INFO ON HIT RATIO, SHARED POOL etc.. -- ---------------------------------------------------------------- Hit ratio: SELECT FROM WHERE AND AND (1-(pr.value/(dbg.value+cg.value)))*100 v$sysstat pr, v$sysstat dbg, v$sysstat cg pr.name = 'physical reads' dbg.name = 'db block gets' cg.name = 'consistent gets';

SELECT * FROM V$SGA; -- free memory shared pool: SELECT * FROM v$sgastat WHERE name = 'free memory'; -- hit ratio shared pool: SELECT gethits,gets,gethitratio FROM v$librarycache WHERE namespace = 'SQL AREA'; SELECT SUM(PINS) "EXECUTIONS", SUM(RELOADS) "CACHE MISSES WHILE EXECUTING" FROM V$LIBRARYCACHE; SELECT sum(sharable_mem) FROM v$db_object_cache; -- finding literals in SP: SELECT substr(sql_text,1,50) "SQL",

count(*) , sum(executions) "TotExecs" FROM v$sqlarea WHERE executions < 5 GROUP BY substr(sql_text,1,50) HAVING count(*) > 30 ORDER BY 2; -- ---------------------------------------- 0.7 Quick Table and object information -- --------------------------------------SELECT distinct substr(t.owner, 1, 25), substr(t.table_name,1,50), substr(t.tabl espace_name,1,20), t.chain_cnt, t.logging, s.relative_fno FROM dba_tables t, dba_segments s WHERE t.owner not in ('SYS','SYSTEM', 'OUTLN','DBSNMP','WMSYS','ORDSYS','ORDPLU GINS','MDSYS','CTXSYS','XDB') AND t.table_name=s.segment_name AND s.segment_type='TABLE' AND s.segment_name like 'CI_PAY%'; SELECT substr(segment_name, 1, 30), segment_type, substr(owner, 1, 10), extents, initial_extent, next_extent, max_extents FROM dba_segments WHERE extents > max_extents - 100 AND owner not in ('SYS','SYSTEM'); SELECT FROM WHERE and segment_name, owner, tablespace_name, extents dba_segments owner='SALES' -- you use the correct schema here extents > 700;

SELECT owner, substr(object_name, 1, 30), object_type, created, last_ddl_time, status FROM dba_objects where OWNER='RM_LIVE'; WHERE created > SYSDATE-5; SELECT owner, substr(object_name, 1, 30), object_type, created, to_char(last_ddl_time, 'DD-MM-YYYY;HH24:MI'), status FROM dba_objects where OWNER='RM_LIVE' AND last_ddl_time > SYSDATE-5; SELECT owner, substr(object_name, 1, 30), object_type, created, last_ddl_time, status FROM dba_objects WHERE status='INVALID'; Compare 2 owners: ----------------select table_name from dba_tables where owner='MIS_OWNER' and table_name not in (SELECT table_name from dba_tables where OWNER='MARPAT'); Table and column information: ----------------------------select

substr(table_name, 1, 3) schema , table_name , column_name , substr(data_type,1 ,1) data_type from user_tab_columns where COLUMN_NAME='ENV_ID' where table_name like 'ALG%' or table_name like 'STG%' or table_name like 'ODS%' or table_name like 'DWH%' or table_name like 'MKM%' order by decode(substr(table_name, 1, 3), 'ALG', 10, 'STG', 20, 'ODS', 30, 'DWH ', 40, 'MKM', 50, 60) , table_name , column_id Check on existence of JServer: -----------------------------select count(*) from all_objects where object_name = 'DBMS_JAVA'; should return a count of 3 -- --------------------------------------- 0.8 QUICK INFO ON PRODUCT INFORMATION: -- -------------------------------------ersa SELECT * FROM PRODUCT_COMPONENT_VERSION; SELECT * FROM NLS_DATABASE_PARAMETERS; SELECT * FROM NLS_SESSION_PARAMETERS; SELECT * FROM NLS_INSTANCE_PARAMETERS; SELECT * FROM V$OPTION; SELECT * FROM V$LICENSE; SELECT * FROM V$VERSION; Oracle RDBMS releases: ---------------------9.2.0.1 is the terminal release for Oracle 9i. Rel 2. Normally it's patched to 9.2.0.4. As from october patches 9.2.0.5 and little later 9.2.0.6 were available 9.2.0.4 is patch ID 3095277. 9.0.1.4 8.1.7 8.0.6 7.3.4 is is is is the the the the terminal terminal terminal terminal release release release release for for for for Oracle 9i Oracle8i. Oracle8. Oracle7. Rel. 1. Additional patchsets exists. Additional patchsets exists. Additional patchsets exists.

IS ORACLE 32BIT or 64BIT? ------------------------Starting with version 8, Oracle began shipping 64bit versions of it's RDBMS prod uct on UNIX platforms that support 64bit software. IMPORTANT: 64bit Oracle can only be installed on O

perating Systems that are 64bit enabled. In general, if Oracle is 64bit, '64bit' will be displayed on the opening banners of Oracle executables such as 'svrmgrl', 'exp' and 'imp'. It will also be displayed in the headers o f Oracle trace files. Otherwise if '64bit' is not display at these locations, it can be assumed that O racle is 32bit. or From the OS level: % cd $ORACLE_HOME/bin % file oracle will be indicated. ...if 64bit, '64bit'

To verify the wordsize of a downloaded patchset: -----------------------------------------------The filename of the downloaded patchset usually dictates which version and word size of Oracle it should be applied against. For instance: p1882450_8172_SOLARIS64.zip is the 8.1.7.2 patchset for 64bit Oracle on Solaris. Also refer to the README that is included with the patch or patch set and this Note: Win2k Server Certifications: ---------------------------OS Product Certified With Version Status Addtl. Info. Components Other Install I ssue 2000 10g N/A N/A Certified Yes None None None 2000 9.2 32-bit -Opteron N/A N/A Certified Yes None None None 2000 9.2 N/A N/A Certified Yes None None None 2000 9.0.1 N/A N/A Desupported Yes None N/A N/A 2000 8.1.7 (8i) N/A N/A Desupported Yes None N/A N/A 2000 8.1.6 (8i) N/A N/A Desupported Yes None N/A N/A 2000, Beta 3 8.1.5 (8i) N/A N/A Withdrawn Yes N/A N/A N/A Solaris Server certifications: -----------------------------Server Certifications OS Product Certified With Version Status Addtl. Info. Components Other Install I ssue 9 10g 64-bit N/A N/A Certified Yes None None None 8 10g 64-bit N/A N/A Certified Yes None None None 10 10g 64-bit N/A N/A Projected None N/A N/A N/A 9 9.2 64-bit N/A N/A Certified Yes None None None 8 9.2 64-bit N/A N/A Certified Yes None None None 10 9.2 64-bit N/A N/A Projected None N/A N/A N/A 2.6 9.2 N/A N/A Certified Yes None None None 9 9.2 N/A N/A Certified Yes None None None 8 9.2 N/A N/A Certified Yes None None None 7 9.2 N/A N/A Certified Yes None None None 10 9.2 N/A N/A Projected None N/A N/A N/A 9 9.0.1 64-bit N/A N/A Desupported Yes None N/A N/A 8 9.0.1 64-bit N/A N/A Desupported Yes None N/A N/A 2.6 9.0.1 N/A N/A Desupported Yes None N/A N/A 9 9.0.1 N/A N/A Desupported Yes None N/A N/A 8 9.0.1 N/A N/A Desupported Yes None N/A N/A 7 9.0.1 N/A N/A Desupported Yes None N/A N/A 9 8.1.7 (8i) 64-bit N/A N/A Desupported Yes None N/A N/A 8 8.1.7 (8i) 64-bit N/A N/A Desupported Yes None N/A N/A

2.6 8.1.7 (8i) N/A N/A Desupported Yes None N/A N/A 9 8.1.7 (8i) N/A N/A Desupported Yes None N/A N/A 8 8.1.7 (8i) N/A N/A Desupported Yes None N/A N/A 7 8.1.7 (8i) N/A N/A Desupported Yes None N/A N/A everything below: desupported Oracle clients: --------------Server Client Version 10.1.0 7.3.4 10.1.0 Yes No 9.2.0 Yes No #1 9.0.1 Was Was 8.1.7 Yes Was 8.1.6 No Was 8.1.5 No Was 8.0.6 No Was 8.0.5 No Was 7.3.4 No Was Version 9.2.0 9.0.1 Yes Yes Was Yes No No Was No Was Was Was Was Was Was No Was No Was 8.1.7 8.1.6 8.1.5 No No No Was Was Was Was Was Was 8.0.6 No Was Was Was Was Was Was Was Was 8.0.5 No No No Was Was Was Was Was Was

Yes #2 No Yes Was Yes Was Was Was Was Was No Was Was Was Was Was Was Was

-- ------------------------------------------------------ 0.9 QUICK INFO WITH REGARDS LOGS AND BACKUP RECOVERY: -- ----------------------------------------------------SELECT * from V$BACKUP; SELECT file#, substr(name, 1, 30), status, checkpoint_change# controlfile FROM V$DATAFILE; SELECT d.file#, d.status, d.checkpoint_change#, b.status, b.CHANGE#, to_char(b.TIME,'DD-MM-YYYY;HH24:MI'), substr(d.name, 1, 40) FROM V$DATAFILE d, V$BACKUP b WHERE d.file#=b.file#; SELECT file#, substr(name, 1, 30), status, fuzzy, checkpoint_change# file header FROM V$DATAFILE_HEADER; -- uit -- uit

SELECT first_change#, next_change#, sequence#, archived, substr(name, 1, 40), COMPLETION_TIME, FIRST_CHANGE#, FIRST_TIME FROM V$ARCHIVED_LOG WHERE COMPLETION_TIME > SYSDATE -2; SELECT recid, first_change#, sequence#, next_change#

FROM V$LOG_HISTORY; SELECT resetlogs_change#, checkpoint_change#, controlfile_change#, open_resetlog s FROM V$DATABASE; SELECT * FROM V$RECOVER_FILE -- Which file needs recovery -- ----------------------------------------------------------------------------- 0.10 QUICK INFO WITH REGARDS TO TABLESPACES, DATAFILES, REDO LOGFILES etc..: -- ------------------------------------------------------------------------------ online redo log informatie: V$LOG, V$LOGFILE: SELECT l.group#, l.members, l.status, l.bytes, substr(lf.member, 1, 50) FROM V$LOG l, V$LOGFILE lf WHERE l.group#=lf.group#; SELECT THREAD#, SEQUENCE#, FIRST_CHANGE#, FIRST_TIME, to_char(FIRST_TIME, 'DD-MM-YYYY;HH24:MI') FROM V$LOG_HISTORY; -- WHERE SEQUENCE# SELECT GROUP#, ARCHIVED, STATUS FROM V$LOG; -- tablespace free-used: SELECT Total.name "Tablespace Name", Free_space, (total_space-Free_space) Used_space, total_space FROM (SELECT tablespace_name, sum(bytes/1024/1024) Free_Space FROM sys.dba_free_space GROUP BY tablespace_name ) Free, (SELECT b.name, sum(bytes/1024/1024) TOTAL_SPACE FROM sys.v_$datafile a, sys.v_$tablespace B WHERE a.ts# = b.ts# GROUP BY b.name ) Total WHERE Free.Tablespace_name = Total.name; SELECT substr(file_name, 1, 70), tablespace_name FROM dba_data_files; ----------------------------------------------- 0.11 AUDIT Statements: ---------------------------------------------select v.sql_text, v.FIRST_LOAD_TIME, v.PARSING_SCHEMA_ID, v.DISK_READS, v.ROWS_ PROCESSED, v.CPU_TIME, b.username from v$sqlarea v, dba_users b where v.FIRST_LOAD_TIME > '2009-03-08' and v.PARSING_SCHEMA_ID=b.user_id order by v.FIRST_LOAD_TIME ;

------------------------------------------------ 0.12 EXAMPLE OF DYNAMIC SQL: ----------------------------------------------select 'UPDATE '||t.table_name||' SET '||c.column_name||'=REPLACE('||c.column_na me||','''',CHR(7));' from user_tab_columns c, user_tables t where c.table_name=t.table_name and t.num_rows>0 and c.DATA_LENGTH>10 and data_type like '%CHAR%' ORDER BY t.table_name desc; create public synonym EMPLOYEE for HARRY.EMPLOYEE; select 'create public synonym '||table_name||' for CISADM.'||table_name||';' from dba_tables where owner='CISADM'; select 'GRANT SELECT, INSERT, UPDATE, DELETE ON '||table_name||' TO CISUSER;' from dba_tables where owner='CISADM'; select 'GRANT SELECT ON '||table_name||' TO CISREAD;' from dba_tables where owner='CISADM';

======================== 1. NOTES ON PERFORMANCE: ========================= 1.1 POOLS: ========== -- SHARED POOL: -- -----------A literal SQL statement is considered as one which uses literals in the predicat e/s rather than bind variables where the value of the literal is likely to differ between various executions of the statement. Eg 1: SELECT * FROM emp WHERE ename='CLARK'; is used by the application instead of SELECT * FROM emp WHERE ename=:bind1; SQL statement for this article as it can be shared. -- Hard Parse If a new SQL statement is issued which does not exist in the shared pool then th is has to be parsed fully. Eg: Oracle has to allocate memory for the statement from the shared pool, check the statement syntactically and semantically etc... This is referred to as a hard parse and is very expensiv e in both terms of CPU used and in the number of latch gets performed. --Soft Parse

40) "SQL". This query uses the idea it is common for litera l statements to begin "SELECT col1.GATHER_XXX on tables or indexes. The best approach to take is that all SQL should be sharable unless it is adhoc or infrequently used SQL where it is important to give CBO as much information as possible in order for it to p roduce a good execution plan. count(*) . The values 40.col3 FROM table WHERE .CURSOR_SHARING parameter (8. ANALYZE or DBMS_STATS. grants changes on underlying objects.40) "SQL". invalidations from v$sqlarea order by invalidations DESC..6 onwards) .5 and 30 are example values so this query is looking for different statements whose first 40 characters are the same which have only been executed a few times each and th ere are at least 30 different occurrances in the shared pool." with the leading portion of each st atement being the same. sum(executions) "TotExecs" FROM v$sqlarea WHERE executions < 5 GROUP BY substr(sql_text. so the gl obal performance will be impacted.1.. By looking at the V$SQL AREA view it is possible to see which literal statements are good candidates for converting to use bind v ariables. --Eliminating Literal SQL If you have an existing application it is unlikely that you could eliminate all literal SQL but you should be prepared to eliminate some if it is causing problems. That's orders are TRUNCA TE.If an of As a session issues a SQL statement which is already in the shared pool AND it c use an existing version that statement then this is known as a 'soft parse'. far as the application is concerned it has asked to parse the statement. 1.col2. it should be reloaded and reparsed fully. Hence high ve rsion counts are best avoided. The following query shows SQL in the SGA where there are a large number of similar statements: SELECT substr(sql_text. These order s modify directly the context of related objects associated with cursors. The following query could help us to better identify the concerned cursors: SELECT substr(sql_text. If Oracle matches to a statement with many versions it has to check each version in turn to see if it is truely identical to the statement currently being parsed. --Avoid Invalidations Some specific orders will change the state of cursors to INVALIDATE. if two statements are textually identical but cannot be shared then these are ca lled 'versions' of the same statement. The associated curso rs will stay in the SQLAREA but when it will be reference next time.40) HAVING count(*) > 30 ORDER BY 2.1.1. -.

Oracle determines which literals are "safe" for sub stitution with bind variables. SIMILAR causes statem ents that may differ in some literals. but are otherwise identical. The size of the cursor cache can then be increased or decreased as necessary. It shou ld be used with caution in this release. The parameter can be set dynamically at the system or session level thus: ALTER SESSION SET cursor_sharing = FORCE. If you do not have this parameter set already then it is advisable to set it to a starting value of about 50. This enhancement improves the usability of the parameter for situations where FORCE would normally cause a different.SESSION_CACHED_CURSORS parameter <Parameter:SESSION_CACHED_CURSORS> is a numeric parameter which can be set at in stance level or at session level using the command: ALTER SESSION SET session_cached_cursors = NNN. or ALTER SYSTEM SET cursor_sharing = FORCE. -. undesired execution plan. Whenever a statement is parsed Oracle first looks at the statements pointed to b y your private session cache if a sharable version of the statement exists it can be used. unless the lit erals affect either the meaning of the statement or the degree to which the plan is optimized. or it can be set in the init.6. If all session cache cursors are in use then the least recently used entry is discarded. For multiple similar statements which differ only in the literals used this allo ws the cursors to be shared even though the application supplied SQL uses literals. This will result in some SQL not being shared in an attempt to provide a more ef ficient execution plan.SHARED_POOL_RESERVED_SIZE parameter There are quite a few notes explaining <Parameter:SHARED_POOL_RESERVED_SIZE> alr . If this parameter is set to FORCE then literals will be replaced by system gener ated bind variables where possible.1.<Parameter:CURSOR_SHARING> is a new parameter introduced in Oracle8. a different execution plan may be chosen by the cost based optimizer (CBO) as it no longer has the lit eral values available to it when costing the best execution plan.a pointer to the shared cursor is then added to your session cache. SESSION_CACHED_CURSORS are particularly useful with Oracle Forms applications wh en forms are frequently opened and closed. This provides a sh ortcut access to frequently parsed statements that uses less CPU and uses far fewer latch gets than a soft or hard parse. to share a cursor. To get placed in the session cache the same statement has to be parsed 3 times w ithin the same cursor . -. With CURSOR_SHARING=SIMILAR. Note: As the FORCE setting causes system generated bind variables to be used in place of literals. In Oracle9i. it is possible to set CURSOR_SHARING=SIMILAR.ora file. The statistics section of the bstat/estat report includes a value for 'session c ursor cache hits' which shows if the cursor cache is giving any benefit. The value NNN determines how many 'cached' cursors there can be in your session.

If SHARED_POOL_RESERVED_MIN_ALLOC has been lowered then many space requests may be eligible to be satisfied from this portion of the shared pool and so 10% may be too little.0.5 and provides a means of reserving a portion of th e shared pool for large memory allocations._SQLEXEC_PROGRESSION_COST parameter (8. Shared Server and XA The multi-threaded server (MTS) adds to the load on the shared pool and can cont . -.ora file # _SQLEXEC_PROGRESSION_COST is set to ZERO to avoid SQL sharing issues # See Note:62143.6 and in 8.1. Setting this parameter to 0 can avoid these issues which result in multiple versions statements in the shared pool. al though in certain cases values of 4100 or 4200 may help relieve some contention on a heavily loaded shared pool .1. The parameter was introduced in Oracle 7. It is easy to monitor the space usage of the reserved area using the <View:V$SHA RED_POOL_RESERVED> which has a column FREE_SPACE.SHARED_POOL_SIZE parameter <Parameter:SHARED_POOL_SIZE> controls the size of the shared pool itself.1. From a practical point of view one should set SHARED_POOL_RESERVED_SIZE to about 10% of SHARED_POOL_SIZE unless either the shared pool is very large OR SHARED_POOL_RESERVED_MIN_ALLOC has been set low er than the default value: If the shared pool is very large then 10% may waste a significant amount of memo ry when a few Mb will suffice.eady in circulation. In this situation a smaller shared pool may perform better than a larger one. -.MTS.5. This problem is greatly reduced in 8.1. The reserved area comes out of the shared pool itself.5 onwards) This is a hidden parameter which was introduced in Oracle 8. Eg: Add the following to the init. NB: The shared pool itself should never be made so large that paging or swapping occur as performance can then decrease by many orders of magnitude. -. If there is heavy use of literal S QL and the shared pool is too large then over time a lot of small chunks of memory can build up on the internal memory fr eelists causing the shared pool latch to be held for longer which in-turn can impact performance.1 for details _sqlexec_progression_cost=0 Note that a side effect of setting this to '0' is that the V$SESSION_LONGOPS vie w is not populated by long running queries. SHARED_POOL_RESERVED_MIN_ALLOC should generally be left at its default value. -.SHARED_POOL_RESERVED_MIN_ALLOC parameter In Oracle8i this parameter is hidden. The si ze of the shared pool can impact performance. The parameter i s included here as the default setting has caused some problems with SQL sharability. If it is too small then it is likely that sharable informati on will be flushed from the pool and then later need to be reloaded (rebuilt).6 onwards due to the enhancement in <bug:986149> .

SELECT SUM(PINS) "EXECUTIONS". MTS was renamed to "Shared Server". sum(executions) "TotExecs" FROM v$sqlarea . For the purposes of the shared pool. statistics: ----------SELECT class. hit ratio shared pool: ---------------------SELECT gethits. SELECT sum(sharable_mem) FROM v$db_object_cache.ribute to any problems as the User Global Area (UGA) resides in the shared pool. In Oracle8 the Large Pool can be used for MTS reducing its impact on shared pool activity . Useful SQL for looking at memory and Shared Pool problems --------------------------------------------------------Indeling SGA: ------------SELECT * FROM V$SGA. (In Oracle8/8i XA sessions do NOT put their UGA in the shared pool).gethitratio FROM v$librarycache WHERE namespace = 'SQL AREA'. Private memory allocations do not use the "shared pool lat ch" and so a switch from MTS to dedicated connections can help reduce contention in some cases. Executions: ----------SELECT substr(sql_text.gets. Using dedicated connections rather than MTS causes the UGA to be allocated out o f process private memory rather than the shared pool. SUM(RELOADS) "CACHE MISSES WHILE EXECUTING" FROM V$LIBRARYCACHE. This is also true of XA sessions in Oracle7 as their UGA is located in the shared pool. count(*) . value.1> for a description of the Large Pool.90) "SQL". the behaviour is essentially the same.However memory allocations in the Large Pool still make use of the "shared poo l latch".1. See <Note:62140. name FROM v$sysstat. In Oracle9i. free memory shared pool: -----------------------SELECT * FROM v$sgastat WHERE name = 'free memory'.

If multiple child cursors exist. the fixed sum of memory used for the lifetime of all the child cursors.. RUNTIME_MEM NUMBER Fixed amount of memory required during execution of a cursor. executions > 5 BY substr(sql_text..WHERE GROUP HAVING ORDER ." with the leading portion of each st atement being the same.90) count(*) > 10 BY 2 The values 40.col3 FROM table WHERE .5 and 30 are example values so this query is looking for different statements whose first 40 characters are the same which have only been executed a few times each and there are at least 30 differe nt occurrances in the shared pool. If multiple chi ld cursors exist. V$SQLAREA: SQL_TEXT VARCHAR2(1000) First thousand characters of the SQL text for the current cursor SHARABLE_MEM NUMBER Amount of shared memory used by a cursor. PERSISTENT_MEM NUMBER Fixed amount of memory used for the lifetime of an open cursor. then the sum of all shared memory used by all child cursors. the fixed sum of all memory required during execution of all the child cursors.1. This query uses the idea it is common for litera l statements to begin "SELECT col1. SORTS NUMBER Sum of the number of sorts that were done for all the child cursors VERSION_COUNT NUMBER Number of child cursors that are present in the cache under this parent LOADED_VERSIONS NUMBER Number of child cursors that are present in the cache and have their context he ap (KGL heap 6) loaded OPEN_VERSIONS NUMBER The number of child cursors that are currently open under this current parent USERS_OPENING NUMBER The number of users that have any of the child cursors open .col2. If multiple child cursors exist.

FETCHES NUMBER Number of fetches associated with the SQL statement EXECUTIONS NUMBER Total number of executions. totalled over all the child cursors USERS_EXECUTING NUMBER Total number of users executing the statement over all child cursors LOADS NUMBER The number of times the object was loaded or reloaded FIRST_LOAD_TIME VARCHAR2(19) Timestamp of the parent creation time INVALIDATIONS NUMBER Total number of invalidations over all the child cursors PARSE_CALLS NUMBER The sum of all parse calls to all the child cursors under this parent DISK_READS NUMBER The sum of the number of disk reads over all child cursors BUFFER_GETS NUMBER The sum of buffer gets over all child cursors ROWS_PROCESSED NUMBER The total number of rows processed on behalf of this SQL statement COMMAND_TYPE NUMBER The Oracle command type definition OPTIMIZER_MODE VARCHAR2(10) Mode under which the SQL statement is executed PARSING_USER_ID NUMBER The user ID of the user that has parsed the very first cursor under this parent PARSING_SCHEMA_ID NUMBER The schema ID that was used to parse this child cursor KEPT_VERSIONS NUMBER The number of child cursors that have been marked to be kept using the DBMS_SHA RED_POOL package .

producing ORA-08177 errors.SET_ACTION ACTION_HASH NUMBER The hash value of the action that is named in the ACTION column SERIALIZABLE_ABORTS NUMBER Number of times the transaction fails to serialize. totalled over all the child cursors IS_OBSOLETE VARCHAR2(1) Indicates whether the cursor has become obsolete (Y) or not (N). Column Datatype Description SQL_TEXT VARCHAR2(1000) First thousand characters of the SQL text for the current cursor SHARABLE_MEM NUMBER Amount of shared memory used by this child cursor (in bytes) .SET_MODULE MODULE_HASH NUMBER The hash value of the module that is named in the MODULE column ACTION VARCHAR2(64) Contains the name of the action that was executing at the time that the SQL sta tement was first parsed as set by calling DBMS_APPLICATION_INFO. CHILD_LATCH NUMBER Child latch number that is protecting the cursor V$SQL: -----V$SQL lists statistics on shared SQL area without the GROUP BY clause and contai ns one row for each child of the original SQL text entered.ADDRESS RAW(4) The address of the handle to the parent for this cursor HASH_VALUE NUMBER The hash value of the parent statement in the library cache MODULE VARCHAR2(64) Contains the name of the module that was executing at the time that the SQL sta tement was first parsed as set by calling DBMS_APPLICATION_INFO. This can happe n if the number of child cursors is too large.

PERSISTENT_MEM NUMBER Fixed amount of memory used for the lifetime of this child cursor (in bytes) RUNTIME_MEM NUMBER Fixed amount of memory required during the execution of this child cursor SORTS NUMBER Number of sorts that were done for this child cursor LOADED_VERSIONS NUMBER Indicates whether the context heap is loaded (1) or not (0) OPEN_VERSIONS NUMBER Indicates whether the child cursor is locked (1) or not (0) USERS_OPENING NUMBER Number of users executing the statement FETCHES NUMBER Number of fetches associated with the SQL statement EXECUTIONS NUMBER Number of executions that took place on this object since it was brought into t he library cache USERS_EXECUTING NUMBER Number of users executing the statement LOADS NUMBER Number of times the object was either loaded or reloaded FIRST_LOAD_TIME VARCHAR2(19) Timestamp of the parent creation time INVALIDATIONS NUMBER Number of times this child cursor has been invalidated PARSE_CALLS NUMBER Number of parse calls for this child cursor DISK_READS NUMBER Number of disk reads for this child cursor BUFFER_GETS NUMBER .

CHILD_NUMBER NUMBER Number of this child cursor MODULE VARCHAR2(64) Contains the name of the module that was executing at the time that the SQL sta tement was first parsed. Comparing one PLAN_HA SH_VALUE to another easily identifies whether or not two plans are the same (rather than comparing the two plans line by line).Number of buffer gets for this child cursor ROWS_PROCESSED NUMBER Total number of rows the parsed SQL statement returns COMMAND_TYPE NUMBER Oracle command type definition OPTIMIZER_MODE VARCHAR2(10) Mode under which the SQL statement is executed OPTIMIZER_COST NUMBER Cost of this query given by the optimizer PARSING_USER_ID NUMBER User ID of the user who originally built this child cursor PARSING_SCHEMA_ID NUMBER Schema ID that was used to originally build this child cursor KEPT_VERSIONS NUMBER Indicates whether this child cursor has been marked to be kept pinned in the ca che using the DBMS_SHARED_POOL package ADDRESS RAW(4) Address of the handle to the parent for this cursor TYPE_CHK_HEAP RAW(4) Descriptor of the type check heap for this child cursor HASH_VALUE NUMBER Hash value of the parent statement in the library cache PLAN_HASH_VALUE NUMBER Numerical representation of the SQL plan for this cursor.SET_MODULE . which is set by calling DBMS_APPLICATION_INFO.

CPU_TIME NUMBER CPU time (in microseconds) used by this cursor for parsing/executing/fetching ELAPSED_TIME NUMBER Elapsed time (in microseconds) used by this cursor for parsing/executing/fetchi ng OUTLINE_SID NUMBER Outline session identifier CHILD_ADDRESS RAW(4) Address of the child cursor SQLTYPE NUMBER Denotes the version of the SQL language used for this statement REMOTE VARCHAR2(1) (Y/N) Identifies whether the cursor is remote mapped or not OBJECT_STATUS VARCHAR2(19) Status of the cursor (VALID/INVALID) LITERAL_HASH_VALUE NUMBER Hash value of the literals which are replaced with system-generated bind variab les and are to be matched. when CURSOR_SHARING is used. which is set by calling DBMS_APPLICATION_INFO. If CURSOR_SHARING is not used. then this column d isplays the category of that outline. This is not the hash value for the SQL statement. per cursor OUTLINE_CATEGORY VARCHAR2(64) If an outline was applied during construction of the cursor.MODULE_HASH NUMBER Hash value of the module listed in the MODULE column ACTION VARCHAR2(64) Contains the name of the action that was executing at the time that the SQL sta tement was first parsed. Otherwise the column is left blank. .SET_ACTION ACTION_HASH NUMBER Hash value of the action listed in the ACTION column SERIALIZABLE_ABORTS NUMBER Number of times the transaction fails to serialize. producing ORA-08177 errors.

40) "SQL" FROM v$sqlarea WHERE version_count > 10 . users_executing. sum(users_opening) "Open".60) HAVING sum(executions) > 200 . sum(users_opening) "Open". count(*). SELECT substr(sql_text. SELECT substr(sql_text.100) "Stmt".1.100) HAVING sum(executions) > 200 . "Versions" of a statement occur where the SQL is character for character identic al but the underlying objects or binds etc.1.then the value is 0.60) HAVING sum(sharable_mem) > 20000 . substr(sql_text. sum(executions) "Exec" FROM v$sql GROUP BY substr(sql_text. CHILD_LATCH NUMBER Child latch number that is protecting the cursor Checking for high version counts: -------------------------------SELECT address.1. count(*). sum(executions) "Exec" FROM v$sql GROUP BY substr(sql_text. count(*). This can happe n if the number of child cursors is too large.1. LAST_LOAD_TIME VARCHAR2(19) IS_OBSOLETE VARCHAR2(1) Indicates whether the cursor has become obsolete (Y) or not (N).1. sum(sharable_mem) "Mem".60) "Stmt". users_opening . are different. sum(executions) "Exec" FROM v$sql GROUP BY substr(sql_text. version_count .1. hash_value.100) "Stmt". Finding statement/s which use lots of shared pool memory: -------------------------------------------------------SELECT substr(sql_text..1. sum(sharable_mem) "Mem".

delete To exexcute: exec DBMS_UTILITY. number AND size of extends in STORAGE clause .if only inserts : pctfree low : pctfree 10. method_opt VARCHAR2 DEFAULT NULL).. This should show if there are similar literal statements.'COMPUTE').if updates. ANALYZE TABLE EMPLOYEE ESTIMATE STATISTICS SAMPLE 10 PERCENT. pctused 40 : pctfree low 1. estimate_rows NUMBER DEFAULT NULL. . ALTER TABLE EMPLOYEE DELETE STATISTICS. method=compute.very low updates . DBMS_UTILITY.3 Storage parameters: ----------------------segement: pctfree. 1. estimate.EMPNO_INDEX rebuild tablespace INDEX .ANALYZE_SCHEMA('CISADM'.Rule based / Cost based . estimate_percent NUMBER DEFAULT NULL. or multiple versions of a statements which account for a large portion of the me mory in the shared pool. pctused. method VARCHAR2.ANALYZE_DATABASE ( method VARCHAR2.4 rebuild indexes on regular basis: ----------------------------------------alter index SCOTT. 1. where MEMSIZE is about 10% of the shared pool size in bytes.apply EXPLAIN PLAN in query . oltp . method_opt VARCHAR2 DEFAULT NULL).ANALYZE COMMAND: ANALYZE TABLE EMPLOYEE COMPUTE STATISTICS. ANALYZE TABLE EMPLOYEE COMPUTE STATISTICS FOR ALL INDEXES.ANALYZE_SCHEMA ( schema VARCHAR2. estimate_percent NUMBER DEFAULT NULL.indx1 COMPUTE STATISTICS.2 statistics: --------------. estimate_rows NUMBER DEFAULT NULL. ANALYZE INDEX scott.DBMS_UTILITY.ANALYZE_SCHEMA() procedure: DBMS_UTILITY.

begin for c1 in s1 loop update tab1 set col1 = 'value2' WHERE current of s1. zip) Suppose a user issues the query: SELECT .7 Reduce fragmentation of a dictionary managed tablespace: -----------------------------------------------------------alter tablespace DATA coalesce..8. -. state. if i > 1000 then commit. If you want to influence which rollback segment will be used in your transactions.6 set transaction parameters: ------------------------------ONLY ORACLE 7. you can use the statement set transaction use rollback segment SEGMENT_NAME 1.8 normalisation of tables: ---------------------------The more tables are 'normalized'.Commit after every X records . cursor s1 is SELECT * FROM tab1 WHERE col1 = 'value1' FOR UPDATE. You should next use the ANALYZE TABLE COMPUTE STATISTICS command 1. 1. 1.5 Is an index used in a query?: --------------------------------De WHERE clause of a query must use the 'leading column' of (one of the) index(e s): Suppose an index 'indx1' exists on EMPLOYEE(city.storage (initial 5M next 5M pctincrease 0). the higher the performance costs for queries joining tables 1.9 commits na zoveel rows: ---------------------------declare i number := 0.8i: Suppose you must perform an action which will generate a lot of redo and rollback. i := i + 1. FROM EMPLOYEE WHERE state='NY' Then this query will not use that index! Therfore you must pay attention to the cardinal column of any index.

NAME VARCHAR2(10) NULL ). / -. end loop. end loop. end. i := i .'DAY'). NULL.1. begin while i<1000000 loop j:=sysdate+i. / -.i := 0. j date. end. k varchar2(10).-----------------------------CREATE TABLE TEST ( ID NUMBER(10) NULL.-----------------------------CREATE TABLE TEST2 ( i number ID NUMBER(10) DATUM DATE DAG VARCHAR2(10) NAME VARCHAR2(10) ).'joop').'joop'). end if. k:=TO_CHAR(SYSDATE+i. commit. NULL. begin while i>1 loop insert into TEST values (1.1. insert into TEST2 values (i. NULL. . commit. commit. NULL declare i number := 1. sysdate+i. NULL. declare i number := 1000. DATUM DATE NULL. k. j. end loop. i := i + 1. commit. commit.

'DAY'). j. end loop. NULL. begin while i<1000 loop j:=sysdate+i.'DAY'). j date.sql script. Now it's possible to do the following: -.10 explain plan commAND. i := i + 1.'joop'). insert into TEST3 (ID. NULL.DATUM. / 1. delete the former performance data DELETE FROM plan_table WHERE statement_id = 'XXX'. k varchar2(10). l. -. needed for storage of performance data. commit.sql script.VORIG. l varchar2(10). / -.now you can run the query that is to be analyzed EXPLAIN PLAN SET STATEMENT_ID = 'XXX' FOR SELECT * FROM EMPLOYEE WHERE city > 'Y%'.DAG.-----------------------------CREATE TABLE TEST3 ( ID NUMBER(10) DATUM DATE DAG VARCHAR2(10) VORIG VARCHAR2(10) NAME VARCHAR2(10) ). .end. commit. NULL. you can use the utlxpls.NAME) values (i. k:=TO_CHAR(SYSDATE+i. end.optionally. COMMIT. l:=TO_CHAR(SYSDATE+i-1. k. NULL. autotrace: ------------------------------------1 explain plan commAND: ----------------------First execute the utlxplan. NULL declare i number := 1. To view results. This script will create the PLAN_TABLE table.

of via ALTER SESSION SET HASH_JOIN_ENABLED=TRUE).set_sql_trace_in_session(448. gesorteerd.set_sql_trace_in_session(448. Turn SQL tracing off in session 448 SQL> exec dbms_system.sql script worden uitgevoerd (onder SYS).2288. Init. DBMS_SYSTEM. SQL> exec dbms_system. 3 SQL trace en TKPROFF ---------------------SQL trace kan geactiveerd worden via init. Opmerking: Execution plan / access path bij een join query: . DBMS_SUPPORT. is voor alle sessions) USER_DUMP_DEST= lokatie trace files .Name. SUM(Dollar_Amount) FROM COMPANY. een index van de tweede table gebaseerd op de WHERE clause.398).START_TRACE_IN_SESSION(12.FALSE). worden alle rows opgehaald.ora of via ALTER SESSION SET SQL_TRACE=TRUE DBMS_SYSTEM.Name.SET_SQL_TRACE_IN_SESSION(12.nested loop: 1 table is de driving table met full table scan of gebruik van in dex.SET_SQL_TRACE_IN_SESSION(12.ora parameters moeten aanwezig zijn (HASH_JOIN_ENABLE=TRUE. Meestal zeer effectief bij joins van een kleine table met een grote table. TRUE). De kleine table is de driving table in memory en het vervolg is een algolritme wat lijkt op de nested loop Kan ook worden afgedwongen met een hint: SELECT /*+ USE_HASH(COMPANY) */ COMPANY. DBMS_SYSTEM. en gejoined naar een resultset. set autotrace on / off ------------------------Deze maakt ook gebruik van de PLAN_TABLE en de PLUSTRACE role moet bestaan.2288. en de tweede table wordt benadert m.Company_ID GROUP BY COMPANY.TRUE). 398.v. . FALSE). serial#. HASH_AREA_SIZE= .b. SALES WHERE COMPANY.Company_ID = SALES. . Desgewenst kan het plustrce. TRUE).ora: Max_dump_file_size in OS blocks SQL_TRACE=TRUE (kan zeer grote files opleveren. 398.Hash join: bepaalde init.SET_SQL_TRACE_IN_SESSION(sid.merge join: als er geen bruikbare index is. The trace information will get written to us er_dump_dest. Turn SQL tracing on in session 448.2.

V$DATAFILE .phyrds. DF.Name File_Name.2 undocumented init parameters: --------------------------------SELECT * FROM SYS.12 Indien de CBO niet het beste access path gebruikt: hints in query: ----------------------------------------------------------------------Goal hints: Access methods hints: ALL_ROWS.File# ORDER BY Weight desc / 3. INDEX SELECT /*+ INDEX(emp_pk) */ FROM emp WHERE empno=12345. V$DATAFILE DF. df.File#=FS.Phyblkwrt Total_IO.file# .Phyblkrd+FS.Relative File I/O (2) set pagesize 60 linesize 80 newpage 0 feedback off ttitle skip centre 'Datafile IO Weights' skip centre column Total_IO format 999999999 column Weigt format 999. fs. HASH.1 Reads AND writes in files: -----------------------------V$FILESTAT.deptno ============================================== 3. 6) Drive.X$KSPPI .Relative File I/O (1) SELECT fs.deptno=dept. CLUSTER. (SELECT MAX(Phyblkrd+Phyblkwrt) MaxIO FROM V$FILESTAT) WHERE DF. dname FROM emp. 1. 50).1. dept WHERE emp. fs.file#. FS.file#.b. Data dictonary queries m. CHOOSE.name. 1. v$datafile df WHERE fs. RULE FULL. 100*(FS.Name.Phyblkwrt) / MaxIO Weight FROM V$FILESTAT FS. FIRST_ROWS.file#=df.status FROM v$filestat fs.99 column file_name format A40 break on drive skip 2 compute sum of Weight on Drive SELECT substr(DF. substr(df. ROWID. SELECT /*+ RULE */ ename. df.Phyblkrd+FS.t perfoRMANce: ============================================== 3.phywrts.

v$sysstat dbg. ofwel PR=0.1) = '_'. value FROM v$sysstat WHERE name IN ('db block gets'. 'consistent gets'.3 Kans op gebruik index of niet?: ----------------------------------Kijk in DBA_TAB_COLUMNS.value+cg. Praktijk: Hit ratio moet gemiddeld wel zo > 0. phys ical_reads.name = 'consistent gets'. dan is de Hit Ratio=LR/LR=1 Er worden dan geen blocks van disk gelezen.CLUSTERING_FACTOR als clustering_factor = aantal blocks: ordered 3. .'physical reads'). block_gets. consistent_gets.0.value)))*100 FROM v$sysstat pr.v. 10).sid.p.4 snel overzicht hit ratio buffer cache: -----------------------------------------Hit ratio= (LR .b.NUM_DISTINCT DBA_TABLES.name = 'physical reads' AND dbg. SELECT (1-(pr. username SELECT name. 1. USER_INDEXES. consistent_gets.name = 'db block gets' AND cg.PR) / LR Stel er zijn nauwelijk Physical Reads PR. v$sess_io.9 V$sess_io en v$sysstat en v$session kunnen geraadpleegd worden om de hit rat io te bepalen.NUM_ROWS als num_distinct in de buurt komt van num_rows : index favoriet i. -.t.1. V$sess_io: sid. hit ratio CLEAR SET HEAD ON SET VERIFY OFF col col col col HitRatio format 999. physical_reads V$session: sid.8 .uitgebeidere query m. 3.WHERE SUBSTR(KSPPINM. full table Kijk in DBA_INDEXES. v$sysstat cg WHERE pr.value/(dbg.99 heading 'Hit Ratio' CGets format 9999999999999 heading 'Consistent Gets' DBGets format 9999999999999 heading 'DB Block Gets' PhyGets format 9999999999999 heading 'Physical Reads' SELECT substr(Username.

used_ublk "ROLLB BLKS".start_time. 10). 1. substr(owner. 1. s.sid=l. block FROM v$lock SELECT s. t.sid AND (consistent_gets+block_gets) > 0 AND Username is NOT NULL / SELECT 'Hit Ratio' Database.7 sid's.lmode. l. l. s. l.v_$session s WHERE t.xidusn = r.name = 'db block gets' AND cg.status.name.value+db.sid. 10). v$sysstat pr WHERE db.v_$transaction t. SELECT l. 1. substr(s.100*(consistent_gets+block_gets-physical_reads)/ (consistent_gets+block_g ets) HitRatio FROM v$session. decode(t. 1. s.addr=s. 1. v$session s WHERE l.value DBGets. 10).type.6 Wat zijn de actieve transacties?: ------------------------------------SELECT substr(username.status) )) status FROM sys.saddr SELECT sid. s.name = 'consistent gets' AND pr.lmode. 10).noundo. 1.row_wait_obj# FROM v$lock l. substr(s. t.v_$rollname r. 10).schemaname. resource belasting en locks: --------------------------------------SELECT sid. l.addr. lmode. v$sess_io WHERE v$session. 1. s. 'SPACE TX'.value)/(cg.ses_addr = s. decode(t. decode(t.sid. substr(s. 10).usn AND t. v$sysstat cg. 10) FROM v$access SID Session number that is accessing an object OWNER Owner of the object OBJECT Name of the object . db. 1. sys. pr.schemaname. t.name = 'physical reads' / 3. sys. 'RECURSIVE TX'.space. 10). 'NO UNDO TX'. 100*(cg.lockwait.value+db.value CGets. substr(s.username. ctime. v$lock l WHERE s. l. substr(s. 10). r.value) HitRatio FROM v$sysstat db.block FROM v$session s. 10).command. 1.sid. 1. substr(osuser. substr(object.o suser. substr(terminal. 'YES'.sid = v$sess_io.saddr 3.program. 'YES'.value-pr.recursive.saddr. 'YES'.sid. cg.value PhyGets. s.

TYPE Type identifier for the object SELECT substr(s.sid. s.0. column name format a40 column value format a10 SELECT name. upper(s.gets-misses)/ decode(gets.serial#.0. immediate_gets.username. decode(substr(p.username).log_io. column latch_name format a40 SELECT name latch_name.0.latches en locks in beeld set pagesize 23 set pause on set pause 'Hit any key. decode(s. s. v$latchholder b.latch# AND (c. 'cpu_count')..a.3) hit_ratio FROM v$latch WHERE name = 'redo copy'.a. a.'log_simultaneous_copies'.sid.osuser).. gets.1).gets.1. immediate_misses. misses. s.ses_addr=s.latch# = c.immediate_misses.osuser).1.8 latch use in SGA (locks op process): ---------------------------------------SELECT c.username.process) .gets). -.a. v$transaction t WHERE t.addr = b.b.a.username.name. immediate_gets-immediate_misses)/ decode(immediate_gets. t.name like 'redo%' or c.3) hit_ratio FROM v$latch WHERE name = 'redo allocation'. p. null.name like 'row%') ORDER BY a.latch#. column latch_name format a40 SELECT name latch_name. upper(s.1. decode( p. 1. 'ORACUSR '. '?'.saddr 3.' col col col col col col col col col sid format 999999 serial# format 999999 username format a12 trunc process format a8 trunc terminal format a12 trunc type format a12 trunc lmode format a4 trunc lrequest format a4 trunc object format a73 trunc SELECT s. round(decode(immediate_gets-immediate_misses.0. round(decode(gets-misses.laddr(+) AND a. 10).pi d FROM v$latch a.phy_io FROM v$session s.1.value FROM v$parameter WHERE name in ('log_small_entry_max_size'. t.immediate_gets.process. v$latchname c WHERE a.misses.immediate_gets).sleeps.1.

'MR'.type. 'PLS USR LOCK'.paddr = p. upper(s. 'SMON LOCK '. 'SEQNO INSTCE'.sid. chr(0)). sys. 'WL'.Long locks 'TM'. 'SPACE TRANSC'.owner# = u. 'DISTRIB TRAN'.id1. 'CU'. h. 'GENERIC ENQ '. s. nvl(s.terminal)) terminal. 'CONTROL FILE'.pid = p.serial#.type <> 'MR' UNION ALL /*** LATCH HOLDERS ***/ SELECT s.user$ u. s. 'RS+SLOT#'||l. 'RSX'.process. 'TRANSAC ENQ'. 'MEDIA RECVRY'. 'DML/DATA ENQ'. 'LOG SW KICK '. 2. 'FS'. decode(s.id1||' ID2='||l. 'LOG SWITCH '. 'X'.username.'||o. 0. u.request) ) lrequest. 'PF'. 'ROW WAIT '. 'LATCH'. 'INSTANCE NUM'. sys. 1. 'RX'.sid = s.Short locks 'BL'.pid . 'CF'.id1. decode(l. -. 6. 'NULL'. 'X'.name||'. 'TD'.type) type.obj$ o. sys. 'ST'. sys. 4.terminal.1. 'TS'. 'RSX'. 'RT'.v_$process p. 'IN'. 'UN'.v_$latchholder h WHERE h. 2.terminal. 'USER NAME '.name. 'SC'. s. 'DX'. 'IS'. 'LS'. decode(l.addr(+) AND l.id2. 'THREAD='||l. 'TE'. 'SEQNO VALUE '. 'S'. 'SV'. 'NONE'. 'NULL'.'||o.obj#(+) AND o.username. 'DF'. 'PWFILE ENQ '. u.'||o. 'WRITE REDO '. 'DLL ENQ '. 'RS'. 'REDO THREAD '. 'SYS ('||substr(p. 'NONE'. 'RECO LOCK '.3)|| ' BLOCK#='||substr(l. 4. 'RS'. 'DATA FILE '. 'GET STATE '.id2. 'EXTEND SEG '. null. 'INSTCE RECVR'. 'CROSS INST F'.v_$session s. 'MR'. 'SN'.username. 'TEMP TABLE '. 0. 'TT'. 'LIBCACHE INV'. -. 'PR'. 'DM'. null. 'TA'.name||'.4.id1||' WRP#'||l. decode(l. sys. 'ID1='||l.id1.sid AND l.4)||')') username. 3. 0. s. 'DIRECT LOAD '. 'SEQNO ENQ '. 'SQ'. 'FI'. 'TYPE='||l. 5. 'MOUNT DEF '. 'IV'. 'REDO LOG FILE#='||l.) process.1. 'NONE'. 'X'. 'S'.lmode) ) lmode. 'RW'. sys. rtrim(p. decode(l. 'PROCESS STRT'.name.request.terminal.id2. decode(l.name||' ADDR='||rawtohex(laddr) FROM sys. 'BUF HASH TBL'. 'MOUNT/STRTUP'. 'SM'. 'FILE#='||substr(l. 'WL'. 'TD'. 3. 'CI'. 6.id2) object FROM sys. 'FILE SET '. 'TX'. 'IR'. 'DICTIONARY OBJECT'. 'SCN ENQ '. 'UL'.name. 'ENQUEUE'.v_$lock l. 'TS'. 'DL'.v_$process p WHERE s.id1. 1. 'DR'.name||'. 'RW'. 'TX'.user#(+) AND l. decode(u. 'CURSOR BIND '. to_char(l. 'RX'. u.lmode. 'RT'. 'TM'.v_$session s. 'SGA OPN FILE'. 'NEW BLOCK ALLOCATION'). to_char(l. 'MM'. 5. 'TEMP SEGMENT'.type.5)||' ROW='||l.id1 = o. 'KK'.name).

'LATCH'. w.sid. V$session w WHERE v. sys. s.addr / SELECT v. Name Null? ----------------------------.SID=w.v_$process p.TERMINAL FROM v$sess_io v. w.serial#.v_$latch l WHERE latchwait is not null AND p.paddr UNION ALL /*** LATCH WAITERS ***/ SELECT s.latchwait FROM sys.SID. name||' LATCH='||p. w. s. SQL> desc v$sess_io Name Null? ----------------------------. v.USERNAME.latchwait = l.username.addr = s. sys.process.BLOCK_CHANGES.SID. 'X'. 'NONE'. s. s.-------SADDR SID SERIAL# AUDSID PADDR USER# USERNAME COMMAND OWNERID TADDR LOCKWAIT STATUS SERVER SCHEMA# SCHEMANAME OSUSER PROCESS MACHINE TERMINAL PROGRAM TYPE SQL_ADDRESS SQL_HASH_VALUE SQL_ID SQL_CHILD_NUMBER PREV_SQL_ADDR PREV_HASH_VALUE PREV_SQL_ID PREV_CHILD_NUMBER PLSQL_ENTRY_OBJECT_ID Type -------------------NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER Type -------------------RAW(8) NUMBER NUMBER NUMBER RAW(8) NUMBER VARCHAR2(30) NUMBER NUMBER VARCHAR2(16) VARCHAR2(16) VARCHAR2(8) VARCHAR2(9) NUMBER VARCHAR2(30) VARCHAR2(30) VARCHAR2(12) VARCHAR2(64) VARCHAR2(30) VARCHAR2(48) VARCHAR2(10) RAW(8) NUMBER VARCHAR2(13) NUMBER RAW(8) NUMBER VARCHAR2(13) NUMBER NUMBER .BLOCK_GETS.terminal.v_$session s.AND p.paddr AND p.-------SID BLOCK_GETS CONSISTENT_GETS PHYSICAL_READS BLOCK_CHANGES CONSISTENT_CHANGES SQL> desc v$session.OSUSER. v.addr = s.SID ORDER BY v.

IMP and EXP. IMPDP and EXPDP.PLSQL_ENTRY_SUBPROGRAM_ID PLSQL_OBJECT_ID PLSQL_SUBPROGRAM_ID MODULE MODULE_HASH ACTION ACTION_HASH CLIENT_INFO FIXED_TABLE_SEQUENCE ROW_WAIT_OBJ# ROW_WAIT_FILE# ROW_WAIT_BLOCK# ROW_WAIT_ROW# LOGON_TIME LAST_CALL_ET PDML_ENABLED FAILOVER_TYPE FAILOVER_METHOD FAILED_OVER RESOURCE_CONSUMER_GROUP PDML_STATUS PDDL_STATUS PQ_STATUS CURRENT_QUEUE_DURATION CLIENT_IDENTIFIER BLOCKING_SESSION_STATUS BLOCKING_INSTANCE BLOCKING_SESSION SEQ# EVENT# EVENT P1TEXT P1 P1RAW P2TEXT P2 P2RAW P3TEXT P3 P3RAW WAIT_CLASS_ID WAIT_CLASS# WAIT_CLASS WAIT_TIME SECONDS_IN_WAIT STATE SERVICE_NAME SQL_TRACE SQL_TRACE_WAITS SQL_TRACE_BINDS SQL> NUMBER NUMBER NUMBER VARCHAR2(48) NUMBER VARCHAR2(32) NUMBER VARCHAR2(64) NUMBER NUMBER NUMBER NUMBER NUMBER DATE NUMBER VARCHAR2(3) VARCHAR2(13) VARCHAR2(10) VARCHAR2(3) VARCHAR2(32) VARCHAR2(8) VARCHAR2(8) VARCHAR2(8) NUMBER VARCHAR2(64) VARCHAR2(11) NUMBER NUMBER NUMBER NUMBER VARCHAR2(64) VARCHAR2(64) NUMBER RAW(8) VARCHAR2(64) NUMBER RAW(8) VARCHAR2(64) NUMBER RAW(8) NUMBER NUMBER VARCHAR2(64) NUMBER NUMBER VARCHAR2(19) VARCHAR2(64) VARCHAR2(8) VARCHAR2(5) VARCHAR2(5) ======================================================== 4. and SQL*Loader Examples ======================================================== .

EXPDP practice/practice PARFILE=par1.DPS.job_mode .4. But ofcourse there are other views as well: SQL> select view_name from dba_views where view_name like '%PUMP%'.attached_sessions FROM dba_datapump_jobs .state . .osuser FROM dba_datapump_sessions DPS .1 EXPDP and IMPDP examples: ============================= New for Oracle 10g. SELECT DPS.job_name .S.v$session S WHERE S.saddr = DPS.dmp LOGFILE=export_dir:hr_schema.expctl Oracle 10g provides two new views. are the impdp and expdp utilities. VIEW_NAME DATAPUMP_PATHS DATAPUMP_PATHMAP DATAPUMP_TABLE_DATA DATAPUMP_OBJECT_CONNECT DATAPUMP_DDL_TRANSFORM_PARAMS DATAPUMP_REMAP_OBJECTS V_$DATAPUMP_JOB V_$DATAPUMP_SESSION GV_$DATAPUMP_JOB GV_$DATAPUMP_SESSION USER_DATAPUMP_JOBS DBA_DATAPUMP_JOBS DBA_DATAPUMP_SESSIONS AQ$KUPC$DATAPUMP_QUETAB_S AQ$_KUPC$DATAPUMP_QUETAB_F AQ$KUPC$DATAPUMP_QUETAB AQ$KUPC$DATAPUMP_QUETAB_R SELECT owner_name . DBA_DATAPUMP_JOBS and DBA_DATAPUMP_SESSIONS t hat allow the DBA to monitor the progress of all DataPump operations.explo g EXPDP system/******** PARFILE=c:\rmancmd\dpe_1.job_name .operation .par EXPDP hr/hr DUMPFILE=export_dir:hr_schema.saddr .degree .owner_name .

log For example output files see expdpSCOTT. The following is an example of the schema export and import synt ax: $ expdp scott/tiger@db10g schemas=SCOTT directory=TEST_DIR dumpfile=SCOTT.Table Exports/Imports: ------------------------The TABLES parameter is used to specify the tables that are to be exported.d mp logfile=impdpEMP_DEPT.log.dmp lo gfile=expdpSCOTT.d mp logfile=expdpEMP_DEPT.log $ impdp scott/tiger@db10g schemas=SCOTT directory=TEST_DIR dumpfile=SCOTT.Database Exports/Imports: ---------------------------The FULL parameter indicates that a complete database export is required.dmp lo gfile=impdpSCOTT. CREATE OR REPLACE DIRECTORY test_dir AS '/u01/app/oracle/oradata/'.DEPT directory=TEST_DIR dumpfile=EMP_DEPT.log. The following is an example of the table export and import syntax: $ expdp scott/tiger@db10g tables=EMP.log and impdpEMP_DEPT. In addition to basic import and export functionalit y data pump provides a PL/SQL API and support for external tables. -.log and impdpSCOTT. GRANT CREATE ANY DIRECTORY TO scott.Schema Exports/Imports: -------------------------The OWNER parameter of exp has been replaced by the SCHEMAS parameter which is u sed to specify the schemas to be exported. For the examples to work we must first unlock the SCOTT account and create a dir ectory object it can access: CONN sys/password@db10g AS SYSDBA ALTER USER scott IDENTIFIED BY tiger ACCOUNT UNLOCK. faster and more flexible alternative to the "exp" a nd "imp" utilities used in previous Oracle versions.dmp logfi .log For example output files see expdpEMP_DEPT.DEPT directory=TEST_DIR dumpfile=EMP_DEPT.Oracle Data Pump is a newer. GRANT READ.log $ impdp scott/tiger@db10g tables=EMP. -. The "TABLE_EXISTS_ACTION=APPEND" parameter allows data to be imported into exist ing tables. WRITE ON DIRECTORY test_dir TO scott. The fo llowing is an example of the full database export and import syntax: $ expdp system/password@db10g full=Y directory=TEST_DIR dumpfile=DB10G. -.

dmp LOGFILE=export_dir:HR_PAYROLL_REFRESH. multiple tables. limited to 650M --------------------------------------------------------------------------------------------JOB_NAME=SH_TABLESONLY DIRECTORY=export_dir DUMPFILE=export_dir:SHONLY_%U. only 1 schema. writing to multiple files with %U varia ble.log. limited --------------------------------------------------------------------------------------JOB_NAME=HR_PAYROLL_REFRESH DIRECTORY=export_dir DUMPFILE=export_dir:HR_PAYROLL_REFRESH_%U. EXPDP parfile. EXPDP parfile.log For an example output file see expdpDB10G. EXPDP parfile -----------------------JOB_NAME=NightlyDRExport DIRECTORY=export_dir DUMPFILE=export_dir:fulldb_%U.log $ impdp system/password@db10g full=Y directory=TEST_DIR dumpfile=DB10G.explog SCHEMAS=SH PARALLEL=2 FILESIZE=650M STATUS=60 Example 4.explog STATUS=20 .dmp LOGFILE=export_dir:SH_TablesOnly.dmp LOGFILE=export_dir:NightlyDRExport. writing to multiple files with %U var iable.dmp logfi le=impdpDB10G. Example 1.explog FULL=Y PARALLEL=2 FILESIZE=650M CONTENT=ALL STATUS=30 ESTIMATE_ONLY=Y Example 2.explog FULL=Y CONTENT=DATA_ONLY ESTIMATE=STATISTICS ESTIMATE_ONLY=Y STATUS=60 Example 3. only for getting an estimate of export size --------------------------------------------------------------JOB_NAME=EstimateOnly DIRECTORY=export_dir LOGFILE=export_dir:EstimateOnly. EXPDP parfile.le=expdpDB10G.

dmp LOGFILE=export_dir:HR_PAYROLL_IMPORT. Imports data +only+ into selected tables in the HR sch ema.dmp LOGFILE=export_dir:GenerateImportDDL.HR.PAYROLL_SALARY. including metada ta.explog SCHEMAS=HR CONTENTS=ALL FLASHBACK_TIME=TO_TIMESTAMP"('04-10-2005 23:59'.PAYROLL_TRANSACT IONS CONTENT=DATA_ONLY TABLE_EXISTS_ACTION=TRUNCATE Example 7.'SALES')" TABLE_EXISTS_ACTION=TRUNCATE Example IMPDP parfile.implog STATUS=20 TABLES=HR.HR.PAYROL L_SALARY.sql INCLUDE=TABLE .HR.3 tables in the SH schema are the only tables to be ref reshed.'CUSTOMERS'. 2005 -----------------------------------------------------------------------------------------------------------------------JOB_NAME=HREXPORT DIRECTORY=export_dir DUMPFILE=export_dir:HREXPORT_%U. asof just before midnight on April 10. IMPDP parfile. 'MM-DD-YYYY HH24:MI')" Example 6.HR.'PRODUCTS'. IMPDP parfile.FILESIZE=132K CONTENT=ALL TABLES=HR.EMPLOYEES.Note t hat this code is +not+ executed! --------------------------------------------------------------------------------------------------------------DIRECTORY=export_dir JOB_NAME=GenerateImportDDL DUMPFILE=export_dir:hr_payroll_refresh_%U.PAYROLL_HOURLY.implog STATUS=30 CONTENT=DATA_ONLY SCHEMAS=SH INCLUDE=TABLE:"IN('COUNTRIES'.HR.PAYROLL_CHECKS.PAYROLL_HOURLY.implog SQLFILE=export_dir:GenerateImportDDL.HR. Multiple dump files will be used --------------------------------------------------------------------------------------------------------------------JOB_NAME=HR_PAYROLL_IMPORT DIRECTORY=export_dir DUMPFILE=export_dir:HR_PAYROLL_REFRESH_%U.HR. EXPDP parfile.HR.DEPARTMENTS.dmp LOGFILE=export_dir:2005-04-10_HRExport.Generates SQLFILE output showing the DDL statements.PAYROLL_TRANSACTIONS Example 5.PAYROLL_CHECKS. Exports all objects in the HR schema.These tables will be truncated before loading ------------------------------------------------------------------------------------------------------------------------------DIRECTORY=export_dir JOB_NAME=RefreshSHTables DUMPFILE=export_dir:fulldb_%U.dmp LOGFILE=export_dir:RefreshSHTables.

the data specialists must get d ata into the data marts quickly and efficiently.start_date => '04/18/2005 23:00:00.END. the DBA at Acme Bank. is at the center of attention in a high-profile meet ing of the bank's top management team. Lora provides the meeting attendees with t hree possibilities.job_type => 'PLSQL_BLOCK' . END. And that's why Lora is at the meeting.Example: schedule a procedure which uses DBMS_DATAPUMP -----------------------------------------------------BEGIN DBMS_SCHEDULER. Transportable Tablespaces: Lora starts by describing the transportable tablespaces option. which run on heterogeneous platforms. just copying the Oracle data files is not sufficient. The quickest way to transport an entire tablespace to a target system is to simply transfer the tablespace's underlying files. However.000000' . What options doe s she propose for moving the data? An experienced and knowledgeable DBA.repeat_interval => 'FREQ=DAILY' . the target databa se must recognize and import the files .CREATE_JOB ( job_name => 'HR_EXPORT' . one idea presented is to create several small data marts each base d on a particular functional area that can each be used by specialized teams. The objective is to identify ways of enabling end users to slice and dice the da ta in the company's main data warehouse. At the meeting.job_action => 'BEGIN HR. including their implemen tation details and their pros and cons.SP_EXPORT. To effectively implement the data mart approach.comments => 'Performs HR Schema Export nightly at 11 PM' ).' . The challenge the team faces is figuring out how to quickly refresh the warehous e data to the data marts.enabled => TRUE . using F TP (file transfer protocol) or rcp (remote copy). / ====================================== How to use the NETWORK_LINK paramater: ====================================== Note 1: ======= Lora. as follows: Using transportable tablespaces Using Data Pump (Export and Import) Pulling tablespaces This article shows Lora's explanation of these options.

and stop at will. it must be self-contained. the set is considered to be self-contained. Unlike those older tools. Data Pump Expo rt and Import are controlled by jobs. A few checks are necessary before this option can be considered. In addition. which replaces the earlier Oracle Export (EX P) and Import (IMP) tools. Using transportable tablespaces involves copying the tablespace files and making the data available in the targe t database. TS2) is not self-contained. and other depen dent segments of the tables in the tablespace must be inside the tablespace. Lora's test transports the TS1 and TS2 tablespaces as follows: 1. Ensure the tablespaces are read-only: SELECT STATUS . the tablespace set is self-contained.TRANSPORT_SET_VIOLATIONS. Lora has run a test before the meeting to see if Data Pump can handle Acme's req uirements. such as a particular stored procedure or a set of tables from a particular tablespace. Identify any nontransportable sets. Lora explains that if a set of tablespaces contai ns all the dependent segments.and the corresponding tablespace before the tablespace data can become available to end users. no rows selected 3. if another index of a table in TS1 is in tablespace TS3. Data Pump is Oracle's next-generation data transfer tool. 2.contained. the tablespace set (TS1. restart.TRANSPORT_SET_CHECK ('TS1'. END.DBMS_TTS.'TS2'). the tablespaces are self-contained: SELECT * FROM SYS. Issue the f ollowing command: BEGIN SYS. Data Pump uses proprietary APIs that bypass the SQL buffer. That is. Lora proposes using the Data Pump Export utility i n Oracle Database 10g. Data Pump can ex tract specific objects. First. all the indexes. Check that the set of TS1 and TS2 tablespaces is self. which use regular SQL to extract and insert data. For instance. However. If no rows are selected. for a ta blespace TS1 to be transported to a target system. To transport the tablespaces. which the DBA can pause. if tablespaces TS1 and TS2 are to be transfe rred as a set and a table in TS1 has an index in TS2. making the process extremely fast. partitions.

5.FROM DBA_TABLESPACES WHERE TABLESPACE_NAME IN ('TS1'. Data Pump Import fetches the necessary metadata from the source across the datab ase link and re-creates it in the target. eit her a dump file set or another database if the NETWORK_LINK parameter is specified. She merely specifies the value srcdb.'/u01/oradata/ ts2_1. the database link to the source database. ALTER TABLESPACE TS1 READ WRITE. The NETWORK_LINK parameter initiates a network import.TS2\) NOLOGFILE=Y This step makes the TS1 and TS2 tablespaces and their data available in the targ et database. STATUS --------READ ONLY READ ONLY 4. ALTER TABLESPACE TS2 READ WRITE. In the target database. Note 2: ======= One of the most significant characteristics of an import operation is its mode. make the TS1 and TS2 tablespaces in the source database read-write. typically to the local database. for the parameter NETWORK_LINK in the impdp command above.dbf'. 7. into the dir ectory /u01/oradata. using Data Pump Import. import the tablespaces into the database. Note that Lora doesn't export the metadata from the source database. Finally. That server contacts the remote source database referenced by the database link .'TS2'). Transfer the data files of each tablespace to the remote system. CREATE DATABASE LINK srcdb USING 'srcdb'. In the target database. create a database link to the source database (named srcdb in the line below). using a transfer mechanism such as FTP or rcp. impdp lora/lora123 TRANSPORT_DATAFILES="'/u01/oradata/ts1_1. The specified mode applies to the source of the operation.dbf'" NETWORK_LINK='srcdb' TRANSPORT_TABLESPACES=\(TS1. 6. because the mode largely determines what is imported. This means that the impdp client initiates the import request.

2 Export / Import examples: ============================= In all Oracle versions 7. In this case. There are no dump files involved.WE8ISO8859P15 # export NLS_LANG=AMERICAN_AMERICA. and writes it directly back t o the target database.dmp FROMuser=ted touser=john buffer=4194304 c:\> cd [oracle_db_home]\bin c:\> set nls_lang=american_america.8i.8. retrieves the data. because it contains only metadata.in the NETWORK_LINK parameter. the source_database_link would be replaced with the na me of a valid database link that must already exist. The export file will be small.dmp owner=HR indexes=Y exp system/manager file=expdat. The log file is written to dpump_dir1. exp system/manager file=expdat. the Export command could be: EXP TRANSPORT_TABLESPACE=y TABLESPACES=ts_temp_sales FILE=jan_sales.dmp FROMuser=ted touser=john indexes=N commit=Y b uffer=64000 imp rm_live/rm file=dump. 4.AL32UTF8 c:\> imp system/manager fromuser=mis_owner touser=mis_owner file=[yourexport. the export file will contain information describing . Look at this example: exp scott/tiger tables=emp query=\"WHERE deptno=10\" -.dmp tables=(employee) imp system/manager file=expdat. jan_sales.dmp full=Y buffer=64000 commit=Y imp system/manager file=expdat.dmp compress=Y owner=(HARRY. specified on the DIRECTORY parameter. impdp hr/hr TABLES=employees DIRECTORY=dpump_dir1 NETWORK_LINK=source_database_l ink EXCLUDE=CONSTRAINT This example results in an import of the employees table (excluding constraints) from the source database. For our example scenario. PIET) exp system/manager file=hr.SALES) imp system/manager file=hr.dmp.9i.dmp ] FROM Oracle8i one can use the QUERY= export parameter to SELECTively unload a su bset of the data FROM a table.dmp This operation will generate an export file.dmp TABLES=(john.10g you can use the exp and imp utilities.Export metadata only: The Export utility is used to export the metadata describing the objects contain ed in the transported tablespace. In the following example.UTF8 # export NLS_LANG=AMERICAN_AMERICA.

-. Then we will export this user. GRANT connect TO albert. LOCID int. GRANT create sequence TO albert. create table DEPT -.GRANTS: GRANT create session TO albert. constraint pk_dept primary key (depid). See what we have after the import.connect albert/albert -. and all other information that the ta rget Oracle database will need in order to access the objects in ts_temp_sales. constraint fk_dept_loc foreign key (locid) references loc(locid) ).table of employees . column datatype. This user will create a couple of tables with referential constraints (PK-FK relations).create tables create table LOC -.User: create user albert identified by albert default tablespace ts_cdc temporary tablespace temp QUOTA 10M ON sysaux QUOTA 20M ON users QUOTA 50M ON TS_CDC . CITY varchar2(16).the table temp_jan_sales. $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$ Extended example: ----------------CASE 1: ======= We create a user Albert on a 10g DB.table of locations ( LOCID int. constraint pk_loc primary key (locid) ). GRANT resource TO albert. drop the user. GRANT create table TO albert. -. -. GRANT create procedure TO albert. such as the column names. and do an import. DEPTNAME varchar2(16).table of departments ( DEPID int. create table EMP -.

TABLE_NAME.5).Production on Sat Mar 1 08:03:59 2008 Copyright (c) 1982.---------------R R P P P EMP DEPT LOC DEPT EMP PK_DEPT PK_LOC -.show constraints: SQL> select CONSTRAINT_NAME.'Joop'.2.2). (4.'Haarlem'). (7. OLAP and Data Mining options Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set server uses AL32UTF8 character set (possible charset conversion) . (3. (1.2). pk_emp primary key (empid). 2005.1).'Utrecht').'Sales'.0 .1.1. Oracle.null). (3.3).1).'Management'.'RD'. int.5). int. CONSTRAINT_NAME E ------------------------------------------FK_EMP_DEPT FK_DEPT_LOC PK_LOC PK_DEPT PK_EMP -.'Nadia'.'Gerrit'. varchar2(16). (4. (6.2). (4.Produc tion With the Partitioning. (5. (1.'IT'.R_CONSTRAINT_NAME from u ser_constraints. CONSTRAINT_TYPE.2.0 . (3.'Nina'.0.-----------------------------.1).dat owner=albert Export: Release 10.4). (2. (5.4).null.0. (2.3). C TABLE_NAME R_CONSTRAINT_NAM .'Harry'. fk_emp_dept foreign key (depid) references dept(depid) -. All rights reserved.'Amsterdam').'PZ'. (2.make an export C:\oracle\expimp>exp '/@test10g2 as sysdba' file=albert.( EMPID EMPNAME DEPID constraint constraint ).'Christa'. Connected to: Oracle Database 10g Enterprise Edition Release 10.insert some data: INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO LOC LOC LOC LOC DEPT DEPT DEPT DEPT DEPT EMP EMP EMP EMP EMP EMP EMP VALUES VALUES VALUES VALUES VALUES VALUES VALUES VALUES VALUES VALUES VALUES VALUES VALUES VALUES VALUES VALUES (1.

Connected to: Oracle Database 10g Enterprise Edition Release 10.0. exporting dimensions .0 . Oracle. exporting refresh groups and children . exporting PUBLIC type synonyms .2. exporting table EMP 7 rows exported .1. exporting indextypes . exporting bitmap. exporting database links . exporting post-schema procedural objects and actions .About to export specified users . exporting sequence numbers . .1. exporting object type definitions for user ALBERT About to export ALBERT's objects .. exporting cluster definitions ..0.create user albert See above -. about to export ALBERT's tables via Conventional Path ..0 . exporting table LOC 4 rows exported . All rights reserved. exporting synonyms .02.Production on Sat Mar 1 08:09:26 2008 Copyright (c) 1982. .. exporting materialized views . . exporting table DEPT 5 rows exported .do the import C:\oracle\expimp>imp '/@test10g2 as sysdba' file=albert. 2005. OLAP and Data Mining options Export file created by EXPORT:V10. exporting referential integrity constraints . . exporting posttables actions . exporting foreign function library names for user ALBERT . exporting statistics Export terminated successfully without warnings. exporting private type synonyms . exporting triggers .Produc tion With the Partitioning. exporting snapshot logs .dat fromuser=albert tous er=albert Import: Release 10.. . C:\oracle\expimp> -.2. exporting stored procedures . exporting job queues .01 via conventional path import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set import server uses AL32UTF8 character set (possible charset conversion) . exporting views .. . exporting operators .drop user albert SQL>drop user albert cascade . exporting pre-schema procedural objects and actions . functional and extensible indexes .

EMPID ---------1 2 3 4 5 6 7 EMPNAME DEPID ---------------...connect albert/albert SQL> select * from emp. SQL> select * from loc. CONSTRAINT_TYPE. DEPID ---------1 2 3 4 5 DEPTNAME LOCID ---------------. importing table "EMP" . . importing table "LOC" About to enable constraints. .R_CONSTRAINT_NAME from u ser_constraints.TABLE_NAME. importing table "DEPT" .---------Joop 1 Gerrit 2 Harry 2 Christa 3 4 Nina 5 Nadia 5 5 rows imported 7 rows imported 4 rows imported 7 rows selected.. LOCID ---------1 2 3 4 CITY ---------------Amsterdam Haarlem Utrecht SQL> select * from dept.---------Sales 1 PZ 1 Management 2 RD 3 IT 4 -.show constraints: SQL> select CONSTRAINT_NAME. . importing ALBERT's objects into ALBERT . Import terminated successfully without warnings.-----------------------------.---------------R R P P P DEPT EMP DEPT EMP LOC PK_LOC PK_DEPT . C:\oracle\expimp> . CONSTRAINT_NAME E ------------------------------------------FK_DEPT_LOC FK_EMP_DEPT PK_DEPT PK_EMP PK_LOC C TABLE_NAME R_CONSTRAINT_NAM .

. truncate table loc.02. CONSTRAINT_NAME C TABLE_NAME R_CONSTRAINT_NAM . CASE 2: ======= We are not going to drop the user.Everything is back again.Production on Sat Mar 1 08:25:27 2008 Copyright (c) 1982. but empty the tables: SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> alter table dept disable constraint FK_DEPT_LOC.0 .01 via conventional path import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set import server uses AL32UTF8 character set (possible charset conversion) . alter table dept disable constraint PK_DEPT. 2005.0. Connected to: Oracle Database 10g Enterprise Edition Release 10. importing table "LOC" 4 rows imported About to enable constraints. importing table "DEPT" 5 rows imported . IMP-00017: following statement failed with ORACLE error 2270: "ALTER TABLE "EMP" ENABLE CONSTRAINT "FK_EMP_DEPT"" IMP-00003: ORACLE error 2270 encountered ORA-02270: no matching unique or primary key for this column-list IMP-00017: following statement failed with ORACLE error 2270: "ALTER TABLE "DEPT" ENABLE CONSTRAINT "FK_DEPT_LOC"" IMP-00003: ORACLE error 2270 encountered ORA-02270: no matching unique or primary key for this column-list Import terminated successfully with warnings.dat ignore=y fromuser=al bert touser=albert Import: Release 10. alter table emp disable constraint FK_EMP_DEPT. but we have a problem with the FOREIGN KEYS: SQL> select CONSTRAINT_NAME. alter table emp disable constraint pk_emp. All rights reserved.do the import C:\oracle\expimp>imp '/@test10g2 as sysdba' file=albert. truncate table emp. truncate table dept.TABLE_NAME.. -.0.2.R_CONSTRAINT_NAME. importing table "EMP" 7 rows imported . importing ALBERT's objects into ALBERT .. .1. .2. OLAP and Data Mining options Export file created by EXPORT:V10.1. STATU S from user_constrai nts. Oracle. So the data gets imported.Produc tion With the Partitioning. CONSTRAINT_TYPE. alter table loc disable constraint pk_loc.0 .

SQL> select CONSTRAINT_NAME.TABLE_NAME.---------------R DEPT R EMP P DEPT P EMP P LOC PK_LOC PK_DEPT What is exported?: -----------------Tables. loc enable constraint pk_loc. CONSTRAINT_TYPE. indexes.---------------R DEPT R EMP P LOC P EMP P DEPT PK_LOC PK_DEPT dept enable constraint pk_dept. dept enable constraint FK_DEPT_LOC.R_CONSTRAINT_NAME.----FK_DEPT_LOC ENABLED FK_EMP_DEPT ENABLED PK_DEPT ENABLED PK_EMP ENABLED PK_LOC ENABLED SQL> Everything is back again.-----------------------------. database links gets exported. emp enable constraint pk_emp. $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$ C TABLE_NAME R_CONSTRAINT_NAM . Example: -------- . dept enable constraint PK_DEPT.----FK_DEPT_LOC DISABLED FK_EMP_DEPT DISABLED PK_LOC DISABLED PK_EMP DISABLED PK_DEPT DISABLED alter alter alter alter alter alter table table table table table table . emp enable constraint FK_EMP_DEPT.E STATUS ------------------------------------------. CONSTRAINT_NAME E STATUS ------------------------------------------.-----------------------------. STATU S from user_constraints. data.

1. herschrijfgroepen en kinderen worden geÙxporteerd . clusterdefinities worden geÙxporteerd. Export van opgegeven gebruikers gaat beginnen . dimensies worden geÙxporteerd. . bibliotheeknamen van verwijzende functie voor gebruiker OEMUSER worden geÙxpo teerd . Export is uitgevoerd in WE8MSWIN1252 tekenset en AL16UTF16 NCHAR-tekenset.dmp owner=oemuser Verbonden met: Oracle9i Enterprise Edition Release 9. operatoren worden geÙxporteerd. . . . . statistieken worden geÙxporteerd. . tabel CUSTOMERS wordt geÙxporteerd.4. .. volgnummers worden geÙxporteerd. indextypen worden geÙxporteerd. databasekoppelingen worden geÙxporteerd.0 ... . opgeslagen procedures worden geÙxporteerd. D:\temp> Can one import tables to a different tablespace? ------------------------------------------------Import the dump file using the INDEXFILE= option Edit the indexfile. post-schema procedurele objecten en acties wordt geÙxporteerd. . bitmap. .. via conventioneel pad .0.. snapshots worden geÙxporteerd.Er zijn 2 rijen geÙxporteerd.Production With the Partitioning option JServer Release 9.. . this will create the required tables in the appropriate tablespaces Import the table(s) with the IGNORE=Y option.4. objecttypedefinities voor gebruiker OEMUSER worden geÙxporteerd Export van objecten van OEMUSER gaat beginnen . . . functionele en uit te breiden indexen worden geÙxporteerd. .Production. acties post-tabellen worden geÙxporteerd . . Change the default tablespace for the user: Revoke the "UNLIMITED TABLESPACE" privilege FROM the user Revoke the user's quota FROM the tablespace FROM WHERE the object was exported.. Export is succesvol beÙindigd zonder waarschuwingen. takenwachtrijen worden geÙxporteerd .0 . This forces the import utility to create tables in the user's default tablespace .1.0. logs voor snapshots worden geÙxporteerd. Run this indexfile against your database. . Make the tablespace to which you want to import the default tablespace for the u ser Import the table Can one export to multiple files?/ Can one beat the Unix 2 Gig limit? . . . . triggers worden geÙxporteerd. Remove remarks and specify the correct tablespaces.exp system/manager file=oemuser. synoniemen worden geÙxporteerd. . pre-schema procedurele objecten en acties wordt geÙxporteerd. . views worden geÙxporteerd.. referentiÙle integriteitsbeperkingen worden geÙxporteerd. export van tabellen van OEMUSER gaat beginnen .

Error 2: -------- .pipe . the export utility supports multiple output files. Do you have invalid objects? Is DBMS_EXPORT_EXTENSION invalid? If so.Export the table data once again. Or possibly different imp/exp versions are run to another version of the database. The errors indicate that $ORACLE_HOME/rdbms/admin/CATALOG. Were these scripts run co nnected as SYS? Try SELECT OBJECT_NAME. try compil ing it manually: ALTER PACKAGE DBMS_EXPORT_EXTENSION COMPILE BODY. column 31: PLS-00302: component 'DBMS_EXPORT_EXTENSION' must be declared 1.. Some famous Errors: ------------------Error 1: -------EXP-00008: ORACLE error 6550 encountered ORA-06550: line 1. # create a named pipe mknod exp. 3.pipe p # read the pipe . 2.pipe > scott. If you receive errors during manual compilation.exp.Analyze which tables/rows could be affected by national characters before running the export .. Other fix: If there are problems in exp/imp from single byte to multibyte databases: . as has been previously suggested.output to zip file in the background gzip < exp. OBJECT_TYPE FROM DBA_OBJECTS WHERE STATUS = 'INVALID' AND OWNER = 'SYS'. exp SCOTT/TIGER FILE=D:\F1.SQL Should be run again.log Use the following technique if you use an Oracle version prior to 8i: Create a compressed export on the fly.E:\F2.dmp. please show errors for further information. .gz & # feed the pipe exp userid=scott/tiger file=exp.SQL and $ORACLE_HOME/rdbms/admin/CATPROC.SQL and executed in the lesser version RDBMS. The problem can be resolved by copying the higher version CATEXP.dmp FILESIZE=10m LOG=scott.Increase the size of affected rows.--------------------------------------------------------------------FROM Oracle8i.

Fix ~~~~ a) If the statistics of a table are not required to include in export take the export with parameter STATISTICS=NONE Example: $exp scott/tiger file=emp1. you need to ensure the client NLS e nvironment performing the export is set to match the server.Version: 9.4. This warning is generated because the statistics are questionable due to the client character set difference from the server character set.0.2. the statistics are need to be included can use STATISTICS=ESTIMATE or COMPUTE (default is Estimate).Version: 9.4 .Personal Edition .2.4 to 9.0: Schema Export Fails with ORA-1403 (No Data Fou nd) on Exporting Cluster Definitions Creation Date: 29-AUG-2004 Type: PROBLEM Last Revision Date: 29-AUG-2004 Status: PUBLISHED The information in this article applies to: .1 Content Type: TEXT/PLAIN Subject: Oracle 9.2. ERRORS -----EXP-56 ORACLE error encountered ORA-1403 no data found EXP-0: Export terminated unsuccessfully SYMPTOMS -------A schema level export with the 9.4 to 9.0.0.Oracle Server .4 to 9. fails when exporting the cluster definitions with: .2.0.EXP-00091: Exporting questionable statistics.Oracle Server .2. There is an article which discusses the causes of questionable statistics availa ble via the MetaLink Advanced Search option by Doc ID: Doc ID: 159787.html>: Note:281780.1 9i: Import STATISTICS=SAFE If you do not want this conversion to occur.0. The exp version must be equal or older than the DB version Doc ID </help/usaeng/Search/search.Standard Edition .Oracle Server .2.2.dmp tables=emp STATISTICS=NONE b) In case.4 export utility from a 9.0.2.0. Error 3: -------EXP-00056: ORA-01403: EXP-00056: ORA-01403: EXP-00000: ORACLE error 1403 encountered no data found ORACLE error 1403 encountered no data found Export terminated unsuccessfully You can't export any DB with an exp utility of a newer version.0.Enterprise Edition . Hi.Version: 9.2.0.4 This problem can occur on any platform.4 .4 or higher release database in which XDB has been installed.

0.OBJECT" FROM dba_objects WHERE owner='XDB' AND status != 'VALID' ORDER BY 4. .2.0 Oracle OLAP API You create a trace file of the ORA-1403 error: SQL> SHOW PARAMETER user_dump SQL> ALTER SYSTEM SET EVENTS '1403 trace name errorstack level 3'. XDB XML XOQ STATUS VERSION COMP_NAME ----------.1.2.0. no rows selected Note: If you do have invalid XDB objects..4. The trace file that was written to your USER_DUMP_DEST directory. owner||'.15) comp_id. see the solution mentioned in: [NOTE:255724.'||object_name "OWNER.6.0 Oracle XDK for Java 9. substr(version.2.-----------------------------INVALID VALID LOADED 9.. -.. and the same ORA-1403 error occurs when performing a full database export. exporting cluster definitions EXP-00056: ORACLE error 1403 encountered ORA-01403: no data found EXP-00000: Export terminated unsuccessfully You can confirm that XDB has been installed in the database: SQL> SELECT substr(comp_id. substr(comp_name... COMP_ID --------------.4.0.30) comp_name FROM dba_registry ORDER BY 1. object_id. status.---------.EXU9XDBUID You can confirm that you have no invalid XDB objects in the database: SQL> SET lines 200 SQL> SELECT status.1&p_database_id=NO T> "Oracle 9i: Full Export Fails with ORA-1403 (No Data Found) on Exporting Cluster Defintions" CHANGES ------- .Re-run the export SQL> ALTER SYSTEM SET EVENTS '1403 trace name errorstack off'.0 Oracle XML Database 9.2. System altered. object_type.1] <ml2_documents.showDocument?p_id=255724.1. shows: ksedmp: internal or fatal error ORA-01403: no data found Current SQL statement for this session: SELECT xdb_uid FROM SYS.10) version.1. System altered.

You recently restored the database from a backup or you recreated the controlfile.DBF' ORA-06512: at "SYS.DBF' SIZE 100m AUTOEXTEND ON NEXT 100M MAXSIZE 2000M.g.DBMS_LOB". SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp2. or: If the controlfile has a reference to the tempfile(s).DBMS_METADATA". SQL> DROP TABLESPACE temp.0.DBF' SIZE 100m AUTOEXTEND ON NEXT 100M MAXSIZE 2000M.3 or earlier export utility: . exporting cluster definitions EXP-00056: ORACLE error 1157 encountered ORA-01157: cannot identify/lock data file 201 . Note that the errors are different when exporting with a 9.5 or later export utility: . name FROM v$tempfile. no rows selected SQL> ALTER TABLESPACE temp ADD TEMPFILE 'M:\ORACLE\ORADATA\M9204WA\TEMP01. line 424 ORA-06512: at "SYS.0. but the files are missing on disk. CAUSE ----The Temporary tablespace does not have any tempfiles. SQL> CREATE TEMPORARY TABLESPACE temp TEMPFILE 'M:\ORACLE\ORADATA\M9204WA\TEMP01. enabled. re-create the temporary tablespace.: SQL> SET lines 200 SQL> CREATE TEMPORARY TABLESPACE temp2 TEMPFILE 'M:\ORACLE\ORADATA\M9204WA\TEMP201.see DBWR trace file ORA-01110: data file 201: 'M:\ORACLE\ORADATA\M9201WA\TEMP01. . e. add the tempfile(s): SQL> SET lines 200 SQL> SELECT status. If the controlfile does not have any reference to the tempfile(s). line 1140 ORA-06512: at line 1 EXP-00000: Export terminated unsuccessfully The errors are also different when exporting with a 9.DBF' REUSE.see DBWR trace file ORA-01110: data file 201: 'M:\ORACLE\ORADATA\M9205WA\TEMP01.DBF' EXP-00000: Export terminated unsuccessfully FIX --1.2. exporting cluster definitions EXP-00056: ORACLE error 1157 encountered ORA-01157: cannot identify/lock data file 201 . or you performed Operating System actions on your database tempfiles.2.

1> "How to p erform full system Export/Import" Question: Can data corruption occur using export & import (version 8.NLS .1 </metalink/plsql/showdoc?db=NOT&id=163334.7. 2.1 Content Type: TEXT/X-HTML Subject: Oracle Server .1.1> "How to Connect AS SYSDBA when Using Export or Import" COMPATIBILITY ============= Question: Which version should I use when moving data between different database releases? See Note 132904.1> "Import . Importing Into Oracle7" Question: How to resolve the IMP-69 error when importing into a database? See Note 163334.PERFORMANCE .1 </metalink/plsql/showdoc?db=NOT&id=277237.TOP IMPORT DEFECTS .TOP EXPORT DEFECTS .Export and Import FAQ Creation Date: 08-FEB-2 002 Type: FAQ Last Revision Date: 16-FEB-2005 Status: PUBLISHED PURPOSE ======= This Frequently Asked Questions (FAQ) provides common Export and Import issues in the following sections: .1 </metalink/plsql/showdoc?db=NOT&id=10767.1 </metalink/plsql/showdoc?db=NOT&id=132904.SQL> SQL> SQL> SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp.1> "Overview of Export and Import in Oracle7" Question: What is important when doing a full database export or import? See Note 10767.3 to 9.FREQUENT ERRORS GENERIC ======= Question: What is actually happening when I export and import data? See Note 61949.ORA-942 .1> "Compat ibility Matrix for Export & Import Between Different Oracle Versions" See Note 291024.1> "NT: Expo rting from Oracle8. Other errors: ------------Doc ID </help/usaeng/Search/search.1> "Compat ibility and New Features when Transporting Tablespaces with Export and Import" See Note 76542.1 </metalink/plsql/showdoc?db=NOT&id=291024.PARAMETERS .1 </metalink/plsql/showdoc?db=NOT&id=61949.TABLESPACE .REPLICATION .0)? See Note 199416.1 </metalink/plsql/showdoc?db=NOT&id=76542.GENERIC .html>: Note:175624.1> "ALERT: EXP Can Produce Dump File with Corrupted Data" Question: How to Connect AS SYSDBA when Using Export or Import? See Note 277237.1 </metalink/plsql/showdoc?db=NOT&id=199416. 2.LARGE FILES .INTERMEDIA .COMPATIBILITY .ADVANCED QUEUING . Now re-run the export. SHUTDOWN IMMEDIATE STARTUP DROP TABLESPACE temp2 INCLUDING CONTENTS AND DATAFILES.

1> "Query= S yntax in Export in 8i" See Note 277010.1> "Parame ter FILESIZE .1 </metalink/plsql/showdoc?db=NOT&id=281461.1> "2Gb or N ot 2Gb . and what does it do? See Note 91864.7 Export" See Note 1019280..1> "Export and Import of Table with LOB Columns (like CLOB and BLOB) has Slow Performance" LARGE FILES =========== Question: Which commands to use for solving Export dump file problems on UNIX pl atforms? See Note 30528.102 </metalink/plsql/showdoc?db=NOT&id=1019280.1> "Parame ter FILESIZE .1 </metalink/plsql/showdoc?db=NOT&id=30528.1> "When t o Use CONSISTENT=Y During an Export" Question: How to use the Oracle8i/9i Export parameter QUERY=.1 </metalink/plsql/showdoc?db=NOT&id=113450.1 </metalink/plsql/showdoc?db=NOT&id=62427.6> "Unab le to export when export file grows larger than 2GB" See Note 290810..6 </metalink/plsql/showdoc?db=NOT&id=1057099.1> "Tuning C onsiderations when Import is slow" Question: Why has export performance decreased after creating tables with LOB co lumns? See Note 281461.Make Export Write to Multiple Export Files" Question: How to export to a tape device by using a named pipe? See Note 30428.1> "How to Specify a Query in Oracle10g Export DataPump and Import DataPump" Question: How to create multiple export dumpfiles instead of one large file? See Note 290810.1 </metalink/plsql/showdoc?db=NOT&id=30428.1.Gets IMP-00069 when Importing 8.1 </metalink/plsql/showdoc?db=NOT&id=155477.1> "QREF: Ex port/Import/SQL*Load Large Files in Unix .File limits in Oracle" See Note 1057099. How can I improve the performance of Import? See Note 93763.1> "Parame ter DIRECT: Conventional Path Export versus Direct Path Export" Question: What is the meaning of the Export parameter CONSISTENT=Y and when shou ld I use it? See Note 113450.Quick Reference" Question: How to solve the EXP-15 and EXP-2 errors when Export dump file is larg er than 2Gb? See Note 62427.1 </metalink/plsql/showdoc?db=NOT&id=93763.1> "Exportin .102> " IMP-69 on Import" PARAMETERS ========== Question: What is the difference between a Direct Path and a Conventional Path E xport? See Note 155477.Make Export Write to Multiple Export Files" PERFORMANCE =========== Question: Import takes so long to complete.1 </metalink/plsql/showdoc?db=NOT&id=91864.1 </metalink/plsql/showdoc?db=NOT&id=290810.1 </metalink/plsql/showdoc?db=NOT&id=290810.1 </metalink/plsql/showdoc?db=NOT&id=277010.

6> "Movi ng Tables Between Tablespaces Using EXPORT/IMPORT" See Note 1068183.1 </metalink/plsql/showdoc?db=NOT&id=15656.102> " ORA-00942: ON TABLE LEVEL IMPORT" NLS === Question: Which effect has the client's NLS_LANG setting on an export and import ? See Note 227332.1 </metalink/plsql/showdoc?db=NOT&id=96842.1> "Full I mport shows Errors when adding Referential Constraint on Cartrige Tables" Question: How to resolve an ORA-942 during import of a snapshot (log) into a dif ferent schema? See Note 1017292.1 </metalink/plsql/showdoc?db=NOT&id=130080.6> "How to change the default tablespace when importing using the INDEXFILE option" Question: How can I export all tables of a specific tablespace? See Note 1039292.g to Tape on Unix System" TABLESPACE ========== Question: How to transport tablespace between different versions? See Note 291024.102 </metalink/plsql/showdoc?db=NOT&id=1020026.6 </metalink/plsql/showdoc?db=NOT&id=1068183.1> "Compat ibility and New Features when Transporting Tablespaces with Export and Import" Question: How to move tables to a different tablespace and/or different user? See Note 1012307.102 </metalink/plsql/showdoc?db=NOT&id=1017292.1 </metalink/plsql/showdoc?db=NOT&id=109576.1> "Proble .Frequently Asked Questions" See Note 15656. When Importing Triggers" Question: How to resolve an ORA-942 during import of one specific table? See Note 1013822.102> " ORA-01702.1> "Loss Of Diacritics When Performing EXPORT/IMPORT Due To Incorrect Charactersets" INTERMEDIA OBJECTS ================== Question: How to solve an EXP-78 when exporting metadata for an interMedia Text index? See Note 130080. ORA-00942.102> " IMP-00017 IMP-00003 ORA-00942 USING FROMUSER/TOUSER ON SNAPSHOT [LOG] IMPORT" Question: How to resolve an ORA-942 during import of a trigger on a renamed tabl e? See Note 1020026.1 </metalink/plsql/showdoc?db=NOT&id=291024.102 </metalink/plsql/showdoc?db=NOT&id=1013822.6 </metalink/plsql/showdoc?db=NOT&id=1039292.6> "How to Export Tables for a specific Tablespace" ORA-942 ======= Question: How to resolve an ORA-942 during import of the ORDSYS schema? See Note 109576.1 </metalink/plsql/showdoc?db=NOT&id=227332.1> "NLS co nsiderations in Import/Export . ORA-25001.6 </metalink/plsql/showdoc?db=NOT&id=1012307.1> "Export/I mport and NLS Considerations" Question: How to prevent the loss of diacritical marks during an export/import? See Note 96842.

SUBMIT for Replication jobs? See Note 137382. but now I get ORA-6550 and PLS-201 when e xporting? See Note 120540.2.6> "EXP-000 67 PERFORMING DIRECT PATH EXPORT" EXP-00079: Data in table %s is protected (EXP-79) .5.X" FREQUENTLY REPORTED EXPORT/IMPORT ERRORS ======================================== EXP-00002: Error in writing to export file Note 1057099. dump f ile size > 2Gb) or a disk/filesystem that ran out of space.%s) (EXP-3 EXP-0) Note 274076.0.5 to 8.1> "EXP-8 PLS-201 After Drop User ORDSYS" ADVANCED QUEUING OBJECTS ======================== Question: Why does export show ORA-1403 and ORA-6512 on an AQ object.1> "EXP-3 whi le exporting Rollback Segment definitions during FULL Database Export" EXP-00067: "Direct path cannot export %s which contains object or lob data.1 </metalink/plsql/showdoc?db=NOT&id=159952.1 </metalink/plsql/showdoc?db=NOT&id=124392.1 </metalink/plsql/showdoc?db=NOT&id=137382.6> "Unable to export when export file grows larger than 2GB" EXP-00002: error in writing to export file The export file could not be written to disk anymore.6 </metalink/plsql/showdoc?db=NOT&id=1037317. probably because the disk is full or the device has an error. PLS-306 Unable to Import Oracle8i JobQueues into Oracle8" Question: How to reorganize Replication base tables with Export and Import? See Note 1037317.1> "EXP-8 and ORA-1403 When Performing A Full Export" Question: How to resolve export errors on DBMS_AQADM_SYS and DBMS_AQ_SYS_EXP_INT ERNAL? See Note 114739.1> "EXP-00003 When Exporting From Oracle9i 9. after an u pgrade? See Note 159952. Most of the time this is followed by a device (filesystem) error message indicat ing the problem.1 </metalink/plsql/showdoc?db=NOT&id=114739. EXP-00003: No storage definition found for segment(%s.1> "IMP-3.0 with a Pre-9." Note 1048461.0.0 Export Utility" Note 124392.6" Question: I dropped the ORDSYS schema.1 </metalink/plsql/showdoc?db=NOT&id=274076.6 </metalink/plsql/showdoc?db=NOT&id=1048461.2.1.1.1> "ORA-40 68 while performing full database export" REPLICATION OBJECTS =================== Question: How to resolve import errors on DBMS_IJOB.5.6> "Move Replication System Tables using Export/Import for Oracle 8.1 </metalink/plsql/showdoc?db=NOT&id=120540. Possible causes are file systems that do not support a certain limit (eg.6 </metalink/plsql/showdoc?db=NOT&id=1057099.ms with EXPORT after upgrading from 8.

1> "Export of Database fails with EXP-00904 and ORA-01003" Note 158048.1> "ORA-904 u sing EXP73 against Oracle8/8i Database" Note 1017276.1 </metalink/plsql/showdoc?db=NOT&id=148740.1> "9i: Impor t STATISTICS=SAFE" IMP-00016: Required character set conversion (type %lu to %lu) not supported Note 168066.1 </metalink/plsql/showdoc?db=NOT&id=113450.DBMS_XDBUTIL_INT' while Exporting Database" Note 256548.%s) (IMP-3 ORA-4030 ORA-3113) Note 165016.1> "When to U se CONSISTENT=Y During an Export" ORA-04030: Out of process memory when trying to allocate %s bytes (%s.DBMS_STATS".1 </metalink/plsql/showdoc?db=NOT&id=256548.1 </metalink/plsql/showdoc?db=NOT&id=221178.1 </metalink/plsql/showdoc?db=NOT&id=172220.1 </metalink/plsql/showdoc?db=NOT&id=114356.1> "How to Pr event EXP-00079 or EXP-00080 Warning (Data in Table xxx is Protected) During Exp ort" EXP-00091: Exporting questionable statistics Note 159787.1> "ALERT: Ex port of table with dropped functional index may cause IMP-20 on import" ORA-00904: Invalid column name (EXP-8 ORA-904 EXP-0) Note 106155.102 </metalink/plsql/showdoc?db=NOT&id=1017276.1> "Import Da taPump: Transport Tablespace Fails with ORA-39123 and 29344 (Failed to match own er SYS)" ORA-29516: Aurora assertion failure: Assertion failure at %s (EXP-8 ORA-29516 EX P-0) Note 114356.1 </metalink/plsql/showdoc?db=NOT&id=123355. (IMP-17 IMP-3 ORA-20001 ORA-6512) Note 123355.102> "Ora cle8i Export Fails on Synonym Export with EXP-8 and ORA-904" ORA-01406: Fetched column value was truncated (EXP-8 ORA-1406 EXP-0) Note 163516.1> "PLS-201 a nd ORA-06512 at 'XDB.Note 277606.1> "Export Fa ils With ORA-29516 Aurora Assertion Failure EXP-8" .1 </metalink/plsql/showdoc?db=NOT&id=163516..1 </metalink/plsql/showdoc?db=NOT&id=294992.1 </metalink/plsql/showdoc?db=NOT&id=168066.1 </metalink/plsql/showdoc?db=NOT&id=106155.1> "EXP-0 and ORA-1406 during Export of Object Types" ORA-01422: Exact fetch returns more than requested number of rows Note 221178.1 </metalink/plsql/showdoc?db=NOT&id=130916. line .1 </metalink/plsql/showdoc?db=NOT&id=158048.1> "Export of Database with XDB Throws ORA-1422 Error" ORA-01555: Snapshot too old Note 113450.failed to match owner 'SYS' Note 294992.1> "EXP-00008 ORA-1003 ORA-904 During Export" Note 172220.1 </metalink/plsql/showdoc?db=NOT&id=165016.1> "Corrupt P ackages When Export/Import Wrapper PL/SQL Code" ORA-06512: at "SYS.1> "IMP-17 an d IMP-3 errors referring dbms_stats package during import" ORA-29344: Owner validation failed .1 </metalink/plsql/showdoc?db=NOT&id=159787..1 </metalink/plsql/showdoc?db=NOT&id=277606.1> "IMP-16 Wh en Importing Dumpfile into a Database Using Multibyte Characterset" IMP-00020: Long column too large for column buffer size Note 148740.1> "Oracle8i Export Fails on Synonym Export with EXP-8 and ORA-904" Note 130916.

exu81rls Bug 2685696 </metalink/plsql/showdoc?db=Bug&id=2685696> Release : 9.2.1 </metalink/plsql/showdoc?db=NOT&id=163516.0.1.7.1 </metalink/plsql/showdoc?db=NOT&id=124392.1.1.x) Problem : EXP-79 when Exporting Protected Tables Solution : this is not a defect Workaround: N/A.orac le.2.1.com/ARULi ..x) Problem : Full database export fails with EXP-3: no storage definition found for segment Solution : Oracle9i (9.1.x) Workaround: yes.2 and higher Problem : Conventional export may produce an export file with corrupt data Solution : 8.0.1 </metalink/plsql/showdoc?db=NOT&id=278937.1.7.0.0.7. 24491 13 (for 9.5 and 9.4 from Oracle9i fails with invalid id entifier SPOLICY (EXP-8 ORA-904 EXP-0) Solution : 9.2.2. (I MP-17 IMP-3 ORA-6550 PLS-103) Note 123355.x) and Oracle9i (9.1> "How to Prevent EXP-00079 or EXP-00080 Warning (Data in Table xxx is Protected) During Export" Bug 2410612 </metalink/plsql/showdoc?db=Bug&id=2410612> Release : 8.com/ARULink/PatchDetails/process_form?patch_num=2410612> (for 8. see Bug 2900891 </metalink/plsql/showdoc?db=Bug&id=2900891> ho w to recreate view sys.oracle.1 </metalink/plsql/showdoc?db=NOT&id=199416. see Note 199416.x or check for Patch 2410612 <http://updates.1.1 </metalink/plsql/showdoc?db=NOT&id=123355.7.0.1.3 and below Problem : Export with 8.7.1> "Import Da taPump: ORA-39083 and PLS-103 when Importing Statistics Created with Non ".5 Workaround: yes.1> "ALERT: Client Program May Give Incorrect Query Results (EXP Can Produce Dump File with Corrupted Data)" Release : Oracle8i (8." NLS Decimal Character" EXPORT TOP ISSUES CAUSED BY DEFECTS =================================== Release : 8.1> "EXP-0 and ORA-1406 during Export of Object Types" Bug 1098503 </metalink/plsql/showdoc?db=Bug&id=1098503> Release : Oracle8i (8. see Note 277606.1.DBMS_XDBUTIL_IN T (EXP-56 ORA-1422 ORA-6512) Solution : 9.0.1.0.2.1> "IMP-17 an d IMP-3 errors referring dbms_stats package during import" Note 278937.2.2 and below Problem : Export may fail with ORA-1406 when exporting object type definition s Solution : apply patch-set 8.1.3 and 8.7.3 Workaround: no.3 and higher and 9.x).PLS-00103: Encountered the symbol ".4 and below and 9.4 or 9.1> "EXP-3 while exporting Rollback Segment definitions during FULL Database Export " Bug 2900891 </metalink/plsql/showdoc?db=Bug&id=2900891> Release : 9.7.0.3 and below Problem : Export fails when exporting triggers in call to XDB. see Note 163516. see Note 124392.0.x) Workaround: yes.4 or check for Patch 2410612 <http://updates.1." when expecting one of the following .1 </metalink/plsql/showdoc?db=NOT&id=277606..

SET_TRIGGER_FIRING_PROPERTY to fail during Import (IMP-17 IMP-3 ORA-911 ORA-6512).1> "ORA-931 or ORA-23308 in SET_TRIGGER_FIRING_PROPERTY on Import of Trigger in 8.2.1.7. Solution : in Oracle9iR2 with patchset 9. see Note 221178.1.1> "Corrupt Packages When Export/Import Wrapper PL/SQL Code" Bug 2067904 </metalink/plsql/showdoc?db=Bug&id=2067904> Release : Oracle8i (8.0.4 Workaround: yes.7.0.com/ARULi nk/PatchDetails/process_form?patch_num=2919120> (for 9.7.4 and below Problem : Export fails when exporting triggers in call to XDB.SET_TRIGGER_FIRING_PROPERTY to fail during Import (IMP-17 IMP-3 ORA-931 ORA-23308 ORA-6512).0.0.7.1.x and 9.1> "ORA-01422 ORA-06512: at "XDB.2 and below and 9.1> "Export of Database with XDB Throws ORA-1422 Error" IMPORT TOP ISSUES CAUSED BY DEFECTS =================================== Bug 1335408 </metalink/plsql/showdoc?db=Bug&id=1335408> Release : 8.0. see Note 256548.1 </metalink/plsql/showdoc?db=NOT&id=221178.3 or 8.1.0.2.5 or check for Patch 2919120 <http://updates.1.2 and below Problem : Trigger-name causes call to DBMS_DDL.1 </metalink/plsql/showdoc?db=NOT&id=123355.2.0.1 </metalink/plsql/showdoc?db=NOT&id=239821. see Note 239890.0.2.1> "IMP-17 and IMP-3 errors referring DBMS_STATS package during import" Bug 1879479 </metalink/plsql/showdoc?db=Bug&id=1879479> Release : 8.1.7.4 Workaround: yes. see Note 239821. see Note 165016.DBMS_XDBUTIL_INT" while exporting full database" Bug 2919120 </metalink/plsql/showdoc?db=Bug&id=2919120> Release : 9.4) Workaround: yes.1 </metalink/plsql/showdoc?db=NOT&id=256548.1.0. see Note 123355.0. in Oracle9iR1 with 9.1 </metalink/plsql/showdoc?db=NOT&id=239890.1.1 </metalink/plsql/showdoc?db=NOT&id=165016. Solution : in Oracle8i with 8.7.2 and below Problem : Schema-name causes call to DBMS_DDL.2 and below Problem : Bad export file using a locale with a '.7.DBMS_XDBUTIL_IN T (EXP-56 ORA-1422 ORA-6512) Solution : 9.7.3 Workaround: yes.3) Workaround: yes.' decimal seperator (IMP-17 IMP-3 ORA-6550 PLS-103) Solution : apply patch-set 8.x and Oracle9i" .x) and 9.1.1.nk/PatchDetails/process_form?patch_num=2410612> (for 9.1. Solution : in Oracle9iR1 with patchset 9.1.1.1> "ORA-911 in SET_TRIGGER_FIRING_PROPERTY on Import of Trigger in 8.1.3 and higher.2.x" Bug 2854856 </metalink/plsql/showdoc?db=Bug&id=2854856> Release : Oracle8i (8.2.0.2 and 9.1.x) and 9.0.2 and below Problem : Export of a wrapped package can result in a corrupt package being i mported (IMP-3 ORA-4030 ORA-3113 ORA-7445 ORA-600[16201]).7.3 and higher Workaround: no.oracle.

dis rows=2 errors=2 skip=0 BONUS.ctl bad=bonus.first_name.middle_initial.' OPTIONALLY ENCLOSED BY '"' (player_id.CTL: LOAD DATA INFILE 'PLAYER.CTL LOG=LOAD1.CTL: LOAD DATA INFILE bonus.LOG BAD=LOAD1.3 SQL*Loader examples: -======================= SQL*Loader is used for loading data from text files into Oracle tables.start_date) SQLLDR system/manager CONTROL=LOAD1. The text file can have fixed column positions or columns separated by a special character.4.bad log=bonus.ctl sqlldr parfile=bonus.log discard=bonus. city position(09:19) char.CTL: LOAD DATA .PAR: userid=scott control=bonus.TXT' INTO TABLE BASEBALL_PLAYER FIELDS TERMINATED BY '.dat APPEND INTO TABLE BONUS (name position(01:08) char.DSC Example 3: another controlfile: -----------------------------SMSSOFT.last_name.par Example 1: ---------BONUS.". to call sqlloader sqlldr system/manager control=smssoft.BAD DISCARD=LOAD1. for example an ".par Example 2: ---------LOAD1. salary position(20:22) integer external) Now you can use the command: $ sqlldr parfile=bonus.

SHORTNAME.dsc' APPEND INTO TABLE TEST FIELDS TERMINATED BY "<tab>" TRAILING NULLCOLS ( c1. QUANTITY_SOLD. one would use a real tab character which is not visible.TXT' TRUNCATE INTO TABLE SMSSOFTWARE FIELDS TERMINATED BY '. the convential path is used.' OPTIONALLY ENCLOSED BY '"' (DWMACHINEID.dat APPEND INTO TABLE sales FIELDS TERMINATED BY "|" (PROD_ID.Direct path load: Buffer cache is not used. NAME.INFILE 'SMSSOFT.Convential path load: When the DIRECT=Y parameter is not used. and that the buffer cache is used. CMDB_ID. AMOUNT_SOLD) It can be loaded with the following command: $ sqlldr sh/sh control=sh_sales. . CUST_ID. Referential integrety and triggers are disabled during the load. in the acutal imp lementation.ctl direct=true 4. c3 date(8) "DD-MM-YY" ) BEGINDATA 1<tab>X<tab>25-12-00 2<tab>Y<tab>31-12-00 Note: The <tab> placeholder is only for illustration purposes.ctl) loading the sales table: LOAD DATA INFILE sh_sales. This means that essentially INSERT statements are used. CHANNEL_ID. PROMO_ID. SERIALNUMBER. New blocks are written as needed. TIME_ID.4 Creation of new table on basis of existing table: ===================================================== CREATE TABLE EMPLOYEE_2 AS SELECT * FROM EMPLOYEE . Existing used blocks are not used. c2 char. LOGONNAME) Example 4: another controlfile: ------------------------------LOAD DATA INFILE * BADFILE 'd:\stage\loader\load. SOFTWARE. triggers and referential integrety are in normal use. Example 5: ---------The following shows the control file (sh_sales.bad' DISCARDFILE 'd:\stage\loader\load. .

Move AND Size Datafiles. ALTER DATABASE ADD LOGFILE ('/oracle/dbs/log1c. ALTER DATABASE ADD LOGFILE ('/oracle/dbs/log1c. logfiles: ======================================================= 5.1 ADD OR DROP REDO LOGFILE GROUP: =================================== ADD: ---alter database add logfile group 4 ('/db01/oracle/CC1/log_41. '/db02/oracle/CC1/log_42. tablespaces.rdo'. '/oracle/dbs/log2c. Add logfile plus group: ALTER DATABASE ADD LOGFILE GROUP 4 ('/dbms/tdbaeduc/educslot/recovery/redo_logs/ .CREATE TABLE temp_jan_sales NOLOGGING TABLESPACE ts_temp_sales AS SELECT * FROM sales WHERE time_id BETWEEN '31-DEC-1999' AND '01-FEB-2000'. insert into DSA_IMPORT SELECT * FROM MDB_DW_COMPONENTEN@SALES 4.6 Simple differences between table versions: ============================================== SELECT * FROM new_version MINUS SELECT * FROM old_version.rdo') SIZE 500K. Add. insert into t SELECT * FROM t2. ======================================================= 5. '/oracle/dbs/log2c. SELECT * FROM old_version MINUS SELECT * FROM new_version.rdo'.rdo') SIZE 500K.dbf') size 5M.dbf'.5 Copy commAND om data uit een remote database te halen: ========================================================== set copycommit 1 set arraysize 1000 copy FROM HR/PASSWORD@loc create EMPLOYEE using SELECT * FROM employee WHERE state='NM' 4.

TO_CHAR(first_time. next_change# FROM gv$log_history. 10M.log') SIZE 50M.log') ('/u03/oradata/redo3a. first_change#. first force a log switch to occur.'/u08/oradata/redo4b. 10M -.) -You can drop an online redo log group only if it is inactive.log') SIZE SIZE SIZE SIZE 10M.redo04. 10M -. DROP: -----An instance requires at least two groups of online redo log files.'/u07/oradata/redo3b.'MM-DD-YY HH12:MIPM').log'.log'SIZE '/u02/oradata/redo02. 10M.Forcing log file switches .dbf' to group 4.'/u05/oradata/redo1b.log'. 10M.2 ADD REDO LOGFILE MEMBER: ============================ alter database add logfile member '/db03/oracle/CC1/log_3c.log'SIZE '/u04/oradata/redo04. If you need to drop the current group. 10M.LOG'.log'.'/u06/oradata/redo2b.log') ('/u02/oradata/redo2a. ALTER DATABASE DROP LOGFILE 'G:\ORADATA\AIRM\REDO02. ALTER DATABASE ADD LOGFILE ('G:\ORADATA\AIRM\REDO05. ALTER DATABASE ADD LOGFILE GROUP 5 ('/dbms/tdbaeduc/educslot/recovery/redo_logs/ redo05. -.Log Files Without Redundancy LOGFILE GROUP GROUP GROUP GROUP 1 2 3 4 '/u01/oradata/redo01.log'SIZE '/u03/oradata/redo03.log'. Note: More on ONLINE LOGFILES: ------------------------------.log') SIZE 50M.LOG') SIZE 20M. View information on log file history SELECT thread#. regardless of the number of members in the groups. 5.Log Files With Redundancy LOGFILE GROUP 1 GROUP 2 GROUP 3 GROUP 4 ('/u01/oradata/redo1a.log'SIZE 10M.log') ('/u04/oradata/redo4a. ALTER DATABASE DROP LOGFILE GROUP 3. (A group is one or more memb ers.Related Queries View information on log files SELECT * FROM gv$log.

Use this version of clearing a log file if the corrupt log file has not been archived. ALTER DATABASE CLEAR LOGFILE GROUP 4. SHUTDOWN. host $ cp /u03/logs/log1a.log') SIZE 100M.log /u05/logs/log1b. Managing Log File Groups Adding a redo log file group ALTER DATABASE ADD LOGFILE ('<log_member_path_and_name>'. -.log /u04/logs/log1a. ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP 3.log' TO '/u04/oradata/log1a.rdo'.log'.Clear A Log File If It Has Become Corrupt ALTER DATABASE CLEAR LOGFILE GROUP <group_number>. Relocating redo log files ALTER DATABASE RENAME FILE '<existing_path_and_file_n ame>' TO '<new_path_and_file_name>'.log'. -.log $ exit startup mount ALTER DATABASE RENAME FILE '/u03/logs/log1a.Clear A Log File If It Has Become Corrupt And Avoid Archiving ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP <group_number>. '/oracle/dbs/log2c. conn / as sysdba SELECT member FROM v_$logfile. This statement overcomes two situations where dropping redo logs is not possible : If there are only two log groups The corrupt redo log file belongs to the current group.ALTER SYSTEM SWITCH LOGFILE.log' TO '/u05/oradata/log1b.rdo') SIZE 500K. Adding a redo log file group and specifying the group number ALTER DATABASE ADD LOGFILE GROUP <group_number> ('<log_member_path_and_name>') SIZE <integer> <K|M>. -.log $ cp /u03/logs/log1b. ALTER DATABASE RENAME FILE '/u04/logs/log1b. ALTER DATABASE OPEN host $ rm /u03/logs/log1a. ALTER DATABASE ADD LOGFILE ('/oracle/dbs/log1c.log . ALTER DATABASE ADD LOGFILE GROUP 4 ('c:\temp\newlog1. '<log_member_path_and_name>') SIZE <integer> <K|M>.

rdo' TO GROUP 2.log $ exit SELECT member FROM v_$logfile. CREATE TABLE test AS SELECT owner. ALTER DATABASE DROP LOGFILE MEMBER '/oracle/dbs/log3c. conn / as sysdba SELECT ((SYSDATE-1/1440)-TO_DATE('01/01/2007'. Disable Log Archiving Stop log file archiving The following is undocumented and unsupported and should be used only with great care and following through tests.log' TIME MI N 579354757. ALTER DATABASE ADD LOGFILE MEMBER '/oracle/dbs/log2b. INSERT INTO test (owner. object_type FROM all_objects WHERE SUBSTR(object_name. Drop a redo log file group ALTER DATABASE DROP LOGFILE GROUP <group_number>. or ALTER SYSTEM DUMP LOGFILE '<logfile_path_and_name>' TIME MIN <value> TIME MIN <value> conn uwclass/uwclass alter session set nls_date_format='MM/DD/YYYY HH24:MI:SS'. object_name.rdo'. Managing Log File Members Adding log file group members ALTER DATABASE ADD LOGFILE MEMBER '<log_member_pat h_and_name>' TO GROUP <group_number>. Dropping log file group members ALTER DATABASE DROP LOGFILE MEMBER '<log_member_ path_and_name>'. ALTER DATABASE DROP LOGFILE GROUP 4. SELECT SYSDATE FROM dual. object_type) VALUES ('UWCLASS'. object_name.1. COMMIT. Dumping Log Files Dumping a log file to trace ALTER SYSTEM DUMP LOGFILE '<logfile_path_and_name>' DBA MIN <file_number> <block_number> DBA MAX <file_number> <block_number>.'MM/DD/YYYY'))*86400 ssec FROM dual.$ rm /u03/logs/log1b. 'TEST'). One might consider th . ALTER SYSTEM DUMP LOGFILE 'c:\oracle\product\oradata\orabase\redo01. 'log_dump'.1) BETWEEN 'A' AND 'W'.

old dirty buffers get written to disk. ALTER SYSTEM SET "_disable_logging"=TRUE. old buffers get overwritten. ALTER DATABASE NOARCHIVELOG.dbf' rezise 400M. I was quite happy to restore the test database back from backup. ~ the above paraphrased from a private email from Richard Foote. STARTUP MOUNT EXCLUSIVE.dbf' autoextend off. By disabling logging. The AUTOEXTEND option cannot be turned OFF at for the entire tablespace with a single command.dbf' rezise 400M. The buffer cache works in exactly th e same way. I completed the task in hours and if anything untoward were to have happened. 5.dbf' size 50M autoextend ON maxsize unlimited. (increase or decrease size) 5.4 ADD FILE TO TABLESPACE: =========================== alter tablespace DATA add datafile '/db05/oracle/CC1/data02.is for loading a data warehouse. alter database datafile '/oradata/temp/temp. Be sure to restart logging as soon as the load is complete or the system will be at extremely high risk.3 RESIZE DATABASE FILE: ========================= alter database datafile '/db05/oracle/CC1/data01. ALTER DATABASE OPEN. 5. Each datafile within the tablespace must explicitly turn off the AUTOEXTEND option via the ALTER DATABASE command.5 ALTER STORAGE FOR FILE: =========================== alter database datafile '/db05/oracle/CC1/data01. . The rest of the database remains unchanged. I used it in a very large test environment where I wanted to perform a massive a mount of changes (a process to convert blobs to clobs actually) and it was going to take days to complete.dbf' autoextend ON maxsize unlimited. (increase or decrease size) alter tablespace DATA datafile '/db05/oracle/CC1/data01. It's just the process of physically flushing the redo buffer that gets disabled. conn / as sysdba SHUTDOWN.

log'.log'.log' to '/dbms/tdbaplay/playdw hs/recovery/redo_logs/redo01. alter database rename file '/dbms/tdbaplay/playdwhs/database/playdwhs/redo03. alter database rename file '/dbms/tdbaplay/playdwhs/database/playdwhs/redo02.log'.log' to '/dbms/tdbaplay/playdw hs/recovery/redo_logs/redo03.7 MOVE OF REDO LOG FILE: ========================== connect internal shutdown mv /db05/oracle/CC1/redo01.log' to '/dbms/tdbaplay/playdw hs/recovery/redo_logs/redo02.dbf'.dbf'.dbf' to '/db02/oracle/CC1/data01. alter database open.dbf'.dbf' to '/dbms/tdbaplay/play dwhs/database/default/sysaux01. alter database rename file '/dbms/tdbaplay/playdwhs/database/playdwhs/system01.dbf' to '/dbms/tdbaplay/playdw hs/database/default/temp01.dbf'.dbf'.dbf' to '/dbms/tdbaplay/play dwhs/database/default/system01. 5.dbf /db02/oracle/CC1 connect / as SYSDBA startup mount CC1 alter database rename file '/db01/oracle/CC1/data01.6 MOVE OF DATA FILE: ====================== connect internal shutdown mv /db01/oracle/CC1/data01.dbf' to '/dbms/tdbaplay/pla ydwhs/database/default/undotbs01. alter database rename file '/dbms/tdbaplay/playdwhs/database/playdwhs/temp01.+447960585647 5. alter database rename file '/dbms/tdbaplay/playdwhs/database/playdwhs/sysaux01. alter database rename file '/dbms/tdbaplay/playdwhs/database/playdwhs/undotbs01.dbf'. alter database rename file '/dbms/tdbaplay/playdwhs/database/playdwhs/users01. alter database rename file '/dbms/tdbaplay/playdwhs/database/playdwhs/redo01.dbf' to '/dbms/tdbaplay/playd whs/database/default/users01.dbf /db02/oracle/CC1 .

log' to '/u02/oradata/spltst1/redo03. alter database open.10 CREATE TABLESPACE STORAGE PARAMETERS: ========================================== locally managed 9i style: . alter tablespace data online.log'.9 ALTER DEFAULT STORAGE: ========================== alter tablespace AP_INDEX_SMALL default storage (initial 5M next 5M pctincrease 0).log /u02/oradata/spltst1/ startup mount pfile=/apps/oracle/admin/SPLTST1/pfile/init. 5. alter database datafile 8 offline.connect / as SYSDBA startup mount CC1 alter database rename file '/db05/oracle/CC1/redo01. in case of problems: ALTER DATABASE CLEAR LOGFILE GROUP n example: -------shutdown immediate op Unix: mv /u01/oradata/spltst1/redo01. alter database rename file '/u03/oradata/spltst1/redo03.dbf' to '/db02/oracle/CC1/redo01.log /u02/oradata/spltst1/ mv /u03/oradata/spltst1/redo03. 5.dbf'.ora alter database rename file '/u01/oradata/spltst1/redo01. 5. alter database datafile 8 online.log' to '/u02/oradata/spltst1/redo01.log'.8 Put a datafile or tablespace ONLINE or OFFLINE: =================================================== alter tablespace data offline. alter database open.

. CREATE TABLESPACE CISTS_01 DATAFILE '/u07/oradata/spldevp/cists_01.dbf' SIZE 100M EXTENT MANAGEMENT LOCAL UNIFORM SIZE CREATE TEMPORARY TABLESPACE TEMP TEMPFILE '/u07/oradata/spldevp/temp01.DBF' SIZE 100M EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT AUTO.dbf' SIZE 120 0M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K. -.dbf' SIZE 400 M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K.dbf' SIZE 3000M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 64K. 1M is default: ------------------------------CREATE TABLESPACE LOBS DATAFILE 'f:\oracle\oradata\pegacc\lobs01. CREATE TABLESPACE PUB DATAFILE 'C:\ORACLE\ORADATA\TEST10G\PUB. CREATE TABLESPACE RMAN DATAFILE 'C:\ORACLE\ORADATA\RMAN\RMAN.dbf' SIZE 50M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K.DBF' SIZE 50M EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT AUTO. CREATE TABLESPACE CISTS_01 DATAFILE '/u01/oradata/spldev1/cists_01. CREATE TABLESPACE CISTS_01 DATAFILE '/u04/oradata/pilactst/cists_01.dbf' SIZE 3000 M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M. CREATE TABLESPACE USERS DATAFILE '/u06/oradata/splpack/users01. ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP.dbf' size 100M extent management local autoallocate. CREATE TABLESPACE LOBS2 DATAFILE 'f:\oracle\oradata\pegacc\lobs02. CREATE TABLESPACE INDX DATAFILE '/u06/oradata/splpack/indx01.dbf' SIZE 200M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 10M.dbf' SIZE 1000M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K. ALTER TABLESPACE CISTS_01 ADD DATAFILE '/u03/oradata/splplay/cists_02.DBF' SIZE 50M EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT AUTO.-. CREATE TABLESPACE STAGING DATAFILE 'C:\ORACLE\ORADATA\TEST10G\STAGING.uniform size.autoallocate: ---------------CREATE TABLESPACE DEMO DATAFILE '/u02/oracle/data/lmtbsb01.dbf' SIZE 10 00M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K.

temporary tablespace: -----------------------CREATE TEMPORARY TABLESPACE TEMP TEMPFILE '/u04/oradata/pilactst/temp01.dbf' SIZE 200M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 10M.segment management manual or automatic: -. create user cisuser identified by cisuser default tablespace cists_01 temporary tablespace temp. alter tablespace DATA add datafile '/db05/oracle/CC1/data02. grant connect to cisuser. grant resource to cisuser.ALTER TABLESPACE UNDOTBS ADD DATAFILE '/dbms/tdbaprod/prodross/database/default/undotbs03. To specify manual space management.--------------------------------------We can have a locally managed tablespace. create user cisread identified by cisread default tablespace cists_01 temporary tablespace temp. grant resource to cisadm. create user cisadm identified by cisadm default tablespace cists_01 temporary tablespace temp. or if you want segement space management to be automatic: CREATE TABLESPACE INDX2 DATAFILE '/u06/oradata/bcict2/indx09.dbf' SIZE 5000M EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT AUTO. but the segment space management. -. grant resource to cisread.dbf' SIZE 2000M . . grant connect to cisadm. grant connect to cisread. be still used manually. -.dbf' size 50M autoextend ON maxsize unlimited.dbf' SIZE 5000M EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT MANUAL. use the SEGMENT SPACE MANAGEMENT MANUAL clau se CREATE TABLESPACE INDX2 DATAFILE '/u06/oradata/bcict2/indx09. via the free lists and the pct_free and pct_used parameters.

dbf 3 /u03/oradata/bcict2/temp02. alter tablespace UNDO add file '/u04/oradata/bcict2/undo07.: SQL> SET lines 200 SQL> CREATE TEMPORARY TABLESPACE temp2 TEMPFILE 'M:\ORACLE\ORADATA\M9204WA\TEMP201. add the tempfile(s): SQL> SET lines 200 SQL> SELECT status.dbf' SIZE 5000M. The AUTOALLOCATE clause is not allowed for temporary tablespaces.dbf ALTER DATABASE TEMPFILE '/u02/oracle/data/lmtemp02.DBF' SIZE 100m AUTOEXTEND ON . but the files are missing on disk.dbf' SIZE 5000M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 100M. no rows selected SQL> ALTER TABLESPACE temp ADD TEMPFILE 'M:\ORACLE\ORADATA\M9204WA\TEMP01.DBF' R EUSE. you can do so as shown in the above statement. ALTER DATABASE datafile '/u04/oradata/bcict2/undo07.dbf' size 500M. The Oracle default f or SIZE is 1M. e.dbf' DROP INCLUDING DATAFILES. or: If the controlfile has a reference to the tempfile(s). alter tablespace TEMP add tempfile '/u04/oradata/bcict2/temp02. 1 /u03/oradata/bcict2/temp. CREATE TEMPORARY TABLESPACE TEMP2 TEMPFILE '/u04/oradata/bcict2/temp01.CREATE TEMPORARY TABLESPACE TEMP TEMPFILE '/u04/oradata/bcict2/tempt01. If you get errors: -----------------If the controlfile does not have any reference to the tempfile(s). But if you want to specify another value for SIZE. ALTER TABLESPACE TEMP ADD TEMPFILE '/u04/oradata/bcict2/tempt4.g.dbf' RESIZE 3000M. enabled.dbf' SIZE 5000M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 100M. re-create the temporary tablespace.dbf 2 /u03/oradata/bcict2/temp01. The extent management clause is optional for temporary tablespaces because all t emporary tablespaces are created with locally managed extents of a uniform size. name FROM v$tempfile.dbf' SIZE 5000M.

SQL> DROP TABLESPACE temp.ROLLBACK TABLESPACE: -.DBF' SIZE 100m AUTOEXTEND ON NEXT 100M MAXSIZE 2000M.dbf' SIZE 2000M REUSE AUTOEXTEND ON NEXT 1024K MAXSIZE UNLIMITED . CREATE TABLESPACE "USERS" LOGGING DATAFILE '/u02/oradata/pegacc/users01.dbf' SIZE 2M REUSE AUTOEXTEND ON.dbf' SIZE 20M REUSE AUTOEXTEND ON NEXT 1024K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO . SQL> SHUTDOWN IMMEDIATE SQL> STARTUP SQL> DROP TABLESPACE temp2 INCLUDING CONTENTS AND DATAFILES. SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp2.-------------------create tablespace RBS datafile '/disk01/oracle/oradata/DB1/rbs01. -.dbf' SIZE 20M REUSE AUTOEXTEND ON NEXT 1024K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO .---------------CREATE UNDO TABLESPACE undotbs_02 DATAFILE '/u01/oracle/rbdb1/undo0201.dbf' SIZE 100M REUSE AUTOEXTEND ON NEXT 1024K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO . CREATE TABLESPACE "INDX" LOGGING DATAFILE '/u02/oradata/pegacc/indx01. ALTER SYSTEM SET UNDO_TABLESPACE = undotbs_02. SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp. ################################################################################ ####### CREATE TABLESPACE "DRSYS" LOGGING DATAFILE '/u02/oradata/pegacc/drsys01.NEXT 100M MAXSIZE 2000M. CREATE TABLESPACE "XDB" LOGGING DATAFILE '/u02/oradata/pegacc/xdb01.undo tablespace: -.dbf' SIZE 1000M REUSE AUTOEXTEND ON NEXT 1024K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO . CREATE TABLESPACE "TOOLS" LOGGING DATAFILE '/u02/oradata/pegacc/tools01. CREATE TABLESPACE "LOBS" LOGGING DATAFILE '/u02/oradata/pegacc/lobs01. SQL> CREATE TEMPORARY TABLESPACE temp TEMPFILE 'M:\ORACLE\ORADATA\M9204WA\TEMP01.dbf' size 25M default storage ( initial 500K next 500K pctincrease 0 minextents 2 ). -.dbf' SIZE 100M REUSE AUTOEXTEND ON NEXT 1024K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO .

EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M . Unlike the C_TS# cluster. the number of free extents in a tablespace should never be greater than can be recorded in the primary cluster block for that tablespace. Unfortunately. which is about 500 free extents for a database with an 8K d atabase block size. then cluster block chaining wil l occur which can significantly impact performance on the data dictionary and space management transactions in p articular. then creating segments with thousands of extents (like mentioned in the previous section) will cause ex cessive cluster block chaining in this cluster.u et$. or freed fo r reuse. Although. if a tablespace h as more free extents than can be contained in a single cluster block. Oracle updates these tables in the data dictionary whenever an extent is allocated. uet$. Used extents. Preferably. ################################################################################ ####### General form of a 8i type statement: CREATE TABLESPACE DATA DATAFILE 'G:\ORADATA\RCDB\DATA01.DBF' size 100M EXTENT MANAGEMENT DICTIONARY default storage ( initial 512K next 512K minextents 1 pctincrease 0 ) minimum extent 512K logging online peRMANENTt. one block will be reserved in the cluster for each tablespace. Because it is created with out a SIZE clause. are recorded in the data dictionary table sys. The sys. which is clustered in the C_FILE#_BLOCK# cluster. The major dilemma with an excessive number of used and/or free extents is that they can . This is the default in Oracle8i when no extent management clause is used in the CREATE TABLESPACE st atement. you are specifying that extent management for segments in this tablespace will be managed using the dictionary tables sys.fet$ and sys. More info: ---------By declaring a tablespace as DICTIONARY managed. Unless your data dictionary wa s specifically customized prior to database creation to allow for more used extents per segment . on the other hand. chaining in this cluster cannot be repaired without recreating the entire databa se.fet$ table is clustered in the C_TS# cluster. C_FILE#_BLOCK# is sized on the assumption that segments will have an average of just 4 or 5 extents each.

For a database with a db block size of 8K. Take for example a query against D BA_EXTENTS. alter table emp . then the default extent management for any new tablespace is dictionary managed in Oracle9i. not because of the impact of full table scans. used extents are only recorded in the extent map in the segment header block of each segment. If COMPATIBLE is set to 9. that this information is not cached in the dictionary cache .0. Keep in mind though. but rather th e performance of the data dictionary and dictionary cache.dbf'. Extents shoul d therefore not be allowed to grow into the thousands.7.misrepresent the operations of the dictionary cache LRU mechanism.11 DEALLOCATE EN OPSPOREN VAN UNUSED SPACE IN EEN TABLE: ========================================================== alter table emp deallocate unused. When the extents are allocated or freed for reu se. It is for this reason that it is recommended that the number of extents per segm ent in locally managed tablespaces be limited to the number of rows that can be contained in the extent map with th e segment header block. in add itional extent map blocks within the segment. the above formula would be 505 extents. These changes do not gen erate rollback information because they do not update tables in the data dictionary (except for tablespace quota information). Ea ch bit in the bitmap corresponds to a block or a group of blocks.0. and if necessary.(db_block_size / 16) . This query would be required to read every segment header and every additional extent map block i n the entire database. Drop a tempfile from the TEMP tablespace: alter tablespace TEMP drop tempfile '/dbms/tdbaaccp/accproca/database/default/temp02. Oracle simply changes the bitmap values to show the new status of the blocks. While free space is represented in a bitmap within the tablespace. then the default extent mana gement for any new tablespace is locally managed in Oracle9i. This is the default in Oracle9i.0.0. that involves I/O and potentially lots of it. A Locally Managed Tablespace is a tablespace that manages its own extents by mai ntaining a bitmap in each datafile to keep track of the free or used status of blocks in that datafile. This would be approximately . and if those blocks are not in th e buffer cache. 5. If COMPATIBLE is less than 9. It must be obtained from the database block every time that it is required.

-. dbms_output. dbms_output. var3 number.STORAGE PARAMETERS EXAMPLE: -.put_line('OBJECT_NAME = NOG ZON SLECHTE INDEX'). name varchar(2) ) tablespace users pctfree 10 storage (initial 1024K next 1024K pctincrease 10 minextents 2).12 CREATE TABLE: ================== -. var6. var4. var5. var3.put_line('UNUSED_BYTES ='||var4).--------------------------create table emp ( id number. dbms_output. var7 number. var2 number. dbms_output. dbms_output. / 5. var1. dbms_output.unused_space('AUTOPROV1'. var7). dbms_output. var5 number. Deze datafile moet in dezelfde tablespace bestaan. 'INDEX'. dbms_output. end.put_line('LAST_USED_BLOCK ='||var7). var4 number. alter table emp allocate extent ( size 100K datafile '/db05/oradata/CC1/user05.deallocate unused keep 100K. var6 number. 'MACADDRESS_INDEX'. ALTER a COLUMN: =============== .put_line('UNUSED_BLOCKS ='||var3).gebruik van de dbms_space.unused_space package declare var1 number.dbf').put_line('TOTAL_BLOCKS ='||var1). begin dbms_space. var2.put_line('LAST_USED_EXTENT_FILE_ID ='||var5).put_line('TOTAL_BYTES ='||var2).put_line('LAST_USED_EXTENT_BLOCK_ID ='||var6).

. NAAM VARCHAR2 (30) NOT NULL. insert into DSA_IMPORT SELECT * FROM MDB_DW_COMPONENTEN@SALES -.Creation of new table on basis of existing table: -.NEXTVAL INTO :NEW.------------------------------------------------CREATE TABLE EMPLOYEE_2 AS SELECT * FROM EMPLOYEE insert into t SELECT * FROM t2. CREATE SEQUENCE seq_employee INCREMENT BY 1 START WITH 1218 MAXVALUE 99999 NOCYCLE. CREATE TABLE CUSTOMER ( CUSTOMER_ID NUMBER (10) NOT NULL.ALTER TABLE GEWEIGERDETRANSACTIE MODIFY (VERBRUIKTIJD DATE).CUSTOMER_ID FROM dual.Creation of a table with an autoincrement: -. CREATE SEQUENCE seq_a INCREMENT BY 1 START WITH 1 MAXVALUE 99999 NOCYCLE. CREATE OR REPLACE TRIGGER tr_CUSTOMER_ins BEFORE INSERT ON CUSTOMER FOR EACH ROW BEGIN SELECT seq_customer. CONSTRAINT PK_CUSTOMER PRIMARY KEY ( CUSTOMER_ID ) USING INDEX TABLESPACE INDX PCTFREE 10 STORAGE ( INITIAL 16K NEXT 16K PCTINCREASE 0 )) TABLESPACE USERS PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 80K NEXT 80K PCTINCREASE 0 MINEXTENTS 1 MAXEXTENTS 2147483645 ) NOCACHE. -. END.-----------------------------------------CREATE SEQUENCE seq_customer INCREMENT BY 1 START WITH 1 MAXVALUE 99999 NOCYCLE.

5.VERBRUIKID FROM dual.online 8.NEXTVAL INTO :NEW. -. you can just do: create index cust_indx on customers(id) nologging. CREATE OR REPLACE TRIGGER tr_PARENTEENHEID_ins BEFORE INSERT ON PARENTEENHEID FOR EACH ROW BEGIN SELECT seq_brains_verbruik. In situations where you have B*-tree index leaf blocks that can be freed up for reuse. END.16 or higher NOLOGGING TABLESPACE INDEX_BIG PCTFREE 10 STORAGE ( INITIAL 5M NEXT 5M pctincrease 0 ). This statement is without storage parameters. If you have a LMT.CREATE SEQUENCE seq_brains_verbruik INCREMENT BY 1 START WITH 1750795 MAXVALUE 100000000 NOCYCLE. you can merge those leaf blocks using the following statement: ALTER INDEX vmoore COALESCE. ALTER INDEX emp_ename INITRANS 5 MAXTRANS 10 STORAGE (PCTINCREASE 50).13 REBUILD OF INDEX: ====================== ALTER INDEX emp_pk REBUILD -.Basic example of creating an index: CREATE INDEX emp_ename ON emp(ename) TABLESPACE users STORAGE (INITIAL 20K NEXT 20k PCTINCREASE 75) PCTFREE 0.Dropping an index: DROP INDEX emp_ename: . DROP INDEX emp_ename: -.

then you can use any name for the link to sales .com.division3. substr(db_link.14 MOVE TABLE TO OTHER TABLESPACE: ==================================== ALTER TABLE CHARLIE.acme. For example. 5.emp@foo.emp@sales.1. A synonym allows access to a table on a remote database using the same syntax th at you would use to access a table on a local database. you can call the link foo.CUSTOMERS MOVE TABLESPACE USERS2 5.40).EMPLOYEE.acme.com. you can access the remote database as follows: SELECT name FROM scott. You can create the synonym emp for emp@hq.com. substr(host. a user or application can reference remote data as follows: SELECT * FROM scott. # emp table in scott's schema SELECT loc FROM scott.dept@sales. For example.com so that you can issue the following query instead to access the same data: SELECT * FROM emp.acme. For example.com.10). View DATABASE LINKS: select substr(owner. substr(username.acme. If GLOBAL_NAMES is set to FALSE. # link name different FROM global name Synonyms for Schema Objects: Oracle lets you create synonyms so that you can hide the database link name FROM the user. created from dba_db_links .25).division3. Then.division3.division3.acme.acme.1.16 DATABASE LINK: =================== CREATE PUBLIC DATABASE LINK SALESLINK CONNECT TO FRONTEND IDENTIFIED BY cygnusx1 USING 'SALES'.1.15 SYNONYM (pointer to an object): ==================================== example: create public synonym EMPLOYEE for HARRY.5.com. assume you issue the followi ng query against a table in a remote database: SELECT * FROM emp@hq.1.50). SELECT * FROM employee@MY_LINK. using a database link to database sales.

package COMPILE specification/body/package example ALTER PACKAGE emp_mgmt COMPILE PACKAGE.function COMPILE.5. ALTER PROFILE EXTERNLIMIT LIMIT SESSIONS_PER_USER 20 IDLE_TIME 20.17 TO CLEAR TABLESPACE TEMP: ============================== alter tablespace TEMP default storage (pctincrease 0).remove_emp COMPILE. ALTER PROFILE EXTERNLIMIT LIMIT PASSWORD_REUSE_TIME 90 PASSWORD_REUSE_MAX UNLIMITED.procedure COMPILE. TO FIND OBJECTS: SELECT 'ALTER '||decode( object_type. alter session set events 'immediate trace name DROP_SEGMENTS level TS#+1'.object_type) ||' '||owner ||'. 5. 'PACKAGE SPECIFICATION' . example: ALTER FUNCTION oe. ALTER USER GERRIT PROFILE DEVELOPER. 5.get_bal COMPILE. CREATE PROFILE PRIOLIMIT LIMIT SESSIONS_PER_USER 10. ALTER PROCEDURE schema. 'PACKAGE SPECIFICATION' .'PACKAGE' . PACKAGE. PROCEDURE: =============================================== ALTER FUNCTION schema.'PACKAGE BODY' . ALTER PACKAGE schema.18 RENAME OF OBJECT: ====================== RENAME sales_staff TO dept_30.'PACKAGE' . RENAME emp2 TO emp.19 CREATE PROFILE: ==================== CREATE PROFILE DEVELOPER LIMIT IDLE_TIME 10. 5.'|| object_name ||' COMPILE ' ||decode( object_type. example ALTER PROCEDURE hr.20 RECOMPILE OF FUNCTION.

To create a package body we now specify each PL/SQL block that makes up the pack age. The package body contains the public and private PL/SQL blocks which make up the application. FUNCTION MYFUNC1. .'PACKAGE BODY' .175) WHERE ISBN = REQISBN. MYVAR1 IN OUT CHAR. END MYPACK1.21 CREATE PACKAGE: ==================== A package is a set of related functions and / or routines.TCOST OUT NUMBER). IF TEMP_COST > 0 THEN UPDATE JD11. 5.'SPECIFACTION' . Packages consist of a specificati on and a body. private blocks are not defined in the package specification and cannot be called by any routine other than one defined within the package body. Packages are used to group together PL/SQL code blocks which make up a common ap plication or are attached to a single business function. An example follows :CREATE OR REPLACE PACKAGE BODY MYPACK1 AS PROCEDURE MYPROC1 (REQISBN IN NUMBER. COMMIT. NULL) ||'.BOOK SET COST = (TEMP_COST*1. ELSE UPDATE JD11.2)) IS BEGIN SELECT COST FROM JD11. END IF.32 WHERE ISBN = REQISBN.BOOK SET COST = 21.' FROM dba_objects WHERE status = 'INVALID'.'BODY' . allow you to update the blocks that make up the package bod y without affecting the specification (which is the object that users have rights to) and allow you to grant execute rights once instead of for each and every block. TCOST OUT NUMBER) TEMP_COST NUMBER(10. The package specification lists the public interfaces to the blocks within the p ackage body. note that we are not creating these blocks separately (no CREATE OR REPLACE is required for the procedure and function definitions). To create a package specification we use a variation on the CREATE command.BOOK INTO TEMP_COST WHERE ISBN = REQISBN. The benefits of packages are that they improve the organisation of procedure and function blocks. MYVAR1 IN OUT CHAR. TCOST := TEMP_COST.. An example follows :CREATE OR REPLACE PACKAGE MYPACK1 AS PROCEDURE MYPROC1 (REQISBN IN NUMBER. all we need put in the specification is each PL/SQL block header that will be public within the package.

2). SUSPEND/RESUME. 5. FLUSH SHARED_POOL. PROCEDURE increase_comm(employee_id NUMBER. BEGIN SELECT COST FROM JD11. 5.ERRORS (CODE. PROCEDURE remove_dept(department_id NUMBER).MYFUNC1 . location NUMBER) RETURN NUMBER. SWITCH LOGFILE.23 ALTER SYSTEM: ================== ALTER ALTER ALTER ALTER ALTER ALTER SYSTEM SYSTEM SYSTEM SYSTEM SYSTEM SYSTEM CHECKPOINT. FUNCTION MYFUNC1 RETURN NUMBER IS RCOST NUMBER(10. You can use DROP PACKAGE and DROP PACKAGE BODY to remove the p ackage objects FROM the database. MESSAGE) VALUES(99. 'ISBN NOT FOUND'). You can execute a public package block like this :EXECUTE :PCOST := JD11. salary_incr NUMBER). PROCEDURE remove_emp(employee_id NUMBER). . END MYFUNC1. SET RESOURCE_LIMIT = TRUE.EXCEPTION WHEN NO_DATA_FOUND THEN INSERT INTO JD11. / Before you can call this package's procedures and functions. CREATE OR REPLACE PACKAGE schema.package CREATE PACKAGE emp_mgmt AS FUNCTION hire (last_name VARCHAR2. commission_pct NUMBER. FUNCTION create_dept(department_id NUMBER.BOOK INTO RCOST WHERE ISBN = 21. END emp_mgmt. END MYPACK1. department_id NUMBER) RETURN NUMBER. manager_id NUMBER. RETURN (RCOST). no_sal EXCEPTION. you must define these procedures and functions in the package body.22 View a view: ================= set long 2000 SELECT text FROM sys. no_comm EXCEPTION.MYPACK1. END MYPROC1. ENABLE/DISABLE RESTRICTED SESSION. comm_incr NUMBER).dba_views WHERE view_name = 'CONTROL_PLAZA_V'. PROCEDURE increase_sal(employee_id NUMBER. job_id VARCHAR2. salary NUMBER.WHERE JD11 is the schema name that owns the package.

CREATE VIEW X AS SELECT * FROM gebruiker@aptest 5. create user jaap identified by jaap default tablespace users temporary tablespace temp. ALTER SYSTEM SET GLOBAL_NAMES=FALSE. grant connect to jaap. 5.40-length(size_tab. alter index HEAT_CUSTOMER_POSTAL_CODE rebuild.size_col)/2.0' SCOPE=SPFILE.26 CREATE A VIEW: =================== CREATE VIEW v1 AS SELECT LPAD(' '. ALTER TRIGGER Reorder ENABLE. 5.2. 5. Or in 1 time for all triggers on a table: ALTER TABLE Inventory DISABLE ALL TRIGGERS. ALTER SYSTEM SET COMPATIBLE = '9.27 MAKE A USER: ================= CREATE USER jward IDENTIFIED BY aZ7bC2 DEFAULT TABLESPACE data_ts QUOTA 100M ON test_ts QUOTA 500K ON data_ts TEMPORARY TABLESPACE temp_ts PROFILE clerk.25 DIASABLING AND ENABLING AN INDEX: ====================================== alter index HEAT_CUSTOMER_POSTAL_CODE unusable. grant resource to jaap. GRANT connect TO jward.ALTER SYSTEM SET LICENSE_MAX_USERS = 300. Dynamic queries: .' ') size_col FROM size_tab.24 HOW TO ENABLE OR DISABLE TRIGGERS: ======================================= Disable enable trigger: ALTER TRIGGER Reorder DISABLE.

SELECT 'GRANT reSource to '||USERNAME||'. SELECT 'ALTER TABLE RM_LIVE. .'MDSYS').'OUTLN'. SELECT 'GRANT CREATE SeSSion to '||USERNAME||'. SELECT 'GRANT unlimited tableSpace to '||USERNAME||'. SELECT 'GRANT connect to '||USERNAME||'.'SYSTEM'.'ORDSYS'.'CTXSYS'.CREATE USER AND GRANT PERMISSION STATEMENTS -. Becoming another user: ====================== .'||table_name||' disable constraint '||constraint_na me||'.' FROM DBA_USERS WHERE USERNAME NOT IN ('SYS'. You can use sequences to automatically generate primary key values.'ORDSYS'.----------------.Do the query: select 'ALTER USER '||username||' IDENTIFIED BY VALUES '||''''||password||''''|| '.'ORDSYS'.'MDSYS').' from dba_constraints where owner='RM_LIVE' and CONSTRAINT_TYPE='P'.'OUTLN'.'CTXSYS'.'MDSYS').'CTXSYS'.'ORDSYS'.'CTXSYS'.28 CREATE A SEQUENCE: ======================= Sequences are database objects from which multiple users can generate unique int egers.'SYSTEM'.' FROM DBA_USERS WHERE USERNAME NOT IN ('SYS'.'||table_name||' disable constraint '||constraint_na me||'.' from dba_constraints where owner='RM_LIVE' and CONSTRAINT_TYPE='R'.do what you need to do as the other account . 5.'CTXSYS'.change the password .'OUTLN'.' FROM DBA_USERS WHERE USERNAME NOT IN ('SYS'.'SYSTEM'.grant <other roles or permissions> to <user> SELECT 'ALTER TABLE RM_LIVE.' FROM DBA_USERS WHERE USERNAME NOT IN ('SYS'.'SYSTEM'.'MDSYS').' from dba_users.'ORDSYS'.'SYSTEM'. CREATE SEQUENCE INCREMENT BY START WITH MAXVALUE <sequence name> <increment number> <start number> <maximum value> .'OUTLN'.dynamic querieS SELECT 'CREATE USER '||USERNAME||' identified by '||USERNAME||' default tableSpa ce '|| DEFAULT_TABLESPACE||' temporary tableSpace '||TEMPORARY_TABLESPACE||'.' FROM DBA_USERS WHERE USERNAME NOT IN ('SYS'.change the password back to the original value -.'MDSYS').'OUTLN'.

29 STANDARD USERS IN 9i: ========================== CTXSYS is the primary schema for interMedia.bsq is run. and ORDPLUGINS are schemas required when installing any of the ca rtridges. Unfortunately.CYCLE .plb is exec uted. are automatically created during database creation : SCOTT by script $ORACLE_HOME/rdbms/admin/utlsampl. ORDSYS. 5. indexes. The OUTLN user owns the package OUTLN_PKG which is used to manage stored outline s and their outline categories. MDSYS. OUTLN is an integral part of the database required for the plan stability featur e in Oracle8i. the OUTLN user is created at database creation time when sql. By default. CREATE SEQUENCE department_seq INCREMENT BY 1 START WITH 1 MAXVALUE 99999 NOCYCLE. ANONYMOUS if catqm.bsq Optionally: DBSNMP if Enterprise Manager Intelligent Agent is installed TRACESVR if Enterprise Manager is installed AURORA$ORB$UNAUTHENTICATED \ AURORA$JIS$UTILITY$ -.30 FORCED LOGGING: ==================== . and synonyms related to t his package. grants. I am not 100% on the steps associated with the MTSSYS user.sql OUTLN by script $ORACLE_HOME/rdbms/admin/sql.sql catalog script for SQL XML management XDB is executed 5.if Oracle Servlet Engine (OSE) is installed OSE$HTTP$ADMIN / MDSYS if Oracle Spatial option is installed ORDSYS if interMedia Audio option is installed ORDPLUGINS if interMedia Audio option is installed CTXSYS if Oracle Text option is installed REPADMIN if Replication Option is installed LBACSYS if Oracle Label Security option is installed ODM if Oracle Data Mining option is installed ODM_MTR idem OLAPSYS if OLAP option is installed WMSYS if Oracle Workspace Manager script owmctab. There are other tables (base tables). MTSSYS is required for the Oracle Service for MTS and is specific to NT. While the interMedia and cartridge schemas can be recreated by running their ass ociated scripts as needed.

Check Hardware Requirements Operating System Software Requirements Java Runtime Environment (JRE) Check Software Limits Setup the Solaris Kernel Create Unix Group «dba» Create Unix User «oracle» Setup ORACLE environment ($HOME/.2.profile) as follows .ORA and S QLNET.1.ORA.com) The following. ==================================================== ORACLE INSTALLATIONS ON SOLARIS. AIX. except those in temporary t ablespaces. LISTENER. ALTER TABLESPACE TDBA_CDC NO FORCE LOGGING.2. you can download our SQLNET configuration files TNSNAMES. ALTER DATABASE DROP SUPPLEMENTAL LOG DATA. short Installation Guide shows how to install Oracle 9. Install Oracle 92 on Solaris: ================================== 6. If a database is in force logging mode. all changes.0 on SUN Solaris 8 -------------------------------------------------------------------------------The Oracle 9i Distribution can be found on Oracle Technet (http://technet.oracle . VMS: ==================================================== 6: 7: 8: 9: Install Install Install Install on on on on Solaris Linux OpenVMS AIX ================================== 6. A force logging might take a while to complete b ecause alter database add supplemental log data.ORA. we suggest this way and NOT u sing DBASSIST.alter database no force logging. You may download our scripts to create a database. will be logged.1 Tutorial 1: =============== Short Guide to install Oracle 9. LINUX.0 for SU N Solaris 8. Besides this scripts. It is also possible to put arbit rary tablespaces into force logging mode: alter tablespace force logging. independently from any nologging specification.

ORACLE_HOME = /opt/oracle/product/9.loc File Install with Installer in interactive mode Create the Database Start Listener Automatically Start / Stop the Database Install Oracle Options (optional) Download Scripts for Sun Solaris For our installation.Read the README File included in the Patch .com . . please a djust these parameters for your own environment.sun.com) Operating System Software Requirements Use the latest kernel patch from Sun Microsystems. enter the following co mmand and multiply the BLOCKS column by 512.sun. or Unpacking downloaded installation files Check oraInst.0 ORACLE_SID = TYP2 -------------------------------------------------------------------------------Check Hardware Requirements Minimal Memory: 256 MB Minimal Swap Space: Twice the amount of the RAM To determine the amount of RAM memory installed on your system./install_custer cat /var/sadm/install_data/<luster name>_log showrev -p . $ /usr/sbin/prtconf To determine the amount of SWAP installed on your system. $ swap -l Use the latest kernel patch from Sun Microsystems (http://sunsolve..Install from CD-ROM .Reboot the system To determine your current operating system information: $ uname -a To determine which operating system patches are installed: $ showrev -p .Usually the only thing you have to do is: $ $ $ $ cd <patch cluster directory> .2. .Download the Patch from: http://sunsolve.. we used the following ORACLE_HOME and ORACLE_SID. enter the follow ing command...

each of which can be used by one or more products or releases. You should not modify the symbolic link. Check Software Limits Oracle9i includes native support for files greater than 2 GB. enter the following command: $ ulimit -Sa To check maximum hard limits. adding the l . You should not modify this JRE. The Installer creates the oraInventory dire ctory the first time it is run to keep an inventory of products that it installs on yo ur system as well as other installation information. Setup the Solaris Kernel Set to the sum of the PROCESSES parameter for each Oracle database. To check current soft shell limits. Check your shell t o determine whether it will impose a limit. but you can redirect the X-windows output to another system. add /usr/ccs/bin to the beginning of the PATH environment variable in the current shell.loc. unless it is done thr ough a patch provided by Oracle Support Services. The inventory can contain multiple versions of the JRE. enter the following command: $ ulimit -Ha The file (blocks) value should be multiplied by 512 to obtain the maximum file s ize imposed by the shell.To determine which operating system packages are installed: $ pkginfo -i [package_name] To determine if your X-windows system is working properly on your local system. If n ot. Java Runtime Environment (JRE) The JRE shipped with Oracle9i is used by Oracle Java applications such as the Or acle Universal Installer is the only one supported. The location of oraInventory is defined in /var/opt/or acle/oraInst. $ xclock To determine if you are using the correct system executables: $ $ $ $ /usr/bin/which /usr/bin/which /usr/bin/which /usr/bin/which make ar ld nm Each of the four commands above should point to the /usr/ccs/bin directory. Products in an ORACLE_HOME access the JRE through a symbolic link in $ORACLE_HOM E/JRE to the actual location of a JRE within the inventory. A value of unlimited is the operating system default and is the maximum value of 1 TB.

Were I you. PROCESSES=200 The value of SEMMNS is calculated as follows: SEMMNS = [(A=100) + (B=100)] + [(C=200) * 2] + [(# of instances=3) * 10] = 630 Setting parameters too high for the operating system can prevent the machine fro m booting up.ora files set to the following values: ORACLE_SID=TYP1. it will not impact Solaris in any way. adjust down accordingly).. Solaris doesn't automatically allocate shared memory.remarks: The parameter for shared memory (shminfo_shmmax) can be set to the maximum val ue. Refer to Sun Microsystems Sun SPARC Solaris system administration documentation for parameter limits. the values should be set to at least (2*nr of clients + 15). if not. then add an additional 10 for each database. unless you specify the value in /etc/system and reboot. i'd put in lines in /etc/system that look something like this: only the first value is *really* important.. As a rule of the thumb. PROCESSES=100 ORACLE_SID=TYP2. You will have to reboot the system after making changes to the /etc/system fil e. PROCESSES=100 ORACLE_SID=TYP3. For example. consider a system that has three Oracle instances with the PROCESSE S parameter in their initSID. The values for semaphores (seminfo_semmni and seminfo_semmns) depend on the nu mber of clients you want to collect data from. set set set set set set shmsys:shminfo_shmmax=4294967295 shmsys:shminfo_shmmin=1 shmsys:shminfo_shmmni=100 shmsys:shminfo_shmseg=10 semsys:seminfo_semmsl=256 semsys:seminfo_semmns=1024 .argest one twice. It specifies the maximum amount of shared memory to allocate. Then this value will dictate your maximum SGA size as you build your database. I'd make this parameter be about 70-75% of your physical ram (assuming you have nothing else on this machine running besides Oracle . * * Kernel Parameters on our SUN Enterprise with 640MB for Oracle 9 * set shmsys:shminfo_shmmax=4294967295 set shmsys:shminfo_shmmin=1 set shmsys:shminfo_shmmni=100 set shmsys:shminfo_shmseg=10 set semsys:seminfo_semmni=100 set semsys:seminfo_semmsl=100 set semsys:seminfo_semmns=2500 set semsys:seminfo_semopm=100 set semsys:seminfo_semvmx=32767 -.

Usually the CD-ROM will be mounted automatically by the Solaris Volume Manager.. export ORACLE_SID ORACLE_TERM=xterm.. export ORACLE_TERM TNS_ADMIN=/export/home/oracle/config/9... /cdrom exit or CTRL-D .gz.0.2.cpio.gz and 901solaris_disk3.2. if not.cpio files ..set semsys:seminfo_semmni=400 -. export PATH # CLASSPATH must include the following JRE location(s): CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib Install from CD-ROM .gz) gunzip them somewhere and you'll get three .profile) as follows # Setup ORACLE environment ORACLE_HOME=/opt/oracle/product/9..cpio.end remarks Create Unix Group «dba» $ groupadd -g 400 dba $ groupdel dba Create Unix User «oracle» $ useradd -u 400 -c "Oracle Owner" -d /export/home/oracle \ -g "dba" -m -s /bin/ksh oracle Setup ORACLE environment ($HOME/.WE8ISO8859P1. $ su root $ mkdir /cdrom $ mount -r -F hsfs /dev/. export ORACLE_HOME ORACLE_SID=TYP2.0. export NLS_LANG ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data. or Unpacking downloaded installation files If you downloaded database installation files from Oracle site (901solaris_disk1 .cpio. export TNS_ADMIN NLS_LANG=AMERICAN_AMERICA.getright. export ORA_NLS33 LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/openwin/lib LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/dt/lib:/usr/ucblib:/usr/local/lib export LD_LIBRARY_PATH # Set up the search paths: PATH=/bin:/usr/bin:/usr/sbin:/opt/bin:/usr/ccs/bin:/opt/local/GNU/bin PATH=$PATH:/opt/local/bin:/opt/NSCPnav/bin:$ORACLE_HOME/bin PATH=$PATH:/usr/local/samba/bin:/usr/ucb:. do it as follows as user root.com/ ) $ cd <somewhere> .. 901solaris_disk2. The best way to download the huge files is to use the tool GetRight ( http://www.

usually located in: /var/opt/oracle/oraInst.ora $ ls -l initTYP2.2. then you must edit the Oracle Inventor y File.2.0 export DISPLAY . $ cd $ORACLE_HOME/dbs $ ln -s /export/home/oracle/config/9.0/initTYP2. repeat steps for Disk2 and D3isk3.10:0.0:Y Create the Database Edit and save the CREATE DATABASE File initTYP2.1.sql in $ORACLE_HOME/dbs. or crea te a symbolic-Link from $ORACLE_HOME/dbs to your Location. No w you should have three directories (Disk1.loc File If you used Oracle before on your system.0/initTYP2. Disk2 and Disk3) containing installation files.0 Answer the questions in the Installer.2.loc inventory_loc=/opt/oracle/product/oraInventory Install with Installer in interactive mode Install Oracle 9i with Oracle Installer $ $ $ $ cd /Disk1 DISPLAY=<Any X-Window Host>:0. we use the following install directories Inventory Location: /opt/oracle/product/oraInventory Oracle Universal Installer in: /opt/oracle/product/oui Java Runtime Environment in: /opt/oracle/product/jre/1.ora First start the Instance.2./runInstaller example display: $ export DISPLAY=192.ora file for correct syntax and system resources.gz cat 901solaris_disk1.cpio | cpio -icd This will extract all the files for Disk1. Check oraInst.1.$ $ $ $ mkdir Disk1 Disk2 Disk3 cd Disk1 gunzip 901solaris_disk1.0/ $ sqlplus /nolog SQL> connect / as sysdba SQL> startup nomount .8 Edit the Database Startup Script /var/opt/oracle/oratab TYP2:/opt/oracle/product/9. just to test your initTYP2.168. $ cd /export/home/oracle/config/9.ora -> /export/home/oracle/config/9.ora initTYP2.cpio.

d/lsnrora* Install Oracle Options (optional) You may want to install the following Options: Oracle JVM Orcale XML Oracle Spatial Oracle Ultra Search Oracle OLAP Oracle Data Mining Example Schemas Run the following script install_options.tar.sh to enable this options in the databa se. ORACLE_SID and PATH must be adjusted on your own Environment. Before running this scripts adjust the initSID./init.gz).log Start Listener $ lsnrctl start LSNRTYP2 Automatically Start / Stop the Database To start the Database automatically on Boot-Time.sql SQL> @shutdown immediate SQL> startup Check the Logfile: initTYP2.) 6.SQL> shutdown immediate Now you can create the database SQL> @initTYP2.sh Download Scripts for Sun Solaris These Scripts can be used as Templates.d/dbora* lrwxrwxrwx 1 root root S99lsnrora -> ./install_options. parallel_automatic_tuning = false shared_pool_size = 200000000 java_pool_size = 100000000 $ . lrwxrwxrwx 1 root root S99dbora -> . Archivelog.ora paramaters as follows for the build process.. you can reset the paramters to sma ller values. that some Parameters like O RACLE_HOME.. .d. create or use our Startup Scri pts dbora and lsnrora (included in ora_config_sol_920. Create symbolic Links from the Startup D irectories. Please note. Besides this.ora Parameters for your Database (Size. you should check the ini tSID.2 Environment oracle user: ---------------------------- ../init. After this.. which must be installed in /etc/init.

lp.profile -------MAIL=/usr/mail/${LOGNAME:?} umask=022 EDITOR=vi.daemon uucp::5:root.128:0.adm adm::4:root.daemon sysadmin::14: . export ORACLE_HOME ORACLE_SID=OWS.adm.2. export ORA_NLS33 LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/openwin/lib LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/dt/lib:/usr/ucblib:/usr/local/lib export LD_LIBRARY_PATH PATH=.adm nuucp::9:root. export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/9. export NLS_LANG ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data.17. export EDITOR ORACLE_BASE=/opt/app/oracle.0 export DISPLAY /etc >more passwd ----------------root:x:0:1:Super-User:/:/sbin/sh daemon:x:1:1::/: bin:x:2:2::/usr/bin: sys:x:3:3::/: adm:x:4:4:Admin:/var/adm: lp:x:71:8:Line Printer Admin:/usr/spool/lp: uucp:x:5:5:uucp Admin:/usr/lib/uucp: nuucp:x:9:9:uucp Admin:/var/spool/uucppublic:/usr/lib/uucp/uucico smmsp:x:25:25:SendMail Message Submission Program:/: listen:x:37:4:Network Admin:/usr/net/nls: nobody:x:60001:60001:Nobody:/: noaccess:x:60002:60002:No Access User:/: nobody4:x:65534:65534:SunOS 4.2.adm lp::8:root.x Nobody:/: avdsel:x:1002:100:Albert van der Sel:/export/home/avdsel:/bin/ksh oraclown:x:1001:102:Oracle owner:/export/home/oraclown:/bin/ksh brighta:x:1005:102:Bright Alley:/export/home/brighta:/bin/ksh customer:x:2000:102:Customer account:/export/home/customer:/usr/bin/tcsh /etc >more group ---------------root::0:root other::1: bin::2:root.sys.bin.:/usr/bin:/usr/sbin:/sbin:/usr/ucb:/etc:$ORACLE_HOME/lib:/usr/oasys/bin:$O RACLE_HOME/bin:/usr/local/bin: export PATH PS1='$PWD >' DISPLAY=172.typical profile for Oracle account on most unix systems: . export ORACLE_SID ORACLE_TERM=xterm.nuucp staff::10: daemon::12:root.uucp mail::6:root tty::7:root. export ORACLE_TERM TNS_ADMIN=$ORACLE_HOME/network/admin. export TNS_ADMIN NLS_LANG=AMERICAN_AMERICA.bin.AL16UTF8.daemon sys::3:root.

smmsp::25:smmsp nobody::60001: noaccess::60002: nogroup::65534: dba::100:oraclown.0 ORACLE_SID = VEN1 -------------------------------------------------------------------------------System Requirements Oracle 9i needs Kernel Version 2.2. ORACLE_HOME = /opt/oracle/product/9. System Requirements Create Unix Group «dba» Create Unix User «oracle» Setup Environment ($HOME/.brighta oper::101: oinstall::102: ===================================== 7..ORA and SQLNET.Article 1: ==================== The Oracle 9i Distribution can be found on Oracle Technet (http://technet.2. Beside s these scripts.4 and glibc 2.0 on Red Hat Linux 7.1.ORA. . we used the following ORACLE_HOME AND ORACLE_SID.com) The following short Guide shows how to install and configure Oracle 9... you can download our NET configuration files: LISTNER. . Component Check with . which is included in RedHat Li nux 7. or Unpacking downloaded installation files Install with Installer in interactive mode Create the Database Create your own DB-Create Script (optional) Start Listener Automatically Start / Stop the Database Setup Kernel Parameters ( if necessary ) Install Oracle Options (optional) Download Scripts for RedHat Linux 7. TNSNAMES.2. please a djust these parameters for your own environment..2 / 8.2.bash_profile) as follows Mount the Oracle 9i CD-ROM (only if you have the CD) .0 You may download our Scripts to create a database.. we suggest this way and NOT using DBASSIST.. install Oracle 9i on Linux: ===================================== ==================== 7.2 For our installation.ORA.oracle .

.bash_profile) as follows # Setup ORACLE environment ORACLE_HOME=/opt/oracle/product/9..4 rpm -q kernel kernel-2.0.3 Proc*C/C++ rpm -q gcc gcc-2.jar export CLASSPATH # Set up the search paths: PATH=$POSTFIX/bin:$POSTFIX/sbin:$POSTFIX/sendmail PATH=$PATH:/usr/local/jre/bin:/usr/local/jdk/bin:/bin:/sbin:/usr/bin:/usr/sbin PATH=$PATH:/usr/local/bin:$ORACLE_HOME/bin:/usr/local/jsdk/bin PATH=$PATH:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin PATH=$PATH:/usr/local/samba/bin export PATH Mount the Oracle 9i CD-ROM (only if you have the CD) . export ORACLE_HOME ORACLE_SID=VEN1. export ORACLE_OWNER TNS_ADMIN=/home/oracle/config/9.0. Output Liunx Kernel Version 2.. export ORACLE_TERM ORACLE_OWNER=oracle. export NLS_LANG ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data..2.7-10 System Libraries rpm -q glibc glibc-2. export ORACLE_SID ORACLE_TERM=xterm. export ORA_NLS33 CLASSPATH=$ORACLE_HOME/jdbc/lib/classes111.96-98 Create Unix Group «dba» $ groupadd -g 400 dba Create Unix User «oracle» $ useradd -u 400 -c "Oracle Owner" -d /home/oracle \ -g "dba" -m -s /bin/bash oracle Setup Environment ($HOME/.2. export TNS_ADMIN NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1.2.zip LD_LIBRARY_PATH=$ORACLE_HOME/lib.. export LD_LIBRARY_PATH ### see JSDK: export CLASSPATH # Set up JAVA and JSDK environment: export JAVA_HOME=/usr/local/jdk export JSDK_HOME=/usr/local/jsdk CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JSDK_HOME/lib/jsdk.4-19..4.

or Unpacking downloaded installation files If you downloaded database installation files from Oracle site (Linux9i_Disk1.getright.Mount the CD-ROM as user root.2. T he best way to download the huge files is to use the tool GetRight ( http://www.com/ ) $ $ $ $ cd <somewhere> cpio -idmv < Linux9i_Disk1. or crea te a symbolic-Link from $ORACLE_HOME/dbs to your Location. just to test your initVEN1.ora file for correct syntax and system resources.sql in $ORACLE_HOME/dbs.0:Y Create the Database Edit and save the CREATE DATABASE File initVEN1. $ cd /home/oracle/config/9./runInstaller Answer the questions in the Installer.cpio cpio -idmv < Linux9i_Disk2. $ cd $ORACLE_HOME/dbs $ ln -s /home/oracle/config/9.gz) gunzip them somewhere and you'll get three .8 Edit the Database Startup Script /etc/oratab VEN1:/opt/oracle/product/9. Install with Installer in interactive mode Install Oracle 9i with Oracle Installer $ $ $ $ cd Disk1 DISPLAY=<Any X-Window Host>:0.ora initVEN1.1.ora First start the Instance.gz and Linux9i_Disk3. $ $ $ $ su root mkdir /cdrom mount -t iso9660 /dev/cdrom /cdrom exit .cpio.0/initVEN1. we use the following install directories Inventory Location: /opt/oracle/product/oraInventory Oracle Universal Installer in: /opt/oracle/product/oui Java Runtime Environment in: /opt/oracle/product/jre/1.ora -> /home/oracle/config/9. Linux9i_Disk2.2.0/initVEN1.cpio files.2.cpio.cpio cpio -idmv < Linux9i_Disk3.cp io..0 export DISPLAY .0/ $ sqlplus /nolog SQL> connect / as sysdba .cpio Now you should have three directories (Disk1.2.gz. Disk2 and Disk3) containing instal lation files..ora $ ls -l initVEN1.

g. 3. .d/dbora* lrwxrwxrwx 1 root root S99lsnrora -> . Creat e symbolic Links from the Startup Directories in /etc/rc./init.d (e. SEMOPM. Use the ipcs command to obtain a list of the system s current shared memory and se maphore segments. you will experience problems during installation and instance startup. To modify kernel parameters using the /proc file system: 1. which must be installed in /etc/rc. Change to the /proc/sys/kernel directory. create or use our Startup Scri pts dbora and lsnrora (included in ora_config_linux_901. and semaphores e xtensively for interprocess communication.sql SQL> @shutdown immediate SQL> startup Check the Logfile: initVEN1. The greater the amount of data you can store in memory. the UNIX kernel reduces disk I/O activity. In addition. Log in as root user. and S EMMNI parameters.d/rc2. by maintaining data in memory./init.gz). /etc/rc.d). and their identification number and owner. swap space. the values for the SEMMSL. You can modify the kernel parameters by using the /proc file system.. Review the current semaphore parameter values in the sem file using the cat o r more utility # cat sem The output will list. the faster your database will operate. If your kernel parameter settings are insufficie nt for Oracle9i.tar. in order..SQL> startup nomount SQL> shutdown immediate Now you can create the database SQL> @initVEN1.d/init. SEMMNS. lrwxrwxrwx 1 root root S99dbora -> .d. 2.log Create your own DB-Create Script (optional) You can generate your own DB-Create Script using the Tool: $ORACLE_HOME/bin/dbca Start Listener $ lsnrctl start LSNRVEN1 Automatically Start / Stop the Database To start the Database automatically on Boot-Time. The following example shows how the output will appear.d/lsnrora* Setup Kernel Parameters ( if necessary ) Oracle9i uses UNIX resources such as shared memory.

# cat shared_memory_parameter In the preceding example. 5. Review the current shared memory parameters using the cat or more utility. The parameters in the following table are the minimum values required to run Ora cle9i with a single database instance.sh to enable this options in the databa se. the shared_memory_parameter is either the SHMMAX or SH MMNI parameter. 250 is the value of the SEMMSL parameter.250 32000 32 128 In the preceding example. Before running this scripts adjust the initSID. Modify the parameter values using the following command: # echo SEMMSL_value SEMMNS_value SEMOPM_value SEMMNI_value > sem In the preceding command.d/rc. Modify the shared memory parameter using the echo utility.ora paramaters as follows for the build process.local # Setup Kernel Parameters for Oracle 9i echo 250 32000 100 128 > /proc/sys/kernel/sem echo 2147483648 > /proc/sys/kernel/shmmax echo 4096 > /proc/sys/kernel/shmmni Install Oracle Options (optional) You may want to install the following Options: Oracle JVM Orcale XML Oracle Spatial Oracle Ultra Search Oracle OLAP Oracle Data Mining Example Schemas Run the following script install_options. After this. to mo dify the SHMMAX parameter. 4. For example. Write a script to initialize these values during system startup and include t he script in your system init files. parallel_automatic_tuning = false shared_pool_size = 200000000 java_pool_size = 100000000 . Refer to the following table to determine if your system shared memory and semap hore kernel parameters are set high enough for Oracle9i. enter the following: # echo 2147483648 > shmmax 7. 6. 32000 is the value of the SEMMNS parameter. all parameters must be entered in order. you can reset the paramters to smaller values. You can put the initialization in the file /etc/rc. The parameter name must be entered in lowercase letters. 32 is the value of the SEMOPM parameter. and 128 is the value of the SEMMNI paramet er.

Also in cluded in this article is a detailed overview for applying the Oracle9i (9. 2004. Please note.(Oracle Metalink Note: 252217.2.Article 2: ==================== Installing Oracle9i (9. be applying the 9.2 These Scripts can be used as Templates. Sr.2.2. Keep in mind the following assumptions throughout this article: When installing Red Hat Linux Fedora Core 2.0) on Red Hat Linux (Fedora Core 2) by Jeff Hunter.1) Install the Oracle 9.0.2.$ .0) RDBMS software on Red Hat Linux Fedora Core 2. This will save considerable time since the patch set does not have to be downloaded and installed..0 . As of March 26. you should check the initSID.0 patchset already included.0.sh Download Scripts for RedHat Linux 7. that some Parameters like O RACLE_HOME. however.0 Patchset Post Installation Steps Creating the Oracle Database -------------------------------------------------------------------------------Overview The following article is a summary of the steps required to successfully install the Oracle9i (9.0. I install ALL components. . (Everythi ng).4.4.0. Database Administrator -------------------------------------------------------------------------------Contents Overview Swap Space Considerations Configuring Shared Memory Configuring Semaphores Configuring File Handles Create Oracle Account and Directories Configuring the Oracle Environment Configuring Oracle User Shell Limits Downloading / Unpacking the Oracle9i Installation Files Update Red Hat Linux System . Archivelog.4./install_options. We will.5 .0) patchset. ORACLE_SID and PATH must be adjusted on your own Environment.2.2.5.2.0.5.) ==================== 7.2.0 patchset. This makes it easier than trying to troubleshoot missing software component s.0 RDBMS Software Install the Oracle 9. Oracle includes the Oracle9i RDBMS software with the 9..5. . ora Parameters for your Database (Size.0. Besides this.

at the end of this article.5.2. The post installation section includes steps for configuring the Oracle Networki ng files. -------------------------------------------------------------------------------Swap Space Considerations Ensure enough swap space is available.OR # cat /proc/swaps . Finally. make a file that will act as additional swap space. Installing Oracle9i requires a minimum of 512MB of memory.OR # cat /proc/meminfo | grep MemTotal If you have less than 512MB of memory (between your RAM and SWAP).0 dat abase named ORA920 using supplied scripts.5. The speed is primarily a result of processes not needing to copy . it is recommend to apply the 9. you can add t emporary swap space by creating a temporary swap file.Although it is not required. rebuild your system. (An inadequate amount of swap during the installation will cause the Oracle Univ ersal Installer to either "hang" or "die") To check the amount of memory / swap you have allocated. As root. type either: # free . configuring the database to start and stop when the machine is cycled.0.0.2. and other miscellaneous tasks. This way you do not have to use a raw device or even more drastic. let's say about 300 MB: # dd if=/dev/zero of=tempswap bs=1k count=300000 Now we should change the file permissions: # chmod 600 tempswap Finally we format the "partition" as swap and add it to the swap space: # mke2fs tempswap # mkswap tempswap # swapon tempswap -------------------------------------------------------------------------------Configuring Shared Memory The Oracle RDBMS uses shared memory in UNIX to allow processes to access common data structures and data. These data structures and data are placed in a shared memory segment to allow pr ocesses the fastest form of Interprocess Communications (IPC) available. we will be creating an Oracle 9.0 patchset.

Keep in mind that the maximum value of the SHMMAX parameter is 4GB. you can use either of the following three methods: This is method I use most often. To change the value SHMMAX. shared pool. It is important to size the SGA to efficiently hold the database buffer cache. Inadequate sizing of the SGA can have a dramatic decre ase in performance of the database. It is therefore possible to create a 2. I generally set the SHMMAX para meter to 2GB. you would want to set the SHMMAX parameter to 3GB. This is an area of memory within the Oracle instance that is shared by all Oracle backup and foreground processes . In the case o f a 2. NOTE: With a 32-bit Linux operating system. the default maximum size of the SGA is 1.7GB SGA. On a 32-bit Linux operating system.7GB. This is the reason I will often set the SHMMAX parameter to 2GB since it requires a larger value for SHMMAX. This method sets the SHMMAX on startup by inser ting the following kernel parameter in the /etc/sysctl. The followin g example shows the values of my shared memory limits on a fresh RedHat Linux install using the defaults: # ipcs -lm -----.data between each other to share common data and structures . the default value for SHMMAX is 32MB.7GB SGA. Oracle uses shared memory in UNIX to hold its Shared Global Area (SGA). it is possible that the Oracle SGA (which is held in shared segments) may be limited in size. An inadequ ate SHMMAX setting would result in the following: ORA-27123: unable to attach to shared memory segment You can determine the value of SHMMAX by performing the following: # cat /proc/sys/kernel/shmmax 33554432 As you can see from the output above. but you will need make several change s at the Linux operating system level by changing the mapped base.Shared Memory Limits -------max number of segments = 4096 max seg size (kbytes) = 32768 max total shared memory (kbytes) = 8388608 min seg size (bytes) = 1 Let's continue this section with an overview of the parameters that are responsi ble for configuring the shared memory settings in Linux. To determine all shared memory limits you can use the ipcs command.conf startup file: . th e physical memory is divided into a 3GB user space and a 1GB kernel space. redo log buf fer as well as other shared Oracle memory structures. If the SHMMAX is set incorrectly (too low ). SHMMAX The SHMMAX parameter is used to define the maximum size (in bytes) for a shared memory segment and should be set large enough for the largest SGA size. This is often too small to configure the Oracle SGA.relieving the kern el from having to get involved. without Physical Address Extension (PAE).

-------------------------------------------------------------------------------Configuring Semaphores Now that we have configured our shared memory settings. When an application requests semaphores. use bigpages which supports the configuration of larger memory page s izes. we look at the SHMALL shared memory kernel parameter.# echo "kernel. it does so using "sets". A semaphore can be thought of as a counter that i s used to control access to a shared resource. however. the value of this parameter should always be at least: ceil(SHMMAX/PAGE_SIZE) The default size of SHMALL is 2097152 and can be queried using the following com mand: # cat /proc/sys/kernel/shmall 2097152 From the above output. you can make this change directly to the /proc file system. Semaphores provide low level sync hronization between processes (or threads within a process) so that only one pro cess (or thread) has access to the shared segment. use the following: # ipcs -ls . You can determine the value of SHMMNI by performing the following: # cat /proc/sys/kernel/shmmni 4096 SHMALL Finally.589. You can .592 bytes The default setting for SHMALL should be adequate for our Oracle installation. thereby ensureing the integri ty of that shared resource. This value is sufficient and typically does not need to be ch anged. The default value for this parameter is 4096. NOTE: The page size in Red Hat Linux on the i386 platform is 4096 bytes. To determine all semaphore limits. This parameter co ntrols the total amount of shared memory (in pages) that can be used at one time on the system. the total amount of shared memory (in bytes) that can be used at one time on the system is: SM = (SHMALL * PAGE_SIZE) = 2097152 * 4096 = 8.shmmax=2147483648 SHMMNI We now look at the SHMMNI parameters. This command c an be made permanent by putting it into the /etc/rc.shmmax=2147483648" >> /etc/sysctl. This kernel parameter is used to set the m aximum number of shared memory segments system wide.934.conf If you wanted to dynamically alter the value of SHMMAX without rebooting the mac hine. it is time to take care of configuring our semaphores. In short.local startup file: # echo "2147483648" > /proc/sys/kernel/shmmax You can also use the sysctl command to change the value of SHMMAX: # sysctl -w kernel.

-----. Setting Semaphore Kernel Parameters Finally. To summarize : SEMMNS = sum of PROCESSES setting for each database on the system + ( 2 * [largest PROCESSES setting]) + (10 * [number of databases on system] To determine the maximum number of semaphores that can be allocated on a Linux s ystem.ora file for all databases hosted on the Linux system plus 10. All o .(SEMMSL * SEMMNI) SEMOPM The SEMOPM kernel parameter is used to control the number of semaphore operation s that can be performed per semop system call. Oracle recommends setting SEMMSL to the largest PROCESS instance parameter setti ng in the init. SEMMNS The SEMMNS kernel parameter is used to control the maximum number of semaphores (not semaphore sets) on the entire Linux system. The semop system call (function) provides the ability to do operations for multi ple semaphores with one semop system call. Oracle recommends setting the SEMOPM to a value of no less than 100. use the following calculation. we see how to set all semaphore parameters using several methods. Oracle recommends setting the SEMMNI to a value of no less than 100. SEMMNI The SEMMNI kernel parameter is used to control the maximum number of semaphore s ets on the entire Linux system. Oracle recommends setting the SEMMNS to the sum of the PROCESSES instance parame ter setting for each database on the system. the only parameter I care about changing (raising) is SEMOPM. Oracle recommends setting the SEMMSL to a value of no less than 100. and then finally adding 10 for each Oracle database on the system. adding the largest PROCESSES twice. In th e following. It will be the lesser of: SEMMNS -or. Al so. A semaphore set can have the maximum number of SEMMSL semaphores per semaphore set and is therefore recommended to se t SEMOPM equal to SEMMSL.Semaphore Limits -------max number of arrays = 128 max semaphores per array = 250 max semaphores system wide = 32000 max ops per semop call = 32 semaphore max value = 32767 You can also use the following command: # cat /proc/sys/kernel/sem 250 32000 32 128 SEMMSL The SEMMSL kernel parameter is used to control the maximum number of semaphores per semaphore set.

file-max=65536" >> /etc/sysctl. . I have seen othe rs (Red Hat Linux AS 2. you can make this change directly to the /proc fi le system.file-max=65536 NOTE: It is also possible to query the current usage of file handles using the f ollowing command: # cat /proc/sys/fs/file-nr 1140 0 103062 In the above example output. you will want to increase this value to at least 65536. If this is the case. This command can be made permanent by putting it into the /etc/rc. it is critical to ensure that the ma ximum number of file handles is large enough. This method sets the maximum number of file han dles (using the kernel parameter file-max) on startup by inserting the following kernel parameter in the /etc/sysctl.conf If you wanted to dynamically alter the value of all semaphore kernel parameters without rebooting the machine. the default for Red Hat Linux is 103062. The setting for file handles desig nate the number of open files that you can have on the entire Linux system.conf If you wanted to dynamically alter the value of all semaphore kernel parameters without rebooting the machine. Total number of file handles currently being used.conf startup file: # echo "kernel. This is method I use most often. This is essentially the va lue of file-max .sem=250 32000 100 128" >> /etc/sysctl.conf startup file: # echo "fs.loc al startup file: # echo "65536" > /proc/sys/fs/file-max You can also use the sysctl command to change the maximum number of file handles : # sysctl -w fs. Fedora Core 1. Use the following command to determine the maximum number of file handles for th e entire system: # cat /proc/sys/fs/file-max 103062 Oracle recommends that the file handles for the entire system be set to at least 65536.sem="250 32000 100 128" -------------------------------------------------------------------------------Configuring File Handles When configuring our Linux database server. you can make this change directly to the /proc fi le system. and Red Hat version 9) that will only d efault to 32768. here is an explanation of the three values from the file-nr command: Total number of allocated file handles.ther default settings should be sufficient for our example installation. In most cases.(see above).loc al startup file: # echo "250 32000 100 128" > /proc/sys/kernel/sem You can also use the sysctl command to change the value of all semaphore setting s: # sysctl -w kernel. This command can be made permanent by putting it into the /etc/rc. Maximum number of file handles that can be allocated. This method sets all semaphore kernel parameter s on startup by inserting the following kernel parameter in the /etc/sysctl.1. This is method I use most often.

# useradd -u 173 -c "Oracle Software Owner" -d /u01/app/oracle -g "dba" -m -s /b in/bash oracle # passwd oracle Changing password for user oracle. Ver ify the ulimit setting my issuing the ulimit command: # ulimit unlimited -------------------------------------------------------------------------------Create Oracle Account and Directories Now let's create the Oracle UNIX account all all required directories: Login as the root user id.1 Failing to set the LD_ASSUME_KERNEL parameter will cause the Oracle Universal Installer to hang! Verify all mount points.20 it is set to unlimited. Usually for 2.4. we will be using four mount points (or directories) as fol lows: /u01 : The Oracle RDBMS software will be installed to /u01/app/oracle. New UNIX password: ************ BAD PASSWORD: it is based on a dictionary word Retype new UNIX password: ************ passwd: all authentication tokens updated successfully. Please keep in mind that all of the following mount poi nts can simply be directories if you only have one hard drive. # mkdir -p /u01/app/oracle # mkdir -p /u03/app/oradata # mkdir -p /u04/app/oradata # mkdir -p /u05/app/oradata # mkdir -p /u06/app/oradata Create the UNIX Group for the Oracle User Id. then make sure that the ulimit is set properly.NOTE: If you need to increase the value in /proc/sys/fs/file-max. # chown -R oracle:dba /u01 # chown -R oracle:dba /u03 # chown -R oracle:dba /u04 # chown -R oracle:dba /u05 # chown -R oracle:dba /u06 Oracle Environment Variable Settings NOTE: Ensure to set the environment variable: LD_ASSUME_KERNEL=2. /u03 : This mount point will contain the physical Oracle files: . Change ownership of all Oracle Directories to the Oracle UNIX User. # groupadd -g 115 dba Create the UNIX User for the Oracle Software. % su Create directories. For our installation.4.

This will be one large RAID 0 stripe for all Oracle data files.tar" as the Oracle User ID and place it in his HOME directory.Group 3 / Member 3 /u06 : This mount point will contain the all physical Oracle data files.oracle Unpackage the contents of the oracle_920_installation_files_linux. UNDO.Group 3 / Member 1 /u04 : This mount point will contain the physical Oracle files: Control File 2 Online Redo Log File . A fter extracting the archive. The following set of commands descibe how to extract the file and where to copy/extract all required files: $ id uid=173(oracle) gid=115(dba) groups=115(dba) $ pwd /u01/app/oracle $ tar xvf oracle_920_installation_files_linux.Group 1 / Member 1 Online Redo Log File . -------------------------------------------------------------------------------Configuring the Oracle Environment After configuring the Linux operating environment. % su . it is time to setup the Oracl e UNIX User ID for the installation of the Oracle RDBMS Software. Keep in mind that the following steps need to be performed by the oracle user id . All tablespaces including System. Login as the oracle user id.tar oracle_920_installation_files_linux/dbora . you will have a new directory called oracle_920_installation_files_linux that contains all required files.Control File 1 Online Redo Log File .tar archive.tar oracle_920_installation_files_linux/ oracle_920_installation_files_linux/admin. Data.Group 3 / Member 2 /u05 : This mount point will contain the physical Oracle files: Control File 3 Online Redo Log File . You should download the archive "o racle_920_installation_files_linux.Group 2 / Member 2 Online Redo Log File .Group 2 / Member 3 Online Redo Log File . and Index.Group 1 / Member 2 Online Redo Log File . Before delving into the details for configuring the Oracle User ID.Group 1 / Member 3 Online Redo Log File . Temporary. I packaged a n archive of shell scripts and configuration files to assist with the Oracle preparation and installation.tar oracle_920_installation_files_linux/common.Group 2 / Member 1 Online Redo Log File .

tar $ tar xvf oracle_920_installation_files_linux/common. use the following command: . -d) unlimited file size (blocks. -v) unlimited Maximum Number of Open File Descriptors for Shell Session Let's first talk about the maximum number of open file descriptors for a user's shell session. you may want to read through this section.ora oracle_920_installation_files_linux/tnsnames.bash_profile executed $ -------------------------------------------------------------------------------Configuring Oracle User Shell Limits Many of the Linux shells (including BASH) implement certain controls over certai n critical resources like the number of file descriptors that can be opened and the maximum number of processes available to a user's session. -m) unlimited open files (-n) 1024 pipe size (512 bytes. This typically defaults to 1024. You can use the following command to query these shell limits: # ulimit -a core file size (blocks.bash_profile oracle_920_installation_files_linux/dbstart oracle_920_installation_files_linux/ldap.txt $ cp oracle_920_installation_files_linux/. -p) 8 stack size (kbytes. "But I've already altered my Linux environme nt by setting the system wide kernel parameter /proc/sys/fs/file-max". ~/. -l) unlimited max memory size (kbytes. In most cases. but there is still a per user limit on the number of open file descriptors. NOTE: Make sure that throughout this section. that you are logged in as the orac le user account since this is the shell account we want to test! Ok.bash_profile $ tar xvf oracle_920_installation_files_linux/admin.ora oracle_920_installation_files_linux/sqlnet.oracle_920_installation_files_linux/dbshut oracle_920_installation_files_linux/.ora oracle_920_installation_files_linux/crontabORA920. To check that.tar $ . -f) unlimited max locked memory (kbytes.bash_profile ~/. Yes. this is correct. -s) 10240 cpu time (seconds.bash_profile . you will not need to alter any of these shell limits. but you find yourself getting errors when creating or maintaining the Oracle da tabase. -c) 0 data seg size (kbytes. -t) unlimited max user processes (-u) 16383 virtual memory (kbytes.ora oracle_920_installation_files_linux/listener. you are first going to tell me.

-c) data seg size (kbytes. -p) stack size (kbytes. -d) file size (blocks. In short. let's test our new settings for the maximum number of open file descrip tors for the oracle shell session. NOTE: Although you can set the soft and hard file limits higher. then number of file han dles should be increased for the oracle using the user should increase the numbe r of file handles using the hard limit setting.so session required /lib/security/$ISA/pam_unix. The steps defined below sould already be p erformed with a normal Red Hat Linux installation. Logout and log back in as the oracle user acc ount then run the following commands. you would add the following lines: oracle soft nofile 4096 oracle hard nofile 101062 The first line above sets the soft limit. If you were to log out and log back in. -m) open files (-n) pipe size (512 bytes. -l) max memory size (kbytes. If you were to do this. The hard limit defines the maximum number of file handles (or open files) a re possible for the user's shell account. -t) max user processes (-u) 0 unlimited unlimited unlimited unlimited 4096 8 10240 unlimited 16383 . You should have an entry in the /etc/pam. which are required for login. For your Linux system. I am leaving 2000 spare! We're not totally done yet.d/system-auth file. you could edit the /etc/security/limits.% su . which means that th e entire Linux system would run out of file descriptors. which is the number of files handles ( or open files) that the Oracle user will have after logging in to the shell acco unt. you woul d not be able to initiate any new logins since the system would not be able to o pen any PAM modules. -s) cpu time (seconds. You can increase the value of th is parameter to 101062 for the current session by using the following: % ulimit -n 101062 Keep in mind that the above command will only effect the current shell session. Let's first check all current soft shell limits: $ ulimit -Sa core file size (blocks. your shell session could use up all of the file descriptors for the entire Linux system.so I typically validate that my /etc/pam.oracle % ulimit -n 1024 If you wanted to change the maximum number of open file descriptors for a user's shell session.conf as the root account .conf file. -f) max locked memory (kbytes. Notice that I set my hard lim it to 101062 and not 103062. We still need to ensure that pam_limits is configure d in the /etc/pam. the value would be set back to its defau lt for that shell session.d/system-auth file as follows: session required /lib/security/$ISA/pam_limits. If the oracle user account starts to r ecieve error messages about running out of file handles.d/system-auth file has the following two e ntries: session required /lib/security/$ISA/pam_limits. At this point. it is critical to understand to never set the hard limit for nofile for your shell account equa l to /proc/sys/fs/file-max.so Finally. but should still be validated ! The PAM module will read the /etc/security/limits.

conf file. -m) unlimited open files (-n) 101062 pipe size (512 bytes.oracle % ulimit -u 16383 If you wanted to change the soft and hard limits for the maximum number of proce sses for the oracle user. -d) unlimited file size (blocks.conf as the root account.conf file. The session values will not alway s be the same for other shells.virtual memory (kbytes. -f) unlimited max locked memory (kbytes. For your Linux system. -v) unlimited Finally.bash_profile << EOF . The session values will not alway s be the same for other shells. I used the BASH shell. Maximum Number of Processes for Shell Session This section is very similar to the previous section. you would a dd the following lines: oracle soft nproc 2047 oracle hard nproc 16384 NOTE: There may be times when you cannot get access to the root user account to change the /etc/security/limits. You can set this value in the user's login script for the shell as follows: su .oracle cat >> ~oracle/. -c) unlimited data seg size (kbytes. "Maximum Number of Open Fi le Descriptors for Shell Session" and deals with the same concept of soft limits and hard limits as well as configuring pam_limits. NOTE: There may be times when you cannot get access to the root user account to change the /etc/security/limits. -s) unlimited cpu time (seconds.oracle cat >> ~oracle/. For most default Red Hat Lin ux installations. (and for that matter. you will not need to be concerned with the maximum number of u ser processes as this value is generally high enough! NOTE: For this section. Let's start by querying the current limit of the maximum number of processes for the oracle user: % su . -v) unlimited The soft limit is now set to 4096 while the hard limit is now set to 101062. -l) unlimited max memory size (kbytes.bash_profile << EOF ulimit -n 101062 EOF NOTE: For this section. you could edit the / etc/security/limits. You can set this value in the user's login script for the shell as follows: su . all users). I used the BASH shell. let's check all current hard shell limits: $ ulimit -Ha core file size (blocks. -t) unlimited max user processes (-u) 16383 virtual memory (kbytes. -p) 8 stack size (kbytes.

This is a FREE account!) http://www.oracle. -p) 8 stack size (kbytes.htm l . (If you do not currently have an account with Oracle OTN. -l) unlimited max memory size (kbytes. If you are not logged in as the "or acle" user account. enter the following command: $ ulimit -Ha core file size (blocks. -d) unlimited file size (blocks. -v) unlimited The file (blocks) value should be multiplied by 512 to obtain the maximum file s ize imposed by the shell. you will need to creat e one. -f) unlimited max locked memory (kbytes. enter the following command: $ ulimit -Sa core file size (blocks. -------------------------------------------------------------------------------Downloading / Unpacking the Oracle9i Installation Files Most of the actions throughout the rest of this document should be done as the " oracle" user account unless otherwise noted. -c) 0 data seg size (kbytes.2. -s) unlimited cpu time (seconds.ulimit -u 16384 EOF Miscellaneous Notes To check all current soft shell limits. do so now. -p) 8 stack size (kbytes. -d) unlimited file size (blocks.com/technology/software/products/oracle9i/htdocs/linuxsoft. -f) unlimited max locked memory (kbytes. -t) unlimited max user processes (-u) 16383 virtual memory (kbytes. Download Oracle9i from Oracle's OTN Site. -t) unlimited max user processes (-u) 16383 virtual memory (kbytes. -v) unlimited To check maximum hard limits. -m) unlimited open files (-n) 4096 pipe size (512 bytes. Check your shell to determine whether it will impose a limit. -m) unlimited open files (-n) 101062 pipe size (512 bytes.0) includes native support for files greater than 2 GB. -l) unlimited max memory size (kbytes. -c) unlimited data seg size (kbytes. NOTE: Oracle9i Release 2 (9. A value of unlimited is the operating system default a nd typically has a maximum value of 1 TB. -s) 10240 cpu time (seconds.

i386.127.96.rpm # rpm -Uvh compat-libstdc++-devel-7.cpio.gz (632.e.rpm # rpm -Uvh pdksh-5.906.295 bytes) (cksum .2. If the above steps do not work for you.i386.rpm From Fedora Core 2 / Disk #2 # cd /mnt/cdrom/Fedora/RPMS # rpm -Uvh gnome-libs-1.245082434) ship_9204_linux_disk2.90-40.1-2. all of which are available on the Red Hat Fedora Core 2 CDs.96.3-2.14-24.96915247) Directions to extract the files.1. Disk2 and Disk3" containing the Oracle9i Installation files: /Disk1 /Disk2 /Disk3 -------------------------------------------------------------------------------Update Red Hat Linux System .i386.cpio NOTE: Some browsers will uncompress the files but leave the extension the same ( gz) when downloading.756.Download the following files to a temporary directory (i.gz Extract the cpio archives with the command: "cpio -idmv < <filename>" % cpio -idmv < ship_9204_linux_disk1.922 bytes) (cksum .i386.rpm # rpm -Uvh compat-db-4.0.i386.cpio.i386.126.1.243 bytes) (cksum . try skipping step 1 and go directly to step 2 without changing the filename.3-2.gz (538.3-2.rpm From Fedora Core 2 / Disk #4 # cd /mnt/cdrom/Fedora/RPMS # rpm -Uvh sysstat-5.25-2.rpm From Fedora Core 2 / Disk #3 # cd /mnt/cdrom/Fedora/RPMS # rpm -Uvh compat-libstdc++-7. % cpio -idmv < ship_9204_linux_disk1.96.gz You should now have three directories called "Disk1.1. will need to be updated as per the steps described in Metalink Note: 252217. All of these packages will need to be installed as the root user: From Fedora Core 2 / Disk #1 # cd /mnt/cdrom/Fedora/RPMS # rpm -Uvh libpng-1.126.cpio. /u01/app/oracle/orai nstall: ship_9204_linux_disk1.(Oracle Metalink Note: 252217.126.rpm .96.2.126.rpm # rpm -Uvh openmotif21-2. Run "gunzip <filename>" on all the files.rpm # rpm -Uvh compat-gcc-7.1.30-9.rpm # rpm -Uvh compat-gcc-c++-7.cpio.1) The following RPMs.3-2.2.i386.1 "Requirements for Installing Oracle 9iR2 on RHEL3".4.i386.2-22.cpio.2575824107) ship_9204_linux_disk3. % gunzip ship_9204_linux_disk1.i386.i386.gz (296.

Please wait.. .Set gcc296 and g++296 in PATH Put gcc296 and g++296 first in $PATH variable by creating the following symbolic links: # mv /usr/bin/gcc /usr/bin/gcc323 # mv /usr/bin/g++ /usr/bin/g++323 # ln -s /usr/bin/gcc296 /usr/bin/gcc # ln -s /usr/bin/g++296 /usr/bin/g++ Check hostname Make sure the hostname command returns a fully qualified host name by amending t he /etc/hosts file if necessary: # hostname Install the 3006854 patch: The Oracle / Linux Patch 3006854 can be downloaded here. and run "/tmp /orainstRoot.oracle $ cd orainstall/Disk1 $ . $ su . Screen Name Response Welcome Screen: Click "Next" Inventory Location: Click "OK" UNIX Group Name: Use "dba" Root Script Window: Open another window. Change directory to the Oracle installation files you downloaded and extracted.0" refused by server Xlib: Client is not authorized to connect to Server you will then need to execute the following command to get "runInstaller" workin g again: % rm -rf /tmp/OraInstall If you don't do this.0 RDBMS Software As the "oracle" user account: Set your DISPLAY variable to a valid X Windows display.4.2. login as the root userid. When the script has completed. return to the dialog from the O racle Installer and hit Continue.sh -------------------------------------------------------------------------------Install the Oracle 9. Also make sure that "runInstaller" has stopped running in the background.0. % DISPLAY=<Any X-Windows Host>:0. Then run: runInstaller.zip # cd 3006854 # sh rhel3_pre_install. # unzip p3006854_9204_LINUX./runInstaller Initializing Java Virtual Machine from /tmp/OraInstall2004-05-02_08-45-13PM/jre/ bin/java..sh". kill it. the Installer will hang without giving any error messages.0 % export DISPLAY NOTE: If you forgot to set the DISPLAY environment variable and you get the foll owing error: Xlib: connection to ":0. If no t.

y ou should now apply the 9.2.5.0".PATCH SET 4 VERSION 9.0.4.0 patchset.2. To start.0 patchset can be downloaded from Oracle Metalink: Patch Number: 3501955 Description: ORACLE 9i DATABASE SERVER RELEASE 2 .File Locations: Leave the "Source Path" at its default setting.0.2.5. NOTE: The details and instructions for applying the 9.5. When the "Link" phase is complete. You can leave the Destination path at it's default value which should be "/u01/app/oracle/product/9.0 Patchset Once you have completed installing of the Oracle9i (9.2.0. the Oracle Intelligent Agent.5.2.0 to a temporary directory: % cd orapatch % unzip p3501955_9205_LINUX.5.zip % cpio -idmv < 9205_lnx32_release.4.5.5.0) RDBMS software.2.0.0 Product: Oracle Database Family Release: Oracle 9. let's unpack the Oracle 9.sh script as the "root" user account. Available Products: Select "Oracle9i Database 9.cpio .2. Shutdown any started Oracle processes The Oracle Universal Installer will succeed in starting some Oracle programs.0.2.0. in particular the Oracle HTTP Server (Apache). I provide it here simply as a convenience fo r those how do want to apply the latest patchset.84GB)" and click "Next" Database Configuration: Select "Software Only" and click "Next" Summary: Click "Install" Running root.2. I like to use "OraHome920". For the Destinat ion name.sh script.0 patchset. and p ossibly the Orcle TNS Listener.2. you will be prompted to run the $ORACLE_HOME/ root. The 9.0 patchset in this a rticle is not absolutely necessary.0.0.0" and click "Next" Installation Types: Select "Enterprise Edition (2.2.5.2.5 Select a Platform or Language: Linux x86 Last Updated: 26-MAR-2004 Size: 313M (328923077 bytes) Use the following steps to install the Oracle10g Universal Installer and then th e Oracle 9.0 patchset: % $ORACLE_HOME/Apache/Apache/bin/apachectl stop % agentctl stop % lsnrctl stop -------------------------------------------------------------------------------Install the Oracle 9. Make sure all programs are shutdown before attem pting to continue in installing the Oracle 9.0.0.0.

(OUI release 2... Select a Product to Install: Select "Oracle Universal Installer 10.2. we need to install the Oracle10g Universal Installer into the same $ORACLE _HOME we used to install the Oracle9i RDBMS software. The name we used in this article was "OraHome920" and the desti nation path should be "/u01/app/oracle/product/9. the ru nInstaller command still points to the old installer (2.xml file by default. SuSE-7 or SuSE-8 Failed <<<< >>> Ignoring required pre-requisite failures.0 Production Copyright (C) 1999.2.2.0 patchset and to perform all sub sequent maintenance operations on the Oracle software $ORACLE_HOME.5. Th is must be done by running the runInstaller that is included with the 9. Since the symbolic link does not get updated.2).0.5..1.2.0 patchset we extracted in the above step: % cd orapatch/Disk1 % ./runInstaller -ignoreSysPrereqs Starting Oracle Universal Installer. Oracle Universal Installer. .0. choose the same one you created when installing the Or acle9i software.2.0 patchset.2. Use the following options in the Oracle Universal Installer to install the Oracl e10g OUI: Screen Name Response Welcome Screen: Click "Next" File Locations: The "Source Path" should be pointing to the products.2) and will be run inste ad of the new 10g installer. redhat-3 . Correct the runInstaller symbolic link bug. there is a bug that doe s NOT update the $ORACLE_HOME/bin/runInstaller symbolic link to point to the new 10g installation location. Preparing to launch Oracle Universal Installer from /tmp/OraInstall2004-08-30_07 -48-15PM. Oracle.Next. Checking operating system version: must be redhat-2. cannot be used to install the 9..0.. 2004. Oracle requires the use of the Orac le10g Universal Installer to apply the 9.0" and click "Next" Summary: Click "Install" Exit from the Oracle Universal Installer.0 patchse t and higher! Starting with the Oracle 9. NOTE: Using the old Universal Installer that was used to install the Oracle9i RD BMS software. Continuing..0..0. Please wait . Checking installer requirements.1. UnitedLinux-1.5..0. For the Destination name. Version 10.0".1. All rights reserved. Let's get this thing started by installing the Oracle10g Universal Installer.2.5.0. (Bug 3560961) After the installation of Oracle10g Universal Installer.

The name we used in this article was "OraHome920" and the desti nation path should be "/u01/app/oracle/product/9..sh runInstaller We now install the Oracle 9.5.5. Version 10. Checking installer requirements.1.. 2004. choose the same one you created when installing the Or acle9i software. Here is an overview of the selections I made while performing the 9.0 patc hset install: Screen Name Response Welcome Screen: Click "Next" File Locations: The "Source Path" should be pointing to the products. Continuing.sh script as the "root" user account. For the Destination name. Select a Product to Install: Select "Oracle 9iR2 Patchsets 9.0 patchset by executing the newly installed 10 g Universal Installer: % cd % runInstaller -ignoreSysPrereqs Starting Oracle Universal Installer. Go ahead and run the root.2.0. -------------------------------------------------------------------------------Post Installation Steps After applying the Oracle 9...5. Please wait .0..0. you will need to manually update the $ORACLE_HOME/bin/runInstal ler symbolic link: % cd $ORACLE_HOME/bin % ln -s -f $ORACLE_HOME/oui/bin/runInstaller..0 patchset. redhat-3 .2.xml file by default.0 Production Copyright (C) 1999. Oracle.5.sh script. Oracle Universal Installer.0". Checking operating system version: must be redhat-2.0. When the Link phase is complete.2. SuSE-7 or SuSE-8 Failed <<<< >>> Ignoring required pre-requisite failures.0.sh script.1. Exit Universal Installer Exit from the Universal Installer and continue on to the Post Installation secti on of this article.0. ..2. UnitedLinux-1. we should perform several miscella neous tasks like configuring the Oracle Networking files and setting up startup and shutdown scripts for then the machine is cycled.2.To correct this.. All rights reserved. Preparing to launch Oracle Universal Installer from /tmp/OraInstall2004-08-30_07 -59-30PM.2. you will be prompted to run the $ORACLE_HOME/ro ot.0" and click "Next" Summary: Click "Install" Running root.

Change to the oracle HOME directory and copy the files as follows: % % % % % % cd cd cp cp cp cp oracle_920_installation_files_linux ldap. however.358 on an i686 login: oracle . This can be done using scripts that I already included with the oracle_920_installation_files_linux.ora $ORACLE_HOME/network/admin/ tnsnames. there will be no screen activity until the datab ase creation is complete. Fedora Core release 2 (Tettnang) Kernel 2. You can. $ telnet linux3 .ora $ORACLE_HOME/network/admin/ % cd % lsnrctl start Update /etc/oratab: The dbora script (below) relies on an entry in the /etc/oratab.d/dbora /etc/rc3.ora $ORACLE_HOME/network/admin/ sqlnet.0:Y" >> /etc/oratab Configuring Startup / Shutdown Scripts: Also included in the oracle_920_installation_files_linux.ora $ORACLE_HOME/network/admin/ listener.d/S99dbora /etc/rc5.2. The following tasks will need to be per formed by the root user account: % su # cp /u01/app/oracle/oracle_920_installation_files_linux/dbora /etc/init.d/S99dbora /etc/rc0. navigate to the same directory you started the database creation from.Configuring Oracle Networking Files: I already included sample configuration files (contained in the oracle_920_insta llation_files_linux.tar file is a script ca lled dbora.d/S99dbora /etc/rc4.d # chmod 755 /etc/init. perform the following steps: % su .tar download.sh After starting the RUN_CRDB. This script can be used by the init process to startup and shutdown the database when the machine is cycled. To create t he database.6. and tail the crdb.d/K10dbora /etc/rc6.. bring up a new console window to the Linux databse server as the oracle user account.5-1.tar file) that can be simply copied to their proper location and started.d/dbora /etc/init.d/dbora /etc/init../RUN_CRDB.log log file. Th e scripts are included in the ~oracle/admin/ORA920/create directory. Perform the foll owing actions as the oracle user account: % echo "ORA920:/u01/app/oracle/product/9.d/K10dbora -------------------------------------------------------------------------------Creating the Oracle Database Finally.d/dbora # # # # # ln ln ln ln ln -s -s -s -s -s /etc/init.sh.d/dbora /etc/init.oracle % cd admin/ORA920/create % .d/dbora /etc/init. let's create an Oracle9i database.

Follow the instructions in the VMS_9202_README. If the Alpha system you are using does not have a gr aphic head.log ===================================== 8. Install Oracle 9. However. This will not work because the RUNINSTALLER.2. use a PC with an X-Windows terminal such as Xcursion.000000]runinstaller. Install disk MUST be ODS-5.COM file is not in the root of DKA10 0:[disk1].2 downloaded from the Oracle website. Oracle and the database will be installed on D KA100. In this example they are in the root of DKA100.bash_profile executed [oracle@linux3 oracle]$ cd admin/ORA920/create [oracle@linux3 create]$ tail -f crdb. The OUI requires X-Windows.com dka100:[disk1] . You must first copy RUNINSTALLER.2 on OpenVMS: ===================================== VMS: ==== Using OUI to install Oracle9i Release 2 on an OpenVMS System We have a PC running Xcursion and a 16 Processor GS1280 with the 2 built-in disk s In the examples we booted on disk DKA0: Oracle account is on disk DKA100. Oracle ships a JRE with its product.2 JAR file that comes from the Oracle website Unpack the JAR file as described on the Oracle website.COM from the dka100:[disk1.000000] directory in to dka100:[disk1]: $ Copy dka100:[disk1. It comes in a Java JAR file.txt file on how to restore the 2 backup save sets. Installation uses the 9.0.BC K files. During this install we discovered a problem: Instructions tell you to run @DKA100:[disk1]runinstaller. you should end up with two dir ectories: [disk1] directory [disk2] directory These directories will be in the root of a disk. you will have to install Java on O penVMS so you can unpack the 9. When the two backup save sets files are restored. This will create two .Password: xxxxxx .

Click Next. Click Next. On the terminal.Enable RAC Select No. Click Next. Select database features Select which demo databases are installed. Enter database name and SID Enter the name of the database and Oracle System Identifier (SID): In this example. Installation ends Click Exit.Installation begins Installation takes from 45 minutes to an hour. To do this use a terminal and execute @[. Oracle is now installed in DKA100:[oracle. The tool to create and manage databases is DBCA. . Click Next. for example Ora_home Dka100:[oracle.Database summary View list of products that will be installed. . The OUI will create the directories as necessary .oracle9]orauser .Assign name and directory structure for the Oracle Home ORACLE_HOME Assign a name for your Oracle home. The SID is DB9I1. Click Next. Click Next. Select an operation Select Create a Database. . Select a template Select New Database. type DBCA to launch the Database Assistant.Oracle Installer starts Start the installation Click Next to start the installation. Click Install. To create the first database.Select type of installation Select Enterprise Edition (or Standard Edition or Custom). . Click Next.oracle9]. . the database name is DB9I.oracle9] This is where the OUI will install Oracle.From a terminal window execute: @DKA100:[disk1]runinstaller . . Assign the directory structure for the home.Select product to install Select Database. you must first set up Oracle logicals. Welcome to Database Configuration Assistant DBCA starts.

Enter system account and password. enter: . Select default node Select the node in which you want your database to operate by default. we selected the default. we selected Shared Server Mode. Click Next. To see if the SID is registered in the Listener. Name the server. Click Next.In the example. Running the database Enter show system to see the Oracle database up and running.oracle9. Select database creation options Creating a template saves time when creating a database.E. The final lines start the database. Click Next. Databases connect information Select database. If it does not complete successfully. Listener Listener automatically picks up the SID from the database. DKA100:[oracle. Click OK. Stop database example Example of how to stop the database. Start Listener before database and the SID will display in the Listener. If it completes successfully.oracle9]orauser db9i1 The next line starts the Listener (needed for client connects). Oracle Enterprise Manager Enter address of server and SID. In the example. Open database Database is opened and exposed. Use the UNIX device syntax I. the SID may not appear immediatel y. Create a template Click OK. Set up some files to start and stop the database. Test database server Use the Enterprise Manager console to test the database server. click Exit. we kept the default settings. For example. Specify database storage parameters Select the device and directory. Example of a start file This command sets the logicals to manage the database: $ @dka100:[oracle.database] would be: /DKA100/oracle/oracle9/database/ In the example. Select memory In the example. Click Finish. If you start the database before the Listener. Click Next. build it again. we selected all possible databases. Click OK. Creating and starting Oracle Instance The database builds. Change connection box to AS SYSDBA.

Enterprise Edition" and click "Submit". 7. Select "IBM RS/6000 AIX" and click "Submit". If more detailed information is needed. 6. 9. Each step should be done in the order that it is listed.0) on an AIX platform. Select Product "Oracle Server .oracle.2.2.1 Content Type: TEXT/PLAIN Subject: AIX: Quick Start Guide . 8. Verify OS version is certified with the RDBMS version ====================================================== The following steps are required to verify your version of the AIX operating system is certified with the version of the RDBMS (Oracle9i Release 2 (9.0 RDBMS Installation Date: 25-JUN-2002 Type: REFERENCE Last Revision Date: 14-APR-2004 Status: PUBLISHED Quick Start Guide Oracle9i Release 2 (9.com. Click the "Certify & Availability" button near the left. Read any general notes at the top of the page.2. SQL> exit Preferred method is to use the Enterprise Manager Console. Click the "View Certifications by Platform" link. Point your web browser to http://metalink.2 (9i) 64-bit" and click "Submit".0) RDBMS Installation AIX Operating System Purpose ======= This document is designed to be a quick reference that can be used when installing Oracle9i Release 2 (9. It is NOT designed to replace the Installation Guide or other documentation. 5. Select Product Group "Oracle Server" and click "Submit".$lsnrctl stat Alter a user User is altered: SQL> alter user oe identified by oe account unlock. 3.2. Click the "Certifications" button near the top middle. Select "9. Installation of Oracle 9i on AIX and other UNIX ================================================== AIX: ==== 9.1 Installation of Oracle 9i on AIX Doc ID: Note:201019. 2. A familiarity with the AIX Operating System is assumed. Creation . These steps are the bare minimum that is necessary for a typical install of the Oracle9i RDBMS. ================================================== 9. please see the Appendix at the bottom of this document for additional resources.9.0)): 1. 4.

x version of RDBMS The InstallPrep script currently does not check requirements for AIX5L systems.) * You may also redirect /tmp by setting the TEMP environment variable. 2. Configure Operating System Resources: Ensure that the system has at least the following resources: ? 400 MB in /tmp * ? 256 MB of physical RAM memory ? Two times the amount of physical RAM memory for Swap/Paging space (On systems with more than 2 GB of physical RAM memory. Create an Oracle Software Owner and Group: Create an AIX user and group that will own the Oracle software. Create a Software Mount Point and Datafile Mount Points: . For more information about the script. or you may choose to use the convenient "Unix InstallPrep script" which automates these checks for you.The "Status" column displays the certification status. This is only recommended in rare circumstances where /tmp cannot be expanded to meet free space requirements. Pre-Installation Steps for the System Administrator ==================================================== The following steps are required to verify your operating system meets minimum requirements for installation. Use these steps to manually check the operating system requirements before attempting to install Oracle RDBMS software. but they are highly recommended. 3. The links in the "Addt'l Info" and "Install Issue" columns may contain additional information relevant to a given version. Note that if patches are listed under one of these links. but Swap/Paging space should never be less than physical RAM memory. please contact your system administator or operating system vendor. For assistance with system administration issues. please review the following article: Note:189256. the requirements for Swap/Paging space can be lowered. and should be performed by the root user. The "Addt'l Info" link also contains information about available patchsets. group = dba) ? Use the "smit security" command to create a new group and user Please ensure that the user and group you use are defined in the local /etc/passwd (user) and /etc/group (group) files rather than resolved via a network service such as NIS. The Following Steps Need to be Performed by the Root User: 1.1 UNIX: Script to Verify Installation Requirements for Oracle 9. Installation of patchsets is not required to be considered certified. (user = oracle. including download information. your installation is not considered certified unless you apply them.

3. the JDK could be downloaded from the following URL: http://www.com/developerworks/java/jdk/aix/index.html Please contact IBM Support if you need assistance downloading or installing the JDK.1 from IBM.0) CD-ROM using the command: # mount -rv cdrfs /dev/cd0 /cdrom 8. With the correct CD-ROM mounted.sh script if you have a newer version of an Oracle database already installed on this system.libperfstat 6. 7. and /u04) Use of multiple mount points is not required. Run the rootpre.5 GB. typically /u01) Create a second.perf. Download and install JDK 1. (typically /u02. If the status shown is "Defined".ibm. third. and fourth mount point for the database files. At the time this article was created. Ensure that Asynchronous Input Output (AIO) is "Available": Use the following command to check the current AIO status: # lsdev -Cc aio Verify that the status shown is "Available".perf. /u03. then you must install it from the AIX operating system CD-ROM from IBM. .perfstat # lslpp -l bos.adt.sh script: NOTE: You must shutdown ALL Oracle database instances (if any) before running the rootpre.libm If this fileset is not installed and "COMMITTED". but is highly recommended for best performance and ease of recoverability. run the following command to begin the process to load the required bos. then change the "STATE to be configured at system restart" to "Available" after running the following command: # smit chaio 5.2.Create a mount point for the Oracle software installation. Mount the Oracle CD-ROM: Mount the Oracle9i Release 2 (9. Do not run the rootpre.libm fileset: # smit install_latest AIX5L systems also require the following filesets: # lslpp -l bos. 4.adt. Ensure that the math library is installed on your system: Use the following command to determine if the math library is installed: # lslpp -l bos.sh script. (at least 3.

Use the following command to view them: % env | more Before attempting to run the Oracle Universal Installer (OUI).2. If the oracle user's default shell is the C-shell (/usr/bin/csh). please review the following article: . Example: umask 022 3.profile".0/bin:/usr/ccs/bin: /usr/bin/X11: (followed by any other directories you wish to include) Set this to what you will call your database instance. then the login script will be named ". then the login script will be named ".profile" or ".2.sh script: # /cdrom/rootpre.1 for detailed information) ORACLE_SID DISPLAY 2. (typically 4 characters in length) <ip-address>:0. the login script will be located in the oracle user's home directory ($HOME).Use the following command to run the rootpre. Parameter ----------ORACLE_HOME PATH Value ----------------------------/u01/app/oracle/product/9. The examples below assume that your software mount point is /u01.sh Installation Steps for the Oracle User ======================================= The Following Steps Need to be Performed by the Oracle User: 1. verify that you can successfully run the following command: % /usr/bin/X11/xclock If this does not display a clock on your display screen. Set Environment Variables Environment variables should be set in the login script for the oracle user.login" file. In either case. Verify the Environment Log off and log on as the oracle user to ensure all environment variables are set correctly.login".0 (review Note:153960. Set the umask: Set the oracle user's umask to "022" in you ". If the oracle user's default shell is the Bourne-shell (/usr/bin/bsh) or the Korn-shell (/usr/bin/sh or /usr/bin/ksh).0 /u01/app/oracle/product/9.

sh" .AIXhost". ? At the "Installation Types Screen". ? If prompted. enter the directory to use for the "Inventory Location".Note:153960.sh has been run by root. then click Next. This should have been done in Pre-Installation step 8 above. The install will begin. ? If prompted. then click Next. enter the directory where you have previously installed the JDK 1. ? At the "File Locations Screen".1 FAQ: X Server testing and troubleshooting 4.1 from IBM. ? At the "Choose JDK Home Directory". Click Next. ? At the "Summary Screen". enter the Global Database Name in the format "ORACLE_SID. ? If prompted. choose Oracle9i Database. but is typically "DataServer" and the first three digits of the version. click Next at the "Component Locations Screen" to accept the default directories. choose Enterprise Edition. then click Install. click Next. Also enter a NAME to identify this ORACLE_HOME. select "Use the default character set" (WE8ISO8859P1) at the "Database Character Set Screen".3. Click Next. The SID entry should be filled in with the value of ORACLE_SID. ? At the "Database Configuration Screen". verify the Destination listed is your ORACLE_HOME directory. Start the Oracle Universal Installer and install the RDBMS software: Use the following commands to start the installer: % cd /tmp % /cdrom/runInstaller Respond to the installer prompts as shown below: ? When prompted for whether rootpre. but is usually not under ORACLE_HOME because the oraInventory is shared with all Oracle products on the system. ? If prompted. review your choices. The NAME can be anything. choose the the configuration based on how you plan to use the database. This should have been done in Pre-Installation step 6 above.hostname" at the "Database Identification Screen". Click Next. This can be any directory. enter the "UNIX Group Name" for the oracle user (dba). ? At the "Welcome Screen". Follow instructions regarding running "root. enter the directory where you would like to put datafiles at the "Database File Location Screen". enter "y". then click Next. ? If prompted. ? If prompted. For example: "DataServer920" ? At the "Available Products Screen". ? If prompted. click Next at the "Privileged Operating System Groups Screen" to accept the default values (your current OS primary group). For example: "TEST.

2.2.0) RDBMS installation is now complete and ready for use. When completed. which can be applied to 9. configured a Listener.oracle.html Select the highest version CD-pack displayed to ensure you get the most up-to-date information. On this CD-ROM you will find the Installation Guide.2.and any other prompts. Run slibclean (/usr/sbin/slibclean) as root to remov e ant currently unused modules in kernel and library memory.3. agent and other processes running in or against the ORACLE_HO ME that will have the patch set installation. Unattended install: ------------------Note 1: ------This note describes how to start the unattended install of patch 9. then use a web browser to open the file "index. and started both for you. please review the following article: Note:146566.com/documentation/content. For example. shutdown all instances (cleanly) if running Parallel Server. the install will have created a default database. Appendix A ========== Documentation is available from the following resources: Oracle9i Release 2 (9.5 on AIX 5L. 9.0. Note: If you are having problems changing CD-ROMs when prompted to do so.2. Administrator's Reference.1 How to Unmount / Eject First Cdrom Your Oracle9i Release 2 (9. To perform a silent installation requiring no user intervention: .0.2.2. 9.0.0) CD-ROM Disk1 ---------------------------------------Mount the CD-ROM. Stop all listener. Oracle Documentation Center --------------------------Point your web browser to the following URL: http://otn.4 Shut down the existing Oracle server instance with normal or immediate priority. and other useful documentation.0.2.htm" located at the top level directory of the CD-ROM.

Description filename Identifies the full path of the specific response file -silent Runs Oracle Universal Installer in complete silent mode. Edit the values for all fields labeled as <Value Required> according to the comm ents and examples in the template. Start the Oracle Universal Installer from the directory described in Step 4 whic h applies to your situation. -nowelcome is not necessary.0.sh script should be run in the same way on both the local node and all participating nodes. -nowelcome Suppresses the Welcome window that appears during installation. Note 3: ------Unattended install of 9.sh script from a root session. The Welcome window is suppressed automatically.2. This parameter is optional. You should pass the full path of the response file template you have edited loca lly as the last argument with your own value of ORACLE_HOME and FROM_LOCATION. If you are applying the patch set in a cluster database environment. the root. The following is an exampl e of the command: % . This parameter is optional.. Note 2: ------In order to make an unattended install of 9.1 on Win2K: Running Oracle Universal Installer and Specifying a Response File To run Oracle Universal Installer and specify the response file: Go to the MS-DOS command prompt.0.2.exe -silent -nowelcome -responseFile filename Where. For example. If you use -silent../runInstaller -silent -responseFile full_path_to_your_response_file Run the $ORACLE_HOME/root. C:\program files\oracle\oui\install> setup.5 on Win2K: To perform a silent installation requiring no user intervention: . Run the appropriate response file.Copy the response file template provided in the response directory where you unp acked the patch set tar file. Go to the directory where Oracle Universal Installer is installed.

Create the database manually from a script. Oracle provides a sample database creation script and a sample initialization parameter file with the database sof tware files it distributes. both of which can be edited to suit your needs. or you can launch it as a standalone tool at any time in the future to create a database. However. and if any patches must be installed. The syntax is as follows: setup. Run DCBA as % dbca . and provides a graphical user interface (GUI) that guides you through the creati on of a database. .1. DBCA can be launched by the Oracle Universal Installer. you can still c reate your database manually. In all cases. For example. Start Oracle Universal Installer release 10.2 Oracle and UNIX and other OS: =============================== You have the following options for creating your new Oracle database: .Make a copy of the response file template provided in the response directory whe re you unzipped the patch set file.1. 9.exe. . You can chose not to use DBCA. the Oracle software needs to be installed on your host machine. If you already have existing scripts for creating your database.exe -silent -responseFile ORACLE_BASE\ORACLE_HOME\response_file_path =============================== 9.Use the Database Configuration Assistant (DBCA). what OS settings must be made.2 located in the unzipped area o f the patch set. You should pass the full path of the response file template you have edited locally as the last argument with your own value of ORACLE_HOME and FROM_LOCATIO N.1 Operating system dependencies: -----------------------------------First.0. consider editing your existing script to take advantage of new Oracle f eatures. determine for this version of Oracle.Upgrade an existing database. depending upon the type of install that you select. Disk1\setup. Edit the values for all fields labeled as <Value Required> according to the comm ents and examples in the template.

8_v3 jdk118_v3-glibc-2.1. glibc 2. export ORA_NLS (bepaald de nls directory t. export ORACLE_HOME (bepaald de dire ctory waarin de instance software zich bevind) ORACLE_SID=brdb. Ook moet er mogelijk shmmax (max size of shared memory segment) en dergelijke kernel parameters worden aangepast. LD_LIBRARY_PATH=/u01/app/oracle/product/8.5.b.2 Als de 8.profile.WE8ISO8859P1".v. vt100.org Download jdk-1. territory en characterset t.3 is needed with Oracle version 8.tar. Deze kan gedownload worden van www.v de client applicaties. Example 2: ---------/dbs01 /dbs01 /app Db directory 1 Constante . export PATH plaats deze variabelen in de oracle user profile file: .1. export ORACLE_TERM ORA_NLSxx=$ORACLE_HOME/ocommon/nls/admin/data.bash_profile etc.blackdown. # sysctl -w kernel.conf Opmerking: Het onderstaANDe is algemeen.b.1. export ORACLE_SID (bepaald de naam van de huidige instance) ORACLE_TERM=xterm.2 Environment variables: ---------------------------Make sure you have the following environment variables set: ON UNIX: ======== Example 1: ---------ORACLE_BASE=/u01/app/oracle.7/lib.. on Linux. Linux could be quite critical with respect to libraries in combination with Oracle. export ORACLE_BASE (root voor oracl e software) ORACLE_HOME=$ORACLE_BASE/product/8.3.tar.shmmax = 100000000" >> /etc/sysctl.For example. export NLS_LANG (Dit specificeer t de language.bz2 in /usr/local tar xvif jdk118_v3-glibc-2. datafiles voor meerdere talen) NLS_LANG="Dutch_The NetherlANDs.8 nodig.7 installatie op Linux Redhat 6. of .1.1.3.7.bz2 ln -s /usr/local/jdk118_v3 /usr/local/java 9.1. export LD_LIBRARY_PATH PATH=$ORACLE_HOME/bin:/bin:/user/bin:/usr/sbin:/bin. maar is ook afgeleid van een Oracle 8.1.1.shmmax=100000000 # echo "kernel.1.7 installatie gedaan wordt is ook nog de Java JDK 1.1. ansi of wat ANDers.1.

ora Example 3: ---------/dbs01/app/orace /dbs02/oradata /dbs03/oradata . Note: The period adds the current working directory to the search path.0.6/network/admin /var/opt/oracle/bene/bdump /var/opt/oracle Device Omvang /dev/md/dsk/d1 /dev/md/dsk/d3 /dev/md/dsk/d4 /dev/md/dsk/d5 /dev/md/dsk/d6 /dev/md/dsk/d7 /dev/md/dsk/d8 /dev/md/dsk/d9 /dev/md/dsk/d10 /dev/md/dsk/d110 /dev/md/dsk/d120 /dev/md/dsk/d123 (Mbyte) 100 1200 200 200 4700 8700 8700 8700 8700 8700 8700 8650 Doel Unix Root-filesysteem Unix usr-filesysteem Unix var-filesysteem Unix opt-filesysteem Oracle_Home Oracle datafiles Oracle datafiles Oracle datafiles Oracle datafiles Oracle datafiles Oracle datafiles Oracle datafiles Oracle software database files database files network files .0/db_1 ORACLE_PATH /u01/app/oracle/product/10.ora tnsnames.6/dbs /opt/oracle/product/8.ora # TNSNAMES.ORA Network Configuration File: /dbs01/app/oracle/product/817/network/admin/tnsnames./dbs01 ctory /dbs01 ectory /dbs01 /dbs01 ctory /app /app /app /app /oracle - - $ORACLE_BASE $ORACLE_ADMIN /817 $ORACLE_HOME Oracle base dire Oracle admin dir Constante Oracle home dire /oracle /admin /oracle /product /oracle /product # LISTENER.ORA Network Configuration File: /dbs01/app/oracle/product/817/network/admin/listener.. /opt/oracle/product/8..6/network/admin /opt/oracle/product/8.1. .0/db_1/bin:.ora listener.1.ora alert log oratab Example 6: ---------ORACLE_BASE /u01/app/oracle ORACLE_HOME $ORACLE_BASE/product/10.0. /var/opt/oracle /opt/oracle/admin/bin Example 4: ---------Mountpunt / /usr /var /home /opt /u01 /u02 /u03 /u04 /u05 /u06 /u07 Example 5: ---------initBENE.0.

The majority of code.g. This directory is called [. For exa mple. When a new database is created a new directory is created in the root directory to store database specific configuration files.DB_db name]. The Oracle environment for a VMS user is set up by running the appropriate ORAUSER_dbname. for a database SALES the file specifi cation could be: . If this environment variable is set. shutdown and orauser files. This directory will normally hold the system tablespace data file as well as the database specific startup.WE8ISO8859P1 ON OpenVMS: =========== When Oracle is installed on VMS. configuration files and command procedures are found belo w this root directory.COM file. Syntax Any connect identifier. a root directory is chosen which is pointed to by the logical name ORA_ROOT. if the TWO_TASK environment variable is set to sales. enter the following command: Solaris: $ cat /var/opt/oracle/oratab Other operating systems: $ cat /etc/oratab ON NT/2000: =========== SET SET SET SET SET ORACLE_BASE=G:\ORACLE ORACLE_HOME=G:\ORACLE\ORA81 ORACLE_SID=AIRM ORA_NLSxxx=G:\ORACLE\ORA81\ocommon\nls\admin\data NLS_LANG=AMERICAN_AMERICA. you do not need to specify the connect identifier in the connect string. e. This directory can be placed anywhere on the VM S system. you can connect to a database using the CONNECT username/passwo rd command rather than the CONNECT username/password@sales command. Example PRODDB_TCP to identify the SID and Oracle home directory for the instance that you want to shut down. Each database created on a VMS system will have an ORAUSER file in it's home dir ectory and will be named ORAUSER_dbname. This sets up the necessary command symbols and logical names to access the various ORACLE utilities.ORACLE_SID SAL1 ORAENV_ASK NO SQLPATH /home:/home/oracle:/u01/oracle TNS_ADMIN $ORACLE_HOME/network/admin TWO_TASK Function Specifies the default connect identifier to use in the connect string.COM.

6/admin/bdump /opt/oracle/product/8.1.6/admin/pfile /opt/oracle/product/8.. Een voorbeeld voor database PROD: /opt/oracle/product/8.ORA_ROOT:[DB_SALES]ORAUSER_SALES.6/admin/udump /opt/oracle/product/8.6/admin/adump /opt/oracle/product/8. To access SQLPLUS use the following command with a valid username and password: $ SQLPLUS username/password SQLDBA is also available on VMS and can be invoked similarly: $ SQLDBA username/password 9.6/admin/cdump /opt/oracle/product/8.4 Users en groups: ---------------------Als je met OS verificatie wilt werken.1.1.com file.1.6/admin/PROD /opt/oracle/product/8.ora gezet zijn: remote_login_passwordfile=none (passwordfile authentication via exlusive) .1.1.1. run this command file in your login.6 /opt/oracle/product/8.COM To have the environment set up automatically on login.1. Example mountpoints and disks: -----------------------------Mountpunt / /usr /var /home /opt /u01 /u02 /u03 /u04 /u05 /u06 /u07 Device /dev/md/dsk/d1 /dev/md/dsk/d3 /dev/md/dsk/d4 /dev/md/dsk/d5 /dev/md/dsk/d6 /dev/md/dsk/d7 /dev/md/dsk/d8 /dev/md/dsk/d9 /dev/md/dsk/d10 /dev/md/dsk/d110 /dev/md/dsk/d120 /dev/md/dsk/d123 Omvang 100 1200 200 200 4700 8700 8700 8700 8700 8700 8700 8650 Doel Unix Root-filesysteem Unix usr-filesysteem Unix var-filesysteem Unix opt-filesysteem Oracle_Home Oracle datafiles Oracle datafiles Oracle datafiles Oracle datafiles Oracle datafiles Oracle datafiles Oracle datafiles 9. moet in de init.1.6/admin/adhoc /opt/oracle/product/8.3 OFA directory structuur: -----------------------------Hou je aan OFA.6/admin/create /u02/oradata/PROD /u03/oradata/PROD /u04/oradata/PROD etc.1.1.

0 chown -R oracle:dba /usr/oracle touch /etc/oratab chown oracle:dba /etc/oratab 9.1. .oracle dba : -rw-r--r-.oracle dba chmod 644 * chmod u+x filename chmod ug+x filename 9.Benodigde groups in UNIX: group dba. dba) $umask laat 022 zien. Deze moet voorkomen in de /etc/group file vaak is ook nog nodig de group oinstall groupadd dba groupadd oinstall groupadd oper Maak nu user oracle aan: adduser -g oinstall -G dba -d /home/oracle oracle # # # # # # # groupadd dba useradd oracle mkdir /usr/oracle mkdir /usr/oracle/9.6 test van user oracle: --------------------------log in als user oracle en geef de commANDo's $groups laat de groups zien (oinstall.1. zoniet zet dan de line umask 022 in het .profile umask is de default mode van een file of directory wanneer deze aangemaakt wordt .5 mount points en disks: ---------------------------maak de mount points: mkdir mkdir mkdir mkdir /opt/u01 /opt/u02 /opt/u03 /opt/u04 dit moeten voor een produktie omgeving aparte schijven zijn Geef nu ownership van deze mount points aan user oracle en group oinstall chown chown chown chown -R -R -R -R oracle:oinstall oracle:oinstall oracle:oinstall oracle:oinstall /opt/u01 /opt/u02 /opt/u03 /opt/u04 directories: drwxr-xr-x oracle dba files : -rw-r----.

bash_profile van de user oracle.sh Installatie database op Unix: ----------------------------$ export PATH=$PATH:$ORACLE_HOME/bin $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib $ dbca & or $ cat "db1:/usr/oracle/9.7 Oracle Installer bij 8. Draai nu oracle installer: Linux: startx cd /usr/local/src/Oracle8iR3 .profile of . Het kan zijn dat de installer vraagt om scripts uit te voeren zoals: orainstRoot. Plaats de environment variabelen van 9.sh Nu volgt een grafische setup.1 in het profile.x op Linux: -----------------------------------------Log in als user oracle.ora |sed s/"#db_name = MY_DB_NAME"/"db_name = db1"/|sed s/#contro l_files/control_files/ > initdb1./runInstaller of Ga naar install/linux op de CD en run runIns.sh Om dit uit te voeren: open een nieuw window su root cd $ORACLE_HOME .1./orainstRoot. log uit en in als user oracle.rwxrwxrwx=777 rw-rw-rw-=666 rw-r--r--=644 welke correspondeert met umask 022 Verander nu het .1. Beantwoord de vragen.ora Start and create database : $ export PATH=$PATH:$ORACLE_HOME/bin $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib $ export ORACLE_SID=db1 $ sqlplus /nolog <<! .0:Y >> /etc/oratab" $ cd $ORACLE_HOME/dbs $ cat initdw.sh en root. en test de environment: %env %echo $variablename 9.

A user can be authenticated. and connected to a local database by typing one of the following SQL*Plus commands: CONNECT / AS SYSDBA CONNECT / AS SYSOPER For a remote database connection over a secure connection. is set to N ONE. Add the user to the OSDBA or OS OPER operating system defined groups.Preparing to Use OS Authentication To enable authentication of an administrative user using the operating system yo u must do the following: Create an operating system account for the user. grant unlimited tablespace to myuser.1.2/rdbms/admin @?/rdbms/admin/catproc ! Now create a user and give it wide ranging permissions : $ sqlplus /nolog <<! connect / as sysdba create user myuser identified by password.g: /apps/oracle/product/9. ! 9.8 OS or Password Authentication: ------------------------------------.connect / as sysdba startup nomount create database db1 ! This creates a default database with files in $ORACLE_HOME/dbs Now add the database meta data to actually make it useful : $ sqlplus /nolog <<! connect / as sysdba @?/rdbms/admin/catalog # E. REMOTE_LOGIN_PASSWORDFILE. Ensure that the initialization parameter. enabled as an administrative user.create any table to myuser. This is the default value for this parameter. the user must also sp ecify the net service name of the remote database: CONNECT /@net_service_name AS SYSDBA CONNECT /@net_service_name AS SYSOPER OSDBA: unix : dba windows: ORA_DBA OSOPER: unix : oper . grant create session.

9 Create a 9i database: --------------------------Step 1: Decide on Your Instance Identifier (SID) Step 2: Establish the Database Administrator Authentication Method Step 3: Create the Initialization Parameter File Step 4: Connect to the Instance Step 5: Start the Instance. Connect to the database as user SYS (or as another user with the administrative privilege).Preparing to Use Password File Authentication To enable authentication of an administrative user using password file authentic ation you must do the following: Create an operating system account for the user. thereby enabling connection A S SYSDBA. If the user does not already exist in the database. Create the password file using the ORAPWD utility: ORAPWD FILE=filename PASSWORD=password ENTRIES=max_users Set the REMOTE_LOGIN_PASSWORDFILE initialization parameter to EXCLUSIVE. For example. Step 6: Issue the CREATE DATABASE Statement Step 7: Create Additional Tablespaces Step 8: Run Scripts to Build Data Dictionary Views Step 9: Run Scripts to Install Additional Options (Optional) Step 10: Create a Server Parameter File (Recommended) Step 11: Back Up the Database. If not already created. so he can connect as follows: CONNECT scott/tiger AS SYSDBA 9. Grant the S YSDBA or SYSOPER system privilege to the user: GRANT SYSDBA to scott.1. Step 1: ------- .windows: ORA_OPER -. create the user. user scott has been granted the SYSDBA privilege. This statement adds the user to the password file.

When these are set. you may get better performance with a smaller shared poo l. This was buffer_pool_keep in Oracle8i. db_keep_cache_size . A large shared_po ol_size is not always better than a smaller shared pool. If the parameter is specified. then the user-specified value indicates a minimum value for the memory pool.This parameter defines the pool that is shared by all users i n the system. db_recycle_cache_size . 16.% ORACLE_SID=ORATEST. export ORACLE_SID Step 2: see above ----------------Step 3: init. This data buffer pool was a sub-pool of db_block_buffers in Oracle8i. Reme mber. 8. then the default is either 48 MB or 4MB * number of CP Us * granule size. including SQL areas and data dictionary caching. as well as setting the size of the Java pool. whichever is greater Modifiable ALTER SYSTEM Basic No Oracle10g Obsolete Oracle SGA Parameters Using AMM via the sga_target parameter renders several parameters obsolete. db_xk_cache_size . then these parameters will default to zero: db_cache_size . or 32 ) sets the size for specialized areas of the buffer area used to store data from tablespaces with varying blocksizes. 4.ora ---------------Note DB_CACHE_SIZE 10g: Parameter type Big integer Syntax DB_CACHE_SIZE = integer [K | M | G] Default value If SGA_TARGET is set: If the parameter is not specified.This parameter determines the number of database block buffers i n the Oracle SGA and is the single most important parameter in Oracle memory. large_pool_size . you can continue to perform manual SGA tuning if you like.This parameter determines the amount of memory to allocate for Orac le's redo log buffers. If your application con tains non-reusable SQL.This is used to store small tables that perform full table scans. then the default is 0 (internally determined by the Oracle Database). but if you set sga_target. If there is a high amount of update activity. If SGA_TARGET is not set.This is reserved for table blocks from very large tables that perform full table scans. shared_pool_size .This is a special area of the shared pool that is reserved for SGA usage when using the multi-threaded server. log_buffer . the log_buffer should be allocated more space. . The large pool is used for para llel query and RMAN processing. they impose a hard limit on the maximum size of their respective areas.This set of parameters (with x replaced by 2.

"(PROTOCOL=TCP)(PRE=oracle.2.This parameter specifies the size of the memory area used by J ava. yo u may want to allocate additional memory. "/vobs/oracle/oradata/mynewdb/control02.This parameter determines the memory region that is allocated f or in-memory sorting. Oracle Corporation does not recommend using rea_size unless the instance is configured with the shared server option.0 .aurora.ctl". # "(PROTOCOL=TCPS)(PRE=oracle. (PROTOCOL=TCP) # Miscellaneous COMPATIBLE=9.server.SGiopServer)".ctl". streams_pool_size . which is similar to the shared pool used by SQL and PL/SQL.ctl") # Archive LOG_ARCHIVE_DEST_1='LOCATION=/vobs/oracle/oradata/mynewdb/archive' LOG_ARCHIVE_FORMAT=%t_%s.dbf LOG_ARCHIVE_START=TRUE # Shared Server # Uncomment and use first DISPATCHES parameter below when your listener is # configured for SSL # (listener. Starting with Oracle9i. When the v$sysstat value sorts (disk) become excessive.SGiopServer)" DISPATCHERS="(PROTOCOL=TCP)(SER=MODOSE)". hash_area_size .This parameter determines the memory region reserved for oins.server. If you set pga_aggre gate_target. hash j hash_a Oracle pga_ag purpos Sample Initialization Parameter File # Cache and I/O DB_BLOCK_SIZE=4096 DB_CACHE_SIZE=20971520 # Cursors and Library Cache CURSOR_SHARING=SIMILAR OPEN_CURSORS=300 # Diagnostics and Statistics BACKGROUND_DUMP_DEST=/vobs/oracle/admin/mynewdb/bdump CORE_DUMP_DEST=/vobs/oracle/admin/mynewdb/cdump TIMED_STATISTICS=TRUE USER_DUMP_DEST=/vobs/oracle/admin/mynewdb/udump # Control File Configuration CONTROL_FILES=("/vobs/oracle/oradata/mynewdb/control01.ora and sqlnet.This is a new area in Oracle Database 10g that is used to pr ovide buffer areas for the streams components of Oracle.java_pool_size -. This is exactly the same automatic tuning principle behind the Oracle9i pga_aggr egate_target parameter that made these parameters obsolete.aurora. recommends that you enable automatic sizing of SQL work areas by setting gregate_target hash_area_size is retained only for backward compatibility es. "/vobs/oracle/oradata/mynewdb/control03.ora) # DISPATCHERS = "(PROTOCOL=TCPS)(SER=MODOSE)". then these parameters are ignored: sort_area_size .

DB_NAME=mynewdb # Distributed.org db_name=test10g ########################################### # Diagnostics and Statistics ########################################### background_dump_dest=C:\oracle/admin/test10g/bdump core_dump_dest=C:\oracle/admin/test10g/cdump user_dump_dest=C:\oracle/admin/test10g/udump ########################################### . Replication and Snapshot DB_DOMAIN=us.com REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE # Network Registration INSTANCE_NAME=mynewdb # Pools JAVA_POOL_SIZE=31457280 LARGE_POOL_SIZE=1048576 SHARED_POOL_SIZE=52428800 # Processes and Sessions PROCESSES=150 # Redo Log and Recovery FAST_START_MTTR_TARGET=300 # Resource Manager RESOURCE_MANAGER_PLAN=SYSTEM_PLAN # Sort.oracle. Bitmap Indexes SORT_AREA_SIZE=524288 # Automatic Undo Management UNDO_MANAGEMENT=AUTO UNDO_TABLESPACE=undotbs Reasonable 10g init.ora: -----------------------########################################### # Cache and I/O ########################################### db_block_size=8192 db_file_multiblock_read_count=16 ########################################### # Cursors and Library Cache ########################################### open_cursors=300 ########################################### # Database Identification ########################################### db_domain=antapex. Hash Joins.

Bitmap Indexes ########################################### pga_aggregate_target=95420416 ########################################### # System Managed Undo and Rollback Segments ########################################### undo_management=AUTO undo_tablespace=UNDOTBS1 LOG_ARCHIVE_DEST=c:\oracle\oradata\log LOG_ARCHIVE_FORMAT=arch_%t_%s_%r.0.dbf' Flash_recovery_area: location where RMAN stores diskbased backups Step 4: Connect to the Instance: -------------------------------- . "C:\oracle\oradata\test10g\control03.2.0 ########################################### # Processes and Sessions ########################################### processes=150 ########################################### # SGA Memory ########################################### sga_target=287309824 ########################################### # Security and Auditing ########################################### audit_file_dest=C:\oracle/admin/test10g/adump remote_login_passwordfile=EXCLUSIVE ########################################### # Shared Server ########################################### dispatchers="(PROTOCOL=TCP) (SERVICE=test10gXDB)" ########################################### # Sort.ctl". Hash Joins.# File Configuration ########################################### control_files=("C:\oracle\oradata\test10g\control01.1. "C:\oracle\oradata\tes t10g\control02.ctl".ctl") db_recovery_file_dest=C:\oracle/flash_recovery_area db_recovery_file_dest_size=2147483648 ########################################### # Job Queues ########################################### job_queue_processes=10 ########################################### # Miscellaneous ########################################### compatible=10.

log') SIZ E 100M. use the CREATE DATABASE statement.dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED. I n this example. GROUP 2 ('/dbms/tdbaplay/playdwhs/recovery/redo_logs/redo02. .dbf' SIZE 20M REUSE UNDO TABLESPACE undotbs DATAFILE '/vobs/oracle/oradata/mynewdb/undotbs01. $ SQLPLUS /nolog CONNECT SYS/password AS SYSDBA Step 5: Start the Instance: --------------------------Start an instance without mounting a database. Typically. Only the SGA is created and background proc esses are started in preparation for the creation of a new database.log') SIZ E 100M. you are not required to specif y the PFILE clause: STARTUP NOMOUNT At this point. GROUP 3 ('/vobs/oracle/oradata/mynewdb/redo03. Oracle 10g create statement: CREATE DATABASE playdwhs USER SYS IDENTIFIED BY cactus USER SYSTEM IDENTIFIED BY cactus LOGFILE GROUP 1 ('/dbms/tdbaplay/playdwhs/recovery/redo_logs/redo01.log') SIZE 100M MAXLOGFILES 5 MAXLOGMEMBERS 5 MAXLOGHISTORY 1 MAXDATAFILES 100 MAXINSTANCES 1 CHARACTER SET US7ASCII NATIONAL CHARACTER SET AL16UTF16 DATAFILE '/vobs/oracle/oradata/mynewdb/system01. Use the STARTUP command with the NOMOUNT option. because the initialization parameter file is stored in the default location. GROUP 2 ('/vobs/oracle/oradata/mynewdb/redo02.log') SIZE 100M.Start SQL*Plus and connect to your Oracle instance AS SYSDBA.dbf' SIZE 325M REUSE EXTENT MANAGEMENT LOCAL DEFAULT TEMPORARY TABLESPACE tempts1 DATAFILE '/vobs/oracle/oradata/mynewdb/temp01. there is no database. Step 6: Issue the CREATE DATABASE Statement: -------------------------------------------To create the new database. The following sta tement creates database mynewdb: CREATE DATABASE mynewdb USER SYS IDENTIFIED BY pz6r58 USER SYSTEM IDENTIFIED BY y1tz5p LOGFILE GROUP 1 ('/vobs/oracle/oradata/mynewdb/redo01. you do this only durin g database creation or while performing maintenance on the database.log') SIZE 100M.

separate from user tablespace CREATE TABLESPACE indx LOGGING DATAFILE '/u01/oracle/oradata/mynewdb/indx01.dbf' SIZE 1000M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED.sql Real Application Clusters Creates Real Application Clusters data di ctionary views Oracle supplies other scripts that create additional structures you can use in m anaging your database and creating database applications.dbf' SIZE 1000M REUSE UNDO TABLESPACE undotbs DATAFILE '/dbms/tdbaplay/playdwhs/database/default/undotbs01.GROUP 3 ('/dbms/tdbaplay/playdwhs/recovery/redo_logs/redo03. These scripts are list ed in Table B-2. Step 9: Run Scripts to Build Data Dictionary Views Run the scripts necessary to build views.sql All databases Creates the data dictionary and public synonyms for ma ny of its views Grants PUBLIC access to the synonyms catproc.dbf' SIZE 500M RE USE EXTENT MANAGEMENT LOCAL SYSAUX DATAFILE '/dbms/tdbaplay/playdwhs/database/default/sysaux01. see Chapter 8. or used with PL/SQL catclust. For information about creating tablespaces. -. CONNECT SYS/password AS SYSDBA -.dbf' SIZE 25M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL. and PL/SQL packages: CONNECT SYS/password AS SYSDBA @/u01/oracle/rdbms/admin/catalog.log') SIZ E 100M MAXLOGFILES 5 MAXLOGMEMBERS 5 MAXLOGHISTORY 1 MAXDATAFILES 100 MAXINSTANCES 1 CHARACTER SET US7ASCII NATIONAL CHARACTER SET AL16UTF16 DATAFILE '/dbms/tdbaplay/playdwhs/database/default/system01.create a tablespace for indexes. " Managing Tablespace s". synonyms. See Also: .create a user tablespace to be assigned as the default tablespace for users CREATE TABLESPACE users LOGGING DATAFILE '/u01/oracle/oradata/mynewdb/users01.sql @/u01/oracle/rdbms/admin/catproc.dbf' SIZE 25M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL.sql EXIT catalog.dbf' SIZE 300M REUSE DEFAULT TEMPORARY TABLESPACE temp TEMPFILE '/dbms/tdbaplay/playdwhs/database/default/temp01.sql All databases Runs all scripts required for.

sql Performance management SYS Allows I/O to be traced on a table-by-table basis catoctk. Final ly.sql Performance monitoring SYS Respectively start and stop collecting performance tuning statistics utlchn1. utlconst. Then it reloads the packages STANDARD and DBMS_STANDARD. which are necessary for using PL/SQL. Create s tables for storing the output of the ANALYZE command with the CHAINED ROWS opt ion. utllockt. It also reloads the packages STANDARD and DBMS_STANDARD. It first alters some data dictionary tables.sql Performance management SYS Creates views that can dynamically displ ay lock dependency graphs catexp7. Can handle both physical and logical rowids.sql PL/SQL SYS Used to change from 32-bit to 64-bit word size or vice ver sa.sql Performance management SYS or SYSDBA Enables and disables generatio n of Oracle Trace output dbmspool. Creates the default table (EXCEPTIONS) for storing exceptions from enabling constraints. and types. in tree structure format utlpwdmg.sql Heterogeneous Services SYS Installs packages for administering heterog eneous services catio.sql Storage management Any user For use with the Oracle Database.sql Advanced Queuing Creates the dictionary objects required for Advanced Queuing catrep.sql Security SYS Creates the Oracle Cryptographic Toolkit package catqueue. utlip.Your operating system-specific Oracle documentation for the exact names and loca tions of these scripts on your operating system Table B-2 Creating Additional Data Dictionary Structures Script Name Needed For Run By Description catblock.sql Performance monitoring SYS or SYSDBA Displays a lock wait-for graph . It inv alidates all existing PL/SQL modules by altering certain dictionary tables so th at subsequent recompilations will occur in the format required by the database. and triggers into the shared pool userlock.sql Metadata management Any user Creates tables and views that show dep endencies between objects utlexpt1.sql Oracle Replication SYS Runs all SQL scripts for enabling database rep lication catrman.sql Concurrency control SYS or SYSDBA Provides a facility for user-name d locks that can be used in a local or clustered environment to aid in sequencin g application actions utlbstat. This script recompiles existing PL/SQL modules in the format required by the new database. SQL statements. and recovery functionality provided b y the Recovery Manager (RMAN) utility dbmsiotc. which are necessary for any PL/SQL compilations.sql PL/SQL SYS Used primarily for upgrade and downgrade operations. such as packages.sql Storage management Any user Analyzes chained rows in index-organize d tables dbmsotrc.sql Constraints Any user For use with the Oracle Database.sql Security SYS or SYSDBA Creates PL/SQL functions for default passwor . procedu res.sql Recovery Manager RMAN or any user with GRANT_RECOVERY_CATALOG_OWNER role Creates recovery manager tables and views (schema) to establish an external recovery catalog for the backup. utlirp. Can handle both physical and logical rowids.sql Exporting data to Oracle7 SYS Creates the dictionary views needed fo r the Oracle7 Export utility to export data from the Oracle Database in Oracle7 Export file format caths. it triggers a recompilation of all PL/SQL modules.sql Year 2000 compliance Any user Provides functions to validate that C HECK constraints on date columns are year 2000 compliant utldtree. restore.sql Performance management SYS or SYSDBA Enables DBA to lock PL/SQL pac kages.sql and utlestat.

utlsampl.99 7% 22% 13% 1% 55 17 12 10 1% /dbms/tdbaaccp/accproca/ 1% /dbms/tdbaaccp/accproca/ 1% /dbms/tdbaaccp/accproca/ 1% /dbms/tdbaaccp/accproca/ ..25 15 4 LPs: PPs: 4 8 240 480 64 128 80 160 LPs: PPs: 4 8 240 480 64 128 80 160 LPs: PPs: 4 8 240 480 64 128 0.sql PL/SQL SYS Recompiles all existing PL/SQL modules that were previously in an INVALID state.78 3. such as emp and dept.00 5. FS: /dbms/tdbaplay/playdwhs/admin /dbms/tdbaplay/playdwhs/database /dbms/tdbaplay/playdwhs/recovery /dbms/tdbaplay/playdwhs/export /dbms/tdbaaccp/accpdwhs/admin /dbms/tdbaaccp/accpdwhs/database /dbms/tdbaaccp/accpdwhs/recovery /dbms/tdbaaccp/accpdwhs/export /dbms/tdbaprod/proddwhs/admin /dbms/tdbaprod/proddwhs/database /dbms/tdbaprod/proddwhs/recovery SIZE(G): 0.23 11. such as scott utlscln.25 15.51 4. Met daaronder het de volgende mount points: /dbms/tdba[env]/[env]dwhs/admin /dbms/tdba[env]/[env]dwhs/database /dbms/tdba[env]/[env]dwhs/recovery /dbms/tdba[env]/[env]dwhs/export /dev/fslv32 admin /dev/fslv33 database /dev/fslv34 recovery /dev/fslv35 export 1. Dat wil zeggen.VALIDATE STRUCTURE of a partitioned table utlxplan. and types.sql Examples SYS or any user with DBA role Creates sample tables.playdwhs .sql Performance management SYS Creates the TKPROFER role to allow the T KPROF profiling utility to be run by non-DBA users utlvalid. and users.25 15 4 5 SIZE(G): 0.sql Performance management Any user +++++++ Graag op de pl003 de twee volgende instances: .00 4..proddwhs Graag conform de huidige standaard voor filesystems. utlrp. such as packages. Sets the default password profile parameters and enab les password management features.00 0. procedures. al deze databases komen op volumegroup roca_vg.d complexity verification.sql Partitioned tables Any user Creates tables required for storing out put of ANALYZE TABLE .25 15 4 5 SIZE(G): 0.accpdwhs En op de pl101 de volgende instance: .sql Oracle Replication Any user Copies a snapshot schema from another sn apshot site utltkprf.

dbf' SIZE 20M REUSE UNDO TABLESPACE undotbs DATAFILE '/vobs/oracle/oradata/mynewdb/undotbs01. EXIT .dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED. Or use a character set as AL32UTF8 Or use mirrored logs with logfile group 1 ('/disk03/oracle/oradata/DB1/redo1a.dbf' SIZE 325M REUSE EXTENT MANAGEMENT LOCAL DEFAULT TEMPORARY TABLESPACE tempts1 DATAFILE '/vobs/oracle/oradata/mynewdb/temp01. The following sample script creates some additional tablespaces: CONNECT SYS/password AS SYSDBA -.dbf' SIZE 25M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL.log') size 100M.log'.log') size 100M +++++++ Step 7: Create Additional Tablespaces: -------------------------------------To make the database functional. group 2 ('/disk05/oracle/oradata/DB1/redo2a.dbf' SIZE 25M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL. '/disk04/oracle/oradata/DB1/redo1b.log') SIZE 100M MAXLOGFILES 5 MAXLOGMEMBERS 5 MAXLOGHISTORY 1 MAXDATAFILES 100 MAXINSTANCES 1 CHARACTER SET US7ASCII NATIONAL CHARACTER SET AL16UTF16 DATAFILE '/vobs/oracle/oradata/mynewdb/system01.log'. GROUP 2 ('/vobs/oracle/oradata/mynewdb/redo02./dbms/tdbaprod/proddwhs/export 5 80 160 CREATE DATABASE mynewdb USER SYS IDENTIFIED BY pz6r58 USER SYSTEM IDENTIFIED BY y1tz5p LOGFILE GROUP 1 ('/vobs/oracle/oradata/mynewdb/redo01. separate from user tablespace CREATE TABLESPACE indx LOGGING DATAFILE '/vobs/oracle/oradata/mynewdb/indx01.log') SIZE 100M. ('/disk06/oracle/oradata/DB1/redo2b.create a user tablespace to be assigned as the default tablespace for users CREATE TABLESPACE users LOGGING DATAFILE '/vobs/oracle/oradata/mynewdb/users01. you need to create additional files and tablesp aces for users.log') SIZE 100M. -.create a tablespace for indexes. GROUP 3 ('/vobs/oracle/oradata/mynewdb/redo03.

and public synonyms for many of the views. 9.Step 8: Run Scripts to Build Data Dictionary Views: --------------------------------------------------Run the scripts necessary to build views. @/dbms/tdbaaccp/ora10g/home/sqlplus/admin/pupbld.ora'.ora' FROM PFILE='/vobs/oracle/admin/mynewdb/scripts/init.sql @/dbms/tdbaaccp/ora10g/home/rdbms/admin/catexp.SQL: Runs all scripts required for or used with PL/SQL. SHUTDOWN -.ora' FROM PFILE='/opt/app/oracle/admin/PEGACC/scripts/init.ora' FROM PFILE='/opt/app/oracle/admin/OWS/pfile/init. CREATE SPFILE='/opt/app/oracle/product/9.10 Oracle 9i licenses: ------------------------ . Step 10: Create a Server Parameter File (Recommended): -----------------------------------------------------Oracle recommends you create a server parameter file as a dynamic means of maint aining initialization parameters.SQL: Creates the views of the data dictionary tables. CREATE SPFILE='/opt/app/oracle/product/9. CONNECT SYS/password AS SYSDBA -. then restarted using the ser ver parameter file (in the default location).2/dbs/spfilePEGACC. and PL/SQL packages: CONNECT SYS/password AS SYSDBA @/vobs/oracle/rdbms/admin/catalog. The instance is shut down.sql @/vobs/oracle/rdbms/admin/catproc.2/dbs/spfilePEGTST.ora' FROM PFILE='/opt/app/oracle/admin/PEGTST/scripts/init. Grants PUBLIC access to the synonyms.sql.sql EXIT Do not forget to run as SYSTEM the script /sqlplus/admin/pupbld.ora'. CATPROC.create the server parameter file CREATE SPFILE='/vobs/oracle/dbs/spfilemynewdb.ora'.this time you will start up using the server parameter file CONNECT SYS/password AS SYSDBA STARTUP EXIT CREATE SPFILE='/opt/app/oracle/product/9.ora'. synonyms. The following script creates a server parameter file from the text initializatio n parameter file and writes it to the default location.sql The following table contains descriptions of the scripts: Script Description CATALOG. the dynamic perfo rmance views.2/dbs/spfileOWS.

However.000 per processor extra. The Oracle STD edition is and EE edition costs $800 (with a 25 user minimum). set the LICENSE_MAX_USERS in itialization parameter in the database's initialization parameter file. you cannot create more user s.named user licesnsing: If you use named user licensing.000 user licenses be purchased or that th e database be licensed via the per-processor pricing model.000 per pr ocessor. Therefor e the LICENSE_MAX_SESSIONS and LICENSE_SESSIONS_WARNING initialization parameters have been deprecated.Setting License Parameters Oracle no longer offers licensing by the number of concurrent sessions. the licensing method can't be changed after it is initial ly licensed. To limit the number of users created in a database. the costs could exceed the costs under the per-processor model. per user There is still an annual support fee of 22 percent. which makes financial sense if there'll never be many users accessing the database. do not allow multiple users to log in using the same user name.000 per processor. Oracle can help you enforce this form of licens ing. ich should be budgeted in licensed at $300 per user (with a five user minimum). Once this limit is reached. then Oracle will require that either 1. If 1. Currently the Standard (STD) edition of the database is priced at $15. So if the business grows and requires significantly more users to access the database. and the Enterprise (EE) edition is priced at $40. Therefore. The RAC feature is $20. which only mak es five connections to the database. and multiply that number by th e licensing cost of the database and database options you need.per-processor licensing: Oracle encourages customers to license the database on the per-processor licensi ng model. With this licensing method you count up the number of CPUs in your computer.000 users access the database through an application server. so that named user licensing can help you ensure compliance with your Oracle license agreement. . . as shown in the following example: LICENSE_MAX_USERS = 200 . It's possible to license the database on a per-user basis. and you n eed to add 22 percent annually for the support contract. You also have to understand what Oracle corporation considers to be a user for t he purposes of licensing purposes. You can set a limit on the number of users created in the database. Note: This mechanism assumes that each person accessing the database has a unique user name and that no people share a user name. wh addition to the licensing fees.

A logminer checkpoint is requested by def ault every 10Mb of redo mined. So this parameter needs to set to at least 2 even for a single non-parallel apply process.ora: -----------------------PARALLEL_MAX_SERVERS=(> apply or capture processes) Each capture process and apply process may use multiple parallel execution servers. Th e default amount of shared_pool memory allocated to logminer is 10Mb. Specify a value for this parameter to ensure that there are enough parallel execution servers. This se ction only gives you a brief overview of the available licensing options and costs. Using this tool.11. so we incre ased the number of parallel_max_server above this figure of 12. 9. The apply process by default needs two parallel servers.If the support contract is not paid each year.9i) or svrmgrl (only i n 8i). is using the "Database Configuratio n Assistant". Older Database installations: ----------------------------------CREATE DATABASE Examples on 8. Parameters set using DBMS_CAPTURE_ADM package: Using the DBMS_CAPTURADM. 9i database. you can safely define as much as 3 execution cap ture process per CPU _CHECKPOINT_FREQUENCY=1 Increase the frequency of logminer checkpoints especially in a database wit h significant LOB or DDL activity. _SGA_SIZE Amount of memory available from the shared pool for logminer processing. In our installation we went for 12 apply server. _kghdsidx_count=1 This parameter prevents the shared_pool from being divided among CPUs LOG_PARALLELISM=1 This parameter must be set to 1 at each database that capt ures events. . in a graphical environment. so if you have additional questions you really shou ld contact an Oracle sales representative Note about 10g init.x The easiest way to create a 8i. then the customer is not licensed to upgrade to the latest version of the database and must re-purchase all of the licenses over again in order to upgrade versions. Increase this value esp ecially in environments where large LOBs are processed.SET_PARAMETER procedure there a 3 a parameters that are of common usage to affect installation PARALLELISM=3 There may be only one logminer session for the whole ruleset and only one e nqueuer process that will push the objects. you are able to create a database and setup the NET configurati on and the listener. It is also possible to use a script running in sqlpus (8i.

REUSE 10M REUSE -.dbf' SIZE 2M REUSE AUTOEXTEND ON NEXT 5M MAXSIZE 150M.. REUSE. -.dbf' SIZE 3M REUSE AUTOEXTEND ON NEXT 5M MAXSIZE 150M.Create additional tablespaces .Create rollback segments.log' SIZE 1M '/u01/oracle/rbdb1/redo03. -.Bring new rollback segments online and drop the temporary system one . run catalog.dbf' SIZE 5M REUSE AUTOEXTEND ON NEXT 5M MAXSIZE 150M.log' SIZE 1M DATAFILE '/u01/oracle/rbdb1/system01. CREATE ROLLBACK SEGMENT rb3 STORAGE(INITIAL tablespace rbs.RBS: For rollback segments -. 50K NEXT 250K) 50K NEXT 250K) 50K NEXT 250K) 50K NEXT 250K) REUSE.dbf' SIZE AUTOEXTEND ON NEXT 10M MAXSIZE 200M CHARACTER SET WE8ISO8859P1. CREATE TABLESPACE users DATAFILE '/u01/oracle/rbdb1/users01.USERs: Create user sets this as the default tablespace -. CREATE TABLESPACE temp DATAFILE '/u01/oracle/rbdb1/temp01. CREATE ROLLBACK SEGMENT rb4 STORAGE(INITIAL tablespace rbs.Alter temporary system tablespace online before proceding ALTER ROLLBACK SEGMENT rb_temp ONLINE.Create another (temporary) system tablespace CREATE ROLLBACK SEGMENT rb_temp STORAGE (INITIAL 100 k NEXT 250 k).Charactersets that are used a lot in europe: WE8ISO8859P15 WE8MMSWIN1252 Example 1: ---------$ SQLPLUS /nolog CONNECT username/password AS sysdba STARTUP NOMOUMT PFILE=<path to init. CREATE ROLLBACK SEGMENT rb1 STORAGE(INITIAL tablespace rbs.log' SIZE 1M '/u01/oracle/rbdb1/redo02.sql -.Create database CREATE DATABASE rbdb1 CONTROLFILE REUSE LOGFILE '/u01/oracle/rbdb1/redo01.sql run catproq. -..ora> -. -.TEMP: Create user sets this as the temporary tablespace CREATE TABLESPACE rbs DATAFILE '/u01/oracle/rbdb1/rbs01. CREATE ROLLBACK SEGMENT rb2 STORAGE(INITIAL tablespace rbs. REUSE.log' SIZE 1M '/u01/oracle/rbdb1/redo04.

.sql create rollback segment SYSROLL tablespace system storage (initial 2M next 2M minextents 2 maxextents 255). etc.ALTER ALTER ALTER ALTER ROLLBACK ROLLBACK ROLLBACK ROLLBACK SEGMENT SEGMENT SEGMENT SEGMENT rb1 rb2 rb3 rb4 ONLINE.3. ONLINE.4/dbs/initDB1. create tablespace RBS datafile '/disk01/oracle/oradata/DB1/rbs01.3.ora create database "DB1" maxinstances 2 maxlogfiles 32 maxdatafiles 254 characterset "US7ASCII" datafile '/disk02/oracle/oradata/DB1/system01. ONLINE.4/rdbms/admin/catalog.4/rdbms/admin/catproq. .log'. '/disk04/oracle/oradata/DB1/redo1b.3. create rollback segment RBS_1 tablespace RBS1 storage (initial 512K next 512K minextents 50). ('/disk06/oracle/oradata/DB1/redo2b. group 2 ('/disk05/oracle/oradata/DB1/redo2a.log') size 100M. Example 2: ---------connect internal startup nomount pfile=/disk00/oracle/software/7.sql @/disk00/oracle/software/7. alter rollback segment RBS02 online. DROP ROLLBACK SEGMENT rb_temp .log') size 100M REM * install data dictionary views @/disk00/oracle/software/7.dbf' size 128M autoextent on next 8M maxsize 256M logfile group 1 ('/disk03/oracle/oradata/DB1/redo1a. create rollback segment RBS02 tablespace RBS storage (initial 500K next 500K minextents 2 optimal 1M). ALTER ROLLBACK SEGMENT rb_temp OFFLINE.dbf' size 25M default storage ( initial 500K next 500K pctincrease 0 minextents 2 ). alter rollback segment SYSROLL online.log'. alter rollback segment RBS01 online. ONLINE.

create a service with oradim oradim -new -sid -startmode -pfile 2.log' SIZE 2048K.3.ora" SVRMGR> CREATE DATABASE hd LOGFILE 'G:\oradata\hd\redo01. alter user sys temporary tablespace TEMP.sql Oracle 9i: ---------- .etc.4/rdbms/admin/catdbsyn.b. PRODUCT_USER_PROFILE. 'G:\oradata\hd\redo02.sql @catproq.log' SIZE 2048K MAXLOGFILES 32 MAXLOGMEMBERS 2 MAXLOGHISTORY 1 DATAFILE 'G:\oradata\hd\system01. etc. alter user system default tablespace TOOLS temporary tablespace TEMP. other tablespaces you need run other scripts you need. @catalog..sql @/disk00/oracle/software/7.3.v. create tablespace DATA datafile '/disk05/oracle/oradata/DB1/data01.dbf' size 25M default storage ( initial 500K next 500K pctincrease 0 maxextends UNLIMITED ).4/rdbms/admin/pubbld.dbf' SIZE 264M REUSE AUTOEXTEND ON NEX T 10240K MAXDATAFILES 254 MAXINSTANCES 1 CHARACTER SET WE8ISO8859P1 NATIONAL CHARACTER SET WE8ISO8859P1.log' SIZE 2048K. SQLPLUS_USER_PROFILE Example 3: on NT/2000 8i best example: -------------------------------------Suppose you want a second database on a NT/2000 Server: 1.. sqlplus /nolog (or use svrmgrl) startup nomount pfile="G:\oracle\admin\hd\pfile\init. 'G:\oradata\hd\redo03. connect system/manager @/disk00/oracle/software/7.sql t.

Verder bestaat de kern uit: . Deze kijken in ORATAB om te zien welk e databases gestart moeten worden.Example 1: ---------CREATE DATABASE mynewdb USER SYS IDENTIFIED BY pz6r58 USER SYSTEM IDENTIFIED BY y1tz5p LOGFILE GROUP 1 ('/vobs/oracle/oradata/mynewdb/redo01.2 dbstart en dbshut: -----------------------Het script dbstart zal oratab lezen en ook tests doen en om de oracle versie te bepalen.2. 9.log') SIZE 100M.0.1 oratab: ------------Inhoud ORATAB in /etc of /var/opt: Voorbeeld: # $ORACLE_SID:$ORACLE_HOME:[N|Y] # ORCL:/u01/app/oracle/product/8. of startdb en stopdb of wat daarop lijkt. 9.dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED.dbf' SIZE 20M REUSE UNDO TABLESPACE undotbs DATAFILE '/vobs/oracle/oradata/mynewdb/undotbs01.5:Y # De oracle scripts om de database te starten en te stoppen zijn: $ORACLE_HOME/bin /dbstart en dbshut.log') SIZE 100M MAXLOGFILES 5 MAXLOGMEMBERS 5 MAXLOGHISTORY 1 MAXDATAFILES 100 MAXINSTANCES 1 CHARACTER SET US7ASCII NATIONAL CHARACTER SET AL16UTF16 DATAFILE '/vobs/oracle/oradata/mynewdb/system01.log') SIZE 100M. GROUP 3 ('/vobs/oracle/oradata/mynewdb/redo03.2 Automatische start oracle bij system boot: ============================================== 9.2.dbf' SIZE 325M REUSE EXTENT MANAGEMENT LOCAL DEFAULT TEMPORARY TABLESPACE tempts1 DATAFILE '/vobs/oracle/oradata/mynewdb/temp01. GROUP 2 ('/vobs/oracle/oradata/mynewdb/redo02.

oracle -c "/path/to/$ORACLE_HOME/bin/dbstart" # Start DB's su . Voor dbshut geldt een overeenkomstig verhaal. en zal deze databases starten. De Oracle database processen zijn een van de eerste processen die worden afgeslo ten. sysinit.3 init.$$ su CUR. export ORACLE_ADMIN su PRD.d/S99 dbstart (or equivalent) file: Tijdens het opstarten van Unix worden de scrips in de /etc/rc2.d uitgevoerd die beginnen met een 'S' en in alfabetische volgorde.d/K10oracle # Configuration File: /opt/oracle/admin/bin/K10oracle ORACLE_ADMIN=/opt/oracle/admin. voeg nu de juiste entries toe in het /etc/rc2.3 Het stoppen van Oracle in unix: ----------------------------------Tijdens het down brengen van Unix (shutdown -i 0) worden de scrips in de directo ry /etc/rc2. export ORACLE_ADMIN . Het bestand K10oracle is gelinkt met de /etc/rc2. 9. of customized via een customized startdb script: ORACLE_ADMIN=/opt/oracle/admin. Het bestAND S99oracle is gelinkt met deze directory.$$ oracle -c "$ORACLE_ADMIN/bin/startdb WPRD 1>$ORACLE_ADMIN/log/WPRD/startW 2>&1" oracle -c "$ORACLE_ADMIN/bin/startdb WTST 1>$ORACLE_ADMIN/log/WTST/startW 2>&1" oracle -c "$ORACLE_ADMIN/bin/startdb WCUR 1>$ORACLE_ADMIN/log/WCUR/startW 2>&1" 9. Het kijkt in oratab welke sid 's op 'Y' staan.het starten van sqldba. svrmgrl of sqlplus vervolgens doen we een connect vervolgens geven we het startup commando.$$ su TST.d uitgevoerd die beginnen met een 'K' en in alfabetische volgorde.2. rc: -----------------------Voor een automatische start.oracle -c "/path/to/$ORACLE_HOME/bin/lsnrctl start" # Start listener su . De Oracle database processen zullen als (een van de) laatste processen worden ge start. Inhoud S99oracle: su .oracle -c "/path/tp/$ORACLE_HOME/bin/namesctl start" # Start OraNames (o ptional) Het dbstart script is een standaard Oracle script.

oracle -c "$ORACLE_ADMIN/bin/stopdb WTST 1>$ORACLE_ADMIN/log/WTST/stopWTST. $ORACLE_ADMIN/env/$ORACLE_SID.su $$ su $$ su $$ .oracle -c "$ORACLE_ADMIN/bin/stopdb WCUR 1>$ORACLE_ADMIN/log/WCUR/stopWCUR. Dit script heeft 1 paramet er. ORACLE_SID # Configuration File: /opt/oracle/admin/bin/startdb # Algemene omgeving zetten .env . 2>&1" . $ORACLE_ADMIN/env/profile ORACLE_SID=$1 export $ORACLE_SID # Settings van het RDBMS .oracle -c "$ORACLE_ADMIN/bin/stopdb WPRD 1>$ORACLE_ADMIN/log/WPRD/stopWPRD. 2>&1" . ORACLE_SID # Configuration File: /opt/oracle/admin/bin/stopdb # Algemene omgeving zetten . $ORACLE_ADMIN/env/$ORACLE_SID.4 startdb en stopdb: ---------------------Startdb [ORACLE_SID] -------------------Dit script is een onderdeel van het script S99Oracle.env # Het starten van de database sqlplus /nolog << EOF connect / as sysdba startup EOF # Het starten van de listener lsnrctl start $ORACLE_SID # Het starten van de intelligent agent voor alle instances #lsnrctl dbsnmp_start Stopdb [ORACLE_SID] ------------------Dit script is een onderdeel van het script K10Oracle. $ORACLE_ADMIN/env/profile ORACLE_SID=$1 echo $ORACLE_SID # Omgeving zetten RDBMS . Dit script heeft 1 paramet er. 2>&1" 9.

cd $ORACLE_ADMIN/batches/bin. $ORACLE_ADMIN/env/$ORACLE_SID. export ORACLE_SID su .. .6 Autostart in NT/Win2K: -------------------------1) Older versions . export ORACLE_HOME ORACLE_SID=WCUR . sqlplus /nolog << EOF connect / as sysdba shutdown immediate EOF 9..log 2>&1 # Configuration File: /opt/oracle/admin/batches/bin/batches.# Het stoppen van de intelligent agent #lsnrctl dbsnmp_stop # Het stoppen van de listener lsnrctl stop $ORACLE_SID # Het stoppen van de database. export ORACLE_SID su . export ORACLE_ADMIN ORACLE_HOME=/opt/oracle/product/8.1.oracle -c ".sql 1> $ORACLE_ADMIN/batches/log/batches$ORACLE_SID. cd $ORACLE_ADMIN/batches/bin. $ORACLE_ADMIN/env/$ORACLE_SID. case $BL_TRACE in T) set -x . 1=monday. sqlplus /NOLOG @$ORACLE_ADMIN/batches/bin/Analyse_ WILLOW2K.sql 1> $ORACLE_ADMIN/batches/log/batches$ORACLE_SID.oracle -c ". sqlplus /NOLOG @$ORACLE_ADMIN/batches/bin/Analyse_ WILLOW2K.en v.sh >> /opt/oracle/admin/batches/log/batcheserroroutput..5 Batches: -----------De batches (jobs) worden gestart door het Unix proces cron # Batches (Oracle) # Configuration File: /var/spool/cron/crontabs/root # Format of lines: # min hour daymo month daywk cmd # # Dayweek 0=sunday. export BL_TRACE ' worden alle comman do's getoond.`date +"%y%m%d"` 2>&1" ORACLE_SID=WCON . esac ORACLE_ADMIN=/opt/oracle/admin. $ORACLE_ADMIN/env/profile .6.`date +"%y%m%d"` 2>&1" 9.sh # Door de op de commandline ' BL_TRACE=T . 0 9 * * 6 /sbin/sh /opt/oracle/admin/batches/bin/batc hes.en v. $ORACLE_ADMIN/env/profile . .

library archives of object files.l og 2) NT Registry value HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0\ORA_SID_AUTOSTART REG_EXPAND_SZ TRUE 9.mk install mk -f $ORACLE_HOME/svrmgr/lib/ins_svrmgr.An Oracle patch set has been applied via an Oracle provided installer.mk install mk -f $ORACLE_HOME/network/lib/ins_network.delete the existing instance FROM the command prompt: oradim80 -delete -sid SID recreate the instance FROM the command prompt: oradim -new -sid SID -intpwd <password> -startmode <auto> -pfile <path\initSID. [Step 1] Log into the UNIX system as the Oracle software owner Typically this is the user 'oracle'. .o ra> Execute the command file FROM the command prompt: oracle_home\database\strt<sid> . Oracle.cmd Check the log file generated FROM this execution: oracle_home\rdbmsxx\oradimxx. Relinking occurs automatically under these circumstances: . distribute individual object files. like many application vendors who create products for UNIX.7 Tools: ---------Relink van Oracle: -----------------info: showrev -p pkginfo -i relink: mk -f $ORACLE_HOME/rdbms/lib/ins_rdbms. This guarantees a reliable integration with functions provi ded by the OS system libraries. perform this basic environment check fir st: . and some source files which then get ?relinked? at the operating system level d uring installation to create usable executables. [STEP 2] Verify that your $ORACLE_HOME is set correctly: For all Oracle Versions and Platforms.mk install $ORACLE_HOME/bin relink all Relinking Oracle Background: Applications for UNIX are generally not distributed as complete exec utables.An Oracle product has been installed with an Oracle provided installer.

i. shut down both the database and the listener. net_server. plsql client_sharedlib Client shared library interMedia ctx ctx Oracle Text utilities precomp All precompilers that have been installed utilities All utilities that have been installed oemagent oemagent Note: To give the correct permissions to the nmo and nmb execu tables. usage: r elink <parameter> accepted values for parameter: all Every product executable that has been installed oracle Oracle Database executable only network net_client. [Step 3] Verify and/or Configure the UNIX Environment for Proper Relinking: For all Oracle Versions and UNIX Platforms: The Platform specific environment v ariables LIBPATH.e.X (64Bit) on Solaris (64Bit) OS . [Step 5] Run the OS Commands to Relink Oracle: Before relinking Oracle. % cd $ORACLE_HOME/bin % relink .% cd $ORACLE_HOME % pwd . Oracle 8.1] How to Set UNIX Environment Variables for help with setting UNIX environment variables) If on SOLARIS (Sparc or Intel) with: Oracle 7..: % setenv LD_LIBRARY_PATH ${ORACLE_HOME}/lib:${LD_LIBRARY_PATH} (see [NOTE:131207. or 8.X.X.3..Set LD_LIBRARY_PATH_64=$ORACLE_HOME/lib Oracle 9..Set LD_LIBRARY_PATH=$ORACLE_HOME/lib If using 64bit(non 9i) Oracle.X or 9. $ORACLE_H . & SHLIB_PATH typically are already set to include system library locations lik e '/usr/lib'. then add the $O RACLE_HOME/lib directory to them where appropriate..Set LD_LIBRARY_PATH=$ORACLE_HOME/lib [Step 4] For all Oracle Versions and UNIX Platforms: Verify that you performed Step 2 correctly: % env|pg ..should return '/usr/ccs/bin/ld' If using 32bit(non 9i) Oracle..Ensure that /usr/ccs/bin is before /usr/ucb in $PATH % which ld .X. .X -----------------------*** NEW IN 8i AND ABOVE *** A 'relink' script is provided in the $ORACLE_HOME/bin directory.this will display all of the command's options..Doing this will ensure that $ORACLE_HOME is set correctly in your current env ironment.X (32Bit) on Solaris (64Bit) OS .X. .Set LD_LIBRARY_PATH_64=$ORACLE_HOME/lib64 Oracle 9.Set LD_LIBRARY_PATH=$ORACLE_HOME/lib .. LD_LIBRARY_PATH. you need only check what they are set to first. 8..0. cman client net_client.1.X: .1.X.make sure that you see the correct absolute path for OME in the variable definitions..Set LD_LIBRARY_PATH=$ORACLE_HOME/lib32 . In most cases.

ogmsctl % cd $ORACLE_HOME/rdbms/lib % make -f ins_rdbms. However.mk install For executables: names.sh script after relinking oemagent. oid Note: ldap option is available only from 9i.mk install For executables related to ldap (for example Oracle Internet Directory): % cd $ORACLE_HOME/ldap/lib % make -f ins_ldap.4 Operating System and Version: Solaris 8 . 'relink all' will recreate the shared libraries that most executables r ely on and thereby resolve most issues that require a proper relink. tkprof.mk install For executables: isqlplus % cd $ORACLE_HOME/sqlplus/lib % make -f ins_sqlplus install_isqlplus For executables: dbsnmp. orapwd. -orSince the 'relink' command merely calls the traditional 'make' commands. sqlldr. dbv. trcroute. You can relink most of the executables associated with an Oracle Server Installa tion by running the following command: % relink all This will not relink every single executable Oracle provides (you can discern which executables were relinked by checking their timestamp wit h 'ls -l' in the $ORACLE_HOME/bin directory). tnsping % cd $ORACLE_HOME/network/lib % make -f ins_net_client. oemevent. oratclsh % cd $ORACLE_HOME/network/lib % make -f ins_oemagent. svrmgrl. imp. trcasst. exp. namesctl % cd $ORACLE_HOME/network/lib % make -f ins_names. lsnrctl % cd $ORACLE_HOME/network/lib % make -f ins_net_server.mk install For executables: tnslsnr. rman.you must run the root. you would have to manually r elink ldap. ogms.mk install For executables: osslogin. mig. onrsd. Thread Status: Closed From: Ray Stell 20-Apr-05 21:43 Subject: solaris upgrade RDBMS Version: 9. ldap ldap.2. In 8i.mk install Note: Unix Installation/OS: RDBMS Technical Forum Displayed below are the messages of the selected thread. you still have the option of running the 'make' commands independently: For executables: oracle.0.mk install For executables: sqlplus % cd $ORACLE_HOME/sqlplus/lib % make -f ins_sqlplus.

8 to 5. -------------------------------------------------------------------------------From: Samir Saad 21-Apr-05 03:28 Subject: Re : solaris upgrade You must relink even if you find that the databases came up after Solaris upgrad e and they seem fine. etc.o) could not be loaded. soumya anand 21-Apr-05 10:59 Subject: Re : solaris upgrade Hello Ray. 0509-136 Symbol acancel64 (number 2) is not exported from dependent module /unix.9. 0509-136 Symbol aio_nwait (number 4) is not exported from dependent module /unix. Does this require a new oracle 9. . Soumya Note: troubles after relink: ---------------------------If you see on AIX something that resembles the following: P522:/home/oracle $lsnrctl exec(): 0509-036 Cannot load program lsnrctl because of the following errors: 0509-130 Symbol resolution failed for /usr/lib/libc. 0509-026 System error: Cannot run a file that does not have a valid form at. 0509-150 Dependent module libc. after an OS upgrade it sufficient to relink the executables. Regards.0 ee server install or relink or nothing at all? Thanks.): Product Version: solaris upgrade I need to move a server from solaris 5. Import. 0509-192 Examine . 0509-136 Symbol iosuspend64 (number 3) is not exported from dependent module /unix.e. SQL*Loader.2. As for the existing Oracle installations.Error Number (if applicable): Product (i.o] because: 0509-136 Symbol kaio_rdwr64 (number 0) is not exported from dependent module /unix.loader section symbols with the 'dump -Tv' command. As rightly pointed by Samir. 0509-136 Symbol listio64 (number 1) is not exported from dependent module /unix. Samir.a(aio_64.a[aio_64. -------------------------------------------------------------------------------From: Oracle. they will all be fine.

Monitor the following files on your system to detect system problems: tail -f /var/adm/SYSLOG tail -f /var/adm/messages tail -f /var/log/syslog =============== 10.If this occurs. "strace " on Linux. swap errors. Then p ress Enter. "trace" on SCO Unix or call your system administrator to find the equivalent com mand on your system. Do one of the following: Restart your system. 1. Monitor your Unix system: Logfiles: --------Unix message files record all system problems like disk errors. trace: -----truss -aef -o /tmp/trace svrmgrl To trace what a Unix process is doing enter: truss -rall -wall -p <PID> truss -p $ lsnrctl dbsnmp_start NOTE: The "truss" command works on SUN and Sequent. CONSTRAINTS: =============== 10. you have asynchronous I/O turned off.1 index owner en table owner information: DBA_INDEXES ------------------------------------------set linesize 100 SELECT DISTINCT substr(owner. etc. Run smitty aio and move the cursor to Configure defined Asynchronous I/O. To turn on asynchronous I/O: Run smitty chgaio and set STATE to be configured at system restart from defined to available. Press Enter. Use "tusc" on HP-UX. NFS problems. . 10) as INDEX_OWNER.

r_constraint_name.constraint_name=b. 1. SUBSTR(c.constraint_name=b. SELECT substr(owner. substr(table_owner. 1.column_name. as as as as as INDEX_NAME. 40) substr(tablespace_name. INDEX_TYPE. 1.constraint_type as TYPE.constraint_type as TYPE. DBA_CONS_COLUMNS b WHERE c. 40) BLEVEL. INDEX_TYPE. 1.constraint_name.OWNER in ('TRIDION_CM'. 1.constraint_type in ('P'. 40) FROM DBA_INDEXES WHERE owner<>table_owner.STATUS FROM DBA_INDEXES order by index_owner. SUBSTR(c.constraint_type in ('P'.column_name. SUBSTR(c. 10) substr(table_owner. 1. 1. 1. 10) as TABLE_OWNER. 40) as COLUMN_NAME FROM DBA_CONSTRAINTS c.1. 40) substr(index_type. 40) as INDEX_NAME. 40) as TABLE_NAME FROM DBA_INDEXES WHERE table_name='HEAT_CUSTOMER'. 40) as CONSTRAINT_NAME. INDEX_NAME. 1.constraint_type as TYPE. substr(index_type.constraint_name AND c. 'R'. SELECT distinct c. 1.constraint_name AND c.2 PK en FK constraint relations: ---------------------------------SELECT c. 1. substr(index_name. as as as as as INDEX_OWNER. 'U'). 1. 1. 40) as REF_KEY.'VPOUSERDB') AND c. 40) as COLUMN_NAME FROM DBA_CONSTRAINTS c. 10) as INDEX_TYPE.NUM_ROWS. 1. 1. 40) as REF_KEY. 1.substr(index_name. SUBSTR(b. TABLE_NAME 10. 10) substr(index_name. 10) substr(table_name. 1. 'U'). 1. TABLE_OWNER. . SELECT c. SELECT DISTINCT substr(owner.OWNER='RM_LIVE' AND c. SUBSTR(c.constraint_name.table_name. 10) substr(table_owner. SUBSTR(c. 40) as CONSTRAINT_NAME. 10) substr(table_name. 1. 'R'. DBA_CONS_COLUMNS b WHERE c. 10) as INDEX_OWNER. 40) as TABLE_NAME. TABLE_OWNER. substr(table_name.40) substr(index_type.table_name. 40) as TABLE_NAME.'TCMLOGDBUSER'. SUBSTR(b. TABLE_NAME. 1. 1. TABLE_SPACE. SUBSTR(c. 1.r_constraint_name.

constraint_name=b. REF_TABLE varchar2(40)).constraint_name. SUBSTR(c. 1. 40) as REF_KEY FROM DBA_CONSTRAINTS c.OWNER='RM_LIVE' AND c.table_name from dba_cons_columns where b.constraint_type as TYPE. SUBSTR(c.constraint_type ='R'. 1. 40) as TABLE_NAME. 40) as TABLE_NAME. DBA_CONS_COLUMNS b WHERE c. SUBSTR(c. 1. 1. 40) as TABLE_NAME. 40) as CONSTRAINT_NAME.constraint_name.r_constrain t_name) as REF_TABLE FROM DBA_CONSTRAINTS c.table_name.constraint_name AND .constraint_name AND c. (select b. REF_KEY varchar2(40). 40) as TABLE_NAME. 1.constraint_type as TYPE. ---------------------------------------------------------------------SELECT c. SUBSTR(c.constraint_name AND c. insert into reftables (type.constraint_name=b. 1. 40) as REF_KEY. TABLE_NAME varchar2(40).r_constraint_name. SUBSTR(c.OWNER='RM_LIVE' AND c. ----------------------------------------------------------------------create table reftables (TYPE varchar2(32). 40) as CONSTRAINT_NAME. 40) as CONSTRAINT_NAME. SUBSTR(c. DBA_CONS_COLUMNS b WHERE c.constraint_name.table_name. DBA_CONS_COLUMNS b WHERE c.constraint_name.r_constraint_name. SUBSTR(c. CONSTRAINT_NAME varchar2(40).constraint_type as TYPE. SELECT c.table_name.OWNER='RM_LIVE' AND c. 1. 1. SUBSTR(c.ref_key) SELECT distinct c. DBA_CONS_COLUMNS b WHERE c. 1.constraint_type ='R'. 1.r_constraint_name.table_name.constraint_name. SUBSTR(c. SUBSTR(c. 40) as REF_KEY FROM DBA_CONSTRAINTS c. SUBSTR(c.constraint_name=b. 40) as REF_KEY FROM DBA_CONSTRAINTS c. 1.r_constraint_name.constraint_name AND c.SUBSTR(c.constraint_name=b.constraint_name=c. 1.table_name. 40) as CONSTRAINT_NAME. update reftables set REF_TABLE=(select distinct table_name from dba_cons_columns where owner='RM_LIVE' and CONSTRAINT_NAME=REF_KEY).constraint_type ='R'.

constraint_name AND c. 1.constraint_name. SELECT 'ALTER TABLE BRAINS. SELECT 'SELECT * FROM '||c. SELECT SUBSTR(owner. as TABLE_NAME.column_name from dba_constraints c. o. . 30) as OWNER. c. 1.owner='BRAINS'. 1. 1. 1. DBA_CONS_COLUMNS b WHERE c.table_name.constraint_name=o. 10) as OWNER. SUBSTR(table_name. 10) constraint_type SUBSTR(table_name. (select table_name from c where c.table_name||' WHERE '||b.3 PK en FK constraint informatie: DBA_CONSTRAINTS -----------------------------------.column_name||' '||c. 40) as REF_KEY.constraint_type. constraint_type as TYPE.' FROM DBA_CONSTRAINTS WHERE owner='PROJECTS' AND constraint_type='R'. constraints SELECT SUBSTR(owner.constraint_name. 40) as TABLE_NAME.constraint_name=b. as TYPE.search_c ondition FROM DBA_CONSTRAINTS c.r_constraint_name.constraint_type = 'C'. SUBSTR(r_constraint_name. status FROM DBA_CONSTRAINTS WHERE OWNER='BRAINS' AND constraint_type in ('R'. 40) as CONSTRAINT_NAME. 1.owner and all foreign key.constraint_type='R' and c.constraint_type ='R' or c.OWNER='RM_LIVE' AND c.'||table_name||' enable constraint '||constraint_na me||'. o. 10. SELECT 'ALTER TABLE PROJECTS.'||table_name||' disable constraint '||constraint_nam e||'. DELETE_RULE as DELETE_RULE. 'U').constraint_type ='P' .c.OWNER='BRAINS' AND c. 'P'. dba_cons_columns o where c. c.' FROM USER_CONSTRAINTS WHERE owner='BRAINS' AND constraint_type='R'.constraint_name and c. select select c. SUBSTR(constraint_name.

1. 1. 40) as substr(s. CONSTRAINT_NAME. DBA_INDEXES WHERE c. 40) as substr(s.tablespace_name. TABLESPACE as as as as as x Type.index_name. DBA_INDEXES WHERE c. SELECT c.4 opsporen bijbehorende index van een bepaalde constraint: DBA_INDEXES. 1.constraint_type substr(x.owner='JOOPLOC'. as as as as x Type. 40) as substr(c.STAT US from dba_constraints where owner='FIN_VLIEG' and constraint_type in ('P'.owner en alle primary key constraints bepalen van een bepaalde user. TABLE_NAME. OWNER 10.index_name AND c. 1. op bepaa lde objects Zelfde query: Zet OWNER='gewenste_owner' AND constraint_type='P' select owner.constraint_name. SUBSTR(r_constraint_name. 30) as CONSTRAINT_NAME. 1.'U').5 opsporen tablespace van een constraint of constraint owner: --------------------------------------------------------------SELECT substr(s. 1. -.constraint_name=x. INDX_NAME.table_name. status FROM DBA_CONSTRAINTS WHERE OWNER='BRAINS' AND constraint_type in ('R').constraint_type substr(x. INDX_NAME. Type . 1.constraint_name Segmentname.segment_name. 40) substr(x. 1. 40) substr(c. 40) substr(c. Constraintname. 40) FROM DBA_CONSTRAINTS c. 10.TABLE_NAME. 1.'R'. 1. CONSTRAINT_TYPE.constraint_name=x. CONSTRAINT_NAME.owner. Tablespace. 30) as REF_KEY. 1. DBA_CONSTRAINTS c WHERE s. 1. 10) FROM DBA_CONSTRAINTS c.segment_name=c.constraint_name='UN_DEMO1'. DELETE_RULE as DELETE_RULE.segment_type.R_CONSTRAINT_NAME. 10) as FROM DBA_SEGMENTS s.tablespace_name.constraint_name. 40) substr(c. 1. DBA_C ONSTRAINTS -----------------------------------------------------------SELECT c. CONSTRAINT_NAME.SUBSTR(constraint_name. 40) substr(c.index_name AND c.constraint_name.index_name.

10. 1. 10.owner='PROJECTS'. 10) as INDEX_OWNER.uitzetten: alter table tablename disable constraint constraint_name -. -. maar ook kan: ALTER TABLE DEMO ENABLE PRIMARY KEY.aanzetten: alter table tablename enable constraint constraint_name -.voorbeeld: ALTER TABLE EMPLOYEE DISABLE CONSTRAINT FK_DEPNO. 1. substr(c. substr(i.table_name.' FROM DBA_CONSTRAINTS WHERE owner='MIS_OWNER' AND constraint_type='R' AND TABLE_NAME LIKE 'MKM%'.column_position as POSITION FROM DBA_INDEXES i.'||table_name||' enable constraint '||constrain t_name||'.' FROM DBA_CONSTRAINTS WHERE owner='MIS_OWNER' AND constraint_type='R' AND TABLE_NAME LIKE 'MKM%'. 40) as TABLE_NAME.column_name. DBA_IND_COLUMNS c WHERE i. c.index_owner.owner='SALES'. 1. 40) as INDEX_NAME.index_name=c.Alle FK constraints van een schema in een keer uitzetten: SELECT 'ALTER TABLE MIS_OWNER.7 Aan en uitzetten van constraints: -------------------------------------.AND c. ALTER TABLE EMPLOYEE ENABLE CONSTRAINT FK_DEPNO. .index_name.index_type. substr(i. substr(c. SELECT 'ALTER TABLE MIS_OWNER.6 Ophalen index create statements: -----------------------------------DBA_INDEXES DBA_IND_COLUMNS SELECT substr(i.index_name AND i. 15) as INDEX_TYPE. 40) as COLUMN_NAME.'||table_name||' disable constraint '||constrai nt_name||'. 1. 1.

custid. kunnen we deze dubbele records plaatsen in de EXCEPTIONS table: 1. c.8 Constraint aanmaken en initieel uit: ---------------------------------------Dit kan handig zijn bij bijvoorbeeld het laden van een table waarbij mogelijk dubbele waarden voorkomen ALTER TABLE CUSTOMERS ADD CONSTRAINT PK_CUST PRIMARY KEY (custid) DISABLE. 10. contactname varchar(10).10. 3.2: Voorbeeld met ON DELETE CASCADE: .name FROM CUSTOMERS c. Als nu blijkt dat bij het aanzetten van de constraint. Welke dubbele rijen: SELECT c.row_id. er dubbele records voorko men. create table contacts ( contactid number not null.9. aanmaken EXCEPTIONS table: @ORACLE_HOME\rdbms\admin\utlexcpt.sql 2.9 Gebruik PK FK constraints: -----------------------------10.9. EXCEPTIONS s WHERE c. indien er een row in contacts bestaat met hetzelfd e custid. Nu bevat de EXCEPTIONS table de dubbele rijen. Constraint aaNzetten: ALTER TABLE CUSTOMERS ENABLE PRIMARY KEY exceptions INTO EXCEPTIONS.1: Voorbeeld normaal gebruik met DRI: create table customers ( custid number not null. Hierbij kun je dus niet zondermeer een row met een bepaald custid uit customers verwijderen. CONSTRAINT pk_contactid PRIMARY KEY (contactid). custid number. CONSTRAINT pk_cust PRIMARY KEY (custid) ). custname varchar(10). 10.rowid=s. CONSTRAINT fk_cust FOREIGN KEY (custid) REFERENCES customers(custid) ).

commit. delete: -----------------------------------Als voorbeeld op table customers: CREATE OR REPLACE PROCEDURE newcustomer (custid NUMBER. Ook de clausule "ON DELETE SET NULL" kan gebruikt worden. / CREATE OR REPLACE PROCEDURE delcustomer (cust NUMBER) IS BEGIN delete from customers where custid=cust. Gewone users kunnen informatie opvragen uit USER_ en ALL_ views. DBA_IND_COLUMNS. Nu is het wel mogelijk om in customers een row te verwijderen.11 User datadictonary views: ----------------------------We hebben al gezien dat we voor constraint informatie voornamelijk de onderstaan de views raadplegen: DBA_TABLES DBA_INDEXES.10 Procedures voor insert. CONSTRAINT pk_contactid PRIMARY KEY (contactid). custid number. contactname varchar(10). DBA_CONSTRAINTS. END. END. De row in contacts wordt dan namelijk ook verwijdert.create table contacts ( contactid number not null. / 10. custname VARCHAR) IS BEGIN INSERT INTO customers values (custid. commit.custname). USER_ : in the schema van de user ALL_ : waar de user bij kan . 10. terwijl in contacts een overeenkomende custid bestaat. CONSTRAINT fk_cust FOREIGN KEY (custid) REFERENCES customers(custid) ON DELETE C ASCADE ). DBA_SEGMENTS Deze zijn echter voor de DBA.

DBMS_JOB and scheduled Jobs: ================================ Used in Oracle 9i and lower versions.'OK BLEVEL'. alter index HEAT_CUSTOMER_EMAIL_ADDRESS rebuild. -.'OK BLEVEL'.12 Create en drop index examples: ----------------------------------CREATE UNIQUE INDEX HEATCUST0 ON HEATCUST(CUSTTYPE) TABLESPACE INDEX_SMALL PCTFREE 10 STORAGE(INITIAL 163840 NEXT 163840 PCTINCREASE 0 ).13 Check the height of indexes: --------------------------------Is an index rebuild neccessary ? SELECT index_name. alter index HEAT_CUSTOMER_EMAIL_ADDRESS unusable. USER_INDEXES. DROP INDEX indexname 10. USER_TAB_COLUMNS.0.'BLEVEL HIGH') OK FROM dba_indexes WHERE owner='SALES' and blevel > 3.'OK BLEVEL'. . alter index HEAT_CUSTOMER_POSTAL_CODE rebuild. 10.4.14 Make indexes unusable (before a large dataload): -----------------------------------------------------.'OK BLEVEL'.Enable Indexes again alter index HEAT_CUSTOMER_DISCON_DATE rebuild.1.'OK BLEVEL'.3.Make Indexes unusable alter index HEAT_CUSTOMER_DISCON_DATE unusable. owner.USER_TABLES. USER_VIEWS. USER_CONS_COLUMNS. USER_CONSTRAINTS. cat tab col dict ALL_TABLES ALL_INDEXES ALL_CONSTRAINTS ALL_VIEWS ALL_SEQUENCES ALL_CONS_COLUMNS ALL_TAB_COLUMNS ALL_SOURCE 10. blevel. decode(blevel. USER_SEQUENCES. 2. ================================ 11. USER_SOURCE. alter index HEAT_CUSTOMER_POSTAL_CODE unusable.

WHAT() DBMS_JOB. Dit kan via de init.SUBMIT (job OUT BINARY_INTEGER. Submit a job: -------------The jobnumber (if you use SUBMIT() ) will be derived from the sequence SYS.2 DBMS_JOB package: ---------------------DBMS_JOB.ora: JOB_QUEUE_PROCESSES=1 ation en jobqueue's JOB_QUEUE_INTERVAL=60 11. interval IN VARCHAR2 DEFAULT 'NULL'. replic check interval . no_parse IN BOOLEAN DEFAULT FALSE).11. 1.INTERVAL() DBMS_JOB.v. max 36 t.1 DBMS_JOB.b.NEXT_DATE() DBMS_JOB. last_date.CHANGE() DBMS_JOB. next_date.JOBSE aantal SNP processes (SNP0. substr(what.REMOVE() DBMS_JOB. next_date IN DATE DEFAULT SYSDATE. SNP1). next_date in DATE DEFAULT SYSDATE interval IN VARCHAR2 DEFAULT 'NULL'. The difference between ISUBMIT and SUBMIT is that ISUBMIT specifies a job number . 50) from dba_jobs. whereas SUBMIT returns a job number generated by the DBMS_JOB package Look for submitted jobs: -----------------------select job. no_parse in BOOLEAN DEFAULT FALSE).SUBMIT() DBMS_JOB.1 SNP background process: ---------------------------Scheduled jobs zijn mogelijk wanneer het SNP background process geactiveerd is. interval.RUN() 11.SUBMIT() ----------------------There are actually two versions SUBMIT() and ISUBMIT() PROCEDURE DBMS_JOB.2. PROCEDURE DBMS_JOB. what IN VARCHAR2. what IN VARCHAR2.ISUBMIT (job IN BINARY_INTEGER.

LAST_DAY(SYSDATE+1). ''ESTIMATE''. / So suppose you submit the above job at 08. END. 'LAST_DAY(ADD_MONTHS(LA ST_DAY(SYSDATE+1). 'DBMS_DDL. COMMIT.next_date => SYSDATE . COMMIT. NULL.'. Sysdate.what => 'test1.ANALYZE_OBJECT(''TABLE''.SUBMIT(:jobno.interval => 'SYSDATE+1/24'). end. 'test1.15h. SYSDATE.' . commit. 50).SUBMIT(:jobno.'). end.Q Suppose you have the following procedure: create or replace procedure test1 is begin dbms_output. Then the next. commit.SUBMIT (job => jobno . 'SYSDATE + 1'). / Example 1: ---------variable jobno number. / DECLARE jobno NUMBER. . ''X1''. and first time. begin DBMS_JOB. begin DBMS_JOB. end.'. 'Sysdate+1'). / Example 3: ---------VARIABLE jobno NUMBER BEGIN DBMS_JOB.1))'). ''CHARLIE''. that the job will run is at 09.15h. Example 2: ---------variable jobno number.SUBMIT(:jobno. END.put_line('Hallo grapjas. 'test1.'. BEGIN DBMS_JOB.

"TUESDAY" ) + 12/24' t 12:00 noon 'TRUNC(LAST_DAY(SYSDATE ) + 1)' e month at midnight 'TRUNC(ADD_MONTHS(SYSDATE + 2/24.next_date => SYSDATE . "FRIDAY") ) ) + 9/24' ednesday. ''THURSDAY'')' of each quarter 'TRUNC(SYSDATE + 1)' :00 midnight 'TRUNC(SYSDATE + 1) + 8/24' 00 a. END. ''Q''). 'Q' ) . end.m. NEXT_DAY(SYSDATE. W -------------------------------------------------------------------------------Example 6: ---------You have this testprocedure create or replace procedure test1 as id_next number.1/24' quarter at 11:00 p.' . 3 ). and Friday at 9:00 a. BEGIN DBMS_JOB.m.what => 'begin space_logger./ PRINT jobno JOBNO ---------14144 Example 4: this job is scheduled every hour ------------------------------------------DECLARE jobno NUMBER. 3). / Example 5: Examples of intervals -------------------------------'SYSDATE + 7' ays from the last execution 'SYSDATE + 1/48' 'NEXT_DAY(TRUNC(SYSDATE). COMMIT.m. :exactly seven d :every half hour :every Monday at :first Thursday :Every day at 12 :Every day at 8: :Every Tuesday a :First day of th :Last day of the :Every Monday. begin .SUBMIT (job => jobno .interval => 'SYSDATE+1/24'). 'NEXT_DAY(TRUNC(SYSDATE ). ''MONDAY'') + 15/24' 3PM 'NEXT_DAY(ADD_MONTHS(TRUNC(SYSDATE.

begin DBMS_JOB. commit. 'LAST_DAY(ADD_MONTHS(LA ST_DAY(SYSDATE+1).'.'. / Suppose on 16 juli at 9:26h you do: variable jobno number. end.09:38 Suppose on 16 juli at 9:41h you do: variable jobno number. LAST_DAY(SYSDATE+1). 'test1. 'test1. SYSDATE.HH24:MI').---------------.---------------. begin DBMS_JOB. 'test1.'.1))'). commit. JOB TO_CHAR(THIS_DAT TO_CHAR(NEXT_DAT ---------. insert into iftest (id) values (id_next+1). end. 'LAST_DAY(ADD_MONTHS(LAST_DAY(SYSDA TE+1).09:26 Suppose on 16 juli at 9:38h you do: variable jobno number. 'LAST_DAY(ADD_MONTHS(LA ST_DAY(SYSDATE+1).HH24:MI') from dba_jobs.1))'). / JOB TO_CHAR(THIS_DAT TO_CHAR(NEXT_DAT ---------.SUBMIT(:jobno.09:41 25 31-07-2004.select max(id) into id_next from iftest. to_char(this_date.---------------25 31-07-2004. LAST_DAY(SYSDATE)+1. commit.---------------.09:39 . end.SUBMIT(:jobno.09:26 26 01-08-2004. end.09:26 26 01-08-2004. begin DBMS_JOB.'DD-MM-YYYY. 'DD-MM-Y YYY. / JOB TO_CHAR(THIS_DAT TO_CHAR(NEXT_DAT ---------.SUBMIT(:jobno. to_char(next_date. commit.---------------25 31-07-2004.1))').---------------27 31-08-2004. / select job.

or INTERVAL when you call the .CHANGE() -----------------------In this example. 'SYSDATE + 3'). SYSDATE. commit.2. NULL. / In the job definition. 'TRUNC(LAST_DAY(SYSDATE + 1/24 ) )' ).REMOVE(14144). The following statements remove job number 14144 FROM the job queue: BEGIN DBMS_JOB.09:41 28 31-07-2004.2.---------------. job number 14144 is altered to execute every three days: BEGIN DBMS_JOB.00:00 25 31-07-2004.---------------27 31-08-2004. 'test1. END.REMOVE() -----------------------Removing a Job FROM the Job Queue To remove a job FROM the job queue. 'test1.00:00 ------------------------------------------------------------------------------------variable jobno number. / If you specify NULL for WHAT.CHANGE(1. end. / JOB TO_CHAR(THIS_DAT TO_CHAR(NEXT_DAT --------. use the REMOVE procedure in the DBMS_JOB pac kage. null. begin DBMS_JOB.2 DBMS_JOB. NEXT_DATE.'. / 11.Suppose on 16 juli at 9:46h you do: variable jobno number. NULL.3 DBMS_JOB.SUBMIT(:jobno.09:26 29 31-07-2004.SUBMIT(:jobno. Always include a semicolon at the end of the job definition. use two single quotation marks around strings. 11. end. END. commit. 'TRUNC(LAST_DAY(SYSDATE ) + 1)' ).'. begin DBMS_JOB.

WHAT() ---------------------You can alter the definition of a job by calling the DBMS_JOB. NULL.CHANGE.6 DBMS_JOB.INTERVAL(): --------------------------The following example illustrates changing the execution interval for a job by calling the DBMS_JOB.4 DBMS_JOB. 'NULL').2.INTERVAL(14144.2. ''DEPARTMENTS''.BROKEN(10. END. Example: BEGIN DBMS_JOB. Oracle does not attempt to run broken jobs.'SYSDATE+(1/48)'). END. / Example: .2. / execute dbms_job. END.WHAT procedure.INTERVAL procedure: BEGIN DBMS_JOB. SYSDATE + 4).7 DBMS_JOB. ''HR''. 'DBMS_DDL. as shown in the following example: BEGIN DBMS_JOB.NEXT_DATE(14144. END.NEXT_DATE() --------------------------You can alter the next execution time for a job by calling the DBMS_JOB. TRUE). The following example changes the definition for job number 14144: BEGIN DBMS_JOB. / 11.2. 11. In this case.WHAT(14144. the current value remains unchanged. 50).procedure DBMS_JOB. the job will not run again after it successfully executes and it will be deleted FROM the job queue 11.'). / 11.ANALYZE_OBJECT(''TABLE''.NEXT_DATE procedure.interval(<job number>.BROKEN(): ------------------------A job is labeled as either broken or not broken. ''ESTIMATE''.5 DBMS_JOB.

BROKEN( V_JOB_ID. BEGIN FOR job_rec IN broken_jobs_cur LOOP DBMS_JOB. 11. END.BROKEN( V_JOB_ID.BROKEN(14144. Example: select JOB into V_JOB_ID from DBA_JOBS where WHAT like '%SONERA%'.FALSE). DBMS_JOB.The following example marks job 14144 as not broken and sets its next execution date to the following Monday: BEGIN DBMS_JOB. NEXT_DAY(SYSDATE. fix broken jobs: ---------------/* Filename on companion disk: job5.3 DBMS_SCHEDULER: -------------------- .job.RUN(): ---------------------BEGIN DBMS_JOB. END LOOP. END job_fixer.REFRESH( 'SONERA'. FALSE. 'C').sql */* CREATE OR REPLACE PROCEDURE job_fixer AS /* || calls DBMS_JOB. END.2.8 DBMS_JOB. 'MONDAY')).BROKEN to try and set || any broken jobs to unbroken */ /* cursor selects user's broken jobs */ CURSOR broken_jobs_cur IS SELECT job FROM user_jobs WHERE broken = 'Y'. / 11. / Example: exec DBMS_JOB. DBMS_SNAPSHOT.RUN(14144). false). true).BROKEN(job_rec.

drop_job (job_name => 'test_self_contained_job'). enabled => TRUE. start_date => SYSTIMESTAMP. job_type => 'PLSQL_BLOCK'. byminute=0'.gather_schema_stats(''JOHN''). / Jobs can be deleted using the DROP_JOB procedure: BEGIN DBMS_SCHEDULER. / BEGIN DBMS_SCHEDULER. job_action => 'BEGIN DBMS_STATS. DBMS_SCHEDULER. / BEGIN DBMS_SCHEDULER. use_current_session => FALSE). END. end_date => NULL.'.run_job (job_name => 'TEST_PROGRAM_SCHEDULE_JOB'. End.drop_job (job_name => 'TEST_PROGRAM_SCHEDULE_JOB'). END. Views: V_$SCHEDULER_RUNNING_JOBS GV_$SCHEDULER_RUNNING_JOBS DBA_QUEUE_SCHEDULES USER_QUEUE_SCHEDULES _DEFSCHEDULE DEFSCHEDULE AQ$SCHEDULER$_JOBQTAB_S AQ$_SCHEDULER$_JOBQTAB_F AQ$SCHEDULER$_JOBQTAB AQ$SCHEDULER$_JOBQTAB_R AQ$SCHEDULER$_EVENT_QTAB_S AQ$_SCHEDULER$_EVENT_QTAB_F AQ$SCHEDULER$_EVENT_QTAB AQ$SCHEDULER$_EVENT_QTAB_R DBA_SCHEDULER_PROGRAMS USER_SCHEDULER_PROGRAMS ALL_SCHEDULER_PROGRAMS .stop_job (job_name => 'TEST_PROGRAM_SCHEDULE_JOB').'). / Oracle 10g: ----------BMS_JOB has been replaced by DBMS_SCHEDULER. repeat_interval => 'freq=hourly.Used in Oracle 10g.create_job ( job_name => 'test_self_contained_job'. END. BEGIN DBMS_SCHEDULER. comments => 'Job created using the CREATE JOB procedure. END.

DBA_SCHEDULER_JOBS USER_SCHEDULER_JOBS ALL_SCHEDULER_JOBS DBA_SCHEDULER_JOB_CLASSES ALL_SCHEDULER_JOB_CLASSES DBA_SCHEDULER_WINDOWS ALL_SCHEDULER_WINDOWS DBA_SCHEDULER_PROGRAM_ARGS USER_SCHEDULER_PROGRAM_ARGS ALL_SCHEDULER_PROGRAM_ARGS DBA_SCHEDULER_JOB_ARGS USER_SCHEDULER_JOB_ARGS ALL_SCHEDULER_JOB_ARGS DBA_SCHEDULER_JOB_LOG DBA_SCHEDULER_JOB_RUN_DETAILS USER_SCHEDULER_JOB_LOG USER_SCHEDULER_JOB_RUN_DETAILS ALL_SCHEDULER_JOB_LOG ALL_SCHEDULER_JOB_RUN_DETAILS DBA_SCHEDULER_WINDOW_LOG DBA_SCHEDULER_WINDOW_DETAILS ALL_SCHEDULER_WINDOW_LOG ALL_SCHEDULER_WINDOW_DETAILS DBA_SCHEDULER_WINDOW_GROUPS ALL_SCHEDULER_WINDOW_GROUPS DBA_SCHEDULER_WINGROUP_MEMBERS ALL_SCHEDULER_WINGROUP_MEMBERS DBA_SCHEDULER_SCHEDULES USER_SCHEDULER_SCHEDULES ALL_SCHEDULER_SCHEDULES DBA_SCHEDULER_RUNNING_JOBS ALL_SCHEDULER_RUNNING_JOBS USER_SCHEDULER_RUNNING_JOBS DBA_SCHEDULER_GLOBAL_ATTRIBUTE ALL_SCHEDULER_GLOBAL_ATTRIBUTE DBA_SCHEDULER_CHAINS USER_SCHEDULER_CHAINS ALL_SCHEDULER_CHAINS DBA_SCHEDULER_CHAIN_RULES USER_SCHEDULER_CHAIN_RULES ALL_SCHEDULER_CHAIN_RULES DBA_SCHEDULER_CHAIN_STEPS USER_SCHEDULER_CHAIN_STEPS ALL_SCHEDULER_CHAIN_STEPS DBA_SCHEDULER_RUNNING_CHAINS USER_SCHEDULER_RUNNING_CHAINS ALL_SCHEDULER_RUNNING_CHAINS ================== 12. Net8 / SQLNet: ================== In bijvoorbeeld sql*plus vult men in: ----------------Username: system Password: manager Host String: XXX .

1 sqlnet.ora voorbeelden: -----------------------------voorbeeld 1..AUTHENTICATION_SERVICES= (NTS) NAMES..----------------NET8 bij de client kijkt in TNSNAMES.world= (.world= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS=(COMMUNITY=tcp. Maar het zou dus zelfs pipo mogen zijn.port..world)(PROTOCOL=TCP)(HOST=STARBOSS)(PORT=1521 ) ) (CONNECT_DATA=(SID=DB1) ) ) DB2.2 tnsnames. DB1= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS=(PROTOCOL=TCP)(HOST=STARBOSS)(PORT=1521) ) (CONNECT_DATA= (SERVICE_NAME=DB1. dan meld de client: ORA-12154 TNS: could not resolve SERVICE NAME Vervolgens wordt door NET8 via de connect descriptor Y contact gemaakt met de listener op de Server die luistert naar Y Is Y niet wat de listener verwacht.host. dan meldt de listener aan de client: TNS: listener could not resolve SERVICE_NAME in connect descriptor 12..ORAnaar de eerste entry XXX= (description. DB1..ora voorbeeld: -------------------------SQLNET.world) ) ) voorbeeld 2. SERVICE_NAME=Y) XXX is eigenlijk een alias en is dus willekeurig hoewel het uiteraard aansluit bij de instance name of database name waarnaar je wilt connecten. protocol.DIRECTORY_PATH= (TNSNAMES) 12.. ) .. Wordt XXX niet gevonden.

world= (.DB3.world) (ORACLE_HOME=D:\oracle8i) (SID_NAME=DB1) ) ) Example 2: ---------############## WPRD ##################################################### LOG_DIRECTORY_WPRD = /opt/oracle/admin/WPRD/network/log LOG_FILE_WPRD = WPRD.ora voorbeelden: -----------------------------Example 1: ---------LISTENER= (DESCRIPTION= (ADDRESS=(PROTOCOL=TCP)(HOST=STARBOSS)(PORT=1521)) ) SID_LIST_LISTENER= (SID_LIST= (SID_DESC= (GLOBAL_DBNAME=DB1..antapex) ) ) 12. voorbeeld 3.log TRACE_LEVEL_WPRD = OFF #ADMIN TRACE_DIRECTORY_WPRD = /opt/oracle/admin/WPRD/network/trace TRACE_FILE_WPRD = WPRD. ) etc.trc WPRD = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=blnl01)(PORT=1521))))) SID_LIST_WPRD = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = WPRD) ...3 listener. RCAT = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = w2ktest)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = rcat.

1.ORA Network Configuration File: D:\oracle\ora901\NETWORK\ADMIN\listen er. LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0)) ) (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = missrv)(PORT = 1521)) ) ) SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = D:\oracle\ora901) (PROGRAM = extproc) ) (SID_DESC = (GLOBAL_DBNAME = o901) (ORACLE_HOME = D:\oracle\ora901) (SID_NAME = o901) ) (SID_DESC = (SID_NAME = MAST) (ORACLE_HOME = D:\oracle\ora901) (PROGRAM = hsodbc) ) (SID_DESC = (SID_NAME = NATOPS) .log TRACE_LEVEL_WTST = OFF #ADMIN TRACE_DIRECTORY_WTST = /opt/oracle/admin/WTST/network/trace TRACE_FILE_WTST = WTST.ora # Generated by Oracle configuration tools.6) (SID_NAME = WTST))) Example 3: ---------# LISTENER.(ORACLE_HOME = /opt/oracle/product/8.trc WTST = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=blnl01)(PORT=1522))))) SID_LIST_WTST = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = WTST) (ORACLE_HOME = /opt/oracle/product/8.6) (SID_NAME = WPRD))) ############## WTST ##################################################### LOG_DIRECTORY_WTST = /opt/oracle/admin/WTST/network/log LOG_FILE_WTST = WTST.1.

Multiple listener locations are specified in the cl ients tnsnames.5: CLIENT LOAD BALANCING: ---------------------------- .(ORACLE_HOME = D:\oracle\ora901) (PROGRAM = hsodbc) ) (SID_DESC = (SID_NAME = VRF) (ORACLE_HOME = D:\oracle\ora901) (PROGRAM = hsodbc) ) (SID_DESC = (SID_NAME = DRILLS) (ORACLE_HOME = D:\oracle\ora901) (PROGRAM = hsodbc) ) (SID_DESC = (SID_NAME = DDS) (ORACLE_HOME = D:\oracle\ora901) (PROGRAM = hsodbc) ) (SID_DESC = (SID_NAME = IVP) (ORACLE_HOME = D:\oracle\ora901) (PROGRAM = hsodbc) (SID_DESC = (SID_NAME = ALBERT) (ORACLE_HOME = D:\oracle\ora901) (PROGRAM = hsodbc) ) ) 12.ora file.ora file looks like with connect-time fail over enabled: ORCL= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS=(PROTOCOL=TCP)(HOST=DBPROD)(PORT=1521)) (ADDRESS=(PROTOCOL=TCP)(HOST=DBFAIL)(PORT=1521)) ) (CONNECT_DATA=(SERVICE_NAME=PROD)(SERVER=DEDICATED) ) ) 12.4: CONNECT TIME FAILOVER: ---------------------------The connect-time failover feature allows clients to connect to another listener if the initial connection to the first listener fails. a connection request to the next listener in the list is attempted. Here is an example of what a tnsnames. This feature increases the availablity of the Oracle s ervice should a listener location be unavailable. If a connection attempt to the first listener fails.

View information about dispatchers and shared servers with the following command s and queries: . Here is an example of the tnsnames. you need 10 dispatchers. Oracle Net moves through the list of listeners and balances the load of connecti on requests accross the available listeners. You set your DISPATCHERS parameter as follows: DISPATCHERS="(PRO=TCP)(DIS=10)" 2.Client Load Balancing is a feature that allows clients to randomly select from a list of listeners.ora parameters. the user program area's are in the SGA in the large pool. if you have 500 concurrent TCP/IP connections. For example. you can configure Shared Server.6: ORACLE SHARED SERVER: --------------------------With the dedicated Server. if you want to configure 3 TCP/IP dispatchers and to IPC dispatcher s. outside the SGA When Shared Server is used. you set the parameters as follows: DISPATCHERS="(PRO=TCP)(DIS=3)(PRO=IPC)(DIS=2)" For example.ora entry that allows for load balancing: ORCL= (DESCRIPTION= (LOAD_BALANCE=ON) (ADDRESS_LIST= (ADDRESS=(PROTOCOL=TCP)(HOST=MWEISHAN-DELL)(PORT=1522)) (ADDRESS=(PROTOCOL=TCP)(HOST=MWEISHAN-DELL)(PORT=1521)) ) (CONNECT_DATA=(SERVICE_NAME=PROD)(SERVER=DEDICATED) ) ) Notice the additional parameter of LOAD_BALANCE. each server process has a PGA. and you want each di spatcher to manage 50 concurrent connections. 12. With a few init. This enables load balancing bet ween the two listener locations specified. 1. DISPATCHERS: The DISPATCHERS parameter defines the number of dispatchers that should start wh en the instance is started. SHARED_SERVER: The Shared_Servers parameter specifies the minimum number of Shared Servers to s tart and retain when the Oracle instance is started.

If system load decreases.ora DISPATCHERS configures dispatcher processes in the shared server architecture. Parameter type Parameter class Integer Dynamic: ALTER SYSTEM 2. USAGE: ----DISPATCHERS = "(PROTOCOL=TCP)(DISPATCHERS=3)" 3. SHARED SERVER CONFIGURATION: =========================== 1.ora SHARED_SERVERS specifies the number of server processes that you want to create when an instance is started up. status.lsnrctl services SELECT name. Add the parameter DISPATCHERS in the init. bytes. idle.INBOUND_CONNECT_TIMEOUT Notes: ======= Note 1: ------- Doc ID: Subject: Note:274130.7: Keeping Oracle connections alive through a Firewall: ---------------------------------------------------------Implementing keep alive packets: SQLNET. messages.ora file. busy. 12. . you should take care not to set SHARED_SERVERS too high at system startup. Therefore. this minimum number of servers is maintained. Save the init. breaks FROM v$dispatcher.1 Content Type: SHARED SERVER CONFIGURATION TEXT/PLAIN Creation Date: 25-MAY-2004 24-JUN-2004 Type: BULLETIN Last Revision Date: Status: PUBLISHED PURPOSE ------- This article discusses about the configuration of shared servers on 9i DB. Add the parameter shared_servers in the init.

Shutdown and startup the database. Check whether the connection is done through server server. Oracle selects defaults): MAX_DISPATCHERS: =============== Specifies the maximum number of dispatcher processes that can run simultaneously.4.IDC. > Select server from v$session. Make a new connection to database other than SYSDBA. SERVER --------DEDICATED DEDICATED DEDICATED SHARED DEDICATED NOTE: ==== The following parameters are optional (if not specified.IDC.) 7.ORACLE.COM = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = xyzac)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = SHARED) (SERVICE_NAME = Oracle) ) ) Change SERVER=SHARED. 6. SHARED_SERVERS: ============== .ora from ORACLE. 5.ORACLE.COM = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = xyzac)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = oracle) ) ) to ORACLE. (NOTE: SYSDBA will always acquire dedicated connection by default. Change the connect string in tnsnames.

Setting this parameter enables you to reserve user sessions for dedicated servers. it should not be specified in the listener.ora file and although they will not show in the Net8 Assistant. or through a parameter in the listener. Note 2: The password can be set either by specifying it through the command CHANGE_PASSW ORD. The password is not . Other parameters affected by shared server that may require adjustment: LARGE_POOL_SIZE: =============== Specifies the size in bytes of the large pool allocation heap. ora file. If the password is changed this way. May need to be adjusted for shared server. We saw how to do that through the CHANGE_PASSWORD comm and earlier.Specifies the number of shared server processes created when an instance is started up. Shared server may force the default value to be set too high. CIRCUITS: ======== Specifies the total number of virtual circuits that are available for inbound and outbound network sessions. To change a password.ora file. SHARED_SERVER_SESSIONS: ====================== Specifies the total number of shared server user sessions to allow. they are readable in the listener. MAX_SHARED_SERVERS: ================== Specifies the maximum number of shared server processes that can run simultaneously.7 password for the listener: ------------------------------Note 1: LSNRCTL> set password <password> where <password> is the password you want to us e. These passwords are stored in the listener. causing performance problems or problems starting the database. SESSIONS: ======== Specifies the maximum number of sessions that can be created in the system.ora file. 12. use "Change_Password" You can also designate a password wh en you configure the listener with the Net8 Assistant.

plaats en status van rollback segementen: ---------------------------------------------------SELECT substr(segment_name. 20). NEXT_EXTENT. LSNRCTL> set password t0p53cr3t LSNRCTL> stop Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC))) TNS-01169: The listener has not recognized the password LSNRCTL> Note 3: more correct method would be to password protect the listener functions.xacts . you must supply it at the Password: prompt as shown above.1 naam. 1. 10). MAX_EXTENTS. you need to use a password to do various operations (such as STOP) but not others (such as STATUS) ============================================= 13. Datadictionary queries Rollback segments: ============================================= 13. s.2 indruk van aantal active transactions per rollback segment: ---------------------------------------------------------------aantal actieve transacties: V$ROLLSTAT naam rollback segment: V$ROLLNAME SELECT n. 13.name. You cannot specify the password in one line as shown below.ora Old Parameter File /d01/home/oracle8i/network/admin/listener. See the net8 admin guide for info but in short -. MIN_EXTENTS. 1.you can: LSNRCTL> change_password Old password: <just hit enter if you don't have one yet> New password: Reenter new password: Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=slackdog)(PORT=1521))) Password changed for LISTENER The command completed successfully LSNRCTL> set password Password: The command completed successfully LSNRCTL> save_config Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=slackdog)(PORT=1521))) Saved LISTENER configuration parameters.bak The command completed successfully LSNRCTL> Now.displayed anywhere. When supplying the password in the listener control utility. status. PCT_INCREASE FROM DBA_ROLLBACK_SEGS. INITIAL_EXTENT. Listener Parameter File /d01/home/oracle8i/network/admin/listener. substr(tablespace_name.

dbf' SIZE 200M AUTOEXTEND ON NEXT 20M MAXSIZE 500 M LOGGING DEFAULT STORAGE ( INITIAL 5M NEXT 5M MINEXTENTS 2 MAXEXTENTS 100 PCTINCREASE 0 ) ONLINE PERMANENT.extents. v$session. Create Tablespace RBS datafile '/db1/oradata/oem/rbs.usn 13.writes FROM V$ROLLNAME n.name. . extents.4 De optimal parameter: -------------------------SELECT n. SELECT n. substr(tablespace_name.usn=s. nvl(S.usn. blocks.3 grootte. 1. 13. bytes/1024/1024 Size_in_MB.usn=s. V$ROLLSTAT s WHERE n.usn=s.usn.5 writes to rollback segementen: ----------------------------------Doe de query begin meting.FROM V$ROLLNAME n.usn=s. V$ROLLSTAT s WHERE n. naam. V$ROLLSTAT s WHERE n.6 Wie en welke processes gebruiken de rollback segs: ------------------------------------------------------Query1: Query op v$lock. s.name. s.usn.name. en bij einde meting en bekijk het verschil SELECT n. s.name rr. s. 15). 1.rssize FROM V$ROLLNAME n.optsize FROM V$ROLLNAME n. v$rollname column column column column rr us os te heading heading heading heading 'RB Segment' 'Username' 'OS user' 'Terminal' format format format format a15 a10 a10 a15 SELECT R. 13. bytes van de rollback segmenten: ------------------------------------------------------------SELECT substr(segment_name. extents.username. 15) FROM DBA_SEGMENTS WHERE segment_type='ROLLBACK'. V$ROLLSTAT s WHERE n. (usn=undo segment number) 13. 'no transaction') us.

s. t.name / Query 2: SELECT r. sys. Data dictionary queries m.usn ORDER BY t.Type='TX' AND L.serial#. permissions: ========================================================= 14.ora via "show parameter transactions" transactions= a (max no of transactions.8 Bepaling minimale grootte rollback segmenten: -------------------------------------------------lts=largest transaction size (normal production. t.S. stel 100) transactions_per_rollback_segment= b (allowed no of concurrent tr/rbs.Terminal te FROM V$LOCK L. s.Id1/65536)=R. 1. sys.v_$rollname r WHERE t.username "USER".2 default tablespace.7 Bepaling minimum aantal rollbacksegmenten: -----------------------------------------------Bepaal in init. t.1 user information in datadictionary --------------------------------------SELECT username. user_id. password FROM DBA_USERS WHERE username='Kees'.Lmode=6 ORDER BY R. s. 78) "COMMAND" FROM sys. security. account_status of users ------------------------------------------------ .addr = s. niet af en toe batch loads) min_size=minimum size van rollback segment min_size= lts * 100 / (100 . S.program. stel 10) minimum=a/b (100/10=10) 13. t.(40 {%free} + 15 {iaiu} +5 {header} min_size=lts * 1.67 Stel lts=700K. V$SESSION S.sid. V$ROLLNAME R WHERE L.taddr AND t.name "RBS".noundo.v_$transaction t. 14.Sid=S. substr(s.xidusn = r.phy_io / 13.phy_io.cr_get.b.status.cr_get.Osuser os.v_$session s.usn AND L. t. t.used_ublk.t.Sid(+) AND trunc(L. dan is de startwaarde rollbacksegment=1400K ========================================================= 14.

1. bytes. substr(machine. 14. 1. 15) FROM V$SESSION.ORA parameters: ======================== 15.5 Invalid objects in DBA_OBJECTS: -----------------------------------SELECT substr(owner. 40). substr(username. 1. 15). 15). SERIAL#' ======================== 15. 1. 1.SELECT username. status. 15). status FROM DBA_OBJECTS WHERE status='INVALID'. 1. 1.4 Systeem rechten van een user opvragen: DBA_SYS_PRIVS --------------------------------------------------------SELECT substr(grantee. 1. 10). 14. logon_time. 15). 10). substr(sche maname. serial#.1 init. default_tablespace. 10). substr(terminal. 1. substr(program. 14. 14. INIT.log . substr(module. admin_option FROM DBA_SYS_PRIVS WHERE grantee='CHARLIE'. max_blocks FROM DBA_TS_QUOTAS WHERE username='CHARLIE'. SELECT * FROM dba_sys_privs WHERE grantee='Kees'. 1.6 session information -----------------------SELECT sid. 14. 10). 40). 1.3 tablespace quotas of users ------------------------------SELECT tablespace_name.7 kill a session ------------------alter system kill session 'SID. substr(osuser. account_status FROM DBA_USERS.ora parameters en ARCHIVE MODE: ---------------------------------------LOG_ARCHIVE_DEST=/oracle/admin/cc1/arch LOG_ARCHIVE_START=TRUE LOG_ARCHIVE_FORMAT=archcc1_%s. substr(object_name. 1. substr(object_type. substr(privilege. 40). max_bytes. blocks.

FIRST_ROWS.5 and provides a means of reserving a portion of the shared pool . it specifies max number of block (statistics related to time are =RULE. You can monitor utilization of the shared pool by querying the view V$SGASTAT. L arger values improve perfoRMANce in multi-user systems.ora en perfoRMANce en SGA: -----------------------------------SORT_AREA_SIZE SORT_AREA_RETAINED_SIZE PROCESSES DB_BLOCK_SIZE DB_BLOCK_BUFFERS SHARED_POOL_SIZE LOG_BUFFER LARGE_POOL_SIZE DBWR_IO_SLAVES DB_WRITER_PROCESSES LGWR_IO_SLAVES= DB_FILE_MULTIBLOCK_READ_COUNT s in one io operation during sequential r ead) BUFFER_POOL_RECYCLE BUFFER_POOL_KEEP TIMED_STATISTICES collected or not) OPTIMIZER_MODE PARALLEL_MIN_SERVERS l recovery) PARALLEL_MAX_SERVERS RECOVERY_PARALLELISM se niveau) = = =TRUE = = = = = = = = 65536 65536 100 8192 3400 52428800 26214400 (per PGA. SHARED_POOL_RESERVED_SIZE: The parameter was introduced in Oracle 7.2 init. Smaller values use less memory. en paralle SHARED_POOL_SIZE: in bytes or K or M SHARED_POOL_SIZE specifies (in bytes) the size of the shared pool.1.10g: LOG_ARCHIVE_DEST=c:\oracle\oradata\log' LOG_ARCHIVE_FORMAT=arch_%t_%s_%r. If you set PARALLEL_AUTOMATIC_TUNING t o false. The shared po ol contains shared cursors. max sort area) (size after sort) (alle processes) (DB_CACHE_SIZE in Oracle 9i) (DB_WRITER_PROCESSES) = 2 =16 (minimize io during table scans. CHOOSE. ALL_ROWS = 2 = 4 = 2 (set parallel recovery op databa (voor Parallel Query. stored procedures. Oracle also allocates parallel execution message buffers from the shared pool. control structures.dbf' other: LOG_ARCHIVE_DEST_1= LOG_ARCHIVE_DEST_2= LOG_ARCHIVE_MAX_PROCESSES=2 15. and other structures.

replic check interval =true = = = .0 (number of shared server processes in (stANDaard is dat OPS$) (of een OS authentication = = = = CC1 TRUE CC1 antapex.7.0.4 instance name. From a practical point of view one should set SHARED_POOL_RESERVED_SIZE to about 10% of SHARED_POOL_SIZE unless either the shared pool is very large OR SHARED_POOL_R ESERVED_MIN_ALLOC has been set lower than the default value: 15. The reserved area comes out of the shared pool its elf.ora en jobs: ---------------------JOB_QUEUE_PROCESSES=1 ation en jobqueue's JOB_QUEUE_INTERVAL=60 15.b. SNP1).v. sid: -----------------------db_name global_names instance_name db_domain 15.net aantal SNP processes (SNP0. max 36 t.1. message queues) = = = = = = /dbs01/app/oracle/admin/AMI_PRD/adump /dbs01/app/oracle/admin/AMI_PRD/bdump /dbs01/app/oracle/admin/AMI_PRD/udump /dbs01/app/oracle/admin/AMI_PRD/cdump (specifies whether resource limi (max number of concurrent user s (at this limit.5 overige parameters: -----------------------OS_AUTHENT_PREFIX REMOTE_OS_AUTHENTICATION via het netwerk kan) REMOTE_LOGIN_PASSWORDFILEe distributed_transactions aq_tm_processes mts_servers multithreaded server) mts_max_servers audit_file_dest background_dump_dest user_dump_dest core_dump_dest resource_limit ts in profiles are in effect) license_max_sessions essions) license_sessions_warning log) license_max_users n be created in the database) compatible = "" = TRUE or FALSE = NONE or EXCLUSIVE =0 or >0 (starts the RECO process) = (advanced queuing.for large memory allocations. warning in alert (maximum number of users that ca are enforced) = 8.3 init.

latches .ora parameters: ------------------------PARAMETER DESCRIPTION -----------------------------.ctl = /dbs06/oradata/AMI_PRD/ctrl/cc1_03. latches:m)] Number of database blocks/latches in recycle buffer pool [CHAR: (buffers:n.ctl = /dbs05/oradata/AMI_PRD/ctrl/cc1_02.ctl = 150 = = = = = = = = = = = = = = = = (max number of data files opene 0 10000 1800 10240 40 "DD-MM-YYYY" AMERICAN AMERICA TRUE 250 1000 CHOOSE 5 TRUE CC1 /app01/oradata/cc1/utl_file All init.---------------------------------------O7_DICTIONARY_ACCESSIBILITY Version 7 Dictionary Accessibility support [TRUE | FALSE] active_instance_count aq_tm_processes archive_lag_target asm_diskgroups asm_diskstring asm_power_limit R] audit_file_dest ['Path'] audit_sys_operations audit_trail background_core_dump ull] background_dump_dest backup_tape_io_slaves bitmap_merge_area_size blank_trimming E] buffer_pool_keep buffer_pool_recycle :m)] Number of active instances in the cluster database [NUMBER] Number of AQ Time Managers to start [NUMBER] Maximum number of seconds of redos the standby could lose [NUMBER] Disk groups to mount automatically [CHAR] Disk set locations for discovery [CHAR] Number of processes for disk rebalancing [NUMBE Directory in which auditing files are to reside Enable sys auditing [TRUE|FALSE] Enable system auditing [NONE|DB|DB_EXTENDED|OS] Core Size for Background Processes [partial | f Detached process dump directory [file_path] BACKUP Tape I/O slaves [TRUE | FALSE] Maximum memory allow for BITMAP MERGE [NUMBER] Blank trimming semantics parameter [TRUE | FALS Number of database blocks/latches in keep buffer pool [CHAR: (buffers:n.control_files control_files control_files db_files d) java_pool_size log_checkpoint_interval log_checkpoint_timeout max_dump_file_size max_enabled_roles nls_date_format nls_language nls_territory o7_dictionary_accessibility open_cursors optimizer_max_permutations optimizer_mode parallel_max_servers pre_page_sga service_names utl_file_dir = /dbs04/oradata/AMI_PRD/ctrl/cc1_01.

2.0] Control file record keep time in days [NUMBER] Control file names list [file_path.0.file_path.] Core dump directory [file_path] Initial number of cpu's for this instance [NUMB Size of create bitmap buffer for bitmap index [INTEGER] Cursor sharing mode [EXACT | SIMILAR | FORCE] Create stored outlines for DML statements [TRUE Use more memory in order to get faster execution [TRUE | FALSE] Size of cache for 16K buffers [bytes] Size of cache for 2K buffers [bytes] Size of cache for 32K buffers [bytes] Size of cache for 4K buffers [bytes] Size of cache for 8K buffers [bytes] Number of database blocks to cache in memory [bytes: 8M or NUMBER of blocks (Ora7)] Data and index block checking [TRUE | FALSE] Store checksum in db blocks and check during reads [TRUE | FALSE] Size of database block [bytes] Buffer cache sizing advisory [internal use only Size of DEFAULT buffer pool for standard block size buffers [bytes] Default database location ['Path_to_directory'] Online log/controlfile destination (where n=1-5 Directory part of global database name stored with CREATE DATABASE [CHAR] * db_file_multiblock_read_count Db blocks to be read each IO [NUMBER] db_file_name_convert Datafile name convert patterns and strings for standby/clone db [.0. ] db_files Max allowable # db files [NUMBER] db_flashback_retention_target Maximum Flashback Database log retention time i n minutes [NUMBER] db_keep_cache_size Size of KEEP buffer pool for standard block size buffers [bytes] db_name Database name specified in CREATE DATABASE [CHAR] db_recovery_file_dest Default database recovery file location [CHAR] db_recovery_file_dest_size Database recovery files size limit [bytes] db_recycle_cache_size Size of RECYCLE buffer pool for standard block size buffers [bytes] db_unique_name Database Unique Name [CHAR] db_writer_processes Number of background database writer processes to start [NUMBER] ..circuits cluster_database | FALSE] cluster_database_instances cluster_interconnects commit_point_strength compatible control_file_record_keep_time control_files core_dump_dest cpu_count ER] create_bitmap_area_size cursor_sharing create_stored_outlines | FALSE | category_name] cursor_space_for_time db_16k_cache_size db_2k_cache_size db_32k_cache_size db_4k_cache_size db_8k_cache_size db_block_buffers db_block_checking db_block_checksum db_block_size db_cache_advice ] db_cache_size db_create_file_dest db_create_online_log_dest_n ) ['Path'] db_domain Max number of virtual circuits [NUMBER] If TRUE startup in cluster database mode [TRUE Number of instances to use for sizing cluster db SGA structures [NUMBER] Interconnects for RAC use [CHAR] Bias this node has toward not preparing in a two-phase commit [NUMBER (0-255)] Database will be completely compatible with this software version [CHAR: 9.

default null string [CHAR FAL client [CHAR] FAL server list [CHAR] Upper bound on recovery reads [NUMBER] MTTR target of forward crash recovery in seconds [NUMBER] Max number of parallel recovery slaves that may be used [LOW | HIGH | FALSE] Enable file mapping [TRUE | FALSE] Network Adapters for File I/O [CHAR] IO operations on filesystem files [Internal] Fix SYSDATE value for debugging[NONE or '2000_1 RAC/OPS .one for each table modified in a transaction [NUMBER] Start DG Broker monitor (DMON process)[TRUE | F Resources for enqueues [NUMBER] Debug event control .lock granularity number of global cache locks per file (DFS) [CHAR] Number of background gcs server processes to st Global Application Context Pool Size in Bytes [bytes] Enforce that database links have same name as remote database [TRUE | FALSE] Size of in-memory hash work area (Shared Server Enable/disable hash join (CBO) [TRUE | FALSE] SGA starting address (high order 32-bits on 64-bit platforms) [NUMBER] Enable automatic server DD updates in HS agent self-registration [TRUE | FALSE] Include file in init.dblink_encrypt_login dbwr_io_slaves ddl_wait_for_locks LSE] dg_broker_config_file1 ] dg_broker_config_file2 ] dg_broker_start disk_asynch_io | FALSE] dispatchers (MTS_dispatchers in Ora 8) distributed_lock_timeout dml_locks drs_start ALSE] enqueue_resources event ] fal_client fal_server fast_start_io_target fast_start_mttr_target fast_start_parallel_rollback file_mapping fileio_network_adapters filesystemio_options fixed_date 2_30_24_59_00'] gc_files_to_locks gcs_server_processes art [NUMBER] global_context_pool_size global_names hash_area_size )[bytes] hash_join_enabled hi_shared_memory_address hs_autoregister ifile instance_groups instance_name instance_number Enforce password for distributed login always be encrypted [TRUE | FALSE] DBWR I/O slaves [NUMBER] Disable NOWAIT DML lock acquisitions [TRUE | FA Data guard broker configuration file #1 ['Path' Data guard broker configuration file #2 ['Path' Start Data Guard broker framework (DMON process) [TRUE | FALSE] Use asynch I/O for random access devices [TRUE Specifications of dispatchers [CHAR] Number of seconds a distributed transaction waits for a lock [Internal] Dml locks .ora ['path_to_file'] List of instance group names [CHAR] Instance name supported by the instance [CHAR] Instance number [NUMBER] .

instance_type ASM] java_max_sessionspace_size java_pool_size java_soft_sessionspace_limit job_queue_processes large_pool_size es] ldap_directory_access SL] license_max_sessions license_max_users ed license_sessions_warning local_listener [CHAR] lock_name_space ary database lock_sga log_archive_config log_archive_dest log_archive_dest_n log_archive_dest_state_n ] log_archive_duplex_dest '] log_archive_format "] log_archive_local_first E | FALSE] log_archive_max_processes ] log_archive_min_succeed_dest log_archive_start RUE | FALSE] log_archive_trace log_buffer log_checkpoint_interval log_checkpoint_timeout ween log_checkpoints_to_alert FALSE] log_file_name_convert log_parallelism Type of instance to be executed RDBMS or Automated Storage Management [RDBMS | Max allowed size in bytes of a Java sessionspace [bytes] Size in bytes of the Java pool [bytes] Warning limit on size in bytes of a Java sessionspace [NUMBER] Number of job queue slave processes [NUMBER] Size in bytes of the large allocation pool [byt RDBMS's LDAP access option [NONE | PASSWORD | S Maximum number of non-system user sessions (concurrent licensing) [NUMBER] Maximum number of named users that can be creat (named user licensing) [NUMBER] Warning level for number of non-system user sessions [NUMBER] Define which listeners instances register with Used for generating lock names for standby/prim assign each a unique name space [CHAR] Lock entire SGA in physical memory [Internal] Log archive config [SEND|NOSEND] [RECEIVE|NORECEIVE] [ DG_CONFIG] Archive logs destination ['path_to_directory'] Archive logging parameters (n=1-10) Enterprise Edition [CHAR] Archive logging parameter status (n=1-10) [CHAR Enterprise Edition [CHAR] Duplex archival destination ['path_to_directory Archive log filename format [CHAR: "MyApp%S. # redo blocks [NUMBER] Checkpoint threshold.ARC Establish EXPEDITE attribute default value [TRU Maximum number of active ARCH processes [NUMBER Minimum number of archive destinations that must succeed [NUMBER] Start archival process on SGA initialization [T Archive log tracing level [NUMBER] Redo circular buffer size [bytes] Checkpoint threshold. maximum time interval bet checkpoints in seconds [NUMBER] Log checkpoint begin/end to alert file [TRUE | Logfile name convert patterns and strings for standby/clone db [. ] Number of log buffer strands [NUMBER] .

logmnr_max_persistent_sessions Maximum number of threads to mine [NUMBER] max_commit_propagation_delay max_dispatchers max_dump_file_size r bytes] max_enabled_roles MBER] max_rollback_segments UMBER] max_shared_servers mts_circuits mts_dispatchers mts_listener_address mts_max_dispatchers mts_max_servers mts_multiple_listeners mts_servers mts_service mts_sessions nls_calendar HAR] nls_comp SI] nls_currency nls_date_format nls_date_language ] nls_dual_currency nls_iso_currency R] nls_language nls_length_semantics nls_nchar_conv_excp nls_numeric_characters nls_sort nls_territory nls_time_format nls_time_tz_format nls_timestamp_format nls_timestamp_tz_format object_cache_max_size_percent object_cache_optimal_size olap_page_pool_size open_cursors open_links open_links_per_instance optimizer_dynamic_sampling optimizer_features_enable optimizer_index_caching Max age of new snapshot in .01 seconds [NUMBER] Max number of dispatchers [NUMBER] Maximum size (blocks) of dump file [UNLIMITED o Max number of roles a user can have enabled [NU Max number of rollback segments in SGA cache [N Max number of shared servers [NUMBER] Max number of circuits [NUMBER] Specifications of dispatchers [CHAR] Address(es) of network listener [CHAR] Max number of dispatchers [NUMBER] Max number of shared servers [NUMBER] Are multiple listeners enabled? [TRUE | FALSE] Number of shared servers to start up [NUMBER] Service supported by dispatchers [CHAR] max number of shared server sessions [NUMBER] NLS calendar system name (Default=GREGORIAN) [C NLS comparison. 8.g.1. GERMAN. BINARY_AI. BINARY_CI. GERMAN_CI. etc NLS territory name (country settings) [CHAR] Time format [CHAR] Time with timezone format [CHAR] Time stamp format [CHAR] Timestamp with timezone format [CHAR] Percentage of maximum size over optimal of the user session's ob [NUMBER] Optimal size of the user session's object cache in bytes [bytes] Size of the olap page pool in bytes [bytes] Max # cursors per session [NUMBER] Max # open links per session [NUMBER] Max # open links per instance [NUMBER] Optimizer dynamic sampling [NUMBER] Optimizer plan compatibility (oracle version e. Enterprise Edition [BINARY | AN NLS local currency symbol [CHAR] NLS Oracle date format [CHAR] NLS date language name (Default=AMERICAN) [CHAR Dual currency symbol [CHAR] NLS ISO currency territory name override the default set by NLS_TERRITORY [CHA NLS language name (session default) [CHAR] Create columns using byte or char semantics by default [BYTE | CHAR] NLS raise an exception instead of allowing implicit conversion [CHAR] NLS numeric characters [CHAR] Case-sensitive or insensitive sort [Language] language may be BINARY.7) [CHAR] Optimizer index caching percent [NUMBER] .

optimizer_index_cost_adj optimizer_max_permutations optimizer_mode L_ROWS] oracle_trace_collection_name oracle_trace_collection_path oracle_trace_collection_size oracle_trace_enable oracle_trace_facility_name oracle_trace_facility_path os_authent_prefix os_roles | FALSE] parallel_adaptive_multi_user

Optimizer index cost adjustment [NUMBER] Optimizer maximum join permutations per query block [NUMBER] Optimizer mode [RULE | CHOOSE | FIRST_ROWS | AL Oracle TRACE default collection name [CHAR] Oracle TRACE collection path [CHAR] Oracle TRACE collection file max. size [NUMBER] Oracle Trace enabled/disabled [TRUE | FALSE] Oracle TRACE default facility name [CHAR] Oracle TRACE facility path [CHAR] Prefix for auto-logon accounts [CHAR] Retrieve roles from the operating system [TRUE

Enable adaptive setting of degree for multiple user streams [TRUE | FALSE] parallel_automatic_tuning Enable intelligent defaults for parallel execution parameters [TRUE | FALSE] parallel_execution_message_size Message buffer size for parallel execution [bytes] parallel_instance_group Instance group to use for all parallel operations [CHAR] parallel_max_servers Maximum parallel query servers per instance [NUMBER] parallel_min_percent Minimum percent of threads required for parallel query [NUMBER] parallel_min_servers Minimum parallel query servers per instance [NUMBER] parallel_server If TRUE startup in parallel server mode [TRUE | FALSE] parallel_server_instances Number of instances to use for sizing OPS SGA structures [NUMBER] parallel_threads_per_cpu Number of parallel execution threads per CPU [NUMBER] partition_view_enabled Enable/disable partitioned views [TRUE | FALSE] pga_aggregate_target Target size for the aggregate PGA memory consumed by the instance [bytes] plsql_code_type PL/SQL code-type [INTERPRETED | NATIVE] plsql_compiler_flags PL/SQL compiler flags [CHAR] plsql_debug PL/SQL debug [TRUE | FALSE] plsql_native_c_compiler plsql native C compiler [CHAR] plsql_native_library_dir plsql native library dir ['Path_to_directory'] plsql_native_library_subdir_count plsql native library number of subdirectories [NUMBER] plsql_native_linker plsql native linker [CHAR] plsql_native_make_file_name plsql native compilation make file [CHAR] plsql_native_make_utility plsql native compilation make utility [CHAR] plsql_optimize_level PL/SQL optimize level [NUMBER] plsql_v2_compatibility PL/SQL version 2.x compatibility flag [TRUE | F ALSE] plsql_warnings PL/SQL compiler warnings settings [CHAR] See also DBMS_WARNING and DBA_PLSQL_OBJECT_SET TINGS pre_page_sga Pre-page sga for process [TRUE | FALSE] processes User processes [NUMBER] query_rewrite_enabled ws Allow rewrite of queries using materialized vie if enabled [FORCE | TRUE | FALSE]

query_rewrite_integrity TED | ENFORCED] rdbms_server_dn read_only_open_delayed recovery_parallelism remote_archive_enable | FALSE | TRUE] remote_dependencies_mode

Perform rewrite using materialized views with desired integrity [STALE_TOLERATED | TRUS RDBMS's Distinguished Name [CHAR] If TRUE delay opening of read only files until first access [TRUE | FALSE] Number of server processes to use for parallel recovery [NUMBER] Remote archival enable setting [RECEIVE[,SEND]

Remote-procedure-call dependencies mode parameter [TIMESTAMP | SIGNATURE] remote_listener Remote listener [CHAR] remote_login_passwordfile Use a password file [NONE | SHARED | EXCLUSIVE] remote_os_authent Allow non-secure remote clients to use auto-logon accounts [TRUE | FALSE] remote_os_roles Allow non-secure remote clients to use os roles [TRUE | FALSE] replication_dependency_tracking Tracking dependency for Replication parallel propagation [TRUE | FALSE] resource_limit Master switch for resource limit [TRUE | FALSE] resource_manager_plan Resource mgr top plan [Plan_Name] resumable_timeout Set resumable_timeout, seconds [NUMBER] rollback_segments Undo segment list [CHAR] row_locking Row-locking [ALWAYS | DEFAULT | INTENT] (Defaul t=always) serial_reuse PLSQL|ALL|NULL] serializable service_names session_cached_cursors session_max_open_files sessions sga_max_size sga_target shadow_core_dump | NONE] shared_memory_address shared_pool_reserved_size shared_pool_size shared_server_sessions shared_servers skip_unusable_indexes LSE] sort_area_retained_size sort_area_size smtp_out_server r [server_clause] spfile sp_name sql92_security sql_trace Reuse the frame segments [DISABLE | SELECT|DML| Serializable [Internal] Service names supported by the instance [CHAR] Number of cursors to save in the session cursor cache [NUMBER] Maximum number of open files allowed per session [NUMBER] User and system sessions [NUMBER] Max total SGA size [bytes] Target size of SGA [bytes] Core Size for Shadow Processes [PARTIAL | FULL SGA starting address (low order 32-bits on 64-bit platforms) [NUMBER] Size in bytes of reserved area of shared pool [bytes] Size in bytes of shared pool [bytes] Max number of shared server sessions [NUMBER] Number of shared servers to start up [NUMBER] Skip unusable indexes if set to true [TRUE | FA Size of in-memory sort work area retained between fetch calls [bytes] Size of in-memory sort work area [bytes] utl_smtp server and port configuration paramete Server parameter file [CHAR] Service Provider Name [CHAR] Require select privilege for searched update/delete [TRUE | FALSE] Enable SQL trace [TRUE | FALSE]

sqltune_category sql_version standby_archive_dest standby_file_management star_transformation_enabled statistics_level streams_pool_size tape_asynch_io | FALSE] thread timed_os_statistics timed_statistics SE] trace_enabled | FALSE] tracefile_identifier transaction_auditing

Category qualifier for applying hintsets [CHAR] Sql language version parameter for compatibility issues [CHAR] Standby database archivelog destination text string ['Path_to_directory'] If auto then files are created/dropped automatically on standby [MANUAL | AUTO] Enable the use of star transformation [TRUE | FALSE | DISABLE_TEMP_TABLE] Statistics level [ALL | TYPICAL | BASIC] Size in bytes of the streams pool [bytes] Use asynch I/O requests for tape devices [TRUE Redo thread to mount [NUMBER] Internal os statistic gathering interval in seconds [NUMBER] Maintain internal timing statistics [TRUE | FAL Enable KST tracing (Internal parameter) [TRUE

Trace file custom identifier [CHAR] Transaction auditing records generated in the redo log [TRUE | FALSE] transactions Max. number of concurrent active transactions [NUMBER] transactions_per_rollback_segment Number of active transactions per rollback segment [NUMBER] undo_management undo_retention undo_suppress_errors undo_tablespace use_indirect_data_buffers Instance runs in SMU mode if TRUE, else in RBU mode [MANUAL | AUTO] Undo retention in seconds [NUMBER] Suppress RBU errors in SMU mode [TRUE | FALSE] Use or switch undo tablespace [Undo_tbsp_name] Enable indirect data buffers (very large SGA on 32-bit platforms [TRUE | FALSE] User process dump directory ['Path_to_directory utl_file accessible directories list utl_file_dir='Path1', 'Path2'.. or utl_file_dir='Path1' # Must be utl_file_dir='Path2' # consecutive entries Policy used to size SQL working areas [MANUAL |

user_dump_dest '] utl_file_dir

workarea_size_policy AUTO]

db_file_multiblock_read_count: The db_file_multiblock_read_count initialization parameter determines the maxim um number of database blocks read in one I/O operation during a full table scan. The setting of this parame ter can reduce the number of I/O calls required for a full table scan, thus improving performan ce. 15.6 9i UNDO or ROLLBACK parameters: ------------------------------------

- UNDO_MANAGEMENT If AUTO, use automatic undo management mode. If MANUAL, use manual undo manage ment mode. - UNDO_TABLESPACE A dynamic parameter specifying the name of an undo tablespace to use. - UNDO_RETENTION A dynamic parameter specifying the length of time to retain undo. Default is 9 00 seconds. - UNDO_SUPPRESS_ERRORS If TRUE, suppress error messages if manual undo management SQL statements are issued when operating in automatic undo management mode. If FALSE, issue error message. This is a dy namic parameter. If you're database is on manual, you can still use the following 8i type paramet ers: - ROLLBACK_SEGMENTS Specifies the rollback segments to be acquired at instance startup - TRANSACTIONS Specifies the maximum number of concurrent transactions - TRANSACTIONS_PER_ROLLBACK_SEGMENT Specifies the number of concurrent transactions that each rollback segment is expected to handle - MAX_ROLLBACK_SEGMENTS Specifies the maximum number of rollback segments that can be online for any i nstance

15.7 Oracle 9i init file examples: ---------------------------------= Example 1: ---------# Cache and I/O DB_BLOCK_SIZE=4096 DB_CACHE_SIZE=20971520 # Cursors and Library Cache CURSOR_SHARING=SIMILAR OPEN_CURSORS=300 # Diagnostics and Statistics BACKGROUND_DUMP_DEST=/vobs/oracle/admin/mynewdb/bdump CORE_DUMP_DEST=/vobs/oracle/admin/mynewdb/cdump TIMED_STATISTICS=TRUE USER_DUMP_DEST=/vobs/oracle/admin/mynewdb/udump # Control File Configuration CONTROL_FILES=("/vobs/oracle/oradata/mynewdb/control01.ctl",

"/vobs/oracle/oradata/mynewdb/control02.ctl", "/vobs/oracle/oradata/mynewdb/control03.ctl") # Archive LOG_ARCHIVE_DEST_1='LOCATION=/vobs/oracle/oradata/mynewdb/archive' LOG_ARCHIVE_FORMAT=%t_%s.dbf LOG_ARCHIVE_START=TRUE # Shared Server # Uncomment and use first DISPATCHES parameter below when your listener is # configured for SSL # (listener.ora and sqlnet.ora) # DISPATCHERS = "(PROTOCOL=TCPS)(SER=MODOSE)", # "(PROTOCOL=TCPS)(PRE=oracle.aurora.server.SGiopServer)" DISPATCHERS="(PROTOCOL=TCP)(SER=MODOSE)", "(PROTOCOL=TCP)(PRE=oracle.aurora.server.SGiopServer)", (PROTOCOL=TCP) # Miscellaneous COMPATIBLE=9.2.0 DB_NAME=mynewdb # Distributed, Replication and Snapshot DB_DOMAIN=us.oracle.com REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE # Network Registration INSTANCE_NAME=mynewdb # Pools JAVA_POOL_SIZE=31457280 LARGE_POOL_SIZE=1048576 SHARED_POOL_SIZE=52428800 # Processes and Sessions PROCESSES=150 # Redo Log and Recovery FAST_START_MTTR_TARGET=300 # Resource Manager RESOURCE_MANAGER_PLAN=SYSTEM_PLAN # Sort, Hash Joins, Bitmap Indexes SORT_AREA_SIZE=524288 # Automatic Undo Management UNDO_MANAGEMENT=AUTO UNDO_TABLESPACE=undotbs Example 2: ---------############################################################################## # Copyright (c) 1991, 2001 by Oracle Corporation ############################################################################## ########################################### # Cache and I/O

########################################### db_block_size=8192 db_cache_size=50331648 ########################################### # Cursors and Library Cache ########################################### open_cursors=300 ########################################### # Diagnostics and Statistics ########################################### background_dump_dest=D:\oracle\admin\iasdb\bdump core_dump_dest=D:\oracle\admin\iasdb\cdump timed_statistics=TRUE user_dump_dest=D:\oracle\admin\iasdb\udump ########################################### # Distributed, Replication and Snapshot ########################################### db_domain=missrv.miskm.mindef.nl remote_login_passwordfile=EXCLUSIVE ########################################### # File Configuration ########################################### control_files=("D:\oracle\oradata\iasdb\CONTROL01.CTL", "D:\oracle\oradata\iasdb \CONTROL02.CTL", "D:\oracle\oradata\iasdb\CONTROL03.CTL") ########################################### # Job Queues ########################################### job_queue_processes=4 ########################################### # MTS ########################################### dispatchers="(PROTOCOL=TCP)(PRE=oracle.aurora.server.GiopServer)", "(PROTOCOL=TC P)(PRE=oracle.aurora.server.SGiopServer)" ########################################### # Miscellaneous ########################################### aq_tm_processes=1 compatible=9.0.0 db_name=iasdb ########################################### # Network Registration ########################################### instance_name=iasdb ########################################### # Pools ########################################### java_pool_size=41943040 shared_pool_size=33554432 ########################################### # Processes and Sessions

########################################### processes=150 ########################################### # Redo Log and Recovery ########################################### fast_start_mttr_target=300 ########################################### # Sort, Hash Joins, Bitmap Indexes ########################################### pga_aggregate_target=33554432 sort_area_size=524288 ########################################### # System Managed Undo and Rollback Segments ########################################### undo_management=AUTO undo_tablespace=UNDOTBS

============== 17. Snapshots: ============== Snapshots allow you to replicate data based on column- and/or row-level subsetti ng, while multimaster replication requires replication of the entire table. You need a database link to implement replication. 17.1 Database link: ------------------In de "local" database, waar de snapshot copy komt te staan, geef een statement als bijv: CREATE PUBLIC DATABASE LINK MY_LINK CONNECT TO HARRY IDENTIFIED BY password USING 'DB1'; De servicename "DB1" wordt via de tnsnames.ora geresolved in een connectdescriptor, waarin de remote Servername, protocol, en SID van de remote database bekend is geworden. Nu is het mogelijk om bijv. de table employee in de remote database "DB1" te SELECTeren: SELECT * FROM employee@MY_LINK; Ook 2PC is geimplementeerd: update employee set amount=amount-100; update employee@my_link set amount=amount+100; commit;

17.2 Snapshots: --------------There are in general 2 styles of snapshots available Simple snapshot: One to one replication of a remote table to a local snapshot (=table). The refresh of the snapshot can be a complete refresh, with the refresh rate specified in the "create snapshot" command. Also a snapshot log can be used at the remote original table in order to repli cate only the transaction data. Complex snapshot: If multiple remote tables are joined in order to create/refresh a local snapsh ot, it is a "complex snapshot". Only complete refreshes are possible. If joins or complex query clauses are used, like group by, one can only use a "complex snapshot". -> Example COMPLEX snapshot: On the local database: CREATE SNAPSHOT EMP_DEPT_COUNT pctfree 5 tablespace SNAP storage (initial 100K next 100K pctincrease 0) REFRESH COMPLETE START WITH SYSDATE NEXT SYSDATE+7 AS SELECT DEPTNO, COUNT(*) Dept_count FROM EMPLOYEE@MY_LINK GROUP BY Deptno; Because the records in this snapshot will not correspond one to one with the records in the master table (since the query contains a group by clause ) this is a complex snapshot. Thus the snapshot will be completely recreated every time it is refreshed. -> Example SIMPLE snapshot: On the local database: CREATE SNAPSHOT EMP_DEPT_COUNT pctfree 5 tablespace SNAP storage (initial 100K next 100K pctincrease 0) REFRESH FAST

START WITH SYSDATE NEXT SYSDATE+7 AS SELECT * FROM EMPLOYEE@MY_LINK In this case the refresh fast clause tells oracle to use a snapshot log to refre sh the local snapshot. When a snapshotlog is used, only the changes to the master table are sent to the targets. The snapshot log must be created in the master database (WHERE the original obje ct is) create snapshot log on employee tablespace data storage (initial 100K next 100K pctincrease 0); Snapshot groups: ---------------A snapshot group in a replication system maintains a partial or complete copy of the objects at the target master group. Snapshot groups cannot span master group boundaries. Figure 3-7 displays the correlation between Groups A and B at the master site an d Groups A and B at the snapshot site. Group A at the snapshot site (see Figure 3-7) contains only some of the objects in the corresponding Group A at the master site. Group B at the snapshot site contains all objects in Group B at the master site. Under no circumstances, however, could Group B at the snapshot site contain obje cts FROM Group A at the master site. As illustrated in Figure 3-7, a snapshot group has the same name as the master g roup on which the snapshot group is based. For example, a snapshot group based on a "PERSONNEL" master group is also named "PERSONNEL." In addition to maintaining organizational consistency between snapshot sites and master sites, snapshot groups are required for supporting updateable snapshots. If a snapshot does not belong to a snapshot group, then it must be a read-only s napshot. A snapshot group is used to organize snapshots in a logical manner. Refresh groups: --------------If 2 or more master tables which have a PK-FK relationship, are replicated, it i s possible'that the 2 cooresponding snapshots violate the referential integrety, because of differen t refresh times and schedules etc.. Related snapshots can be collected int refresh groups. The purpose of a refresh group is to coordinate the refresh schedules of it's members. This is achieved via the DBMS_REFRESH package. The procedures in this package ar

e MAKE, ADD, SUBSTRACT, CHANGE, DESTROY, and REFRESH A refresh group could contain more than one snapshot groups.

Types of snapshots: ------------------Primary Key ----------Primary key snapshots are the default type of snapshot. They are updateable if t he snapshot was created as part of a snapshot group and "FOR UPDATE" was specified when defining the snapshot. Changes are propagated according to the row-level changes that have occurred, as identified by the primary key value of the row (not the ROWID). The SQL statement for creating an updateable, primary key snapshot might look like: CREATE SNAPSHOT sales.customer FOR UPDATE AS SELECT * FROM sales.customer@dbs1.acme.com; Primary key snapshots may contain a subquery so that you can create a horizontal ly partitioned subset of data at the remote snapshot site. This subquery may be as simple as a basic W HERE clause or as complex as a multilevel WHERE EXISTS clause. Primary key snapshots that contain a SELECTed class of subqueries can still be incrementally or fast refreshed. The following is a subquery snapsh ot with a WHERE clause containing a subquery: CREATE SNAPSHOT sales.orders REFRESH FAST AS SELECT * FROM sales.orders@dbs1.acme.com o WHERE EXISTS (SELECT 1 FROM sales.customer@dbs1.acme.com c WHERE o.c_id = c.c_id AND zip = 19555); ROWID ----For backwards compatibility, Oracle supports ROWID snapshots in addition to the default primary key snapshots. A ROWID snapshot is based on the physical row identifiers (ROWIDs ) of the rows in a master table. ROWID snapshots should be used only for snapshots based on master tables FROM an Oracle7 database, and should not be used when creating new snapshots based on master tables FROM O racle release 8.0 or greater databases. CREATE SNAPSHOT sales.customer REFRESH WITH ROWID AS SELECT * FROM sales.customer@dbs1.acme.com; Complex -------

To be fast refreshed, the defining query for a snapshot must observe certain res trictions. If you require a snapshot whose defining query is more general and cannot observ e the restrictions, then the snapshot is complex and cannot be fast refreshed. Specifically, a snapshot is considered complex when the defining query of the sn apshot contains: A CONNECT BY clause Clauses that do not comply with the requirements detailed in Table 3-1, "Restric tions for Snapshots with Subqueries" A set operation, such as UNION, INTERSECT, or MINUS In most cases, a distinct or aggregate function, although it is possible to have a distinct or aggregate function in the defining query and still have a simple snapshot See Also: Oracle8i Data Warehousing Guide for more information about complex materialized views. "Snapshot" is synonymous with "materialized view" in Oracle documentation, and " materialized view" is used in the Oracle8i Data Warehousing Guide. The following statement is an example of a complex snapshot CREATE statement: CREATE SNAPSHOT scott.snap_employees AS SELECT emp.empno, emp.ename FROM scott.emp@dbs1.acme.com UNION ALL SELECT new_emp.empno, new_emp.ename FROM scott.new_emp@dbs1.acme.com; Read Only --------Any of the previously described types of snapshots can be made read-only by omitting the FOR UPDATE clause or disabling the equivalent checkbox in the Repli cation Manager interface. Read-only snapshots use many of the same mechanisms as updateable snapshots, except that they do not need to belong to a snapshot group. Snapshot Registration at a Master Site -------------------------------------At the master site, an Oracle database automatically registers information about a snapshots based on its master table(s). The following sections explain more about Oracle's snapshot registration mechani sm. DBA_REGISTERED_SNAPSHOTS and DBA_SNAPSHOT_REFRESH_TIMES dictionary views You can query the DBA_REGISTERED_SNAPSHOTS data dictionary view to list the following information about a remote snapshot: The owner, name, and database that contains the snapshot The snapshot's defining query

Other snapshot characteristics, such as its refresh method (fast or complete) You can also query the DBA_SNAPSHOT_REFRESH_TIMES view at the master site to obtain the last refresh times for each snapshot. Administrators can use this inf ormation to monitor snapshot activity FROM master sites and coordinate changes to snapsho t sites if a master table needs to be dropped, altered, or relocated. Internal Mechanisms Oracle automatically registers a snapshot at its master database when you create the snapshot, and unregisters the snapshot when you drop it. Caution: Oracle cannot guarantee the registration or unregistration of a snapshot at its master site during the creation or drop of the snapshot, respectively. If Oracle cannot successfully register a snapshot during creation, Oracle completes snapshot registration during a subsequent refresh of the snapsh ot. If Oracle cannot successfully unregister a snapshot when you drop the snapshot, the registration information for the snapshot persists in the master database un til it is manually unregistered. Complex snapshots might not be registered. Manual registration ------------------If necessary, you can maintain registration manually. Use the REGISTER_SNAPSHOT and UNREGISTER_SNAPSHOT procedures of the DBMS_SNAPSHOT package at the master site to add, modify, or remove snapshot regi stration information. Snapshot Log -----------When you create a snapshot log for a master table, Oracle creates an underlying table as the snapshot log. A snapshot log holds the primary keys and/or the ROWIDs of rows that have been updated in the master table. A snapshot log can also contain filt er columns to support fast refreshes of snapshots with subqueries. The name of a snapshot log's table is MLOG$_master_table_name. The snapshot log is created in the same schema as the target master table. One snapshot log can support multiple snapshots on its master table. As described in the previous section, the internal trigger adds change informati on to the snapshot log whenever a DML transaction has taken place on the target mas ter table. There are three types of snapshot logs: Primary Key: The snapshot records changes to the master table based on the prima ry key of the affected rows. Row ID: The snapshot records changes to the master table based on the ROWID of t he affected rows.

Combination: The snapshot records changes to the master table based on both the primary key and the ROWID of the affected rows. This snapshot log supports both primary key and ROWI D snapshots, which is helpful for mixed environments. A combination snapshot log works in the same manner as the primary key and ROWID snapshot log, except that both the primary key and the ROWID of the affected row are recorded. Though the difference between snapshot logs based on primary keys and ROWIDs is small (one records affected rows using the primary key, while the other records affect ed rows using the physical ROWID), the practical impact is large. Using ROWID snapshots and snapshot logs makes reo rganizing and truncating your master tables difficult because it prevents your ROWID snapshots FROM being fast refreshed. If you reorganize or truncate your master table, your ROWID snapshot must be COM PLETE refreshed because the ROWIDs of the master table have changed. To delete a snapshot log, execute the DROP SNAPSHOT LOG SQL statement in SQL*Plu s. For example, the following statement deletes the snapshot log for a table named CUSTOMERS in the SALES schema: DROP SNAPSHOT LOG ON sales.customers; To delete the master table, use truncate table TABLE_NAME purge snapshot log;

============= 18. Triggers: ============= A trigger is PL/SQL code block attached and executed by an event which occurs to a database table. Triggers are implicitly invoked by DML commands. Triggers are stored as text and compiled at execute time, because of this it is wise not to include much code in them but to call out to previously stored procedures or packages as this will greatly improve perfoRMANc e. You may not use COMMIT, ROLLBACK and SAVEPOINT statements within trigger blocks. Remember that triggers may be executed thousands of times for a large update they can seriously affect SQL execution perfoRMANce. Triggers may be called BEFORE or AFTER the following events :INSERT, UPDATE and DELETE. Triggers may be STATEMENT or ROW types. - STATEMENT triggers fire BEFORE or AFTER the execution of the statement

that caused the trigger to fire. - ROW triggers fire BEFORE or AFTER any affected row is processed. An example of a statement trigger follows :CREATE OR REPLACE TRIGGER MYTRIG1 BEFORE DELETE OR INSERT OR UPDATE ON JD11.BOOK BEGIN IF (TO_CHAR(SYSDATE,'DAY') IN ('sat','sun')) OR (TO_CHAR(SYSDATE,'hh24:mi') N OT BETWEEN '08:30' AND '18:30') THEN RAISE_APPLICATION_ERROR(-20500,'Table is secured'); END IF; END; After the CREATE OR REPLACE statement is the object identifier (TRIGGER) and the object name (MYTRIG1). This trigger specifies that before any data change event on the BOOK table this PL/SQL code block will be compiled and executed. The user will not be allowed to update the table outside of normal working hours. An example of a row trigger follows :CREATE OR REPLACE TRIGGER MYTRIG2 AFTER DELETE OR INSERT OR UPDATE ON JD11.BOOK FOR EACH ROW BEGIN IF DELETING THEN INSERT INTO JD11.XBOOK (PREVISBN, TITLE, DELDATE) VALUES (:OLD.ISBN, :OLD. TITLE, SYSDATE); ELSIF INSERTING THEN INSERT INTO JD11.NBOOK (ISBN, TITLE, ADDDATE) VALUES (:NEW.ISBN, :NEW.TITL E, SYSDATE); ELSIF UPDATING ('ISBN) THEN INSERT INTO JD11.CBOOK (OLDISBN, NEWISBN, TITLE, UP_DATE) VALUES (:OLD.ISB N :NEW.ISBN, :NEW.TITLE, SYSDATE); ELSE /* UPDATE TO ANYTHING ELSE THAN ISBN */ INSERT INTO JD11.UBOOK (ISBN, TITLE, UP_DATE) VALUES (:OLD.ISBN :NEW.TITLE , SYSDATE); END IF END; In this case we have specified that the trigger will be executed after any data change event on any affected row. Within the PL/SQL block body we can check which update action is being performed for the currently affected row and take whatever action we feel is appropriate. Note tha t we can specify the old and new values of updated rows by prefixing column names with th e :OLD and :NEW qualifiers. --------------------------------------------------------------------------------

The following statement creates a trigger for the Emp_tab table: CREATE OR REPLACE TRIGGER Print_salary_changes

BEFORE DELETE OR INSERT OR UPDATE ON Emp_tab FOR EACH ROW WHEN (new.Empno > 0) DECLARE sal_diff number; BEGIN sal_diff := :new.sal - :old.sal; dbms_output.put('Old salary: ' || :old.sal); dbms_output.put(' New salary: ' || :new.sal); dbms_output.put_line(' Difference ' || sal_diff); END; / If you enter a SQL statement, such as the following: UPDATE Emp_tab SET sal = sal + 500.00 WHERE deptno = 10; Then, the trigger fires once for each row that is updated, and it prints the new and old salaries, and the difference. CREATE OR REPLACE TRIGGER "SALES".HENKILOROOLI_CHECK2 AFTER INSERT OR UPDATE OR DELETE ON AH_HENKILOROOLI BEGIN IF INSERTING OR DELETING THEN handle_delayed_triggers ('AH_HENKILOROOLI', 'HENKILOROOLI_CHECK'); END IF; IF INSERTING OR UPDATING OR DELETING THEN /* FE */ handle_delayed_triggers('AH_HENKILOROOLI', 'FRONTEND_FLAG'); /* FE */ END IF; /* FE */ END; A trigger is either a stored PL/SQL block or a PL/SQL, C, or Java procedure asso ciated with a table, view, schema, or the database itself. Oracle automatically executes a trigger wh en a specified event takes place, which may be in the form of a system event or a DML statement being issued again st the table. Triggers can be: -DML triggers on tables. -INSTEAD OF triggers on views. -System triggers on DATABASE or SCHEMA: With DATABASE, triggers fire for each ev ent for all users; with SCHEMA, triggers fire for each event for that specific user. BEFORE and AFTER Options The BEFORE or AFTER option in the CREATE TRIGGER statement specifies exactly whe n to fire the trigger body in relation to the triggering statement that is being run. In a CREATE TRIGGER statement, the BEFORE or AFTER option is specified just befo re the triggering statement. For example, the PRINT_SALARY_CHANGES trigger in the previous example is a BEFOR E trigger.

INSTEAD OF Triggers The INSTEAD OF option can also be used in triggers. INSTEAD OF triggers provide a transparent way of modifying views that cannot be modified directly through UPDATE, INSERT, and DELETE statements. These triggers are called INSTEAD OF triggers because, unlike other types of tri ggers, Oracle fires the trigger instead of executing the triggering statement. The trigger performs UPDATE, INSERT, or DELETE operations directly on the underl ying tables.

CREATE TABLE Prj_level Projno Resp_dept CREATE TABLE Empno Ename Job Mgr Hiredate Sal Comm Deptno CREATE TABLE Deptno Dname Loc Mgr_no Dept_type

Project_tab ( NUMBER, NUMBER, NUMBER); Emp_tab ( NUMBER NOT NULL, VARCHAR2(10), VARCHAR2(9), NUMBER(4), DATE, NUMBER(7,2), NUMBER(7,2), NUMBER(2) NOT NULL); Dept_tab ( NUMBER(2) NOT NULL, VARCHAR2(14), VARCHAR2(13), NUMBER, NUMBER);

The following example shows an INSTEAD OF trigger for inserting rows into the MA NAGER_INFO view. CREATE OR REPLACE VIEW manager_info AS SELECT e.ename, e.empno, d.dept_type, d.deptno, p.prj_level, p.projno FROM Emp_tab e, Dept_tab d, Project_tab p WHERE e.empno = d.mgr_no AND d.deptno = p.resp_dept; CREATE OR REPLACE TRIGGER manager_info_insert INSTEAD OF INSERT ON manager_info REFERENCING NEW AS n -- new manager information FOR EACH ROW DECLARE rowcnt number; BEGIN SELECT COUNT(*) INTO rowcnt FROM Emp_tab WHERE empno = :n.empno; IF rowcnt = 0 THEN INSERT INTO Emp_tab (empno,ename) VALUES (:n.empno, :n.ename); ELSE

UPDATE Emp_tab SET Emp_tab.ename = :n.ename WHERE Emp_tab.empno = :n.empno; END IF; SELECT COUNT(*) INTO rowcnt FROM Dept_tab WHERE deptno = :n.deptno; IF rowcnt = 0 THEN INSERT INTO Dept_tab (deptno, dept_type) VALUES(:n.deptno, :n.dept_type); ELSE UPDATE Dept_tab SET Dept_tab.dept_type = :n.dept_type WHERE Dept_tab.deptno = :n.deptno; END IF; SELECT COUNT(*) INTO rowcnt FROM Project_tab WHERE Project_tab.projno = :n.projno; IF rowcnt = 0 THEN INSERT INTO Project_tab (projno, prj_level) VALUES(:n.projno, :n.prj_level); ELSE UPDATE Project_tab SET Project_tab.prj_level = :n.prj_level WHERE Project_tab.projno = :n.projno; END IF; END;

FOR EACH ROW Option The FOR EACH ROW option determines whether the trigger is a row trigger or a sta tement trigger. If you specify FOR EACH ROW, then the trigger fires once for each row of the tab le that is affected by the triggering statement. The absence of the FOR EACH ROW option indicates th at the trigger fires only once for each applicable statement, but not separately for each row affected by the s tatement. For example, you define the following trigger: -------------------------------------------------------------------------------Note: You may need to set up the following data structures for certain examples to wor k: CREATE TABLE Emp_log ( Emp_id NUMBER, Log_date DATE, New_salary NUMBER, Action VARCHAR2(20)); -------------------------------------------------------------------------------CREATE OR REPLACE TRIGGER Log_salary_increase AFTER UPDATE ON Emp_tab FOR EACH ROW WHEN (new.Sal > 1000) BEGIN INSERT INTO Emp_log (Emp_id, Log_date, New_salary, Action) VALUES (:new.Empno, SYSDATE, :new.SAL, 'NEW SAL');

END; Then, you enter the following SQL statement: UPDATE Emp_tab SET Sal = Sal + 1000.0 WHERE Deptno = 20; If there are five employees in department 20, then the trigger fires five times when this statement is entered, because five rows are affected. The following trigger fires only once for each UPDATE of the Emp_tab table: CREATE OR REPLACE TRIGGER Log_emp_update AFTER UPDATE ON Emp_tab BEGIN INSERT INTO Emp_log (Log_date, Action) VALUES (SYSDATE, 'Emp_tab COMMISSIONS CHANGED'); END; Trigger Size The size of a trigger cannot be more than 32K. Valid SQL Statements in Trigger Bodies The body of a trigger can contain DML SQL statements. It can also contain SELECT statements, but they must be SELECT... INTO... statements or the SELECT statement in the def inition of a cursor. DDL statements are not allowed in the body of a trigger. Also, no transaction control statements are allowed in a trigger. ROLLBACK, COMMIT, and SAVEPOINT cannot be used.For system triggers, {CREATE/ALTE R/DROP} TABLE statements and ALTER...COMPILE are allowed. Recompiling Triggers Use the ALTER TRIGGER statement to recompile a trigger manually. For example, the following statement recompiles the PRINT_SALARY_CHANGES trigger : ALTER TRIGGER Print_salary_changes COMPILE; Disable enable trigger: ALTER TRIGGER Reorder DISABLE; ALTER TRIGGER Reorder ENABLE; Or in 1 time for all triggers on a table: ALTER TABLE Inventory DISABLE ALL TRIGGERS;

ALTER DATABASE rename GLOBAL_NAME TO NEW_NAME;

==================================== 19 BACKUP RECOVERY, TROUBLESHOOTING: ====================================

19.1 SCN: -------The Control files and all datafiles contain the last SCN (System Change Number) after: checkpoint, for example via ALTER SYSTEM CHECKPOINT, shutdown normal/immediate/transactional, log switch occurs by the system via alter system switch logfile, alter tablespace begin backup etc..

at checkpoint the following occurs: ------------------------------------ The database writer (DBWR) writes all modified database blocks in the buffer cache back to datafiles, - Log writer (LGWR) or Checkpoint process (CHKPT) updates both the controlfile and the datafiles to indicate when the last checkpoint occurred (SCN) Log switching causes a checkpoint, but a checkpoint does not cause a logswitch. LGWR writes logbuffers to online redo log: ------------------------------------------ at commit - redolog buffers 1/3 full, > 1 MB changes - before DBWR writes modified blocks to datafiles LOG_CHECKPOINT_INTERVAL init.ora parameter: ------------------------------------------The LOG_CHECKPOINT_INTERVAL init.ora parameter controls how often a checkpoint operation will be performed based upon the number of operating system blocks that have been written to the redo log. If this value is larger than the size of the redo log, then the checkpoint will only occur when Oracle performs a log switch FROM one group to another, which is preferred. NOTE: Starting with Oracle 8.1, LOG_CHECKPOINT_INTERVAL will be interpreted to mean that the incremental checkpoint should not lag the tail of the log by more than log_checkpoint_interval number of redo blocks. On most Unix systems the operating system block size is 512 bytes. This means that setting LOG_CHECKPOINT_INTERVAL to a value of 10,000 (the default setting), causes a checkpoint to occur after 5,120,000 (5M) bytes are written to the redo log. If the size of your redo log is 20M, you are taking 4 checkpoints for each log. LOG_CHECKPOINT_TIMEOUT init.ora parameter:

ora parameter. Longer intervals between checkpoints mean that more time will be required during database recovery. enabling a recovery window used for a stand-by database configuration. allows you to log checkpoint start and stop times in the alert log. NOTE: Starting with Oracle 8. FAST_START_IO_TARGET init.-----------------------------------------The LOG_CHECKPOINT_TIMEOUT init.ora paramater: ---------------------------------------FAST_START_IO_TARGET (available only with the Oracle Enterprise Edition) specifies the number of I/Os that should be needed during crash or instance reco very. but a checkpoint does not cause a log switch. The lower the value. FAST_START_MTTR_TARGET can be overridden by either FAST_START_IO_TARGET or LOG_CHECKPOINT_INTERVAL. This is very helpful in determining if checkpoints are occurring at the optimal frequency and gives a chronological view of checkpoints and other database activities occurring in the background. This improvement in recovery perfoRMANce is achieved at the expense of additional writing activity during normal processing. LOG_CHECKPOINT_TIMEOUT will be interpreted to mean that the incremental checkpoint should be at the log position WHERE the tail of the log was LOG_CHECKPOINT_TIMEOUT seconds ago.ora parameter: -------------------------------------------The LOG_CHECKPOINTS_TO_ALERT init. ARCHIVE_LAG_TARGET = 1800 . It is the number of seconds it takes to recover FROM crash recovery. LOG_CHECKPOINTS_TO_ALERT init. Log switches cause a checkpoint.ora parameter: -------------------------------------The following initialization parameter setting sets the log switch interval to 30 minutes (a typical value). the more often DBWR will write the blocks to disk. Checkpoint frequency impacts the time required for the database to recover FROM an unexpected failure. when set to a value of TRUE. ARCHIVE_LAG_TARGET init.ora parameter: -----------------------------------------FAST_START_MTTR_TARGET enables you to specify the number of seconds the database takes to perform crash recovery of a single instance.ora parameter controls how often a checkpoint will be performed based on the number of seconds that have passed since the last checkpoint.1. It is a misconception that setting LOG_CHECKPOINT_TIMEOUT to a given value will initiate a log switch at that interval. Smaller values for this parameter result in faster recovery times. The only way to cause a log switch is manually with ALTER SYSTEM SWITCH LOGFILE or resizing the redo logs to cause more FAST_START_MTTR_TARGET init.

The article wil l then proceed to discuss actions that can be taken to avoid the error and finally will provide some simple PL/SQL scripts that illustrate the issues discussed. If not. Terminology ~~~~~~~~~~~ It is assumed that the reader is familiar with standard Oracle terminology such as 'rollback segment' and 'SCN'. two key concepts are briefly covered below which help in th e understanding of ORA-01555: 1.Note: More on SCN: ================== >>>> thread from asktom You Asked Tom.. Would you tell me what snapshot too old error. the reader should first read the Oracle Se rver Concepts manual and related Oracle documentation. READ CONSISTENCY: ==================== This is documented in the Oracle Server Concepts manual and so will not be discu ssed further. However.1> covers this topic very well: ORA-01555 "Snapshot too old" .. Jane and we said. In addition to this. I think support note <Note:40689. When does it happen? What's the p ossible causes? How to fix it? Thank you very much. for the purposes of this article this should be read and under .Detailed Explanation =================================================== Overview ~~~~~~~~ This article will discuss the circumstances under which a query can return the O racle error ORA-01555 "snapshot too old (rollback segment too small)".

It is left for the next transaction that vi sits any block affected by the update to 'tidy up' the block (hence the term 'delayed blo ck cleanout'). This obviously visits a large number of database blocks to make the c hange to the data. cluster) it stores a poi nter in the header of the data block which identifies the rollback segment used to hold the rollback information for the changes made by the transaction. Here we walk throu gh the stages involved in updating a data block. At the top of the data block we have an area used to link active . (This is required if the user later elects to not commit the changes and wishes to 'undo' the changes mad e. STAGE 1 . When the user commits the transaction Oracle does NOT go back and revi sit these blocks to make the change permanent. the database simply marks the relevant rollback segment header entr y as committed. Now. when one of the changed blocks is revisited Oracle examines the header of the data block which indicates that it has been changed at some point.No changes made Description: This is the starting point. To do this. table. The datab ase needs to confirm whether the change has been committed or whether it is currently unco mmitted. Whenever Oracle changes a database block (index.stood if not understood already. Oracle Server has the ability to have multi-version read consistency which is in valuable to you because it guarantees that you are seeing a consistent view of the data ( no 'dirty reads'). 2. If it is found that the block is committed then the header of the data block is updated so that subsequent accesses to the block do not incur this processing. DELAYED BLOCK CLEANOUT: ========================== This is best illustrated with an example: Consider a transaction that updates a million row table. Oracle determines the rollback segment used for the previous transac tion (from the block's header) and then determines whether the rollback header indica tes whether it has been committed or not. This behaviour is illustrated in a very simplified way below.) Upon commit.

. ... Data Block 500 Rollback Segment Header 5 +----+--------------+ +----------------------+---------+ | tx |5.transactions to a rollback segment (the 'tx' part). Note that all that this does is it updates the rollback segment header's corresponding transaction slot as committed. | | . .) Data Block 500 +----+--------------+ | tx | None | +----+--------------+ | row 1 | | row 2 | | .3) and that it is marked uncommitted (Active).... | .Another user selects data block 500 Rollback Segment Header 5 +----------------------+---------+ | transaction entry 01 |ACTIVE | | transaction entry 02 |ACTIVE | | transaction entry 03 |COMMITTED| | transaction entry 04 |COMMITTED| | .. and the rollback segment header has a table that stores information upon all the latest transactions that have used that rollback segment.. | . | | row n | +-------------------+ STAGE 2 .... . Note that the data block header is updated to point to the rollback segment 5. | | row n | | transaction entry nn |COMMITTED| +------------------+ +--------------------------------+ STAGE 3 ... | | . | ......3uncommitted|--+ | transaction entry 01 |ACTIVE | +----+--------------+ | | transaction entry 02 |ACTIVE | | row 1 | +--->| transaction entry 03 |COMMITTED| | row 2 *changed* | | transaction entry 04 |COMMITTED| | .. .. | | row n | | transaction entry nn |COMMITTED| +------------------+ +--------------------------------+ STAGE 4 ..The user issues a commit Description: Next the user hits commit.3uncommitted|-+ | transaction entry 01 |ACTIVE | +----+--------------+ | | transaction entry 02 |ACTIVE | | row 1 | +-->| transaction entry 03 |ACTIVE | | row 2 *changed* | | transaction entry 04 |COMMITTED| | ... (Since we are free to overwrite committed transactions. transaction slot 3 (5... It does *nothing* to the data block... we have two active transaction slots (01 and 02) and the next free slot is slot 03.. . ..Row 2 is updated Description: We have now updated row 2 of block 500. . Data Block 500 Rollback Segment Header 5 +----+--------------+ +----------------------+---------+ | tx |5.. .. In our example. | | transaction entry nn |COMMITTED| +--------------------------------+ .

.. We can see that there is an uncommitted change in the data block according to the data block's header.. Data Block 500 +----+--------------+ | tx | None | +----+--------------+ | row 1 | | row 2 | | .. . Note: If the transaction of User A is not committed. Both of these situations are discussed below with the series of steps that cause the ORA-01555. 'QENV' is short for 'Query Environment'. and Oracle cannot rollback the transa ction header sufficiently to derive the original rollback segment transaction slot... reference is made to 'QENV'. | | transaction entry nn |COMMITTED| +--------------------------------+ . it performs delayed cleanout).. | . which can be thought of as the environment that existed when a que ry is first started and to which Oracle is trying to attain a read consistent image. o The transaction slot in the rollback segment's transaction table (stored in the rollback segment's header) is overwritten.e. These are : o The rollback information itself is overwritten so that Oracle is unable to r ollback the (committed) transaction entries to attain a sufficiently old enough version of the block. and changes data block 500 to reflect the true state of the datablock. | | row n | +------------------+ ORA-01555 Explanation ~~~~~~~~~~~~~~~~~~~~~ There are two fundamental causes of the error ORA-01555 that are a result of Ora cle trying to attain a 'read consistent' image. but if User A commits. . the rollback segment entr ies will NOT be reused. user B gets an erro r. and "meet" those overwritten entries..Description: Some time later another user (or the same user) revisits data block 500. A ssociated with this environment is the SCN (System Change Number) at that time and hence. QENV 50 is the query environment with SCN Rollback Segment Header 5 +----------------------+---------+ | transaction entry 01 |ACTIVE | | transaction entry 02 |ACTIVE | | transaction entry 03 |COMMITTED| | transaction entry 04 |COMMITTED| | . and if a que ry of User B takes a lot of time.. (i. Oracle then uses the data block header to look up the corresponding rollback segment transaction table slot. sees that it has been committed. the entries become free for reuse. In the steps. ..

Therefore we need to get an image o f the block as of this QENV. Session 1 selects block B1 during this query 3. Session 1 selects block B1 during this query 3. Steps: 1. Now. A session (Session 1. Session 1 updates the block at SCN 51 4. It is under this condition that Oracle may not be able to get the require d rollback information because Session 1's changes have generated rollback informa tion that has overwritten it and returns the ORA-1555 error. The latter is discussed in this article because th is is usually the harder one to understand. otherwise we need to rollback the current block to generate anoth er version of the block as at the required QENV. Session 1 starts query at time T1 and QENV 50 2. .ROLLBACK OVERWRITTEN This breaks down into two cases: another session overwriting the rollback that the current session requires or the case where the current session overwrites the r ollback information that it requires.50. 5. CASE 1 . Session 1 commits the changes made in steps '3' and '4'. CASE 2 . Session 1 starts query at time T1 and QENV 50 2.ROLLBACK TRANSACTION SLOT OVERWRITTEN 1. Oracle can see from the block's header that it has been changed and it is later than the required QENV (which was 50). If an old enough version of the block can be found in the buffer cache th en we will use this. another session or a number of other sessions) then use the same rollback segment for a series of committed transactions. (Now other transactions are free to overwrite this rollback information) 6. Session 1 updates the block at SCN 51 4. Session 1 revisits the same block B1 (perhaps for a different row). Session 1 commits the changes (Now other transactions are free to overwrite this rollback information) 5. Session 1 does some other work that generates rollback information.

6. Next Oracle attempts to lookup the rollback segment header's transaction slot pointed to by the top of the data block. (Note: Normally Oracle can use an algorithm for determining a block's SCN durin g block cleanout even when the rollback segment slot has been overwritten. Note that Oracle is free to reuse these slots since al l transactions are committed. If it cannot rollback the rollback segment transaction table sufficiently it will return ORA-1555 since Oracle can no longer derive the required version of the da ta block. If the transaction slot has been overwritten and the transaction table cannot b e rolled back to a sufficiently old enough version then Oracle cannot derive the block im age and will return ORA-1555. In order to do this. But in this c ase . were subsequently changed. When Session 1 encounters these blocks it determines tha t the blocks have changed and have not yet been cleaned out (via delayed block cleanou t). If this SCN is after the QENV then Oracle m ust try to construct an older version of the block and if it is before then the block ju st needs clean out to be good enough for the QENV. Oracle therefore needs to derive an image of the block as at th at point in time. This is briefly described below : Session 1 starts a query at QENV 50.These transactions each consume a slot in the rollback segment transactio n table such that it eventually wraps around (the slots are written to in a circular fas hion) and overwrites all the slots. It then realises that this has been ove rwritten and attempts to rollback the changes made to the rollback segment header to get the original transaction slot entry. Oracle must look at the relevant rollback segment transact ion table slot to determine the committed SCN. Session 1's query then visits a block that has been changed since the ini tial QENV was established. Session 1 must determine whether the rows in the block existed at QENV 50. It is also possible to encounter a variant of the transaction slot being overwr itten when using block cleanout. After this another process updates the blo cks that Session 1 will require.

(S ame reason as 1). This will allow trans actions to spread their work across multiple rollback segments therefore reducing the li kelihood . then the session mus t be using an Oracle extension whereby fetches across commits are tolerated. Ensure that the outer select does not revisit the same block at different times during the processing.ROLLBACK TRANSACTION SLOT OVERWRITTEN 1. Use any of the methods outlined above except for '6'. to be s pread across more rollback segments thereby reducing the chances of overwriting requir ed rollback information. 5. It addresses the cases where rollback segment informa tion is overwritten by the same session and when the rollback segment transaction table entry is overwritten. This doe s not follow the ANSI model and in the rare cases where ORA-01555 is returned one of the solutions below must be used. CASE 1 . Reduce the number of commits (same reason as 1). the code can be changed so that this is not do ne. 3.Oracle cannot guarantee that the version of the block has not changed since the start of the query). If fetching across commits.ROLLBACK OVERWRITTEN 1. It is worth highlighting that if a single session experiences the ORA-01555 and it is not one of the special cases listed at the end of this article. Run the processing against a range of data rather than the whole table. 4. 2. Solutions ~~~~~~~~~ This section lists some of the solutions that can be used to avoid the ORA-01555 problems discussed in this article.Introducing a dummy sort so that we retrieve all the data. This can be achieved by : . Increase size of rollback segment which will reduce the likelihood of over writing rollback information that is needed. 6. CASE 2 . Add additional rollback segments.Using a full table scan rather than an index lookup . This will allow the updates etc. sort it and then sequentially visit these data blocks.

SQL*DBA or Server Manager : alter session set optimizer_goal = rule. if the index is o n a numeric column with a minimum value of 25 then the following query will force cl eanout of the index : select index_column from table_name where index_column > 24. drop table dummy1. create table dummy1 (a varchar2(200)). done char(1)). . drop table bigemp. REASON: See the reason for using one rollback segment. o Ensure that the rollback segment is small. Eg. o Use one rollback segment other than SYSTEM. If indexes are being accessed then the problem may be an index block and cl ean out can be forced by ensuring that all the index is traversed. REASON: You do not want the session executing the script to be able to find old versions of the block in the buffer cache which can be used to satisfy a block v isit without requiring the rollback information. Before these PL/SQL examples will return this error the database mu st be configured as follows : o Use a small buffer cache (db_block_buffers). Examples ~~~~~~~~ Listed below are some PL/SQL examples that can be used to illustrate the ORA-155 5 cases given above. 2.or rollback segment transaction table slots being consumed. create table bigemp (a number. ROLLBACK OVERWRITTEN rem rem rem rem * * * * 1555_a.sql Example of getting ora-1555 "Snapshot too old" by session overwriting the rollback information required by the same session. b varchar2(30). This can b e achieved by issuing the following in SQL*Plus. then force block cleanout to occur prior to the transaction that returns the ORA-1555. If it is suspected that the block cleanout variant is the cause. select count(*) from table_name. REASON: You need to ensure that the work being done is generating rollback information that will overwrite the rollback information required.

This just uses one session.100) = 0 then insert into dummy1 values ('ssssssssssss'). to_char(i).If another tx is updating the table then we may not need the predicate cursor c1 is select rowid.20). 'N'). b varchar2(30). commit. end. commit. bigemp.200 loop insert into bigemp values (mod(i.. end if. ROLLBACK TRANSACTION SLOT OVERWRITTEN rem * 1555_b. done char(1)). end loop.Must use a predicate so that we revisit a changed block at a different -. done='Y' where c1rec.rem * Populate the example tables. end loop. / drop table mydual. begin for i in 1. if mod(i. to_char(i). begin for c1rec in c1 loop update dummy1 update dummy1 update dummy1 update bigemp commit. -. create table bigemp (a number.4000 loop insert into bigemp values (mod(i. commit. end.time. end if. commit. if mod(i. end. 'N'). select count(*) from bigemp. declare -. .Example of getting ora-1555 "Snapshot too old" by rem * overwriting the transaction slot in the rollback rem * segment header. / rem * Ensure that table is 'cleaned out'.100) = 0 then commit. / set set set set a = 'aaaaaaaa'. rem * Populate demo table. drop table bigemp.20). a = 'cccccccc'..rowid = rowid.* from bigemp where a < 20. a = 'bbbbbbbb'. begin for i in 1. insert into mydual values (1). end loop. create table mydual (a number).sql .

Summary ~~~~~~~ This article has discussed the reasons behind the error ORA-01555 "Snapshot too old". o It is feasible that a rollback segment created with the OPTIMAL clause maycau se a query to return ORA-01555 if it has shrunk during the life of the query causing rollback segment information required to generate consistent read versions of blocks to b e lost. update bigemp set b = 'aaaaa'. begin -.cleanout has been done on 'bigemp'. for c1rec in c1 loop for i in 1. / Special Cases ~~~~~~~~~~~~~ There are other special cases that may result in an ORA-01555. Decreasing LOG_CHECKPOINT_INTERVAL on the secondary database may overcome the problem. declare cursor c1 is select * from bigemp. end loop.script will fail with ORA-1555 for the block cleanout variant. >>>>> thread about SCN .20 loop update mydual set a=a.. o If a query visits a data block that has been changed by using the Oracle disc rete transaction facility then it will return ORA-01555.out then the update and commit statements can be commented and the -.rem * Cleanout demo table. select count(*) from bigemp. end loop. If the cleanout (above) is commented -. These are given b elow but are rare and so not discussed in this article : o Trusted Oracle can return this if configured in OS MAC mode. commit. has provided a list of possible methods to avoid the error when it is encountered. commit. end. a nd has provided simple PL/SQL scripts that illustrate the cases discussed.The following update is required to illustrate the problem if block -.

INSERT INTO trx VALUES (l_trx_id. SYSDATE. step_id. old_y. END. :OLD. alter table trx_detail add constraint xp_trx_detail primary key ( trx_id.Do It Yourself (DIY) Oracle replication Here's a demonstration. END. :NEW. create table trx_detail ( trx_id varchar(25) . userenv('COMMITSCN'). :NEW. old_y number . step_id number . y number ).x. create table trx ( trx_id varchar2(25) primary key. username varchar2(30) ). This is t he table on which we want to perform change-data-capture (CDC). old_x number . new_x. step_tms. First I create a simple table. new_y number . USER). and the trigger on TBL_SRC that will load t he CDC tables. EXCEPTION WHEN dup_val_on_index THEN NULL. SCN number. / . step_i d ). called TBL_SRC. old_x. :OLD. operation char(1) ). I show a couple of CDC tables. new_y) VALUES (l_trx_id. new_x number .x. step_tms date .local_transaction_id.step_id. create table tbl_src ( x number primary key. l_step_id. l_step_id NUMBER. l_step_id := dbms_transaction.y). BEGIN BEGIN l_trx_id := dbms_transaction.y. Next. INSERT INTO trx_detail (trx_id. create or replace trigger b4_src before insert or update or delete on tbl_src for each row DECLARE l_trx_id VARCHAR2(25).

366.3.393.4.999. I'd use built-in Oracle functionality. select * from trx.33402 3732931668 CIDW Notice how the SCN "changed" from 3732931665 to 3732931668. and see the 'true'/post-commit SCN: insert into tbl_src values ( 1.------------------3.33402 3732931665 CIDW commit. Not perfect.999.999.33402 4.Let's see the magic in action.ora parameters and ARCHIVE MODE: ---------------------------------------LOG_ARCHIVE_DEST=/oracle/admin/cc1/arch . 1 row created.4. A TRUNCATE is DDL.------------------3. 19.--------. I'll insert a record. 1 ). Then we'll commit. Oracle was doing som e background transactions in between. / TRX_ID STEP_ID STEP_TMS OLD_X OLD_Y NEW_X NEW_Y O ------------------------.---------.---------.4. We'll see the 'provisional' SCN in the TRX table.---------.448 11-NOV-06 1 1 This approach works back to at least Oracle 7.4.---------.999. I sto red the before and after values as CSV strings. Commit complete.---------------------------.821.---------. For the actual implementation. select * from trx.999.162.3.999.--------. For 9i or later. and that's not captured. TRX_ID SCN USERNAME ------------------------. because it only captures DML. And we can look at the details of the transaction: column step_id format 999. TRX_ID SCN USERNAME ------------------------.2 init.

LOG_ARCHIVE_DEST_1=d:\oracle\oradata\arc LOG_ARCHIVE_START=TRUE LOG_ARCHIVE_FORMAT=arc_%s. export FILES . ! tar -cvf /dev/rmt/0hc /u01/oradata/sys01. ! tar -rvf /dev/rmt/0hc /u02/oradata/data01.1 OS backup script in unix -----------------------------############################################### # Example archive log backup script in UNIX: # ############################################### # Set up the environment to point to the correct database ORACLE_SID=CC1. archive log stop.4.dbf alter tablespace data end backup. exit EOFarch1 # Get a listing of all archived files. etc .log LOG_ARCHIVE_DEST_1= LOG_ARCHIVE_DEST_2= LOG_ARCHIVE_MAX_PROCESSES=2 19. FILES='ls /db01/oracle/arch/cc1/arch*.3 Enabling or disabling archive mode: ---------------------------------ALTER DATABASE ARCHIVELOG (mounted.. export ORAENV_ASK .4 Implementation backup in archive mode via OS script: -------------------------------------------------------19. niet open) ALTER DATABASE NOARCHIVELOG (mounted.dbf'. export ORACLE_SID ORAENV_ASK=NO. # We must briefly stop the archiving process in order that # we do not miss the latest files for sure.. alter tablespace DATA begin backup. # Now we backup the archived redo logs before we delete them. niet open) 19. .oraenv # Backup the tablespaces svrmgrl <<EOFarch1 connect internal alter tablespace SYSTEM begin backup.dbf alter tablespace data end backup.

it is logically inconsistent.# Start archiving again svrmgrl <<EOFarch2 connect internal archive log start. 19. Datafile. This is so that we know what redo logs we need to apply it consistent. it -.others and others from various points in between.. BEGIN BACKUP.bck ############################### # End backup script example # ############################### 19. Met de immediate clausule is wel recovery nodig. Een datafile kan in non-archive mode niet offline worden geplaatst. Als de datafile online wordt gebracht. moet eerst media recovery wordfen toegepa st.6 Recovery in archive mode: to a given file to make we are still writing to up blocks could be from from the time it ended . it freezes the datafile header. exit EOFarch2 # Now backup the archived files to tape tar -rvf /dev/rmt/0hc $FILES # Delete the backupped archived files rm -f $FILES # Backup the control file svrmgrl <<EOFarch3 connect internal alter database backup controlfile to '/db01/oracle/cc1/cc1controlfile. Dit is zo met de NORMAL clausule: alter tablespace offline normal.5 Tablespaces en datafiles online/offline in non-archive en archive mode: --------------------------------------------------------------------------Tablespace: Een tablespace kan in archive mode en non-archive mode offline worden geplaatst zonder dat media recovery nodig is.bck'. Some of the backed the SCN in place at the time the backup began -. Een datafile kan in archive mode offline worden gezet. exit EOFarch3 tar -rvf /dev/rmt/0hc /db01/oracle/cc1/cc1controlfile. While you are backing up that file hot. Backup mode: When you issue ALTER TABLESPACE .

A1: complete recovery: -----------------RECOVER DATABASE RECOVER TABLESPACE DATA RECOVER DATAFILE 5 A2: incomplete recovery: -----------------------time based: recover database until time '1999-12-31:23. V$DATAFILE_HEADER. V$DATABASE." uitvoeren om de nieuwe logentries te purgen uit de online redo files 19.2: Recovery zonder huidige controlfile ========================================== media recovery wanneer er geen huidige controlfile bestaat De control file bevat dus een SCN die te oud is t.00' cancel based: recover database until cancel change bases: recover database until change 60747681. Bij beide recoveries worden de archived redo logs toegepast.40.----------------------------19. except this tablespace) (database open. Een incomplete recovery altijd met "alter database open resetlogs.o.6. gebeurt normaliter op basis van de SCN in de controlfile. except this datafile) 19. V$DATAFILE sta an scn's: Queries: -------- . Dit moet je Oracle laten weten via RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE. and thus SCN's in file headers cannot be compared to anything.6.1: recovery waarbij een current controlfile bestaat ======================================================= Media recovery na de loss van datafile(s) en dergelijke. V$ARCHIVED_LOG.v.7 Queries om SCN te vinden: ----------------------------Iedere redo log is geassocieerd met een hoog en laag scn In V$LOG_HISTORY. de SCN's in de archived redo logs. specifying "using backup controlfile" is effectively telling oracle that you've lost your controlfile. So Oracle will ha ppily keep applying archives until you tell it to stop (or run out) (database not open) (database open.

1. next_change#. 40) FROM V$ARCHIVED_LOG.ts# = d.8 Archived redo logs nodig voor recovery: ------------------------------------------In V$RECOVERY_LOG staan die archived logs vermeld die nodig zijn bij een recovery. checkpoint_change# controlfile FROM V$DATAFILE.SELECT file#.uit -. first_change#. SELECT resetlogs_change#. controlfile_change#. open_resetlog s FROM V$DATABASE.21). Je kunt ook V$RECOVER_FILE gebruiken om te bepalen welke files moeten recoveren.uit SELECT first_change#. 30). 1. status.15. checkpoint_change#. sequence# : geeft het nummer aan van de archived redo log first_change# : eerste scn in archived redo log next_change# : laatste scn in archived redo log. substr(name. fuzzy. SELECT file#. en de eerste scn van d e volgende log checkpoint_change# : laatste actuele SCN FUZZY : Y/N.name FROM v$datafile d. archived. # use values obtained FROM V$RECOVER_FILE query . checkpoint_change# file header FROM V$DATAFILE_HEADER. Hier vind je de FILE# en deze kun je weer gebruiken met v$datafile en v$tablespa ce: SELECT d. indien YES dan bevat de file changes die later zijn dan de scn in de header A datafile that contains a block whose SCN is more recent than the SCN of its he ader is called a fuzzy datafile.ts# AND d. 1. substr(name. status. next_change# FROM V$LOG_HISTORY. substr(name.name. sequence#. SELECT * FROM V$RECOVER_FILE -. 30).file# in (14. sequence#. v$tablespace t WHERE t. SELECT recid.Which file needs recovery Find the latest archived redologs: SELECT name FROM v$archived_log WHERE sequence# = (SELECT max(sequence#) FROM v$archived_log WHERE 1699499 >= first_change#. 19. t. SELECT * FROM v$recover_file. -.

dbf'. . Nu behoeft slechts die ene file te worden teruggezet en daarna recovery toe te passen.save dit als . SVRMGRL>startup mount. . '/disk04/db1/redo/redo02b.dbf'. 19.edit control file met nieuwe lokatie files .sql script en voer het uit: SVRMGRL>@new.dbf' offline.dbf /u01/db1 SVRMGRL>recover datafile '/u01/db1/users01.dbf') size 2M . 19. $ cp /stage/users01.restore files naar nieuwe lokatie: . en oracle zal de archived redo logfiles toepassen.dbf'. media recovery complete SVRMGRL>alter database open. group 2 ('/disk03/db1/redo/redo02a.10 voorbeeld recovery database: --------------------------------Stel meerdere datafiles zijn verloren.11 restore naar ANDere disks: ------------------------------.dbf'.alter database backup controlfile to trace. Zet nu backup files terug. SVRMGRL>recover database. '/disk05/oracle/db1/rbs01.9 voorbeeld recovery 1 datafile: ---------------------------------Stel 1 datafile is corrupt.sql controlfile: startup nomount create controlfile reuse database "brdb" noresetlogs archivelog maxlogfiles 16 maxlogmembers 2 maxdatafiles 100 maxinstances 1 maxloghistory 226 logfile group 1 ('/disk03/db1/redo/redo01a. SVRMGRL>alter database datafile '/u01/db1/users01. '/disk04/db1/redo/redo01b.19. en oracle komt met een suggestie van het toepassen van archived logfiles SVRMGRL>alter database datafile '/u01/db1/users01.dbf') size 2M datafile '/disk04/oracle/db1/sys01.dbf'.dbf' online.

#RECOVER DATABASE ALTER DATABASE OPEN RESETLOGS. kopieer alle files precies van ene lokatie naar ANDere 2. SVRMGRL>@script bij probleem: delete originele controlfiles en geen reuse.'/disk06/oracle/db1/data01. Maak een juiste init.12 Copy van database naar ANDere Server: -----------------------------------------1. 5. source server: alter database backup controlfile to trace 3.. 19. RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE. ALTER DATABASE OPEN RESETLOGS. ALTER DATABASE OPEN RESETLOGS. # Database can now be opened normally.dbf'. .ora met references nieuwe server 4. RECOVER DATABASE # All logs need archiving AND a log switch is needed. Voorbeeld create controlfile: ----------------------------If you want another database name use CREATE CONTROLFILE SET DATABASE . CREATE CONTROLFILE REUSE DATABASE "PROD" NORESETLOGS ARCHIVELOG .. of CREATE CONTROLFILE REUSE SET DATABASE "TEST" RESETLOGS ARCHIVELOG .. character set 'us7ascii' . ALTER DATABASE OPEN. ALTER DATABASE OPEN resetlogs.. edit de ascii versie controlfile uit stap 2 waarbij alle schijflokaties verwi jzen naar de target STARTUP NOMOUNT CREATE CONTROLFILE REUSE SET DATABASE "FSYS" RESETLOGS noARCHIVELOG MAXLOGFILES 8 MAXLOGMEMBERS 4 etc.dbf'. '/disk04/oracle/db1/index01. ALTER SYSTEM ARCHIVE LOG ALL.

LOG' SIZE 100M. 'D:\ORACLE\ORADATA\O901\TOOLS01.dbf'. '/oradata/dump/log/log2. GROUP 3 'D:\ORACLE\ORADATA\O901\REDO03. Voorbeeld controlfile: ---------------------STARTUP NOMOUNT CREATE CONTROLFILE REUSE DATABASE "SALES" NORESETLOGS ARCHIVELOG MAXLOGFILES 5 MAXLOGMEMBERS 2 MAXDATAFILES 255 MAXINSTANCES 2 MAXLOGHISTORY 1363 LOGFILE GROUP 1 ( '/oradata/system/log/log1.dbf'. '/oradata/rbs/rollback.dbf'.LOG' SIZE 100M.log'.DBF'. '/oradata/data_big/ahp_lkt_data_small.DBF'. 'D:\ORACLE\ORADATA\O901\UNDOTBS01.log'.dbf'.dbf'. '/oradata/temp/temp.DBF'. '/oradata/data_big/ahp_lkt_index_small. GROUP 2 'D:\ORACLE\ORADATA\O901\REDO02. 'D:\ORACLE\ORADATA\O901\INDX01. '/oradata/system/users.dbf'. '/oradata/data_small/maniin_ah_data_small.log' ) SIZE 100M.dbf'. '/oradata/data_small/fe_heat_index_big. '/oradata/index_big/maniin_ah_index_small.dbf'. .dbf'.dbf'.STARTUP NOMOUNT CREATE CONTROLFILE REUSE DATABASE "O901" RESETLOGS NOARCHIVELOG MAXLOGFILES 50 MAXLOGMEMBERS 5 MAXDATAFILES 100 MAXINSTANCES 1 MAXLOGHISTORY 113 LOGFILE GROUP 1 'D:\ORACLE\ORADATA\O901\REDO01. '/oradata/data_small/eksa_data_small.dbf'. '/oradata/index_big/fe_heat_data_big. 'D:\ORACLE\ORADATA\O901\CWMLITE01.DBF' CHARACTER SET UTF8 . '/oradata/index_small/ahp_lkt_index_big.dbf'. '/oradata/dump/log/log1.LOG' SIZE 100M DATAFILE 'D:\ORACLE\ORADATA\O901\SYSTEM01.DBF'.DBF'.dbf'.dbf'. GROUP 2 ( '/oradata/system/log/log2.DBF'. '/oradata/index_small/maniin_ah_data_big. 'D:\ORACLE\ORADATA\O901\USERS01. 'D:\ORACLE\ORADATA\O901\DRSYS01.dbf'.DBF'. '/oradata/rbs/rollbig.dbf'.log' ) SIZE 100M DATAFILE '/oradata/system/system.dbf'. '/oradata/data_big/eksa_data_big. 'D:\ORACLE\ORADATA\O901\EXAMPLE01. '/oradata/data_small/ahp_lkt_data_big. '/oradata/index_big/maniin_ah_index_big.

ALTER DATABASE OPEN RESETLOGS. 19. '/oradata/system/tools. '/oradata/data_small/fe_heat_data_small. '/oradata/data_small/softplan_data_small.dbf'.dbf'.dbf'. '/oradata/index_small/fe_heat_index_small.dbf'.dbf'.dbf'.dbf' . RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE. '/oradata/data_small/provisioning_data_small. '/oradata/index_small/softplan_index_big.dbf'.dbf'.dbf'.ora file: BEGIN BACKUP END BACKUP . non-archive mode: # RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE. # Recovery is required if any of the datafiles are restored backups. '/oradata/index_small/provisioning_index_small. ORA-01195: --------------------------Note 1: ------Suppose the system comes with: ORA-01194: file 1 needs more recovery to be consistent ORA-01110: data file 1: '/u03/oradata/tstc/dbsyst01. '/oradata/index_small/softplan_index_small. If you have checked that the scn's of all files are the samed number. '/oradata/data_small/softplan_data_big. you might try in the init. # or if the last shutdown was not normal or immediate.'/oradata/index_small/eksa_index_small. ALTER DATABASE OPEN RESETLOGS.dbf'.dbf' Either you had the database in archive mode or in non archive mode: archive mode RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE.13 PROBLEMS DURING RECOVERY: ------------------------------- normal business | system=453 switch logfile | users=455 | | CRASH tools=459 | | | | | | | -----------------------------------------------------------------------------t=t0 t=t1 t=t2 t=t3 ORA-01194. '/oradata/index_big/eksa_index_big. ALTER DATABASE OPEN RESETLOGS.

you must apply archive logs until you reach the SCN # of the last file that was backed up. unless there was alot of activity on the database during the backu p. I realized that the hot backup was not successf . This is assuming that the hot backup completed error free. logs at the end. Action: Either apply more redo logs until the file is consistent or restore the file from an older backup and repeat the recovery. I can load it again but I would like to know if this kind of problem could be solved or not. When you backup the next datafile the SCN # may be differnet. Therefore. For example. I ran a hot backup script. datafile01 may have a file header frozen at SCN #456. applying one or two more archive logs wi ll solve the problem. the file header is frozen. When you tried to open your database you received the following error: ORA-01195: online backup of file <name> needs more recovery to be consistent Cause: An incomplete recovery session was started. The reported file is an online backup that must be recovered to the time the bac kup ended. Usually. see the index entry "online backups" in the <Oracle7 Server Administrator's Guide>. Explanation ----------When you perform hot backups on a file. Just to let you know. After checking the script's log. ------Note 3: ------ORA-01194: file 1 needs more recovery to be consistent I am working with a test server. For more information about online backup. Solution Description -------------------Continue to apply the requested logs until you are able to open the database. For example the file header for datafile02 may be frozen with SCN #457. that I am new in Oracle Database Administration._allow_resetlogs_corruption = true ------Note 2: ------Problem Description ------------------You restored your hot backup and you are trying to do a point-in-time recovery. which deleted the old ARCHIVE. but an insufficient number of redo logs were applied to make the file consistent.

after taking offline. If you are prompted for a non-exi sting archived log. If the CHANGE# is GREATER than the minimum FIRST_CHANGE# of your logs. I have never taken any cold backups. "ORA-01589: must use RESETLOGS or NORESETLOGS option for database open" I tried to open it with the RESETLOGS option then another error occurred. I don't know how to recover from those. CHANGE# FROM V$RECOVER_FILE. No need for system. Bring the datafile online. Keep entering online logs as requested until you receive the message "Media recovery complete". Oracle probably needs one or more of the online logs to proceed wi th the recovery. Then enter the full path name of one of the members of the redo group whose sequence number matches the one you are being asked for. If the database is at mount point. Thanks. FIRST_CHANGE# FROM V$LOG V1. "ORA-01195: online backup of file 1 needs more recovery to be consistent" Just because. you cannot take system offline which is the file in error in your case. 4. SEQUENCE#. I would really appreciate it. If the database is in NOARCHIVELOG mode. issue the query: SELECT FILE#. RECOVER DATAFILE '<full_path_file_name>' 5. I tried to startup the database and an error occurred.GROUP# = V2.ul and it deleted the Archives. 6. Compare the sequence number referenced in the ORA-280 message with the sequence numbers of your online logs.GROUP#. Recover the datafile. 2. 7. The following might help. Hi Hima. MEMBER.GROUP# . open it Perform a full closed backup of the existing database . 1. I still have hot backups. 3. Issue the following query: SELECT V1. You now have a database that is operating like it's in noarchive mode since the logs are gone. it was a test environment. This will list all your online redolog files and their respective sequence and first change numbers. Mount the database. the datafile can be recovered. V$LOGFILE V2 WHERE V1. If anyone can tell me how to do it from SQLPLUS (SVRMGRL is not loaded). Confirm each of the logs that you are prompted for until you receive the message "Media recovery complete".

online redo logs.controlf iles away. Eg. archive current log. I'm prompted for logs in the usual way but the recovery ends with an ORA-1547 Recover succeeded but open resetlogs would give the following error. I'm off back to the docs again! Thanks in advance Tim -------------------------------------------------------------------------------From: Anand Devaraj 15-Aug-02 15:15 Subject: Re : Recover until time using backup controlfile The error indicates that Oracle requires a few more scns to get all the datafile s in sync. The next error is that datafile 1 (system ts) . Since you dont have an online log file you should use .this isn't the case. I have a hot backup of my database. copy files . What am I missing here? Its driving me nuts. I restore my backup copy of the database . I want to go back five minutes.(just the datafiles) startup nomount and then run an edited controlfile trace backup (with resetlogs). I am trying to perform an incomplete recovery to an arbitrary point in time in t he past. I have all the archive redo lo gs I need to cover the time the backup was taken up to the present. backup controlfile to a file and also to a trace).would need more recovery.------Note 4: ------Recover until time using backup controlfile Hi. (Tablespaces into hotbackup mode. In such cases when Oracle asks for a non-existent archive log. It is quite possible that those scns are present in the online redo logfiles whi ch were lost. (yep im in archivelog mode as well) I shutdown the current database and blow the datafiles. you should provid e the complete path of the online log file for the recovery to succeed. I then RECOVER DATABSE UNTIL TIME 'whenever' USING BACKUP CONTROLFILE. tablespaces out of hotbackup mode. The time specified in the recovery is after the backup as well. Now metalink tells me that this is usually due to backups being restored that ar e older than the archive redo logs .

plus you need all archive logs contai ning all SCNs up to the point to which you want to recover.is there an archive log that was generated AFTER the time you specify in until time? If both answers are yes. you issue the cancel co mmand which will automatically rollback all the incomplete transactions and get all the datafile headers in sync with the controlfile. In this case when you exhaust all the archive log files... Other still in the online log and you can never open un . log at the end of the back up (I do as a matter o sure to be available in case of a failure). you need a full db backup that was completed prior to the point to which you want to recover. I actually recently performed such a recovery several times. Hope this helps .you usually require the online logfiles to be present..RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE. Anand -------------------------------------------------------------------------------From: Radhakrishnan paramukurup 15-Aug-02 16:19 Subject: Re : Recover until time using backup controlfile I am not sure whether you have You need to also to switch the f practice else you need the next log which is not wise some of the changes to reach a consistant state is till you reach a consistent state.. Applying these rules to your case. I have two questions: .. -------------------------------------------------------------------------------From: Mark Gokman 15-Aug-02 16:41 Subject: Re : Recover until time using backup controlfile To successfully perform incomplete recovery. I was being an idio t! Ive ran this exercise a few more times (with success) and I am convinced that wh at I was doing was trying to recover to a point in time that basically was before the latest sc missed this step or just missed in the note... -------------------------------------------------------------------------------From: Tim Palmer 15-Aug-02 18:02 Subject: Re : Re : Recover until time using backup controlfile Thanks Guys! I think Mark has hit the nail on the head here. then you should have no problems. To do an incomplete recovery using time.are you recovering to the point in time AFTER the time the successful full bac kup was copleted? .

During recovery.. The entire process (including the creation of the Undo data) is recorded in Redo logs before the change is completed and written in the Database Buffer Cache.. This data is stored in Undo segments (formerly Ro llback segments in earlier releases of Oracle) in the Undo tablespace. and then the d ata files via the database writer (DBWn) process. Read consistency means that if there is a data change in a row of data that is not yet committed. a new query of this same row or table will not display any of the uncommitted data to other users.DBF' File number. this Undo data is critical for the ability to roll back or undo the changes that were made. Undo tablespace data is an image or snapshot of the origi nal contents of a row (or rows) in a table. but will use the information from the Undo segm ents in the Undo tablespace to actually construct and present a consistent view of the data that only includ es committed transactions or information..n of any one file in the hot backup set I was using . name and directory may vary depending on Oracle configuration Details: Undo tablespace data description In an Oracle database.convinced myself that I wasnt but I must have been. Oracle uses its Redo logs to play forward through transactions . Rowena Serna 16-Aug-02 15:44 Subject: Re : Recover until time using backup controlfile Thanks to mark for his input for helping you out. When a user begins to mak e a change to the data in a row in an Oracle table. Undo data also ensures a way to provide read consistency in the database.. perhaps I need a holiday! Thanks again Tim -------------------------------------------------------------------------------From: Oracle. the original data is first written to Undo segments in the Undo tablespace. ------Note 5: ------ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below ORA-01152: file 2 was not restored from a sufficiently old backup ORA-01110: data file 2: 'D:\ORACLE\ORADATA\<instance>\UNDOTBS01. If the transaction does not complete due to some error or should there be a user decision to reverse (rollback) the change.

Once rec overy is complete. the most common procedure for the restore is to just restore the entire online backup over the existing Oracle files with the database shutdo wn. the default method of Undo management is no longer manual. using the Undo tablespace as the container to maintain the Undo segments for the user tablespaces in the database. Scenario 1 The first scenario would be a recovery of the entire database to a previous poin t-in-time. and the 5. (See the Related Documents section for the appropriate instructions on how to re store and recover an Oracle database to a point-in-time using an online backup.022 or 5. Once the RECOVER DATABASE USING BACKUP CONTROLFILE command was . although it is still recommended that the upgrade to the 5. and the database is considered consistent. If this configuration is left as the default for the database. If Automatic Undo Management is disabled and the database administrator (DBA) has modified the locations for the Undo segments (if the Undo data is no longer in the Undo tablespace). this data may be located elsewhere. and the issues addressed by this TechNote ma y not affect the ability to fully recover the database. Oracle uses the information in the Undo segments to undo or roll back all uncommitted transactions. there are no Rollback segments in individual user tablespaces. and the backup control_file fr om the tape or backup media. As for Oracle 9i.026 Oracle Agent be performed.) In this scenario. but automatic. In this type of situation. where the entire database would be rolled back in time. and all Undo mana gement is processed by the Oracle server.025 version of the VERITAS Backup Exec (tm) Oracle Agent is used to perform Oracle backups. all data in the database is committed data.in a database so that all lost transactions (data changes and their Undo data generation) are replayed into the database. but this behavior is by design and irrelevant to the d iscussion here. an off line restore would include all data files. This type of recovery would utilize the RECOVER DATABASE USING BACKUP CONTROLFIL E statement and its customizations to restore the entire database to a point before the entr y of improper or corrupt data or to roll back to a point before the accidental deletion of cri tical data. the System Change Numbers (SCN) on a ll data files and the control_files match. the Und o tablespace will not be backed up. once all the Redo data is applied to the data files. Then. The tablespace that still maintains it s own Rollback segments is the System tablespace. archived log files.

One of the requirements to accomplish this change. The failure would occur because the Undo tablespac e would still be at its SCN before the restore from backup (an SCN in the future as related to th e restored backup control_file). This would happen simply because the Undo tablespace wasn't on the tape or backu p media that was restored. so the original Undo tablespace wouldn't have been overwritten. whether from an older online backup. Scenario 2 The second scenario would involve the actual corruption or loss of the Undo tabl espace's data files. as were the othe r data files. Oracle 9i does offer the ability to create a new Undo tablespace and to alter th e Oracle Instance to use this new tablespace when deemed necessary by the DBA.executed. At the point when the recovery process started on the actual Undo tablespace. SQL> alter database open resetlogs. the database cannot be opened with the RESETLOGS option. Any attempt to do so yields the error referenced above. this data/tablespace must be recovered.DBF' The only recourse here is to recover or restore an older backup that contains an Undo tablespace. nor in a normal mode.DBF' At this point. during the restore operation. and the Oracle server would respond with the following error messages: ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below ORA-01152: file 2 was not restored from a sufficiently old backup ORA-01110: data file 2: 'D:\ORACLE\ORADATA\<instance>\UNDOTBS01. At this point. Without this ability to acquire an older Undo tablespace to rerun the recovery o peration. Oracle Technical S upport must be contacted. is that there cannot be any active transactions in the Undo segments of the tabl . Or acle would see that the SCN of that tablespace was too high (in relation to the record in the contro l_file). Oracle would begin the recovery process to roll forward through the Redo log tra nsactions. All other tablespaces and control_files would be back at their older SCNs (not n ecessarily consistent yet). or from a closed or offline backup or copy of the database. and it would then roll back or undo uncommitted transactions. though. If the Undo tablespace data is lost or corrupted due to media failure or other i nternal logical error or user error. alter database open resetlogs * Error at line 1: ORA-01152: file 2 was not restored from a sufficiently old backup ORA-01110: data file 2: 'D:\ORACLE\ORADATA\DRTEST\UNDOTBS01. it will not be possible to start the database.

025 version of the Backup Exec for Windows Servers Ora cle Agent (see the Related Documents section for the appropriate instructions on how to id entify the version of the Oracle Agent in use). This error. When utilized. the transaction tables of the Undo segments can be tra ced to provide details on transactions that Oracle is trying to recover via rollback and these traces w ill also identify the objects that Oracle is trying to apply the undo to.026 When using the 5.022 and 5. and reb uild. prevents the dro p and recreation of the Undo tablespace.1 m ay be referenced to set up a trace on the database startup so that the actual transactions that are locking the Undo segments can be identified and dropped. Normal full backups with al l Oracle components selected will run without error and will complete with a successful status since the Undo tablespace is not actually flagged as a selection. would pro ceed normally since lost data or changes would be replayed back into the database. Oracle Technical Support must be contacted. this trace is actually monitoring or dumping data from the transa ction tables in the headers of the Undo segments (where the records that track the data in the Undo segments are located). and only tablespaces with a content type of PERMANENT are located and made available for backup. and Undo da ta would be . has been offline dro pped. In the case of data file corruption. Oracle Doc ID: 94114. and thus prevents the successful recovery of the database.022 or 5. this absence of the Undo tablespace data for restore would not cause any problem because the original Undo tablespace is still available on the database server. To overcome this problem. which do not require a rollback in time. Thi s will be evidenced by an "ORA-01548" error if this is attempted. the Oracle Undo tablespace is not available for bac kup because the Undo tablespace falls into the type category of Undo. or if these Undo segment headers have been corrupted. Backup Exec Agent for Oracle 5.espace when it is time to actually drop it. uncommitted transactions in the database that have data in Undo segments can be extremely troublesome because the existence of any uncommitted transactions will lock the Undo segments holding the data so that they cannot be dropped. in turn. Restores of User tablespaces.025 should be upgraded to 5. even the ability to dump the transacti on table data is lost and the only recourse at this point may be to open the database. Dropping objects that contain uncommitted transac tions that are holding locks on Undo segments does entail data loss. but if the Undo tablespace's data file is actually missing. and the amount of loss depends on how much uncommitted data was in the Undo segments at the point of failure. In most Oracle recovery situations. export. At this point.

Most default backup software can not backup open files. . in certain recovery scenarios. as well as Backup Exec 9.025.026. in order to restore the database to a consistent state. Oracle 9i database backups made with the 5. The scenarios in this TechNote describe two examples (this does not necessarily imply that these are the only scenarios) of how this absence of the Undo tablespace on tape or ba ckup media.025 Agent that shipped with Backup Exec 9. This is the only method of backup when the database is in NO Archive log mode. I. Note: The 5.Backup a) Consistent backups A consistent backup means that all data files and control files are consistent to a point in time. and thus its inability to be restored. The only solution to the problems referenced within this TechNote is to upgrade the Backup Exec for Windows Servers Oracle Agent to version 5.available to roll back uncommitted transactions to leave the database in a consi stent state and ready for user access. and 5. 5. See the Related Documents sectio n for instructions on how to identify the version of the Oracle Agent in use. (in which a rollback in time or full dat abase recovery is attempted. However.e. which includes support for Orac le 9i. Special precautions need to be used and testing needs to be done. they have the same SCN.0 for Windows Servers.6 for Windows NT and Windows 2000. You must apply redo logs to the data files.022 and 5. and to take new offline (closed d atabase) and then new online (running database) backups of the entire Oracle 9i database as per th e Oracle Agent documentation in the Backup Exec 9. and could potentially render the database unrecoverable without an offline backup or the assistance of Oracle Technical Support.026 versions of the Oracle Agent are compatible wi th Backup Exec 8. can result in failure of the database to open and can result in actual data loss. b) Inconsistent backups An Inconsistent backup is possible only when the database is in Archivelog mode and proper Oracle aware software is used.022. ------Note 6: ------.0 for Windows Servers Administrator's Guide.0 for Window s Servers build 4367 or build 4454 should be considered suspect in the context of the info rmation provided in this TechNote. or in the case of damaged or missing Undo tablespace data files) t his missing Undo data can result in the inability to properly recover tablespaces back to a point-in-t ime.

Do not backup the online redo logs. If the database has not been created with Archivelog mode enabled. 3.c) Database Archive mode The database can run in either Archivelog mode or noarchivelog mode. issue Svrmgr> ALTER SYSTEM SWITCH LOGFILE A better way to force this would be: svrmgr> alter system archive log current. SVRMGR> log archive start SVRMGR> alter database open SVRMGR> archive log list This command will show you the log mode and if automatic archival is set. 6. Backup all archived log files determined from steps 2 and 8. Svrmgr> Alter tablespace tablespace_name BEGIN BACKUP 4. always keep the all archived log files starting from the oldest online log sequence. SVRMGR> alter database Archivelog. A cold backup is one taken when the database is shutdown. Noncumulative only includes blocks that were changed since the previous backup at the same or lower level. d) Backup Methods Essentially. 5.. not open. These are useful as they don't take up as much space and time. Svrmgr> archive log list --This will show what the oldest online log sequence is. As a precaution. Svrmgr> Alter tablespace tablespace_name END BACKUP --. you specify if it is to be in Archivelog mode. These will contain the end-of-backup marker and can cause corruption if use doing recovery. Cumulative incremental backups include all blocks that were changed since the last backup at a lower level. also known as online and offline. respectively. 4. backup the datafile(s) of this tablespace. This one reduces the work during restoration as only one backup contains all the changed blocks. --Using an OS command. 9. Then in the init. Svrmgr>alter database Archivelog Svrmgr> log archive start Svrmgr> alter database open 2. Back up the control file: Svrmgr> Alter database backup controlfile to 'filename' e) Incremental backups These are backups that are taken on blocks that have been modified since the last backup. Using rman. A hot backup is on taken when the database is running. there are two backup methods. When you first create the database. you can issue the command whilst the database is mounted. You will want to make sure you have a copy of this redo log file. you issue the command "backup incremental level n" f) Support scenarios . So to force an archived log. Svrmgr> archive log list This is done again to check if the log file had been archived and to find the latest archived sequence number. Commands for a hot backup: 1. 5 for each tablespace. 8.ora file you set the parameter log_archive_start=true so that archiving will start automatically on startup. hot and cold. 10.repeat step 3. There are two kinds of incremental backups Cumulative and Non cumulative. 7. Svrmgr> archive log list ---do this again to obtain the current log sequence.

The database can be open but the specified datafile must be offline. RECOVERY ========= There are several kinds of recovery you can perform.use the recover datafile command. Online Block Recovery. Thread Recovery. Oracle will reconstruct the buffer using the online redo logs and writes it to disk.(pmon) Occurs when a process dies while changing a buffer. The checkpoint count in the data files here are not equal to the check point count in the control file. Note: You must have all archived logs since the backup you restored from. Note: you will lose any transactions that occurred after noon. don't forget to take a backup of the control file whenever there is a schema change. Oracle will recover all datafiles that are online. 2. After you have recovered until noon. 3. Essentially.When the database crashes. Media Failure and Recovery in Noarchivelog Mode In this case. Also. Recover datafile . If. You only need to restore the password file or parameter files if they are lost or are corrupted. Now let's explain a little about Redo vs Rollback. You restore the backup and then recover the database. a) Point in Time recovery: A typical scenario is that you dropped a table at say noon. or else you will not have a complete recovery. This is also performed automatically by Oracle. Rollback information is recorded so that you can undo changes made by the current transaction but were not committed.use the recover tablespace command. if you are not running in archive log mode. depending on what has been lost. and control files. Redo information is recorded so that all commands that took place can be repeated during recovery. The Redo Logs are used to Roll Forward the changes made. . This is performed automatically by Oracle. which will protect the database from having the redo logs that weren't used be applied. you must open the database with resetlogs. The three basic kinds of recovery are: 1. Recover tablespace . The files you need are all datafiles. both committed and non.here you use the recover database command and the database must be closed and mounted. There are three basic types of recovery: 1. and want to recover it. Recover database . then you can only recover the cold backup of the database and you will lose any new data and changes made since that backup was taken. This is also required when a file was offlined without checkpoint and when using a backup control file. 3. Media Failure and Recovery in Archivelog Mode In this case. Oracle applies all the redo changes in the thread that occurred since the last time the thread was checkpointed. however. Then from the Rollback segments. your only option is to restore a backup of your Oracle files. Occurs when an instance crashes while having the database open. 2. The database can be open but the tablespace must be offline. Media Recovery. This is required when a data file is restored from backup.committed changes. the database is in Archivelog mode you will be able to restore the database up to the time of failure. This is necessary to reset the log numbers. depending on the type of failure and the kind of backup you have. the undo information is used to rollback the uncommitted changes. you now have a backup. there are several kinds of recovery you can perform. You will have to restore the appropriate datafiles and do a point-in-time recovery to a time just before noon.

Recover database until cancel using backup controlfile. Recover database until cancel. If all the datafiles belonging to the tablespace rollback_data were lost. recover database 2. Don't forget to reset the rollback_segments parameter in the init. Again.ora. This means that crash recovery cannot be performed. (you type in cancel to stop) Recover database until change n. Otherwise. d) Recovery of missing datafile without rollback segment There are three ways to recover in this scenario. they will have to be taken offline. Note: When performing an incomplete recovery. f) Recovery with missing archived redo logs If your archives are missing. and as such. You can also recreate the control file based on the current one using the 'backup control file to trace' command which will create a script for you to run to create a new one. as mentioned above. You will have lost any uncommitted transactions which were recorded in the archived redo logs. you need to create some temporary rollback segments in order for new transactions to work. If you were to perform a recovery on a database which has tablespaces offline.ora' 3. c) Recovery of missing datafile with rollback segment The tricky part here is if you are performing online recovery. You will see the list of rollback segments that are in status Need Recovery. Note: the best way to avoid this kind of a loss. Now. this is why Oracle strongly suggests mirroring your online redo logs and duplicating copies . is to mirror your online log files. recover datafile 'c:\orant\database\usr1orcl. and they had not been taken offline in a normal state. As always. b) Recovery without control file If you have lost the current control file. you remove the parameter rollback_segments. when an incomplete recovery is performed. you must open the database with resetlogs. This is because the data file needs recovery from a point before the resetlogs option was used. the only way to recover the database is to restore from your latest backup. oracle will want to use those rollback segments when opening the database. So. Recover database using backup control file command must be used when using a control file other that the current. This is thus an incomplete recovery. you can now issue a recover tablespace rollback_data.The four incomplete recovery scenarios all work the same: Recover database until time '1999-12-01:12:00:00'. Otherwise you can just use the recover datafile command. you cannot do a datafile or tablespace recovery). 1. All datafiles will need to berestored and rolled forwarded until the last available archived log file is applied. Do a select name. if you are performing an online recovery. so media recovery is required instead. but can't find them and wont open. Until you recover the datafiles that contain the rollback segments. (i. status from v$datafile to find out if there are any files which are offline. the datafiles must be online. recover tablespace user_data e) Recovery with missing online redo logs Missing online redo logs means that somehow you have lost your redo logs before they had a chance to archived. Next bring the tablespace online and check the status of the rollback segments by doing a select segment_name. Simply issue alter rollback segment online command to complete. you need to recover either by using a backup control file command or create a new control file. or the current control file is inconsistent with files that you need to recover. you must first ensure that in the init. status from dba_rollback_segs. Even if other rollback segments are ok. all the rollback segments that belong to the datafile need to be recovered. the recover database command is necessary.e. The database must then be opened with resetlogs option. you will lose them when you issue the open resetlogs command.ora file.

If a media failure should occur before a backup was made after you opened the database using resetlogs. it may be likely that the corruption is in the actual rollback segment. Media failure before a backup after resetlogs. Use the following query to find out what object Oracle is trying to perform recovery on. The object # is the same as the object_id in sys. and you don't have its backup log anymore. under the status column. In the trace file. but have not had time to backup the database. and you will not be able to recover from the old logs.of the archives. It is imperative that you backup up the database immediately after you have opened the database with reset logs. 3. 5. The first step is to find out what object is causing the rollback to appear corrupted. look in dba_tablespaces. After dropping the object. h) Recovery with corrupted/missing rollback segments. 4. then 2. status from dba_objects where object_id = <object #>. as we have seen from above. however. object_type. it may be required due to incomplete recoveries. The next concern will be if the database crashes after you have opened the database with resetlogs. g) Recovery with resetlogs option Reset log option should be the last resort. TX(#. Check in the directory that is specified by the user_dump_dest parameter (in the init. remove the event. Make sure that all tablespaces are online and all datafiles are online. and shutdown and startup the database. you will most likely lose data.ora: event = "10015 trace name context forever. Stop and start the database. An export or relying on a backup may be necessary to restore the object after the corrupted rollback segment goes away. all are online. how do we find out if it's actually a bad object? 1. i. Put the following in the init. we can drop that object.dba_objects. the above steps will resolve the problematic rollback segment. Drop the offending object so the undo can be released.#) refers to transaction information. If a rollback segment is missing or corrupted. If we can determine that. If we can't we will need to log an iTar to engage support. . 6. 7. So. For tablespaces associated with the datafiles. (recover using a backup control file. select owner. because you have a copy of a control file after the resetlogs point. This can be checked through v$datafile. you will not be able to open the database.ora or show parameter command) for a trace file that was generated at startup time.e.#) object #. or a point in time recovery). The reason is because restoring a lost datafile from a backup prior to the resetlogs will give an error that the file is from a point in time earlier. How to recover? Shut down the database Backup all the datafiles and the control file Startup mount Alter database open resetlogs This will work. In most cases. If this doesn't show us anything. level 10" This event will generate a trace file that will reveal information about the transaction Oracle is trying to roll back and most importantly. what object Oracle is trying to apply the undo to. If this still does not resolve the problem. there should be a message similar to: error recovery tx(#. put the rollback segment back in the init.ora parameter rollback_segments.. object_name. The reason is that oracle updates the control file and resets log numbers.

has been offlined dropped. but have an earlier time stamp due to the system clock change. transaction tables are not read on opening of the database Because of this. And we know that Oracle wont let you read files from before a resetlogs was done. you will need to log an iTar to engage support. If you cannot get the database open. that isn't always possible. Since the tablespace is offline. it thinks the datafiles are offline as well. you cannot recover datafiles belonging to this tablespace using recover database command. However. then you will be able to media recovery using a backup control file by taking the tablespace offline. The issues with read-only tablespaces arise if you have to use a backup control file. Performing a complete recovery is optimal. and set the time to be later than the when the problem occurred. If you don't have a backup control file. there may not be a recent backup etc. the typical safeguards associated with the rollback segment are disabled. j) Recovery with missing System tablespace. or the rollback segment header itself is corrupt. we should see if we can restore from a backup. Please note. The reason here is that when you are using the backup control file. In this case. Instead. you could restored the datafiles from a cold backup. Alternatively. That way it will roll forward through the records that were actually performed later. Log an iTar to engage suppor t to help with this process. export and rebuild. we have to force the database open with the unsupported. However. hidden parameters. and then you can perform a recover database command. you can create a new one using the create controlfile command. You will be able to take the datafiles online after you have opened the database. and hasn't changed to read-write since the last backup. So the only thing to do is get the database open. i) Recovery with System Clock change. the point here is that you should take a backup of the control file every time you switch a tablespaces mod . there is no other alternative than restoring from a backup. there is an exception with read-only tablespaces. The reason is because a recover database command will only recover online datafiles. l) Recovery of Read-Only tablespaces If you have a current control file. then recovery of read only tablespaces is no different than recovering read-write files. mount the database and select from the v$datafile view to see if any of the datafiles are offline. Possibly this corruption will be in the data dictionary. you need to perform a recover tablespace command. If the rollback segment datafile is physically missing. If the tablespace is in read-only mode. so even if you recover database and roll forward. The only option is to restore from a backup. as all transactions will be applied. A solution here is to recover the database until time 'yyyy-mm-dd:00:00:00'. Consequently. You can end up with duplicate timestamps in the datafiles when a system clock changes. If they are. you must open the database with resetlogs. bring them online. Their status is 'offline' in dba_rollback_segs. you should use a backup control file that recognizes the tablespace in read-write mode. the datafiles in this tablespace will not be touched. there is no way to dump the transaction table to check for active transactions.If in fact the rollback segment itself is corrupted. When you have tablespaces that switch modes and you don't have a current control file. Basically. If you drop a rollback segment which contains active transactions then you will have logical corruption. there is no check for active transactions before dropping the rollback segment. k) Media Recovery of offline tablespace When a tablespace is offline. that this is potentially dangerous! When these are used.

the checkpoint . Action: First apply media recovery to the file. For example.. redolog files. an ORA-1113 error will be generated. when you put a tablespace in hot backup mode. Eg: ORA-01113: file 28 needs media recovery ORA-01110: data file 28: '/h04/usupport/app/oracle/oradata/v817/nar.ORA-01547: ORA-01110: ORA-01588 ORA-00205: ---------- ------NOTE 7: ------PURPOSE ------To consolidate the common reasons & solutions for the ORA-1113 error. Oracle's architecture is tightly coupled in the sense that all database files i. SCOPE & APPLICATION -------------------Customers facing ORA-1113 and analysts requiring information on known issues with ORA-1113 errors. datafiles. ORA-1113 ======== An ORA-1113 occurs when a datafile needs recovery. This implies that the checkpoint SCN (System Commit Number) of all datafiles must be the same.e. If that is not the case for a particular datafile. This error is usually followed with ORA-1110 error which will indicate the name of the datafile that needs media recovery. Error Explanation: -----------------01113. and controlfiles -. 00000. "file %s needs media recovery" Cause: An attempt was made to online or open a database with a file that is in need of media recovery.must be in sync when the database is opened or at the end of a checkpoint.dbf' This error message indicates that a datafile that is not up-to-date with respect to the controlfile and other datafiles.

If you simply attempt to online the file without recovering it first. MEMBER.GROUP#. Likewise. AT STARTUP AFTER CRASH WITH TABLESPACE(S) IN HOT BACKUP ********************************************************** A.GROUP# . 1. FIRST_CHANGE# FROM V$LOG V1. since Server Manager is not available in Oracle9i. POSSIBLE CAUSES AND SOLUTIONS SUMMARY: ===================================== I. If the database is down. III.SCN of all its datafiles is frozen at the current value until you issue the corresponding end backup. since its SCN will probably be lower than that of the controlfile and the datafiles in other tablespaces. or SQL> connect / as sysdba (for Oracle9i) SVRMGR> SELECT V1. SVRMGR> STARTUP MOUNT PFILE=<location_of_pfile>. If the database crashes during a hot backup and you try to restart it without doing recovery. II. instead of Server Manager to execute the mentioned commands. use SQL*Plus. and thus an ORA-1113 will result. VERY AT STARTUP AFTER CRASH WITH TABLESPACE(S) IN HOT BACKUP AT STARTUP AFTER RESTORING A DATAFILE OR TABLESPACE FROM A BACKUP TRYING TO ONLINE A DATAFILE OR TABLESPACE WHEN RECOVERING ' USING BACKUP CONTROLFILE' OPTION TO DO INCOMPLETE RECO I. This is discussed in the following sections. Query the V$LOG and V$LOGFILE.GROUP# = V2. 2. WITH ORACLE 7. ********************************************** Before Starting these actions do the following: ********************************************** Note : If you are using Oracle9i. you will likely get ORA-1113 for at least one of the datafiles in the tablespace that was being backed up. SEQUENCE#. V$LOGFILE V2 WHERE V1. you need to mount it first. The steps to take next depend on the scenario in which the ORA-1113 was issued.1 OR LOWER . its SCN will likely be much older than that of the online datafiles. IV. Then connect internal Server Manager and issue the query: SVRMGR> CONNECT INTERNAL. This will list all your online redolog files and their respective sequence and first change numbers. offlining a datafile causes its checkpoint SCN to freeze.

Recover the datafile: SVRMGR> RECOVER DATAFILE '<full path name>'. Then enter the full path name of one of the members of the redo group whose sequence number matches the one you are be ing asked for. Confirm each of the archived logs that you are prompted for until you receive the message "Media recovery complete". For each of the files returned by the above query. 3. Open the database.STATUS = 'ACTIVE' AND V1. 4. WITH ORACLE 7. SVRMGR> ALTER DATABASE OPEN. AT STARTUP AFTER RESTORING A DATAFILE OR TABLESPACE FROM A BACKUP ********************************************************************* A. Find out which datafiles were in hot backup mode when the database crashed or was shutdown abort or the machine was rebooted by running the query: SVRMGR> SELECT V1. NAME FROM V$BACKUP V1. 4. 3.2 OR HIGHER 1. II. SVRMGR> RECOVER DATABASE. SVRMGR> STARTUP MOUNT.FILE#. Open the database. Oracle probab ly needs one or more of the online logs to proceed with the recovery. WITH THE DATABASE IN ARCHIVELOG MODE 1. Mount the database.FILE# = V2. V$DATAFILE V2 WHERE V1. 2. 2. Apply media recovery to the database. issue the command: SVRMGR> ALTER DATABASE DATAFILE '<full path name>' END BACKUP. If you are prompted for an archived log that does not exist. SVRMGR> ALTER DATABASE OPEN.(If the database is NOT already mounted) SVRMGR> STARTUP MOUNT PFILE=<location_of_pfile>. SVRMGR> STARTUP MOUNT. . Mount the database.FILE# .1. Compare the sequence number referenced in the ORA-280 message with the sequence numbers of your online logs. Mount the database. 2. B.

you must weigh the cost of going to a backup versus the cost of recreating the tablespace involved. then it might not be possible to recover the database fully.A above. Confirm each of the archived logs that you are prompted for until you receive the message "Media recovery complete". 4. Issue the query: SVRMGR> SELECT FILE#. you may drop it with an ALTER DATABASE DATAFILE '<full path name>' OFFLINE DROP statement and then open the database.If recovering more than one datafile in a tablepace issue a SVRMGR> RECOVER TABLESPACE. the file cannot be recovered. If you are prompted for an archived log that does not exist. as described in the two previous cases. If recovering more than one tablespace issue a SVRMGR> RECOVER DATABASE. B. CHANGE# FROM V$RECOVER_FILE. Compare the sequence number referenced in the ORA-280 message with the sequence numbers of your online logs. SVRMGR> ALTER DATABASE OPEN. you must drop the tablespace to which the datafile belongs and recreate it. For more details or to assist you in your decision. except that you must always enter the appropriate online log when prompted. the procedure to be followed is analogous to that of scenario II. Then enter the full path name of one of the members of the redo group whose sequence number matches the one you are being asked for. you will only succeed in recovering the datafile or tablespace if the redo to be applied to it is within the range of your online logs. please contact Oracle Customer Support. Once the database is up. Open the database. .If the datafile is in a temporary or index tablespace. If the CHANGE# is GREATER than the minimum FIRST_CHANGE# of your logs. .If the datafile is in the SYSTEM or in a rollback tablespace. restore an up-to-date copy of the datafile (if available) or your most recent full backup.In case you do not have either of this. 3. For all other cases in this scenario. Compare the change number you obtain with the FIRST_CHANGE# of your online lo gs. WITH THE DATABASE IN NOARCHIVELOG MODE In this case. Oracle probab ly needs one or more of the online logs to proceed with the recovery.For more details or to assist you in your decision.Your options at this point include: . the datafile can be recovered. until recovery is finished . If the CHANGE# is LESS than the minimum FIRST_CHANGE# of your logs. In this case.

3. Steps to workaround this issue: 1. 2. Cancel recovery by issuing the "CANCEL" command. Open the database using: SVRMGR> ALTER DATABASE OPEN RESETLOGS. do SVRMGRL> RECOVER TABLESPACE <tablespace_name>. Compare the sequence number referenced in the ORA-280 message with the sequence numbers of your online logs. 3. Oracle probab ly needs one or more of the online logs to proceed with the recovery. Open the database. Confirm each of the archived logs that you are prompted for until you receive the message "Media recovery complete". SVRMGR> ALTER DATABASE OPEN. III.please contact Oracle Customer Support. Notes that explain other possible recovery scenarios involving ORA-1113: ------------------------------------------------------------------------ . 2. Recover database again using: SVRMGR> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL. then upon "ALTER DATABASE OPEN RESETLOGS." you will encounter the ORA-1113 error. If you are prompted for an archived log that does not exist. Recover the datafile: SVRMGRL> RECOVER DATAFILE '<datafile_name>'. Then enter the full path name of one of the members of the redo group whose sequence number matches the one you are being asked for. If recovering a database." option without specifying the "UNTIL CANCEL" option. do SVRMGRL> RECOVER DATABASE. TRYING TO ONLINE A DATAFILE OR TABLESPACE ********************************************** 1. IV. WHEN RECOVERING ' USING BACKUP CONTROLFILE' OPTION TO DO INCOMPLETE RECOVERY ******************************************************************************* If the database is recovered with the "RECOVER DATABASE USING BACKUP CONTROLFILE. If recovering a tablespace.

checkpoint_time . checkpoint_change#. status.MEMBERS."ORA-01113.cou nt(*) from v$datafile_header group by status. select GROUP#. fuzzy. resetlogs_time. select * from v$backup. select file#. archive log list. checkpoi nt_time order by status.ARCHIVED. open_mode. select distinct checkpoint_change# from v$datafile_header.STATUS."ORA-01113 ORA-01110 on Database Startup after Write Disk fa Datafile header contains different SCN comparing to other database files due to a write disk failure Note 146039. checkpoint_change#. substr(name.THREAD#.6 Note 1020262. resetlogs_change#. if the datafile is not required Some usefull queries: set pagesize 20000 set linesize 1000 set pause off set serveroutput on set feedback on set echo on set numformat 999999999999999 Spool recover. recover.1.SEQUENCE#.lst show parameter pfile. ORA-01110" Dropping the datafile while ORA-1113.1 ilure" -.60). 1. 'DD-MON-YYYY HH24:MI:SS') as checkpoint_time. 70) from v$datafile. to_char(checkpoint_time. checkpoint_change#."ORA-1113 on Datafile After Moving Datafile Using USFDMP Utility" ORA-1113 on Datafile After Moving Datafile Using USFDMP -. ORA-01110: TRYING TO STARTUP DATABASE AFTER INCOMPLETE RECOVERY" Another scenario of ORA-1113 Note 168115. resetlogs_time from v$datafile_header. ORA-01186 & ORA-01122" ORA-1113 due to datafile getting locked on OpenVMS Note 1079626.1 -.102 -. checkpoint_change#."VMS: Mount Phase of Database Startup Results in ORA-01113.resetlogs_time. select substr(name.checkpoint_change#. ARCHIVE_CHANGE# from v$database.FIRST_CHANGE# from v$log . select name."Database Startup Fails with ORA-01113.Note 116374. select status. resetlogs_change#.1 -.resetlogs_change#.

wh ich could be in one of the following: directories defined in the LOG_ARCHIVE_DEST_n another directory in the same server or another server standby database RMAN backup OS backup If the archivelog is not found in any of the above mentioned locations. select * from v$recover_file.1. spool off ------NOTE 8: ------Subject: How to recover and open the database if the archivelog required for re covery is either missing. lost or corrupted? Doc ID: Note:465478. then the approach and strategy on how to recover and open the database depends on the SC N (System Change Number) of the datafiles. select GROUP#.FHTYP Type. FHSCN SCN. whether the log sequence# .70) File_name.substr(HXFNM.Version: 8.1 Type: HOWTO Last Revision Date: 28-MAY-2008 Status: PUBLISHED In this Document Goal Solution References -------------------------------------------------------------------------------- Applies to: Oracle Server . as well as. lost or corrupted? Solution The assumption here is that we have exhausted all possible locations to find ano ther good and valid copy or backup of the archivelog that we are looking for.Enterprise Edition . select hxfil FileNo. Goal How to recover and open the database if the archivelog required for recovery is either missing.FHSTA status . FHTNM TABLESPACE_NAME.1.4 to 11. select * from v$recovery_log.7.1.60) from v$logfile. select * from v$log_history.FHSTA status from x$kcvfhall. select HXFIL File_num..substr(member.FHRBA_SEQ Sequence from X$KCVFH.1 Information in this document applies to any platform.HXERR Validity.

we need to apply archivelog(s) or redolog(s) to synchronize all of the online datafiles. Take note that we query the V$DATAFILE_HEADER. which means that they are already synchronized in terms of their SCN. which ind icates the date and time how far the datafiles have been recovered. r un the following SQL statement. count(*) from v$datafile_header group by status. name from v$datafile where file# in (select file# from v$datafile_header where status='OFFLINE'). becau se we want to know the SCN recorded in the header of the physical datafile. checkpoint_change#. then we must apply at least the arch ivelog(s) or redolog(s) whose log sequence# are generated from the beginning and until the completion of the said backup that was used to restore the datafiles. to_char(checkpoint_time. which derives the information from the controlfile. then the datafiles are still not synchronized yet. in some cases. checkpoint_time.required for the recovery is still available in the online redologs. we can immediately open the database without even applying archivelogs. If the datafiles are restored from an online or hot backup. In this situ ation. because we may not be able to recover later the offline datafile once we open th e database in resetlogs. The critical key thing here is to ensure that all of the online datafiles are sy nchronized in terms of their SCN before we can normally open the database. You may run the following query to determine the offline datafiles: select file#. and not the V$DATAFILE. The results of the query above may return some offline datafiles. So. 'DD-MON-YYYY HH24:MI:SS') as checkpoint_time. In this case. and the d atabase is cleanly shutdown before the backup is taken. For the SCN of the datafiles. . checkpoint_change#. which means that the database is open when the backup is taken. if the datafiles are restored from an offline or cold backup. except if there is a req uirement to roll the database forward to a point-in-time after the said backup i s taken. then the datafiles are already synchronized in terms of their SCN. However. as shown below. mounted o r shutdown (normally) when the backup is taken. that means that the data base is either not open. That is whether the database is open. By the way. The results of the above query must return one and only one row for the online d atafiles. if the results return more than one row for th e online datafiles. we intentionally offline the datafile(s). Even though we can recover the database beyond resetlogs for the Oracle database starting from 10g and late r versions due to the introduction of the format "%R" in the LOG_ARCHIVE_FORMAT. b ecause the datafiles are already in a consistent state. select status. ensure tha t all of the required datafiles are online. However. to determine whether the datafil es are synchronized or not. because we are doing a partial database restore. or perhaps we don't need the contents of the said data file. checkpoint_time order by status. checkpoint_change#. is in nomount mode or mounted when the backup is taken. Otherwise. it is recommended that you online the required datafi les now than after the database is open in resetlogs to avoid any possible problems. take note of the CHECKPOINT_TIME in the V$DATAFILE_HEADER. it is important to know the mode of the database w hen the datafiles are backed up. So.

but you still cannot open the database.ora.status. If the above query returns no rows. If we are lucky that the required log sequence# is still available in the online redologs and the corresponding redolog member is still physically existing on d isk. But there is no 100% guarantee that this will open the databa se. This option can be tedious and time consuming. because the V$DATABASE.258.first_change#.first_time.group#. then we expect minimal or perhaps n . (2) create a brand new and separate database.first_change# >= DF. but once we successfully open the new database. ORA-00279: change 189189555 generated at 11/03/2007 09:27:46 needed for thread 1 ORA-00289: suggestion : +BACKUP ORA-00280: change 189189555 for thread 1 is in sequence #428 Specify log: {<RET>=suggested | filename | AUTO | CANCEL} +BACKUP/prmy/onlinelog/group_2. L. (select min(checkpoint_change#) min_checkpoint_change# from v$datafile_header where status='ONLINE') DF where LF. lost or corrupted. then the log sequence# required for recovery is no longer available in the online redolog.sequence#.603422107' After trying all of the possible solutions mentioned above. If you have tried to apply all of the online redolog members instead of an archi velog during the recovery. since they are already overwritten during the redolog sw itches. However. or the corresponding log sequence# is no longer available in the online redolog. as shown in the example below. but you always received the ORA-00310 error.min_checkpoint_change# from v$log L. v$logfile LF. then we cannot normally open the database. Database rebuild means doing the following. then we must immediately rebuild the d atabase. once the database is opened. select LF.group# and L. L. L.CONTROLFILE_TYPE has a value of "BACKUP". So. L. then try to apply each of the redolog membes one at a time during the recovery.min_checkpoint_change#. You may run the followi ng query to determine the redolog members: select * from v$logfile. DF. then we may apply them instead of the archivelog.member. the following are the 3 options available to allow you to open the database: Option#1: Force open the database by setting the _ALLOW_RESETLOGS_CORRUPTION=TRU E in the init. as shown below. L. To confirm. issue the fol lowing query.603422107 ORA-00310: archived log contains sequence 503. since the datafiles are in an inconsistent state. because the archivelog required for recovery is either missi ng. L.group# = L. and finally (3) i mport the recent export dump.You may issue the following SQL statement to change the status of the required d atafile(s) from "OFFLINE" to "ONLINE": alter database datafile <file#> online. namely: (1) perform a fulldatabase export. sequence 428 required ORA-00334: archived log: '+BACKUP/prmy/onlinelog/group_2.thread#.258. that is to determine the redolog member(s) that yo u can apply to recover the database: set echo on feedback on pagesize 100 numwidth 16 alter session set nls_date_format = 'DD-MON-YYYY HH24:MI:SS'.

Option#2: If you have a good and valid backup of the database. References OTHER ERRORS: ============= 1. and any data after that are lost. The above errors indicates that there is a failed distributed transaction that .. Before you try this option. because we still need to apply the arc hivelogs generated during the said backup in order to synchronize the SCN of the datafiles before we can normally open the database. Control file missing ORA-00202: ORA-27041: OSD-04002: O/S-Error: controlfile: 'g:\oradata\airm\control03. phone# and email address of the person who has the autho rity to sign the work order in behalf of the customer. Option#3: Manually extract the data using the Oracle's Data Unloader (DUL). if we restored from an online or hot backup. then restore the database from the said backup. and recover the database by applying up to the la st available archivelog. then we may not be able to open the database. However.. Sat May 24 20:02:40 2003 ORA-205 signalled during: alter database airm mount. we need the complete name. Solution: just copy one of the present to the missing one ORA=00214 --------1. we will only recover the database up to the last archivelog that is applied.ctl' unable to open file unable to open file (OS 2) The system cannot find the file specified. then we can only recover the database from the bac kup that is restored. If the customer wants to pursue this approach. If no ar chivelogs are applied at all. one Control file is different version Solution: just copy one of the present to the different one 19.o data loss at all. In this option. whic h is performed by Oracle Field Support at the customer site on the next business day and for an extra charge. ensure that you have a good and valid backup of the current database.13 recovery FROM -----------------alter system disable distributed recovery ORA-2019 ORA-2058 ORA-2068 ORA-2050: FAILED DISTRIBUTED TRANSACTIONS for step by step instructions on how to proceed.

dbf' end backup. segment_type .time FROM v$datafile df. 19.status = 'ACTIVE'.DBF -------------------------------------------------Note:1034037.file# and bk.needs to be manually cleaned up. If this is the case. the instance may crash before the solutions are implemented.14 get a tablespace out of backup mode: -------------------------------------SVRMGR> connect internal SVRMGR> startup mount SVRMGR> SELECT df. Shows the datafiles currently in a hot backup state. owner .bk. corrupt archive log --------------------------------Archive mandatory in log_archive_dest is unavailable and it's impossible to make a full recovery. 19.v$backup bk 2> WHERE df.17 Database does not start (1) SGADEF.dba_extents file_id = &bad_file_id &bad_block_id BETWEEN block_id and block_id + blocks -1 19. Do an "end backup" on those listed hot backup datafiles.102> In some cases.6 Subject: ORA-01102: WHEN STARTING THE DATABASE Type: PROBLEM Status: PUBLISHED Content Type: TEXT/PLAIN Creation Date: 25-JUL-1997 Last Revision Date: 10-FEB-2000 Problem Description: ==================== You are trying to startup the database and you receive the following error: . SVRMGR> alter database datafile 2> '/u03/oradata/PROD/devlPROD_1. Workaround Configure log_archive_min_succeed_dest = 2 Do not use log_archive_duplex_dest 19.16 ORA-1578 ORACLE data block corrupted (file # %s. SVRMGR> alter database open.file# = bk.DBF LK. tablespace_name sys. See <Note 1012842.name. issue an 'alter system disable distributed recovery' immediately after the database starts to allow the database to run without having reco terminate the instance. block # %s) --------------------------------------------------------------SELECT FROM WHERE AND segment_name .15 Disk full.

dbf 2. lgwr and dbwr) still exist . % ls $ORACLE_HOME/dbs/sgadef<sid>. remove it. smon.dbf If this file does exist. fail. crash. the ORA-01102 error is misleading and may have occurred due to one of the following reasons: . % rm $ORACLE_HOME/dbs/sgadef<sid>. immediate. remove them by using the Unix command "kill".the processes for Oracle (pmon. abort.dbf" file in the directory "ORACLE_HOME/dbs".there is still an "sgadef<sid>. For example: % kill -9 <Process_ID_Number> 3. fails.. Action: Shutdown other instance or mount in a compatible mode..shared memory segments and semaphores still exist even though the database has been shutdown . or scumnt: failed to lock /opt/oracle/product/8.0. Verify that no shared memory segments and semaphores that are owned by "oracle" still exist . Therefore.dbf" file in the "ORACLE_HOME/dbs" directory . Verify that there are no background processes owned by "oracle" % ps -ef | grep ora_ | grep $ORACLE_SID If background processes exist.there is a "ORACLE_HOME/dbs/lk<sid>" file Search Words: ============= ORA-1102. Fri Sep 13 14:35:20 2002 Shutting down instance (abort) Problem Explanation: ==================== A database is started in EXCLUSIVE mode by default.ORA-01102: cannot mount database in EXCLUSIVE mode Cause: Some other instance has the database mounted exclusive or shared.6/dbs/lkSALES Fri Sep 13 14:29:19 2002 ORA-09968: scumnt: unable to lock file SVR4 Error: 11: Resource temporarily unavailable Fri Sep 13 14:29:19 2002 ORA-1102 signalled during: alter database mount. migration Solution Description: ===================== Verify that the database was shutdown cleanly by doing the following: 1. Verify that there is not a "sgadef<sid>.

INSERTS into's.. even though no memory is allocated. Now the database can start.6 Subject: RECOVERING FROM A LOST DATAFILE IN A ROLLBACK TABLESPACE Type: PROBLEM Status: PUBLISHED Content Type: TEXT/PLAIN Creation Date: 16-OCT-1995 Last Revision Date: 18-JUN-2002 Solution 1: --------------Error scenario: 1. (simulate Media errors) Delete file rb1. comment out INIT. SHUTDOWN ABORT..dbf" files are used for locking shared memory. 3. If you have more than one database. remove the shared memory segments % ipcrm -m <Shared_Memory_ID_Number> and remove the semaphores % ipcrm -s <Semaphore_ID_Number> NOTE: The example shown above assumes that you only have one database on this machine. 19. so ORACLE does not try to find the incorrect segment rb1 . active transactions -----------------------------------------------Note:1013221. you will need to shutdown all other databases before proceeding with Step 4. oracle has of . 2.% ipcs -b If there are shared memory segments and semaphores owned by "oracle".ora (Tablespace RB1 with segment rb1 ). Startup the instance Solution Explanation: ===================== The "lk<sid>" It seems that still locked. and "sgadef<sid>. 5. set transaction use rollback segment rb1.18 Rollback segment missing. Oracle thinks memory is By removing the "sgadef" and "lk" files you remove any knowledge shared memory that is in use. Restore a backup of the file Recover: 1. Verify that the "$ORACLE_HOME/dbs/lk<sid>" file does not exist 5. 4. 4.ORA ROLLBACK_SEGMENT parameter .

3. . If for whatever reason. under the status column. What could be some reasons a datablock is unaccessible for undo? 1-If a tablespace or a datafile is offline or missing. ALTER DATABASE OPEN # now we are in business CREATE ROLLBACK SEGMENT rbtemp TABLESPACE SYSTEM.2. undo must be applied to the data block the modified row/s are in. ALTER ROLLBACK SEGMENT rb1 ONLINE.ora usually has no effect.ora' OFFLINE. 8. ALTER TABLESPACE RB1 ONLINE. the undo cannot be applied. When a rollback of a transaction occurs. There is a status column that describes what state the rollback segment is currently in. Solution 2: --------------INTRODUCTION -----------Rollback segments can be monitored through the data dictionary view. This can be checked through v$datafile. Normal states are either online or offline. no suspect instance. 3-If the datablock that is corrupt is actually in the rollback segment itself rather than the object. the status of "needs recovery" will appear. DROP ROLLBACK SEGMENT rbtemp. 6. look in dba_tablespaces. 9. ALTER ROLLBACK SEGMENT rbtemp ONLINE. # We need Temporary RBS for further steps. Here are some examples of why a transaction may need to rollback: 1-A user may do a dml transaction and decides to issue rollback 2-A shutdown abort occurs and the database needs to do an instance recovery in which case. Occasionally. Oracle has to roll back all uncommitted transactions. that data block is unavailable. bringing the rollback segment offline or online either through the alter rollback segment command or removing it FROM the rollback_segments parameter in the init. Result: Successfully rollback uncommitted Transactions. 11. ALTER ROLLBACK SEGMENT rbtemp OFFLINE. When a rollback segment is in this state. UNDERSTANDING ------------A rollback segment falls into this status of needs recovery whenever Oracle tries to roll back an uncommitted transaction in its transaction table and fails. 10. 4. The result is a 'corrupted' rollback segment with the status of needs recovery. dba_rollback_segs. 2-If the object the datablock belongs to is corrupted. STARTUP MOUNT ALTER DATABASE DATAFILE 'rb1. 7. RECOVER TABLESPACE RB1. 5. For tablespaces associated with the datafiles. HOW TO RESOLVE IT ----------------1-MAKE sure that all tablespaces are online and all datafiles are online.

Solution 3: --------------Recovery FROM the loss of a Rollback segment datafile containing active transact ions How do I recover the datafile containing rollback segments having active transac tions and if the backup is done with RMAN without using catalog. 4-CHECK in the directory that is specified by the user_dump_dest parameter (in the init. immediate. The object # is the same as the object_id in sys. If the database cannot startup. object_type.#) object #. removed the event.oraevent = "10015 trace name context forever. what object Oracle is trying to apply the undo to.#) refers to transaction information. status FROM dba_objects WHERE object_id = <object #>. and shutdown and startup the database. put the rollback segment back in the init.but when i tried to open the database after offlining the Rollback segment file I go t the following errors . if that does not work. Note: An ora-1545 may be encountered. abort) and bring it back up. level 10" Setting this event will generate a trace file that will reveal the necessary information about the transaction Oracle is trying to roll back and most importantly. 3-SHUTDOWN the database (if normal does not work. At this point. there should be a message similar toerror recovery tx(#. it may be likely that the corruption is in the actual rollback segment.ora or show parameter command) for a trace file that was generated at startup time.dba_objects. or other errors.ora parameter rollback_segments. 7-THIS object must be dropped so the undo can be released.If that still does not resolve the problem then 2-PUT the following in the init. 6-USE the following query to find out what object Oracle is trying to perform recovery on. In most cases. 8-AFTER dropping the object. SELECT owner. please contact customer support. if the problem has not been resolved. object_name. If this still does not resolve the problem. 5-IN the trace file. An export or relying on a backup may be necessary to restore the object after the corrupted rollback segment goes away. TX(#. I have tried the case study FROM the Oracle recovery handbook. the above steps will resolve the problematic rollback segment. contact customer support at this point.

ORA-00604: error occurred at recursive SQL level 2 ORA-00376: file 2 cannot be read at this time ORA-01110:data file 2: '/orabackup/CCD1prod/oradata/rbs01CCD1prod. so the question is can we offline a rollback segment datafile containing active transactions and open the database ? How to perform recovery in such case using an RMAN backup without using the cata log. The only supported way to recover FROM the loss of a rollback segment datafile c ontaining a rollback segment with a potentially active data dictionary transaction is to r estore the datafile FROM backup and roll forward to a point in time prior to the loss of the datafil e (assuming archivelog mode). are you suggesting this so that active transaction is not lost.is it possible ? Because during the recovery the rollforward is followed by rollback and all the active transactions FROM the rollback segment's transaction table will be rolled back isnt it ? My question is if I have a active transaction in a rollback segment and the file containing that rollback segment is lost and the database crashed or did a shutdown abort c an we open the database after offlining the datafile and commenting out the rollback_segments p arameter in the init. simulate the loss of datafile by removing FROM the os and shut down abort the da tabase. What does Rollforward upto a time prior to the loss of the datafile got to do wi th the recovery. Tom Villane Oracle Support Metalink Analyst FROM: Madhukar Yedulapuram 02-May-02 06:46 Subject: Re : Recovery FROM the loss of a Rollback segment datafile containing a ctive transactions Hi Tom.ora parameter. at this point offlining the file succeeds but you cannot open the database. but this was done through SVRMGRL. Madhukar FROM: Oracle. I appreciate for any insight and tips into this issue. Tom Villane 01-May-02 21:04 Subject: Re : Recovery FROM the loss of a Rollback segment datafile containing a ctive transactions Hi. Here is whats happening. Anyhow shutting down and starup mounting the database allows for the database or the datafile recovery. . mount the database so RMAN can restore the file.dbf' the status of the datafile was "Recover".

You will have to: Restore a good backup of the file RECOVER DATAFILE '<name>' ALTER DATABASE DATAFILE '<name>' ONLINE. you may want to log an iTAR if you have additional questions. The only way you would be able to open the database is if the status of the roll back were OFFLINE.but what happens to an active transaction which was using this rollb ack segment. any other status requires that you recover as noted before. once the database is opened and the media recovery performed on the datafile. madhukar FROM: Oracle. Regards Tom Villane Oracle Support Metalink Analyst FROM: Madhukar Yedulapuram 03-May-02 07:22 Subject: Re : Recovery FROM the loss of a Rollback segment datafile containing a ctive transactions Hi Tom. Madhukar FROM: Oracle. Tom Villane 02-May-02 16:24 Subject: Re : Re : Recovery FROM the loss of a Rollback segment datafile contain ing active transactions Hi.isnt this the logical corruption? madhukar FROM: Madhukar Yedulapuram 05-May-02 08:14 Subject: Re : Recovery FROM the loss of a Rollback segment datafile containing a ctive transactions Tom.the database will show values which were part of an active transaction and not committed. Tom Villane 07-May-02 13:53 . You won't be able to open the database if you lose a rollback segment datafile t hat contains an active transaction.I tried to do it and got the errors which I mentioned earlier. Thank You. Can I get some reponse to my questions. As recovering FROM rollback corruption needs to be done properly. Thank you for the reply.you said that the only way the database can be opened is if the status of the rollback segment was offline. So in this case I have to do offline recovery only or what ? Thanks.

SVRMGR> alter rollback segment test_rbs offline. I should not have said "rolling forward to a point in t ime. Statement processed. Regards Tom Villane Oracle Support Metalink Analyst FROM: Madhukar Yedulapuram 07-May-02 22:23 Subject: Re : Recovery FROM the loss of a Rollback segment datafile containing a ctive transactions Hi Tom. Sorry for the confusion. SVRMGR> create tablespace test_rbs datafile '/orabackup/CCD1prod/oradata/test_rbs01.. . References: Oracle8i Backup and Recovery Guide. Statement processed.dbf' size 10M 2> default storage (initial 1M next 1M minextents 1 maxextents 1024). SVRMGR> set transaction use rollback segment test_rbs. Statement processed. there won't be corruption or inconsistency. SVRMGR> create table case5 (c1 number) tablespace tools. No. SVRMGR> create rollback segment test_rbs tablespace test_rbs. SVRMGR> insert into case5 values (5). SVRMGR> set transaction use rollback segment test_rbs. You must perform closed database recove ry. it follows that rollback data is also (indirectly) recorded in the redo log.. Statement processed.Subject: Re : Re : Recovery FROM the loss of a Rollback segment datafile contain ing active transactions Hi. 1 row processed. but I performed the following test and Oracle is showing logical corruption by s howing data which was never committed. chapter 6 under "Losing Datafiles in ARCHIVE LOG Mode ". ORA-01598: rollback segment 'TEST_RBS' is not online SVRMGR> alter rollback segment test_rbs online." in my previous reply. Since this includes changes made to roll back segment blocks. To recover FROM a loss of Datafiles in the SYSTEM tablespace or datafiles with active rollback segments. After offlining the rollback segment containing active transaction you can open the database and do the recovery and after that any active transactions should be rolled back and the data should not show up. The redo logs will contain the i nformation for both committed and uncommitted transactions. -Shutdown the database -Restore the file FROM backup -Recover the datafile -Open the database. Statement processed.

SVRMGR> drop rollback segment test_rbs. SVRMGR> drop rollback segment test_rbs. SVRMGR> alter database datafile '/orabackup/CCD1prod/oradata/test_rbs01. Media recovery complete. Statement processed. drop rollback segment test_rbs * ORA-01545: rollback segment 'TEST_RBS' specified not available SVRMGR> SELECT segment_name. C1 ---------5 1 row SELECTed. SVRMGR> SELECT * FROM case5. SVRMGR> alter database open.status FROM dba_rollback_segs. SEGMENT_NAME STATUS -----------------------------. SVRMGR> recover tablespace test_rbs. Total System Global Area 145981600 bytes Fixed Size 73888 bytes Variable Size 98705408 bytes Database Buffers 26214400 bytes Redo Buffers 20987904 bytes Database mounted. drop rollback segment test_rbs * .---------------SYSTEM ONLINE R0 OFFLINE R01 OFFLINE R02 OFFLINE R03 OFFLINE R04 OFFLINE R05 OFFLINE R06 OFFLINE R07 OFFLINE R08 OFFLINE R09 OFFLINE R10 OFFLINE R11 OFFLINE R12 OFFLINE BIG_RB OFFLINE TEST_RBS ONLINE 16 rows SELECTed. Statement processed. SVRMGR> alter rollback segment test_rbs online. SVRMGR> alter tablespace test_rbs online.dbf' offline. Statement processed. Statement processed. C1 ---------5 1 row SELECTed. SVRMGR> shutdown abort ORACLE instance shut down. SVRMGR> startup mount ORACLE instance started.Statement processed. SVRMGR> SELECT * FROM case5.

I think this statement is true for Intance and Crash recovery. Regards Tom Villane Oracle Support Metalink Analyst -------------------------------------------------------------------------------FROM: Madhukar Yedulapuram 14-May-02 20:12 Subject: Re : Recovery FROM the loss of a Rollback segment datafile containing a ctive transactions Hi Tom.does nt this contradict the Oracle's stance that only that data will be shown which shown whi ch is committed. madhukar FROM: Oracle.then the s tance of oracle is consistent. At the time that you issue the "alter rollback segment test_rbs online. So what you are saying is the moment I say Alter rollback segment RBS# online.because this caused logical corruption. I brought the tablespace online and did a SELECT FROM the table which was having the active transaction in one of the rollback segments. What you are showing is expected and normal. Can this be explained or is this a bug. and not corruption.but if you look at my test just after performing the tablespa ce recovery (had only one datafile in the RBS tablespace which was offlined before opening the database and doing the recovery).not for media reco very as the case in point proves.but still if you say Oracle issues an implicit commit.oracle will issue an implicit commit. Tom Villane 15-May-02 18:30 Subject: Re : Re : Recovery FROM the loss of a Rollback segment datafile contain ing active transactions .so this statement has iss ued an implicit commit and I could see the data which was never actually committed. Tom Villane 10-May-02 13:19 Subject: Re : Re : Recovery FROM the loss of a Rollback segment datafile contain ing active transactions Hi. FROM: Oracle.ORA-01545: rollback segment 'TEST_RBS' specified not available Here I have to bring the rollback segment offline to dropt it." Oracle does an implicit commit becuase any "ALTER" statement is considered DDL and Oracle issues an implicit COMMIT before and after any data definition language (DDL)statement.

. D ROP. Yes.so the moment i brought the RBS offline. All of the above are considered commits and the data will be saved.Hi.is that what you are saying. Tom Villane 17-May-02 12:18 Subject: Re : Re : Recovery FROM the loss of a Rollback segment datafile contain ing active transactions Hi. -----------------------------------------problem 2: "the backed up datafile size is smaller. RENAME.so recovery is ess entially not applying anything in this case. I should have said the implicit commit hap pened when the rollback segment was altered offline. As a test you can do this (i just did) o create a small 1m tablespace with a datafile. Regards Tom Villane Oracle Support Metalink Analyst FROM: Madhukar Yedulapuram 16-May-02 23:17 Subject: Re : Recovery FROM the loss of a Rollback segment datafile containing a ctive transactions Hi Tom. and Oracle won't accept it for recovery. Whether it's an implicit commit (before and after a DDL statement like CREATE. Regards Tom Villane Oracle Support Metalink Analyst 19. So the data was committed even before performing the recovery.the transaction was committed and the data saved in the table.19 After backup you increase a datafile. that is what happened. ALTER) or if the user did the commit. Thank You very much. A slight correction to what I posted." isn't a problem because we most certainly will accept that file. or if the user exits the application (forces a c ommit). madhukar FROM: Oracle.

all is well. alter the tablespace online again -. This will grow the datafile.."alter database create datafile". tkyte@TKYTE816> recover tablespace t.it'll tell you the file that needs recovery (its already accepted the smaller file at this point) alter database recover datafile 'that file'. alter tablespace t online * ERROR at line 1: ORA-01113: file 9 needs media recovery ORA-01110: data file 9: 'C:\TEMP\T.. I added a datafile AFTER the backup. Tablespace altered. tkyte@TKYTE816> alter tablespace t add datafile 'c:\temp\t2. create a table with initial 2m initial extent. copy the datafile alter it and end backup. tkyte@TKYTE816> recover tablespace t. Tablespace altered. it sees the copy is out of sync.. Here is an example I just ran through: tkyte@TKYTE816> alter tablespace t begin backup.all we need do at this point is: tkyte@TKYTE816> alter database create datafile 'c:\temp\t2. Tablespace altered. alter the datafile and "autoextend on next 1m" it.DBF' and now it tells of the missing datafile -.dbf' size 1m.see DBWR trace file ORA-01110: data file 10: 'C:\TEMP\T2. Database altered.o o o o o o o o o o alter it and begin backup. As for the questions: 1) There is such a command -.. ORA-00283: recovery session canceled due to errors ORA-01157: cannot identify/lock data file 10 . I copied the single datafile that is in T at this point tkyte@TKYTE816> alter tablespace t end backup. try to online it -.. I moved the copy of the one datafile in place. I went out and erased the two datafiles associated with T.. At this point.dbf'.DBF' So. tkyte@TKYTE816> alter tablespace t offline. Media recovery complete. So. offline the tablespace copy the 1m original file back. tkyte@TKYTE816> alter tablespace t online. Tablespace altered. .

changed to 200...22 Setting Trace Events ------------------------database level via init.restore a backup copy of the system file .. so when the value was. 19.23 DROP TEMP DATAFILE ----------------------SVRMGRL>startup mount SVRMGRL>alter database open. SVRMGRL>drop tablespace temp including contents.. it gave an error of "end-of-file on communication channel" The value was reduced to 150 & 100 and the same error was encountered. ora-01157 cannot identify datafile 4 . and we are back in business.a normal datafile can be taken offline and the database started up.tkyte@TKYTE816> alter tablespace t online. and the database was restarted.. the database started.recover the file 19....the system file can be taken offline but the database cannot start ...25 Strange processes=.dbf' offline drop. ALTER SESSION SET EVENTS 'IMMEDIATE TRACE NAME CONTROLF LEVEL 10'... when it was set back to 50.. Can anyone clear ? .. system trace dump file ALTER SESSION SET EVENTS 'IMMEDIATE TRACE NAME SYSTEMSTATE LEVEL 10'.ora depend on some other par ameter ? We were getting the error as maximum no of process (50) exceeded.... SVRMGRL>alter database open.. and database does not start ----------------------------------------------------Does the PROCESSES initialization parameter of init..dbf' SVRMGRL>alter database datafile '/oradata/temp/temp. Tablespace altered. 19. 19.. LEVEL 10" session level ALTER SESSION SET EVENTS 'IMMEDIATE TRACE NAME BLOCKDUMP LEVEL 67109037'.24 SYSTEM DATAFILE RECOVERY ----------------------------. . SVRMGRL>create tablespace temp datafile '. The value was initially set to 50.ora EVENT="604 TRACE NAME ERRORSTACK FOREVER" EVENT="10210 TRACE NAME CONTEXT FOREVER.file not found ora-01110 data file 4 '/oradata/temp/temp.

[%s ]. This indicates that a process has encountered an exceptional condition.check out ur semaphore settings in /etc/system. [%s].5 and recieved an error in alert. [%s]. arguments: [12700]. try increasing seminfo_semmns 19. [].0.x Version 7.8. [%s]. ALTER TABLE MANIIN_ASIAKAS STORAGE ( NEXT 5M ).3. [] .26 ORA-00600 -------------I work with ORACLE DB ver. 00000. 19. Table Partition Segment ======================= . "internal error code.27 segment has reached it's max_extents ----------------------------------------oracle later than 7. []. [41957137]. [%s]. [] oerr ora 600 00600.log ksedmp: internal or fatal error ORA-00600: internal error code. Action: Report as a bug .3 and later: You can set the MAXEXTENTS storage parameter value to UNLIMITED for any object. Temporary Segment ================= ALTER TABLESPACE tablespace DEFAULT STORAGE ( MAXEXTENTS UNLIMITED). [3383]. Rollback Segment ================ ALTER ROLLBACK SEGMENT rollback_segment STORAGE ( MAXEXTENTS UNLIMITED). Table Segment ============= ALTER TABLE MANIIN_ASIAKAS STORAGE ( MAXEXTENTS UNLIMITED). arguments: [%s]. Index Segment ============= ALTER INDEX index STORAGE ( MAXEXTENTS UNLIMITED).the first argument is the internal error number Number [12700] indicates "invalid NLS parameter value (%s)" Cause: An invalid or unknown NLS configuration parameter was specified. [%s]. [44]. [%s]" Cause: This is the generic internal error number for Oracle program exceptions.

If you display the records used in the LOG HISTORY section 9 of the controlfile: SQL> SELECT * FROM v$controlfile_record_section WHERE type='LOG HISTORY' . TYPE RECORDS_TOTAL RECORDS_USED FIRST_INDEX LAST_INDEX LAST_RECID ------------. but does not exceed 65535.---------LOG HISTORY 65535 65535 33864 33863 520892 The number of RECORDS_USED has reached the maximum allowed in RECORDS_TOTAL.----------. VALUE ----7 * the MAXLOGHISTORY database parameter has already reached the maximum of 65535 and it cannot be increased anymore.ALTER TABLE table MODIFY PARTITION partition STORAGE (MAXEXTENTS UNLIMITED). SQL> alter database backup controlfile to trace...ORA" -OR* Set it momentarily if you cannot shut the database down now: SQL> alter system set control_file_record_keep_time=0.------------. SELECT value FROM v$parameter WHERE name='control_file_record_keep_time'.---------. 19. MAXLOGHISTORY is 65535 The MAXLOGHISTORY increases dynamically when the CONTROL_FILE_RECORD_KEEP_TIME is set to a value different FROM 0.log". . you find the following warning messages: kccrsz: denied expansion of controlfile section 9 by 65535 record(s) the number of records is already at maximum value (65535) krcpwnc: following controlfile record written over: RECID #520891 Recno 53663 Record timestamp . Once reached. Explanation ----------The default value for * the CONTROL_FILE_RECORD_KEEP_TIME is 7 days. Solution Description -------------------Set the CONTROL_FILE_RECORD_KEEP_TIME to 0: * Insert the parameter CONTROL_FILE_RECORD_KEEP_TIME = 0 IN "INIT. the message appears in the alert. kccrsz: denied expansion of controlfile section 9 by 65535 record(s) the number of records is already at maximum value (65535) krcpwnc: following controlfile record written over: RECID #520892 Recno 53664 Record timestamp The database is still running.28 max logs -------------Problem Description ------------------In the "alert.log warning you that a controlfile record is written over.-----------. => in the trace file. The CONTROL_FILE_RECORD_KEEP_TIME init parameter is set to 7.

LGWR trace file produced 2. the max value of 65535 reconfirms that the limit has been reached..in 8.5 kccrbl causes SEGV before the call to skgfdisp with wrong block number.. [NOTE:1063567.29 ORA-470 maxloghistory -------------------------Problem Description: ==================== Instance cannot be started because of ORA-470.in 8. It is possible that the maxloghistory limit of 65535 as specified in the controlfile has been reached.. .6] <ml2_documents. max = 65535. a list of online log details is required to indicate which redo log is current. This can be obtained using the following command: startup mount . in-use = 65535.using the command: ALTER SESSION SET EVENTS 'immediate trace name controlf level 10' 3.ora..0.3 and 8.. LOG FILE HISTORY RECORDS: (blkno = 0x13.. Because the recovery will need to roll forward through current online redo logs.4. Further confirmation can be seen FROM the controlfile trace: CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS NOARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 2 MAXDATAFILES 50 MAXINSTANCES 1 MAXLOGHISTORY 65535 .0. Diagnostic Analysis: ==================== The following observations will indicate that we have the maxloghistory limit of 65535: 1. Diagnostic Solution: =================== 1. Dump of the control file .6&p_database_id=NOT> gives a good description on the use of this parameter..19. Set control_file_record_keep_time = 0 in the init. stack: kcrfds -> kcrrlh -> krcpwnc -> kccroc -> kccfrd -> kccrbl -> kccrbp . using the command: ALTER DATABASE BACKUP CONTROLFILE TO TRACE.0. reusable sections never expand and records are reused immediately as required. Controlfile contents. LGWR has also died creating a trace file with an ORA-204 error. Diagnostic Required: ==================== The following information should be requested for diagnostics: 1. OSD skgfdisp returns ORA-27069. 3. size = 36. Mount the database and retrieve details of online redo log files for use in step 6. stack: kcrfds -> kcrrlh -> krcpwnc -> kccwnc -> kccfrd -> kccrbl 2.. last-recid= 188706) . With the parameter set to 0.showDocument?p_id=1063567. 2.. The Lgwr trace file should show the following stack trace: . numerous lines omittted . This parameter specifies the minimum age of a log history record in days before it can be reused. FROM the 'dump of the controlfile': ..

30 Compatible init. OLAP and Data Mining options > ORACLE_HOME = /dbms/tdbaplay/ora10g/home > System name: AIX > Node name: pl003 > Release: 3 > Version: 5 > Machine: 00CB560D4C00 > Instance name: playroca > Redo thread mounted by this instance: 1 > Oracle process number: 28 > Unix process pid: 1548438.showDocument?p_id=1012929.parameters. The MAXLOGHISTORY section of the current control file cannot be extended beyond 65536 entries.0 . 5. An ORA-219 may be returned when the size of the controlfile.583 > Control file resized from 454 to 470 blocks > kccrsd_append: rectype = 28. Without this step it may be impossible to recover the database. [NOTE:1012929. you will receive the message 'Media Recovery Complete'.ora change: -------------------------------Database files have the COMPATIBLE version in the file header. Using the backup controlfile trace.587 > *** ACTION NAME:(0000010 FINISHED67) 2008-02-21 12:51:57. The database will automatically be mounted due to the recreation of the controlfile in step 5 : Recover database using backup controlfile.583 > *** SERVICE NAME:(SYS$USERS) 2008-02-21 12:51:57.6&p_database_id=NOT> gives a good step-by-step guide to recreating the control file. At the recovery prompt apply the online logs in sequence by typing the unquoted full path and file name of the online redo log to apply. If you set the parameter to a higher value.6] <ml2_documents. Note: keep recurring "Control file resized from" > /dbms/tdbaplay/playroca/admin/dump/udump/playroca_ora_1548438. if it did not already crash in step 3.SELECT * FROM v$logfile. lbn = 227.2. Once media recovery is complete. is higher then the maximum allowable size. Recover the database.64bit Productio n > With the Partitioning. enabling crash recovery to repair any incomplete log switch. alter database open 4. all the headers will be updated at next . it is a very important step before recreating the controlfile in step 5 and hense. recs = 1128 19. based on the values of the MAX. image: oracle@pl003 (TNS V1-V3) > > *** 2008-02-21 12:51:57. Shutdown the database.0. This is a very important step.583 > *** SESSION ID:(518.trc > Oracle Database 10g Enterprise Edition Release 10. recreate the controlfile with a smaller maxloghistory value. Although the startup will fail.643) 2008-02-21 12:51:57. 6. as noted in step 2. After applying the current redo log. open the database as follows: alter database open resetlogs. 3.3. Open the database. 7. The value should reflect the amount of log history that you wish to maintain.

2.ora ORACLE instance started. This parameter allows you to immediately take advantage of the maintenance improvements of a new release in your producti on systems without testing the new functionality in your environment.3 on an Oracle8 database.3. Ie: It is not possible to set COMPATIBLE to 7. Some features of the current release may be restricted.2.0 or higher.2. .ora. When using the standby database and feature. For example: idle> startup pfile=initora920.0.0.ctl' In the above case.0 cannot be used by release 8.0.0(default) to 8. I tried to modify parameter in init.ora file: co mpatible=9.0 . while at the same time guarantee ing backward compatibility with an earlier release (in case it becomes necessary to revert to the earlier release).1.0 ORA-00202: control file: '/usr2/oracle/dbs/V73A/ctrl1V73A.0.0. Total System Global Area 143725064 bytes Fixed Size 451080 bytes Variable Size 109051904 bytes Database Buffers 33554432 bytes Redo Buffers 667648 bytes Database mounted. downgrade the COMPATIBLE parameter.3.0 incompatible with ORACLE version 7. Just installed DB9. This parameter specifies the release with which Oracle7 Server must maintain com patibility. If you start the database manually. and try to restart your database.0 . from the co mmand line -you would discover this.2 features. .2. that is. For example.0 in order to guarantee compatibility.0. this parameter must have the same v alue on the primary and standby databases.0. ORA-00402: database changes by release 9. This means that if you shutdown your database. and the value must be 7. database was running with COMPATIBLE 7.You may only change the value of COMPATIBLE after a COLD Backup.1.0.0 and returns an error before mounting since kernel cannot read the controlfile header.0. ----------------Hi Tom. After I restarted the 901 DB.You may only change the value of COMPATIBLE if the database has been shutdown in NORMAL/IMMEDIATE mode.0.0. you will not be able to use 7.0. The default value is the earliest release with which compatibility can be guaranteed. This parameter allows you to use a new release. I got error below when I login to sqlplus: ERROR: ORA-01033: ORACLE initialization or shutdown in progress Anything wrong with that? If I cha nge back.12.1.12.0. kernel uses default 7.database startup.2. you'll receive an error message something like: ORA-00201: control file version 7. The database could not start up.0 with compatibility set to 7.1. I commented out the parameter in init.0.3. if you are running release 7. everything is ok.

.ora file: . or when the log buffer causes the redo threads to switch.. You would have had to of created the database with 8.ora parameter CONTROL_FILE_RECORD_KEEP_TIME equal to zero. additional information indicates which function encountered the error Action: check errno Solution Description: ===================== To workaround this problem you can: 1.ORA-00405: compatibility type "Locally Managed SYSTEM tablespace" ./ctlACPT01. compatible cannot be set DOWN as you are already using new features many times that are not compatible with the older release..31 ORA-27044: unable to write the header block of file: --------------------------------------------------------Problem Description: ==================== When you manually switch redo logs. Use a database blocksize smaller than 16k. Set the init.. ORA-00202: "controlfile: '%s'" Cause: This message reports the name file involved in other messages..dbf' ORA-27044: unable to write the header block of file SVR4 Error: 48: Operation not supported Additional information: 3 Fri Apr 24 13:42:04 1998 kccexpd: controlfile resize from 356 to 368 block(s) denied by OS ..OR 2. you see errors similar to the following in your alert log: ..1 from the very beginning) -----------------------------19....trc: ORA-202: controlfile: '/. This may not be practical in all cases.rdl Fri Apr 24 13:42:04 1998 Errors in file /. and to change the db_block_size of a database you must rebuild the database./rdlACPT04..1 file formats (compatible set to 8. Action: See associated error messages for a description of the problem. This can be done by adding the following line to your init... Generally. ORA-27044: "unable to write the header block of file" Cause: write system call failed.. Note: The particular SVR4 error observed may differ in your case and is irrelevant here./acpt_arch_15973. Fri Apr 24 13:42:00 1998 Thread 1 advanced to log sequence 170 Current log# 4 seq# 170 mem# 0: /..

If CONTROL_FILE_RECORD_KEEP_TIME is set to 0.%s) The ORA-04031 error is usually due to fragmentation in the library cache . The s hared pool holds both the d ata dictionary cache and the fully parsed or compiled representations of PL/SQL blocks and SQL statements. shared pool size is critical to Oracle perfoRMANce.showDocument?p_id=663726&p_da tabase_id=BUG> is only reproducible when the control file needs to grow AND when the db_block_size = 16k. which is fixed in release 8. Explanation: ============ This is [BUG:663726] <ml2_documents.CONTROL_FILE_RECORD_KEEP_TIME = 0 The database must be shut down and restarted to have the changed init.32 ORA-04031 error shared_pool: --------------------------------DIAGNOSING AND RESOLVING ORA-04031 ERROR For most applications. Starting with Oracle8 the control file can grow to a much larger size than it was able to in Oracle7. If there is still not a single chunk large enough to satisfy the request ORA-040 31 is returned.showDocument?p_id=663726&p_database_id=BUG>.%s. The write of a 16K buffer to a control file seems to fail during an implicit resize operation on the controlfile that came as a result of adding log history records (V$LOG_HISTORY) when archiving an online redo log after a log switch. This has been tested on instances with a smaller database block size and the problem has not been able to be reproduced. the record section expands. Records in some sections in the control file are circularly reusable while records in other sections are never reused. Bug 663726 <ml2_documents. then reusable sections never expand and records are reused as needed.0. When any attempt to allocate a large piece of contiguous memory in the shared po ol fails Oracle first flushes all objects that are not currently in use from the pool and the resulting free memory chunks are merged. In the event a new record needs to be added to a reusable section and the oldest record has not aged enough.ora file read. The message that you will get when this error appears is the following: Error: ORA 4031 Text: unable to allocate %s bytes of shared memory (%s.6. 19. CONTROL_FILE_RECORD_KEEP_TIME applies to reusable sections. It specifies the minimum age in days that a record must have before it can be reused.

.33 ORA-4030 Out of memory: ---------------------------Possibly no memory left in Oracle. 19.1. sum(executions) "TotExecs" FROM v$sqlarea WHERE executions < 5 GROUP BY substr(sql_text. First determine if the ORA-04031 was a result of fragmentation in the library cache or in the shared pool reserved space by issuing the following query: SELECT free_space. request_failures. avg_used_size. The errors is also reported if execute permissions are not in place on some procedure. Also inspect the size of any swap file. count(*) .1. The ORA-04031 is a result of lack of contiguous space in the library cache if: REQUEST_FAILURES is > 0 and LAST_FAILURE_SIZE is < SHARED_POOL_RESERVED_MIN_ALLOC or REQUEST_FAILURES is 0 and LAST_FAILURE_SIZE is < SHARED_POOL_RESERVED_MIN_ALLOC The first step would be to consider lowering SHARED_POOL_RESERVED_MIN_ALLOC to put more objects into the shared pool reserved space and increase SHARED_POOL_SIZE. or the OS does not grant more memory. The following SQL can show you statements with literal values or candidates to i nclude bind variables: SELECT substr(sql_text. To resolve this consider increasing SHARED_POOL_RESERVED_MIN_ALLOC to lower the number of objects being cached into the shared pool reserved space and increase SHARED_POOL_RESERVED_SIZE and SHARED_POOL_SIZE to increase the available memory in the shared pool reserved space. This view keeps information of every SQL statement and PL/SQL block executed in the database. SHARED_POOL_RESERVED_SIZE. Before of increasing the shared pool size conside r to tune the application to use shared sql and tune SHARED_POOL_SIZE. used_space. The ORA-04031 is a result of lack of contiguous space in the shared pool reserved space if: REQUEST_FAILURES is > 0 and LAST_FAILURE_SIZE is > SHARED_POOL_RESERVED_MIN_ALLOC. and SHARED_POOL_RESERVED_MIN_ALLOC.or shared pool reserved space. avg_free_size. 19.40) HAVING count(*) > 30 ORDER BY 2.40) "SQL".34 wrong permissions on oracle: ---------------------------------Hi. last_failure_size FROM v$shared_pool_reserved.

.I am under very confusing situation. it'll be running "as the owner" tell me. who is the owner of the shared memory segments associated with the SGA. when you have a setuid program as the oracle binary is.PATH variables and then do sqlplus sys after logging in when i give "select file#. Could you tell me the reason behind this?? Thank & Regards. If that is not Oracle -.sh during the install and the permissions on the oracle binaries are wrong. what does ls -l $ORACLE_HOME/bin/oracle look like..you are "getting confused" somewhere for the s bit would ensure that Oracle was the owner. Some connection troubleshooting: -------------------------------19. I'm not getting any error.error from v$datafile_header.35: ====== ORA-12545: ---------This one is probaly due to the fact the IP or HOSTNAME in tnsnames is wrong.oracle_home. what does ipcs -a show you. it should look like this: $ ls -l $ORACLE_HOME/bin/oracle -rwsr-s--x 1 ora920 ora920 /usr/oracle/ora920/bin/oracle with the "s" bits set. I'm running database (8.1." for some file# i get error as "CAN NOT READ HEADER" but when i login through other unix id and do the same thing. Atul Followup: sounds like you did not run the root. rwsr-s--x 1 oracle dba 494456 Dec 7 1999 lsnrctl 51766646 Mar 31 13:03 regardless of who I log in as.7) My oracle is installed under ownership of userid "oracle" when i login with unix id "TEST" and give oracle_sid. This seems very very confusing.

ORA-12514: ---------This one is probaly due to the fact the SERVICE_NAME in tnsnames is wrong or sho uld be fully qualified with domain name. ORA-12154: ---------This one is probaly due to the fact the alias you have used in the logon dialogb ox is wrong. This e rror will be returned if the database instance has not registered with the listener. Possible Remedy: Check to make sure that the SID is correct.ORA or DB_NAME in the initialisat ion file. ORA-12535: ---------The TNS-12535 or ORA-12535 error is normally a timeout error associated with Firewalls or slow Networks. Cause: The SID specified in the connection was not found in the listener s tables. + In essence.ora parameter setting for the CONNECT_TIMEOUT_<listener_name> value specified. but the SID is not known. the ORA-12535/TNS-12535 is a timing issue between the client and server. Note 2: ------ORA-12505: TNS:listener could not resolve SID given in connect descriptor You are trying to connect to a database. + It can also be an incorrect listener. ORA-12505: ---------TNS:listener does not currently know of SID given in connect descriptor Note 1: ------Symptom: When trying to connect to Oracle the following error is generated: ORA-12224: TNS: listener could not resolve SID given in connection description. The SIDs that are currently register ed with the listener can be obtained by typing: LSNRCTL SERVICES <listener-name> These SIDs correspond to SID_NAMEs in TNSNAMES. . fully qualified with domain name.

Handler(s): "DEDICATED" established:0 refused:0 LOCAL SERVER Service "ORA920. status UNKNOWN. status READY. has 1 handler(s) for this service.0 .. Handler(s): "DEDICATED" established:2 refused:0 state:ready LOCAL SERVER The command completed successfully .Although it is possible that a tnsping command succeeds. there might still a pro blem with the SID parameter of the connection string. Oracle.. eg.. Used parameter files: c:\oracle\ora920\network\admin\sqlnet.EU. All rights reserved.. this is the connection information stored in a tnsnames. status UNKNOWN.0. C:>tnsping ora920 TNS Ping Utility for 32-bit Windows: Version 9.Production Copyright (c) 1997 Oracle Corporation.eu.ora Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = DEV01)(PORT = 2491))) (CONNECT_DATA = (SID = UNKNOWN) (SERVER = DEDICATED))) OK (20 msec) As one can see. Instance "ORA920".DBMOTIVE.0.com" has 2 instance(s).ora file : ORA920.. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DEV01)(PORT=1521))) Services Summary.. Instance "ORA10G". In order to test the known services by a listener.eu. Service "ORA10G.2.0 .dbmotive. we can issue following comman d at the database server side: C:>lsnrctl services LSNRCTL for 32-bit Windows: Version 10.2. 2004.Production Copyright (c) 1991. Handler(s): "DEDICATED" established:0 refused:0 LOCAL SERVER Instance "ORA920".dbmotive.. the SID UNKNOWN is not known by the listener at the database server sid e.7.com" has 1 instance(s).. All rights reserved.1. has 1 handler(s) for this service. has 1 handler(s) for this service.COM = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = DEV01)(PORT = 2491)) ) (CONNECT_DATA = (SID = UNKNOWN) (SERVER = DEDICATED) ) ) However.

either in the Windows NT registry or in your environment (with a set command). you must verify that the service is running.36 ORA-12560 --------------Note 1: ------Oracle classify this as a generic protocol adapter error .showDocument?p_id=892253&p_database_id=BUG> ORA-12560 CREATING DATABASE WITH DB CONFIGURATION ASSISTANT IF SID HAS NON-ALPHA If you encounter an ORA-12560 error when you try to start Server Manager or SQL*Plus locally on your Windows NT server. SCOPE & APPLICATION Support Analysts and customers. RELATED DOCUMENTS PR:1070749.102&p_database_id=NOT> TNS 12560 DB CREATE VIA INSTALLATION OR CONFIGURATION ASSISTANT FAILS BUG:948671 <ml2_documents.Know services are ORA10G and ORA920. 19.1 Subject: WINNT: ORA-12560 DB Start via SVRMGRL or SQL*PLUS ORACLE_SID is set co rrectly Type: BULLETIN Status: PUBLISHED Content Type: TEXT/PLAIN Creation Date: 28-JUL-1999 Last Revision Date: 14-JAN-2004 PURPOSE To assist in resolving ORA-12560 errors on Oracle8i.102 <ml2_documents.6 NOTE:1016454. In my experience it indi cates that Oracle client does not know what instance to connect to or what TNS alias to use . . you should first check the ORACLE_SID value. Changing the SID in our tnsnames. Set the correct ORACLE_HOME ans ORACLE_SID variables. See the entries above for more details .showDocument?p_id=948671&p_database_id=BUG> ORADIM SUC CSSFULLY CREATES AN UNUSABLE SID WITH NON-ALPHANUMERIC CHARACTER BUG:892253 <ml2_documents. Make sure the SID is correctly set.ora to a known service by the listener (ORA920) solved the problem. Note 2: ------Doc ID: Note:73399.showDocument?p_id=1016454. Also.

The Getting Started Guide for Oracle8i on Windows NT documents that SID names can contain only alphanumerics. and the service is running. 1. look at the error stack and check for lower level transport errors. For further details. but attempts to connect will fail with an ORA-12560. You must delete the instance and recreate it with no special characters only alphanumerics are allowed in the SID name.1 Content Type: TEXT/PLAIN Subject: ORA-12560 Connecting to the Server on Unix . Look at the next error down the stack and process that.5 on Windows NT for this issue. ORA-12500 ORA-12560 MAKING MULTIPLE CONNECTIONS TO DATABASE Problem: Trying to connect to the database via listener and the ORA-12500 are . The list below shows some of the causes. Action: Check addresses used for proper protocol specification. It is possible you will hit a cause not described here. however if you attempt to create a SID with an underscore or a dash on Oracle8i you are not prevented from doing so. See BUG#948671. This is a high-level error just reporting an error occurred in the actual transport layer. the symptoms and the action to take. SCOPE & APPLICATION ------------------Support Analysts and customers alike.1. Note 3: ------Doc ID </help/usaeng/Search/search. then it is possible that you have created an instance with a non-alphanumeric character. in that case the information above should allow it to be identified.Troubleshooting Creation Date: 04-SEP-2000 Type: PROBLEM Last Revision Date: 20-MAR-2003 Status: PUBLISHED PURPOSE ------This note describes some of the possible reasons for ORA-12560 errors connecting to server on Unix Box. ORA-12560 CONNECTING TO THE SERVER ON UNIX . Turn off tracing when the operation is complete. turn on tracing and re execute the operation.TROUBLESHOOTING -----------------------------------------------------------ORA-12560: TNS:protocol adapter error Cause: A generic protocol adapter error occurred.If you have verified that ORACLE_SID is properly set. The service will be created and started successfully. which was logged against 8.html>: Note:119008. Before reporting this error. yet you still get an ORA-12560.

Define the TNS_ADMIN environment variable to point to the TNSNAMES directory.Using the $ORACLE_HOME/bin/adapters command. Solution: Finding the resource which is been reached is difficult. contact Worldwide Customer Support. Run the command without parameters to check if the protocol is installed.g. if you get the error in first connection the problem may be in the configuration of the system. $ORACLE_HOME/bin/adapters 2. You may see in the listener.Check the protocol used in the TNSNAMES. $ORACLE_HOME/bin/adapters $ORACLE_HOME/bin/oracle $ORACLE_HOME/bin/adapters $ORACLE_HOME/bin/sqlplus Explanation: If the protocol is not installed every connection attempting to use it will fail with ORA-12538 because the executable doesn't contain the required protocol symbol/s. The executable could not be found or the environment maybe set up incorrectly.102 <ml2_documents. In many cases the error ORA-12500 is caused due to leak of resources in the Unix Box. ORA-12538/ORA-12560 connecting to the database via SQL*Net Problem: Trying to connect to database via SQL*Net the error the error ORA-12538 is prompted.ORA you check is the one that is actually being used by Oracle. Ensure that the ORACLE environment is specified correctly in LISTENER. If error persists.showDocument?p_id=2064862. In the trace file you can see: nscall: error exit nioqper: error from nscall nioqper: nr err code: 0 nioqper: ns main err code: nioqper: ns (2) err code: nioqper: nt main err code: nioqper: nt (2) err code: nioqper: nt OS err code: 12538 12560 508 0 0 Solution: . ensure the protocol is installed. 2. . Otherwise. . then run the command with parameters to see whether a particular tool/application contains the protocol symbols e.: 1.log ORA-12500 and ORA-12560: ORA-12500: TNS:listener failed to start a dedicated server process Cause: The process of starting up a dedicated server process failed.ORA. if you are enable to connect to database and randomly you get the error your operating system is reached the maximum values for some resources.102&p_database_id=NOT> indicates some suggestion to solve the problems.ORA by the connection string . Action: Turn on tracing at the ADMIN level and re execute the operation. the note 2064862.Ensure that the TNSNAMES. Verify that the ORACLE Server executable is present and has execute permissions enabled.prompted.

ORA-12546 ORA-12560 connecting locally to the database Problem: Trying to connect to database locally with a different account to the software owner. If you receive error ORA-12538 when making a sqlplus connection.ora and you are using PARAMETER USE_CKPFILE_LISTENER in listener. The following error struct appears in the SQLNET.6] <ml2_documents.mk install $ ls -l $ORACLE_HOME/bin/sqlplus --> should show a current date/time stamp 3. this should be: 52224 -rwsr-sr-x 1 oracle dba 53431665 Aug 10 11:07 oracle Explanation: The problem occurs due to an incorrect setting on the oracle executable. 4.ora.LOG: nr err code: 12203 TNS-12203: TNS:unable to connect to destination ns main err code: 12541 TNS-12541: TNS:no listener ns secondary err code: 12560 nt main err code: 511 TNS-00511: No listener nt secondary err code: 239 nt OS err code: 0 Solution: Check [NOTE:1061927. ORA-12541 ORA-12560 TRYING TO CONNECT TO A DATABASE Problem: You are trying to connect to a database using SQL*Net and receive the following error ORA-12541 ORA-12560 after change the TCP/IP port in the listener.Error ORA-12538 may also be caused by an issue with the '$ORACLE_HOME/bin/relink all' command. 'Relink All' does not relink the sqlplus executable. . To relink sqlplus manually: $ su .showDocument?p_id=1061927.6&p_database_ id=NOT> to resolve the problem. In the trace file you can see: nioqper: error from nscall nioqper: nr err code: 0 nioqper: ns main err code: 12546 nioqper: ns (2) err code: 12560 nioqper: nt main err code: 516 nioqper: nt (2) err code: 13 nioqper: nt OS err code: 0 Solution: Make sure the permissions of oracle executable are correct.oracle $ cd $ORACLE_HOME/sqlplus/lib $ make -f ins_sqlplus. it may be for this reason. the error the error ORA-12546 is prompted.

AUTHENTICATION_SERVICES Purpose Use the parameter SQLNET.11 Troubleshooting Net8 / Resolving the Most Common Error Messages LOG SQL* 19.1&p_database_id=NOT> Net Common Errors & Diagnostic Worksheet Net8i Admin/Ch. the Listener ignores the TCP port number defined in the ADDRESS section and listens on a random port.AUTHENTICATION_SERVICES = (NONE) Note 2: What does SQLNET. The machine on which the other process is running went down. RELATED DOCUMENTS ----------------Note:39774.AUTHENTICATION_SERVICES to enable one or more authentic ation services.1&p_database_id=NOT> & TRACE Facilities on NET . If authentication has been installed. 3. A process was unable to receive a packet from another process.ora and search for the string SQLNET.showDocument?p_id=39774. Default None Values Authentication Methods Available with Oracle Net Services: none for no authentication methods. Note:45878. 2.AUTHENTICATION_SERVICES do? SQLNET.37 ORA-12637 --------------Packet received failed. it is recommended that this parameter be s et to either none or to one of the authentication methods. The other process was terminated. Some other communications error occurred. When it doesn t exist. A valid username and password can be used to access the database.showDocument?p_id=45878.1 <ml2_documents. all for all authentication methods nts for Windows NT native authentication Authentication Methods Available with Oracle Advanced Security: kerberos5 for Kerberos authentication cybersafe for Cybersafe authentication . add the string SQLNET. Note 1: Just edit the file sqlnet.1 <ml2_documents. change this to = (NONE). Possible causes a re: 1.ora's ADDRESS_LIST section and the parameter USE_CKPFILE_LISTENER = TRUE. When it exists it s set to = (TNS).Explanation: If TCP protocol is listed in the Listener.AUTHENTICATION_SE RVICES.

of course . cybersafe) Note 3: ORA-12637 for members of one NT group.ora".4) . A completely new group with different name has been created. Since then.CRYPTO_SEED and SQLNET.then they get ORA-12637 star ting the Oracle c/s application (document management system). ie: SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = prd) (ORACLE_HOME = /raid/app/oracle/product/7. then it was dropped and created again with exactly the same name (but. I get ORA-12637 packet receive failure when I try to connect to this database.ora". In the "listener.ORA and on the client sqlnet file if they exist. Note 4: ORA-12637 packet receive failure I added a second instance to the Oracle server.AUTHENTICATION_SERVICES=(kerberos5.AUTHENTICATION_SERVICES in the server's SQLNET. with different internal ID). on the server and al l clients.3. W hy is this? Hello Try commenting out the SQLNET.2.0.ORA file contains the following pa rameter: CONNECT_TIMEOUT_LISTENER=0 Note 5: Workaround is to turn off prespawned server processes in "listener. Any hint will be appreciated.0 on Windows 2000 Advanced Server w. client workstations with W2K and Win XP.1. The environment is: Oracle 9. SP4. using OPS$ login Being "identified externally". Win dows 2003 domain controllers in W2K compatible mode. This situation have been identified as causing some kind of mess. users can work fine until the user is added to a "wwwauthor" NT group to allow them to publish documents on Microsoft IIS (intranet) -.radius for RADIUS authentication dcegssapi for DCE GSSAPI authentication See Also: Oracle Advanced Security Administrator's Guide Example SQLNET. comment out or delete the prespawn parameters. Specific NT group (wwwauthor) which caused problems had existed already with specific permissions. Please also verify that the server's LISTENER. Problem solved.

So change from. After the transaction is resolved.--------------------------------------------------------6. fix: Comment out SQLNET. -lthread -lnsl -lsocket -lgen -ldl -lsched 4) Do $ORACLE_HOME/bin/relink all Note 7: fact: Oracle Server .# # # ) (PRESPAWN_MAX = 99) (PRESPAWN_LIST = (PRESPAWN_DESC = (PROTOCOL = TCP) (POOL_SIZE = 1) (TIMEOUT = 30)) # ) ) Note 6: Problem Description ------------------Connections to Oracle 9. STATE.38 ORA 02058: ================ dba_2pc_pending: Lists all in-doubt distributed transactions.2 using a Cybersafe authenticated user fails on Solaris 2. MIXED. if the Windows machine is not in a Domain where there is a Windows Domain Controller. HOST. the view is purged. MIXED. the listener and any clients.31. HOST.1 fact: MS Windows symptom: Starting Server Manager (Svrmgrl) Fails symptom: ORA-12637: Packet Receive Failed cause: Oracle's installer will set the authentication to (NTS) by default. COMMIT# 2 FROM DBA_2PC_PENDING . it will not be able to contact the KDC (Key Distribtion Centre) needed for Authentication.5950 1145324612. 2) In $ORACLE_HOME/lib take a backup copy of the file sysliblist 3) Edit sysliblist. SQL> SELECT LOCAL_TRAN_ID.Personal Edition 8. Solution Description -------------------1) Shutdown Oracle.AUTHENTICATION_SERVICES=(NTS) in sqlnet. GLOBAL_TRAN_ID. -lnsl -lsocket -lgen -ldl -lsched -lthread To. COMMIT# 2 FROM DBA_2PC_PENDING 3 / LOCAL_TRAN_ID GLOBAL_TRAN_ID ---------------------.6 with ORA-12637 and a core dump is generated.10D447310B5FCE408A296417959EBEEC00000000 SQL> select STATE. However.ora 19. The view is empty until populated b y an in-doubt transaction. Move the -lthread entry to the beginning.

1 Subject: ORA-30019 When Executing Dbms_transaction.. Rollback complete.31. tran_comment. STATE TRAN_COMMENT ---------------. SQL> commit.5950 in O SQL> select state. advice from dba_2pc_pending.0.31.3 / STATE MIX HOST ---------------.-----------------------------------------------------------prepared SQL> rollback force '6. LOCAL_TRAN_ID IN_ DATABASE ---------------------.PURGE_LOST_DB_ENTRY('local_tran_id').Version: 9.-------------------------------------------------6.--. .--.5950'. Doc ID: Note:290405.PURGE_LOST _DB_ENTRY.Purge_lost_db_entry Type: PROBLEM Status: MODERATED Content Type: TEXT/X-HTML Creation Date: 11-NOV-2004 Last Revision Date: 16-NOV-2004 The information in this document applies to: Oracle Server . getting ora-30019: ORA-30019: Illegal rollback Segment operation in Automatic Undo mode Changes AUTO UNDO MANAGEMENT is running Cause DBMS_TRANSACTION. Errors ORA-30019 Illegal rollback Segment operation in Automatic Undo mode Symptoms Attempting to clean up the pending transaction using DBMS_TRANSACTION." cannot be done in AUM.) execute DBMS_TRANSACTION.Enterprise Edition .) alter session set "_smu_debug_mode" = 4.PURGE_LOST_DB_ENTRY is not supported in AUTO UNDO MANAGEMENT This is due to fact that "set transaction use rollback segment.5 This problem can occur on any platform. 2. Fix 1.----------------------------------------------------------forced rollback no REBV\PGSS-TST-TCM SQL> select * from dba_2pc_neighbors.2.

you receive: ORA-600 [15625]: Meaning: The arguement 15625 is occuring because some index entry for the table is not found in obj$. If you try to delete the table. Search Words: ------------ORA-600 [12850] ORA-600 [15625] describe delete table Solution Description: --------------------You need to rebuild the database.html>: Note:1064436. 19. Solution Explanation: --------------------Since the table(s) cannot be accessed or dropped because of the data dictionary corruption.19. rebuilding the database is the only option. ORA-600 [12850]: ======================= Doc ID </help/usaeng/Search/search.6 Content Type: TEXT/PLAIN Subject: ORA-00600 [12850]. You cannot drop the tables in question because the data dictionary doesn't know they exist.40 ORA-01092: ================ ------------------------------------------------------------------------------------------ . Problem Explanation: -------------------The data dictionary is corrupt. AND ORA-00600 [15265]: WHEN SELECT OR DESCRIB E ON TABLE Creation Date: 14-JAN-1999 Type: PROBLEM Last Revision Date: 29-FEB-2000 Status: PUBLISHED Problem Description: --------------------You are doing a describe or select on a table and receive: ORA-600 [12850]: Meaning: 12850 occurs when it can't find the user who owns the object from the dictionary.39.

1) + 5. The default value for transactions_per_rollback_segment = 5. cache space is full (currently has (19) entries) ORA-01092: ORACLE instance terminated Change(s) ~~~~~~~~~~ Increased shared_pool_size parameter. transactions = session * 1. Cause ~~~~~~~ Low value for max_rollback_segments The above changes changed the value for max_rollback_segments internally.1 Content Type: TEXT/PLAIN Subject: ORA-01599 and ORA-01092 while starting database Creation Date: 03-DEC-2002 Type: PROBLEM Last Revision Date: 07-AUG-2003 Status: PUBLISHED PURPOSE ------The purpose of this Note is to fix errors ORA-01599 & ORA-01092 when recieved at startup. Use these calculations and find out the value for max_rollback_segments. sessions = (processes * 1.Doc ID </help/usaeng/Search/search. Set it to this value or 30 whichever is greater. 1. Symptom(s) ~~~~~~~~~~ Starting the database gives errors similar to: ORA-01599: failed to acquire rollback segment (20). 2. SCOPE & APPLICATION ------------------All DBAs. Increased processes and/or sessions parameters.1. Fix ~~~~ The value for max_rollback_segments which is to be calculated as follows: max_rollback_segments = transactions/transactions_per_rollback_segment or 30 whichever is greater.html>: Note:222132. Support Analyst. .

Problem Description: ==================== When you startup your Oracle RDBMS database.6 Content Type: TEXT/PLAIN Subject: ORA-01092 STARTING UP ORACLE RDBMS DATABASE Creation Date: 17-NOV-1997 Type: PROBLEM Last Revision Date: 06-JUL-1999 Status: PUBLISHED Problem Summary: ================ ORA-01092 starting up Oracle RDBMS database.showDocument?p_id=2233336&p_database_id=BUG> RDBMS ERRORS AT STARTUP CAN CAUSE ODMA TO OMIT CLEANUP ACTIONS [NOTE:30764.showDocument?p_id=30764. modify the ownership of directory BACKGROUND_DUMP_DEST so that the oracle user (software owner) is the owner and make the permissions on directory BACKGROUND_DUMP_DEST 755.ora Parameter "MAX_ROLLBACK_SEGMENTS" Reference Note ------------------------------------------------------------------------------------------Doc ID </help/usaeng/Search/search.1] <ml2_documents. Reference info ~~~~~~~~~~~~~~ [BUG:2233336] <ml2_documents. Disconnection forced.log). .html>: Note:1038418. Solution Summary: ================= Modify the ownership and permissions of directory BACKGROUND_DUMP_DEST.log file because the ownership and/or permissions on the BACKGROUND_DUMP_DEST directory are incorrect. Solution Description: ===================== To allow oracle to write to the BACKGROUND_DUMP_DEST directory (contains alert_<SID>. Determine the location of the BACKGROUND_DUMP_DEST parameter defined in the init<SID>.1&p_database_id=NOT> Init.3. Follow these steps: 1.ora or config<SID>.ora files. you receive the following error: ORA-01092: ORACLE instance terminated. Startup database after this correct setting. Problem Explanation: ==================== Oracle cannot write to the alert_<SID>.

7.2.html>: Note:273413. You might find SQL in the trace file like: select distinct d..dependency$ d.Enterprise Edition . Errors ORA-1092 Oracle instance terminated.1 Content Type: TEXT/X-HTML Subject: Database Does not Start. Change the permissions on the directory to 755.0. shutting down database USER: terminating instance due to error 604 Instance terminated by USER. 3. the database .p_ obj#>=:1 and d.Version: 8.d. enables oracle to write to the alert_<SID>.status!=5 Cause In the case where there's locally managed temp tablespace in the database.log the following errors are report ed: ORA-00604: error occurred at recursive SQL level 1 ORA-25153: Temporary Tablespace is Empty Error 604 happened during db open.d_obj#=o. For example: % chown oracle * 5. obj$ o where d. Change directory to the location of BACKGROUND_DUMP_DEST..log file. % chmod 755 . Ora-00604 Ora-25153 Ora-00604 Ora-1092 Creation Date: 19-MAY-2004 Type: PROBLEM Last Revision Date: 04-OCT-2004 Status: MODERATED The information in this article applies to: Oracle Server .after controlfile is re-created using the statement generated by "alter database backup controlfile t o trace". Change the owner of all the files and the directory to the software owner.p_obj#. Solution Explanation: ===================== Changing the ownership and permissions of the BACKGROUND_DUMP_DEST directory.1. --------------------------------------------------------------------------Doc ID </help/usaeng/Search/search. 4.obj# and o.1. pid = xxxxx ORA-1092 signalled during: alter database open.4 to 10. ORA-25153 Temporary Tablespace is Empty ORA-604 error occurred at recursive SQL level <num> Symptoms The database is not opening and in the alert.p_timestamp from sys. Login as root.4 This problem can occur on any platform.

DB WILL NO LONGER OPEN. Then DB will open and we can take care of the TEMP tablespace If the error still persists after increasing the sort_area_size and sort_area_re tained_size to a high vale. You are hitting bug 3786479 AFTER DROPPING THE OUTLN USER/SCHEMA. ------------------------------------------------------------------------------Displayed below are the messages of the selected thread. Fairlie Rego . From: Fairlie Rego 23-Mar-05 01:26 Subject: Re : Deleted OUTLN and now I get ORA-1092 and ORA-18008 Hi Ronald.can't be opened again because it complains that temp tablespace is empty. Any experience with this issue out there? Thanks.ORA-18008 http://metalink. SQL*Loader. The query failed because of inadequate sort space(memory + disk) Fix We can increase the sort_area_size and sort_area_retained_size to a very high va lue so that the query completes. nor can the temp tablespace be dropped because the datab ase is not yet open.): Product Version: Deleted OUTLN and now I get ORA-1092 and ORA-18008 One of our DBAs dropped the OUTLN user in 10G and now the instance will not star t.showDocument?p_database_ id=BUG&p_id=3786479 If this is still an issue file a Tar and get a backport.. Startup mount is as far as we can get. Thread Status: Active From: Ronald Shaffer 17-Mar-05 19:23 Subject: Deleted OUTLN and now I get ORA-1092 and ORA-18008 RDBMS Version: 10G Operating System and Version: RedHat ES 3 Error Number (if applicable): ORA-1092 and ORA-18008 Product (i.e. Howeve r no tempfiles can be added to the temp tablespace. Regards. Import. then the only option remains is to restore and recover.com/metalink/plsql/ml2_documents. etc. We get an ORA-18008 specifying the schema is missing and an ORA-1092 when it att empts to OPEN.oracle..

0.0. Import. SQL> startup mount pfile=$ORACLE_HOME/admin/TEST/pfile/init. Disconnection forced I have checked the Log file as follow: . Thread Status: Closed From: Henry Lau 06-Mar-03 10:38 Subject: ORA-01092 while alter datbase open RDBMS Version: 9.3 ORA-01092 while alter datbase open Hi. alter tablespace undotbs offline. Since our undotbs is very large and we try to follow the Doc ID: 157278. alter database nomount * ERROR at line 1: ORA-02231: missing or invalid option to ALTER DATABASE SQL> alter database open.e. 4.dbf size 300M 2. Restart the database. Total System Global Area 386688540 bytes Fixed Size 280092 bytes Variable Size 318767104 bytes Database Buffers 67108864 bytes Redo Buffers 532480 bytes Database mounted. we ar e trying to change the undotbs to a new one We try to 1. 6. SQL> alter database nomount.ora ORACLE instance started. SQL*Loader.1 Error Number (if applicable): ORA-01092 Product (i. 3.1. Create UNDO tablespace undotb2 datafile $ORACLE_HOME/oradata/undotb2. ALTER SYSTEM SET undo_tablespace=undotb2. 5.1. when we restart the database. Change undo = undotb2.): ORACLE DATABASE Product Version: 9.3 Operating System and Version: Linux Redhat 7. it shows the following error.1.--------------------------------------------------------------------------------Displayed below are the messages of the selected thread. alter database open * ERROR at line 1: ORA-01092: ORACLE instance terminated. etc.

SQL> /u01/oracle/product/9.4.0.1.2.0.0. Henry From: Oracle.0.com.0.unitex. Regards Pravin ---------------------------------------------------------------------------------- 19. Pravin Sheth 07-Mar-03 09:31 Subject: Re : ORA-01092 while alter datbase open Hi Henry. What you are seeing is bug 2360088.dbf' ~ ~ ~ ~ Please help to check what the problem is ?? Thank you !! Regards.3.3) 2003-03-06 17:25:38.trc Oracle9i Release 9.0 . I suggest that you log an iSR (formerly iTAR) for a quicker solution for the pro blem.1 Subject: ORA-600 [qerfxFetch_01] Type: REFERENCE Status: PUBLISHED Content Type: TEXT/X-HTML Creation Date: 10-NOV-2003 Last Revision Date: 12-NOV-2004 .615 Evaluating checkpoint for thread 1 sequence 8 block 2 ORA-00376: file 2 cannot be read at this time ORA-01110: data file 2: '/u01/oracle/product/9.2-2smp Version: #1 SMP Sun Apr 8 20:21:34 EDT 2001 Machine: i686 Instance name: TEST Redo thread mounted by this instance: 1 Oracle process number: 9 Unix process pid: 29151.1.hk (TNS V1-V3) *** SESSION ID:(8.0.1/oradata/TEST/undotbs01.2.41 ORA-600 [qerfxFetch_01] ============================= Note 1: ------Doc ID: Note:255881.Production ORACLE_HOME = /u01/oracle/product/9.hk Release: 2. image: oracle@utxrho01. which is fixed in Oracle 9.Production JServer Release 9.1 System name: Linux Node name: utxrho01.com.0 .unitex.3.1/admin/TEST/udump/ora_29151.

<Internal_Only> PURPOSE: This article discusses the internal error "ORA-600 [qerfxFetch_01]". user interrupts need to be handled correctly. Therefore. what it means and possible actions. As such. If/when fully published. . Until the article has been set to EXTERNAL.this section will be deleted as the note moves to publication) </Internal_Only> Note: For additional ORA-600 related information please read Note 146580. PAA Internals Group (Note .1 PURPOSE: This article represents a partially published OERI note. ORA-600 [qerfxFetch_01] is raised when an interrupt has been trapped but has not been handled correctly. additional information will be available here on the nature of this error. It has been published because the ORA-600 error has been reported in at least one confirmed bug. This specific ORA-600 error may be considered for full publication at a later date.<Internal_Only> This note contains information that has not yet been reviewed by the PAA Internals group or DDR. the contents are not necessarily accurate and care should be taken when dealing with customers who have encountered this error. we do not guarantee the contents. If you are going to use the information held in this note then please take whatever steps are needed to in order to confirm that the information is accurate. FUNCTIONALITY: Fixed table row source. Thanks. the SUGGESTIONS section of this article may help in terms of identifying the cause of the error. The information here is only applicable to the versions listed and is provided only for guidance.No underlying data corruption. IMPACT: NON CORRUPTIVE . ERROR: ORA-600 [qerfxFetch_01] VERSIONS: versions 9.2 DESCRIPTION: During database operations.

2.NOT FOR PUBLICATION OR DISTRIBUTION TO CUSTOMERS ======================================================================== Ensure that this note comes out on top in Metalink when ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 qerfxFetch_01 qerfxFetch_01 qerfxFetch_01 qerfxFetch_01 qerfxFetch_01 qerfxFetch_01 qerfxFetch_01 qerfxFetch_01 qerfxFetch_01 qerfxFetch_01 qerfxFetch_01 qerfxFetch_01 qerfxFetch_01 qerfxFetch_01 qerfxFetch_01 qerfxFetch_01 </Internal_Only> Note 2: ------Doc ID </help/usaeng/Search/search. Bug 2306106 OERI:[qerfxFetch_01] possible .log to Oracle Support Services for further analysis.0. Affects: Product (Component) Oracle Server (RDBMS) Range of versions believed to be affected Versions >= 9.2.html>: Note:2306106. please submit the trace files and alert.2 <Internal_Only> INTERNAL ONLY SECTION .8 OERI:[qerfxFetch_01] possible .2 but < 10G Versions confirmed as being affected 9.affects OEM This note gives a brief overview of bug 2306106.0.1.1')> for details of sections in this note. Known Issues: Bug# 2306106 See Note 2306106.</Internal_Only> SUGGESTIONS: If the Known Issues section below does not help in terms of identifying a solution.1 Platforms affected Generic (all / most platforms affected) Fixed: This issue is fixed in 9.2 (Server Patch Set) 10G Production Base Release Symptoms: Error may occur <javascript:taghelp('TAGS_ERROR')> Internal Error may occur (ORA-600) <javascript:taghelp('TAGS_OERI')> ORA-600 [qerfxFetch_01] Related To: (None Specified) Description searched qerfxFetch_01 qerfxFetch_01 qerfxFetch_01 qerfxFetch_01 .2.affects OEM Fixed: 9.0. 10.2.8 Content Type: TEXT/X-HTML Subject: Support Description of Bug 2306106 Creation Date: 13-AUG-2003 Type: PATCH Last Revision Date: 14-AUG-2003 Status: PUBLISHED Click here <javascript:getdoc('NOTE:245840.0.

Note 2: ------Doc ID </help/usaeng/Search/search.html>: TEXT/X-HTML Subject: ORA-600 [kteuproptime-2] Type: REFERENCE Last Revision Date: Status: PUBLISHED Note:233864.2 patchset.4 (Server Patch Set) 10g P roduction Base Release Symptoms: Corruption (Physical) <javascript:taghelp('TAGS_CORR_PHY')> Internal Error may occur (ORA-600) <javascript:taghelp('TAGS_OERI')> ORA-600 [kteuPropTime-2] / ORA-600 [4191] Related To: System Managed Undo Description SMU (System Managed Undo) Undo corruption possible on instance crash.1')> for details of sections in this note.affe cts OEM'.0.affects OEM Note 3: ------Bug 2306106 is fixed in the 9.2.5 iAS Patch Set 9. Bug 2431450 SMU Undo corruption possible on instance crash This note gives a brief overview of bug 2431450.3 Platforms affected Generic (all / most platforms affected) Fixed: This issue is fixed in 9.42 Undo corruption: ====================== Note 1: ------Doc ID </help/usaeng/Search/search. Affects: Product (Component) (Rdbms) Range of versions believed to be affected Versions >= 9 but < 10G Versions confirmed as being affected 9.2. All it says on this bug is 'ORA-600 [qerfxFetch_01] possible .0.4 9.1 Content Type: Creation Date: 28-MAR-2003 07-APR-2005 .0.0.1.1.8 Content Type: TEXT/X-HTML Subject: Support Description of Bug 2431450 Creation Date: 08-AUG-2 003 Type: PATCH Last Revision Date: 05-JAN-2004 Status: PUBLISHED Click here <javascript:getdoc('NOTE:245840. This can result in subsequent ORA-600 errors due to the undo corruption. 19. This bug is not published and thus cannot be viewed externally in MetaLink.0.html>: Note:2431450.2.ORA-600 [qerfxFetch_01] possible .

ERROR: ORA-600 [kteuproptime-2] VERSIONS: versions 9. what it means and possible actions. The information here is only applicable to the versions listed and is provided only for guidance.8 </metalink/plsql/showdoc?db=NOT&id=2431450.2. for System Managed Undo Segments The extent being referenced is not valid. bug 2431450 is fixed in 9. See Note 2431450.1.0.2 that made SMU (System Managed Undo) Undo corruption possible on instance crash.Note: For additional ORA-600 related information please read Note 146580.4.8 . Do not set any other undo/rollback_segment parameters without direction from Support. which will gather additional information to assist support in identifing the cause: # Dump Undo Segment Headers during transaction recovery event="10015 trace name context forever.2 Note 3: ------Hi.log to Oracle Support Services for further analysis.2.1> PURPOSE: This article discusses the internal error "ORA-600 [kteuproptime-2]".0.0 to 9.2.1 </metalink/plsql/showdoc?db=NOT&id=146580. FUNCTIONALITY: UNDO EXTENTS IMPACT: INSTANCE FAILURE POSSIBLE PHYSICAL CORRUPTION SUGGESTIONS: If instance is down and fails to restart due to this error then set the following parameter.2 DESCRIPTION: Oracle has encountered an error propagating Extent Commit Times in the Undo Segment Header / Extent Map Blocks. apply patchset 9.0. level 10" Restart the instance and submit the trace files and alert.0.2. 10. Known Issues: Bug# 2431450 > SMU Undo corruption possible on instance crash Fixed: 9.

4. Note 5: ------BUGBUSTER . It could be because SMON is over-enthusiastic in shrinking extents in SMU segmen ts. 9. []. [] Followed by Fatal internal error happened while SMON was doing active transaction recovery. Ken Robinson Oracle Server EE Analyst ORA-600 [4191] possible on shrink of system managed undo segment.0.2.It's a very rare scenario : This will only cause a problem if there was an instance crash after a transaction committed but before it propogated the extent commit times to all its extents AND there was a shrink of extents before the transaction could be recovered. extent commit times do not get written to all the extents and SMON causes the instance to crash.. Note 4: ------From: Oracle.0 BUG# (if recognised) 2431450 This info.. correct on: 31-AUG-2003 Symptoms Oracle instance crashes and details of the ORA-00600 error are written to the al ert. [].2.0. Regards..0.2.2. 9. Ken Robinson 21-Feb-03 17:44 Subject: Re : ORA-600 kteuPropTime-2 Forgot to mention the second bug for this. pid = 22972 This occurs as Oracle encounters an error when propagating Extent Commit Times i n the Undo Segment Header Extent Map Blocks.0 . lea ving one or more of the undo segments 9.0. this bug was not published (not for any particular reason except it was found internal).bug 2689239. As a result.3. Greetings.0. arguments: [kteuPropTime-2].1. But still. Fixed in: Patch 2431450.log ORA-00600: internal error code. Then SMON: terminating instance due to error 600 Instance terminated by SMON.System-managed undo segment corruption Affects Versions: 9.2.0.

corrupt. Recovering rollback segment _SYSSMU6$ UNDO SEG (BEFORE RECOVERY): usn = 6 Extent Control Header ----------------------------------------------------------------Extent Header:: spare1: 0 spare2: 0 #extents: 7 #blocks: 1934 last map 0x00805f89 #maps: 1 offset: 4080 Highwater:: 0x0080005b ext#: 0 blk#: 1 ext size: 7 #blocks in seg. hdr's freelists: 0 #blocks below: 0 mapblk 0x00000000 offset: 0 Unlocked Map Header:: next 0x00805f89 #extents: 5 obj#: 0 flag: 0x40000000 Extent Map ----------------------------------------------------------------0x0080005a length: 7 0x00800061 length: 8 0x0081ac89 length: 1024 0x00805589 length: 256 0x00805a89 length: 256 . Use this to identify corrupted rollback/undo segments wh en a database cannot be started. The net result is that the database cannot be open ed: "Error 600 happened during db open. When opening the database following the crash. level 10" (set event 10511) event="10511 trace name context forever. This lead s to more ORA-00600 errors and a further instance crash.ora file: _smu_debug_mode=1 event="10015 trace name context forever. Oracle tries to perform crash rec overy and encounters problems recovering committed transactions stored in the corrupt undo segments. an attempt to open the database will still cause a cr ash. level 2" _smu_debug_mode simply collects diagnostic information for support purposes. Notice that the information stored in the segment header about the number of ext ents was inconsistent with the extent map. Eve nt 10015 is the undo segment recovery tracing event. Identify the corrupt undo segment by setting the following parameters in the ini t. shutting down database" Workaround Until the corrupt undo segment can be identified and offlined then unfortunately the database will not open. This is an extract from such a trace file. but Oracle will write vital information about the corrupt rollback/undo segments to a trace file in us er_dump_dest. With these parameters set. revealing that undo segment number 6 (_SYSSMU6$) is corrupt.

you must: Change the undo_management parameter from Create a new UNDO tablespace AUTO to MANUAL . status from dba_rollback_segs where owner='PUBLIC'. SEGMENT_ID ---------1 2 3 4 5 6 7 8 9 10 SEGMENT_NAME -----------_SYSSMU1$ _SYSSMU2$ _SYSSMU3$ _SYSSMU4$ _SYSSMU5$ _SYSSMU6$ _SYSSMU7$ _SYSSMU8$ _SYSSMU9$ _SYSSMU10$ TABLESPACE_NAME --------------UNDOTS UNDOTS UNDOTS UNDOTS UNDOTS UNDOTS UNDOTS UNDOTS UNDOTS UNDOTS STATUS ---------------OFFLINE OFFLINE OFFLINE OFFLINE OFFLINE NEEDS RECOVERY OFFLINE OFFLINE OFFLINE OFFLINE SMON will complain every 5 minutes by writing entries to the alert. This manifests with this error: ORA-00376: file xx cannot be read at this time In cases of UNDO log corruption. segment_name. Note 6: ------Repair UNDO log corruption Don Burleson In rare cases (usually DBA error) the Oracle UNDO tablespace can become corrupte d. select segment_id.Retention Table ----------------------------------------------------------Extent Number:0 Commit Time: 1060617115 Extent Number:1 Commit Time: 1060611728 Extent Number:2 Commit Time: 1060611728 Extent Number:3 Commit Time: 1060611728 Extent Number:4 Commit Time: 1060611728 Comment out parameters undo_management and undo_tablespace and set the undocumen ted _corrupted_rollback_segments parameter to tell Oracle to ignore any corruptions and force the database open: _corrupted_rollback_segments=(_SYSSMU6$) This time. Oracle will start and open OK. which will allow you to check the stat us of the undo segments by querying DBA_ROLLBACK_SEGS. tablespace_name.log as long a s there are undo segments in need of recovery SMON: about to recover undo segment 6 SMON: mark undo segment 6 as needs recovery At this point. you must either download and apply patch 2431450 or create privat e rollback segments.

status from dba_objects where object_id = <object #>. Rollback segment dropped. nuke the corrupt segment and tablespace: SQL> drop rollback segment "_SYSSMU22$". Bounce database. object_type. Note 7: ------Sometimes there can be trouble with an undo segment. SQL > drop tablespace undotbs including contents and datafiles. select owner. SEGMENT_NAME STATUS -----------------------------.oraevent = "10015 trace name context forever. what object Oracle is trying to apply the undo to. Bounce the instance with the hidden parameter _offline_rollback_segments .Drop the old UNDO tablespace Dropping the corrupt UNDO tablespace can be tricky and you may get the message: ORA-00376: file string cannot be read at this time To drop a corrupt UNDO tablespace: 1 Identify the bad segment: select segment_name. USE the following query to find out what object Oracle is trying to perform recovery on. An export or relying on a backup may be necessary to restore the object after the corrupted . object_name. speci fying the bad segment name: _OFFLINE_ROLLBACK_SEGMENTS=_SYSSMU22$ 3. THIS object must be dropped so the undo can be released.---------------_SYSSMU22$ NEEDS RECOVERY 2. Tablespace dropped. level 10" Setting this event will generate a trace file that will reveal the necessary information about the transaction Oracle is trying to rollback and most importantly. Actually there might be something with a normal object: PUT the following in the init. status from dba_rollback_segs where tablespace_name='undotbs_corrupt' and status = NEEDS RECOVERY .

pleas e consult the DBA for assistance.html>: Note:151994.rollback segment goes away. Diagnostic Steps: ----------------1. How the view DBA_FREE_SPACE can be used to determine the space available in the database is described in: [NOTE:121259. it merely indicates that Oracle could not find a large enough area of free contiguous space in which to fit the next extent. Within this view. Error: ORA-01653 Text: unable to extend table %s.1 Content Type: TEXT/PLAIN Subject: Overview Of ORA-01653: Unable To Extend Table %s.%s by %s in tablespace %s ------------------------------------------------------------------------------Cause: Failed to allocate an extent for table segment in tablespace. .1] <ml2_documents.%s By %s In Tab lespace %s Creation Date: 12-JUL-2001 Type: TROUBLESHOOTING Last Revision Date: 15-JUN-2004 Status: PUBLISHED PURPOSE ------This bulletin is an overview of ORA-1653 error message for tablespace dictionary managed. 19.showDocument?p_id=121259. Action: Use ALTER TABLESPACE ADD DATAFILE statement to add one or more files to the tablespace indicated.43 ORA-1653 ============== Note 1: ------Doc ID </help/usaeng/Search/search. When looking to resolve the error by using any of the solutions suggested. Explanation: -----------This error does not necessarily indicate whether or not you have enough space in the tablespace.1&p_database_id=NOT> Using DBA_FREE_SPACE 2. SCOPE& APPLICATION -----------------It is for users requiring further information on ORA-01653 error message. The DBA_TABLES view describes the size of next extent (NEXT_EXTENT) and the percentage increase (PCT_INCREASE) for all tables in the database. you mus t use the view DBA_FREE_SPACE. In order to see the free space available for a particular tablespace. each record represents one fragment of space.

6] <ml2_documents. .Add a Datafile: ALTER TABLESPACE <tablespace name> ADD DATAFILE '<full path and file nam e>' SIZE <integer> <k|m>. This can be checked by looking at DBA_USERS (TEMPORARY_TABLESPACE).6&p_database_id=NOT> O verview of Database Fragmentation [NOTE:121259. Look to see if any users have the tablespace in question as their temporary t ablespace.1] <ml2_documents.showDocument?p_id=1012431.6&p_database_id=NOT> H ow to Diagnose and Resolve ORA-01650.1&p_database_id=NOT> Us ing DBA_FREE_SPACE [NOTE:61997.1] <ml2_documents. . temporary segments may be still holding the space.showDocument?p_id=121259. Possible solutions: ------------------. .Resize the Datafile: ALTER DATABASE DATAFILE '<full path and file name>' RESIZE <integer> <k| m>. ORA-01652.Enable autoextend: ALTER DATABASE DATAFILE '<full path and file name>' AUTOEXTEND ON MAXSIZE UNLIMITED.Lower "next_extent" and/or "pct_increase" size: ALTER <segment_type> <segment_name> STORAGE ( next <integer> <k|m> pctincrease <integer>).Temporary Segment Cleanup and Free Space Coalescing . References: ----------[NOTE:1025288. ORA-01654.6&p_database_id=NOT> S cript to Detect Tablespace Fragmentation [NOTE:1012431.6] <ml2_documents.6] <ml2_documents. The extents must be adjacent to each other for this to work. .6&p_database_id=NOT> S cript to Report on Space in Tablespaces [NOTE:1020182. and Segments .1&p_database_id=NOT> SMO N .showDocument?p_id=1025288. When the extent is allocated : next_extent = next_extent * (1 + (pct_increase/100)) Algorythm to allocate extent for segment is described in the Concept Guide Chapter : Data Blocks.Manually Coalesce Adjacent Free Extents ALTER TABLESPACE <tablespace name> COALESCE.The "next_extent" size is the size of extent that is trying to be allocated ( and for which you have the error).showDocument?p_id=61997. Extents. .How Extents Are Allocated 3.showDocument?p_id=1020090. ORA-01653.6] <ml2_documents.showDocument?p_id=1020182. ORA-01688 : Unable to Extend < OBJECT > by %S in Tablespace [NOTE:1020090.If the tablespace is being used as a temporary tablespace.Defragment the Tablespace: .

Action: Use the ALTER TABLESPACE ADD DATAFILE statement to add one or more files to the specified tablespace.ORA-01652. ORA-1653. you need to get the following .%s partition %s by %s in tablespace %s Cause: Failed to allocate an extent for table segment in tablespace. SCOPE & APPLICATION ------------------You are working with the database and have encountered one of the following errors: ORA-01650: unable to extend rollback segment %s by %s in tablespace %s Cause: Failed to allocate extent for the rollback segment in tablespace.ORA-01688 : Unable to Extend < OBJECT > by %S in Tablespace %S Creation Date: 02-JAN-1997 Type: TROUBLESHOOTING Last Revision Date: 10-JUN-2004 Status: PUBLISHED PURPOSE ------This document can be used to diagnose and resolve space management errors .ORA1650.%s by %s in tablespace %s Cause: Failed to allocate extent for index segment in tablespace.ORA-01653.%s by %s in tablespace %s Cause: Failed to allocate extent for table segment in tablespace. ORA-1652. In order to address the UNABLE TO EXTEND issue.ORA-01 654. Action: Use the ALTER TABLESPACE ADD DATAFILE statement to add one or more files to the specified tablespace.6 Content Type: TEXT/PLAIN Subject: How to Diagnose and Resolve ORA-01650. Action: Use ALTER TABLESPACE ADD DATAFILE statement to add one or more files to the tablespace indicated or create the object in other tablespace. How to Solve the Following Errors About UNABLE TO EXTEND -------------------------------------------------------An "unable to extend" error is raised when there is insufficient contiguous space available to extend the object.html>: Note:1025288. ORA-01688: unable to extend table %s. Action: Use ALTER TABLESPACE ADD DATAFILE statement to add one or more files to the tablespace indicated. A. ORA-01653: unable to extend table %s. ORA-01652: unable to extend temp segment by %s in tablespace %s Cause: Failed to allocate an extent for temp segment in tablespace. ORA-1654 and ORA-1688.Note 2: ------Doc ID </help/usaeng/Search/search. ORA-01654: unable to extend index %s. Action: Use the ALTER TABLESPACE ADD DATAFILE statement to add one or more files to the specified tablespace.

The above query returns the largest available contiguous chunk of space. please refer to [NOTE:1069041. If this query is done immediately after the failure. then try and ensure that the query is tuned to perform its sorts as efficiently as possible.6] <ml2_documen ts. To find the owner of a sort. => "next_extent" for the object => "pct_increase" for the object => The name of the tablespace in which the object resides Use the "next_extent" size with "pct_increase" in the following formula to determine the size of extent that is trying to be allocated. then please refer to [NOTE:188610. tablespace_name FROM dba_rollback_segs WHERE segment_name = '<rollback segment name>'. pct_increase.5 = 768000 ORA-01650 Rollback Segment ========================== SELECT next_extent.information: 1. 2. pct_increase. tablespace_name FROM dba_tablespaces WHERE tablespace_name = '<tablespace name>'. Temporary segments take the default storage clause of the tablespace in which they are created. Please note that if the tablespace you are concerned with is of type TEMPO RARY. Note: pct_increase is only needed for early versions of Oracle.1] <ml2_documents. by default in later versions pct_increase for a rollback segment is 0. extent size = next_extent * (1 + (pct_increase/100) next_extent = 512000 pct_increase = 50 => extent size = 512000 * (1 + (50/100)) = 512000 * 1.showDocument?p_id=1886 10. ORA-01652 Temporary Segment =========================== SELECT next_extent.6&p_database_id=NOT> .showDocument?p_id=1069041. If this error is caused by a query. it will show that the largest contiguous space in the tablespace is smaller than the next extent the object was trying to allocate. The largest contiguous space available for the tablespace SELECT max(bytes) FROM dba_free_space WHERE tablespace_name = '<tablespace name>'.1&p_database_id=NOT>.

tablespace_name FROM dba_indexes WHERE index_name = '<index name>' AND owner = '<owner>'. c. pct_increase. ORA-01688 Table Partition ========================= SELECT next_extent. tablespace_name FROM dba_tab_partitions WHERE partition_name='<partition name>' AND table_owner = '<owner>'. Add a Datafile -------------ALTER TABLESPACE <tablespace name> ADD DATAFILE '<full path and file name>' SIZE <integer> <k|m>. For a temporary segment problem: ALTER TABLESPACE <tablespace name> DEFAULT STORAGE (initial <integer> next <integer> <k|m> pctincrease <integ . The extents must be adjacent to each other for this to work. B. Manually Coalesce Adjacent Free Extents --------------------------------------ALTER TABLESPACE <tablespace name> COALESCE. pct_increase. b. For non-temporary and partitioned segment problem: ALTER TABLE <table_name> MODIFY PARTITION <partition_name> STORAGE ( next <integer> <k|m> pctincrease <integer>). ORA-01654 Index Segment ======================= SELECT next_extent. pct_increase .ORA-01653 Table Segment ======================= SELECT next_extent. Lower "next_extent" and/or "pct_increase" size ---------------------------------------------For non-temporary and non-partitioned segment problem: ALTER <segment_type> <segment_name> STORAGE ( next <integer> <k|m> pctincrease <integer>). Possible Solutions There are several options for solving errors due to failure to extend: a. tablespace_name FROM dba_tables WHERE table_name = '<table name>' AND owner = '<owner>'.

151994. d.errors on 9i: =============================== Doc ID </help/usaeng/Search/search.showDocument?p_id=15284.showDocument?p_id=1012431.Oracle Server Release 9.0 Additional information or documentation on ORA-600 errors not listed here .1&p_database_id=NOT> Und erstanding and Resolving ORA-01547 <Note.showDocument?p_id=1069041.showDocument?p_id=1020182.Oracle Server Release 9.1] <ml2_documents.6&p_database_id =NOT> Overview of Database Fragmentation [NOTE:30910.44: Other ORA.1] <ml2_documents.6&p_database_id=NOT> H ow to Find Creator of a SORT or TEMPORARY SEGMENT or Users Performing Sorts for Oracle8 and 9 Search Words: ============= ORA-1650 ORA-1652 ORA-1653 ORA-1654 ORA-1688 ORA-01650 ORA-01652 ORA-01653 ORA-01654 ORA-01688 1650 1652 1653 1654 1688 19. the following documents are available from Oracle WorldWide Support .1> Overview Of ORA-01654 Unable To Extend Index %s.2.showDocument?p_id=188610.1] <ml2_documents.2.1&p_database_id=NOT> DB A_FREE_SPACE Does not Show Information about Temporary Tablespaces [NOTE:1069041. Resize the Datafile ------------------ALTER DATABASE DATAFILE '<full path and file name>' RESIZE <integer> <k|m>.6] <ml2_documents. (this is not a comprehensive list) [NOTE:1020182.0 Creation Date: 27-JUN-2002 Type: BULLETIN Last Revision Date: 24-MAY-2004 Status: PUBLISHED Top Internal Errors . e.showDocument?p_id=30910.1 Content Type: TEXT/X-HTML Subject: Top Internal Errors . Defragment the Tablespace ------------------------If you would like more information on fragmentation.1> Overview Of ORA-01653 Unable To Extend Table %s.er>).html>: Note:201342.6] <ml2_documents.146595.1&p_database_id=NOT > Recreating Database Objects Related Documents: ================== [NOTE:15284.%s By %s In Ta blespace %s: <Note.6] <ml2_documents.%s By %s In Ta blespace %s: [NOTE:188610.6&p_database_id =NOT> Script to Detect Tablespace Fragmentation [NOTE:1012431.

2.2. 9.1 </metalink/plsql/showdoc?db=Not&id=47456.1 References: <Note:47456. 9.2.1.2. 10G <Bug:2202310 </metalink/plsql/showdoc?db=Bug&id=2202310>> OERI:KCBGCUR_9 p ossible from SMON dropping a rollback segment in locally managed tablespace 9.0. 10G References: <Note:271084.0.0.0.1.2.5. 9.3.0.0.3.2.4.4 ORA-600 [ksmals] ORA-600 [4000] Possible bugs: Fixed in: <Bug:2959556 </metalink/plsql/showdoc?db=Bug&id=2959556>> STARTUP after an ORA-701 fails with OERI[4000] 9.1>> SLAWE:!PWQ] RAISED IN V92040 OR V92050 ON SUN 64BIT ORACLE ORA-600 [ksmals] Possible bugs: Fixed in: <Bug:2662683 </metalink/plsql/showdoc?db=Bug&id=2662683>> CORRUPTION WHEN RUNNING APPS PROGRAM THAT DOES HEAVY INSERTS References: <Note:247822.4.2.may be available from the ORA-600 Lookup tool : <Note:153788.1 </metalink/plsql/showdoc?db=Not&id=138836.1 <Bug:1804676 </metalink/plsql/showdoc?db=Bug&id=1804676>> OERI:KCBGCUR_9 p ossible from ONLINE REBUILD INDEX with concurrent DML 8.2) Support Status and Alerts ORA-600 [KSLAWE:!PWQ] Possible bugs: Fixed in: <Bug:3566420 </metalink/plsql/showdoc?db=Bug&id=3566420>> SS GOT OERI:KSLAWE:!PWQ AND INSTANCE CRASHES 9.0.1>> Oracle9i Release 2 (9.1>> trying to get dba of undo segment header block from usn" ORA-600 [4454] Possible bugs: Fixed in: <Bug:1402161 </metalink/plsql/showdoc?db=Bug&id=1402161>> 454 on long running job 8. 9.1>> BACKGROUND PROCE ALERT: ORA-600[K ORA-7445 & HEAP 9.4. 9.1.1 </metalink/plsql/showdoc?db=Not&id=189908.1 </metalink/plsql/showdoc?db=Not&id=271084.0.0.2.6.7.0.0. 9.2.0. 9.4.2.1>> <Note:189908.0.1 References: <Note:138836.2.0.4.1.1.7.1.1.3.1 </metalink/plsql /showdoc?db=Not&id=153788. 9.0. 10G .2. 10G <Bug:2392885 </metalink/plsql/showdoc?db=Bug&id=2392885>> Direct path load may fail with OERI:kcbgcur_9 / OERI:ktfduedel2 9.7.1 </metalink/plsql/showdoc?db=Not&id=247822.3.3.1 <Bug:2035267 </metalink/plsql/showdoc?db=Bug&id=2035267>> OERI:KCBGCUR_9 p ossible during TEMP space operations 9.1>> ORA-600 [4000] " OERI:4411/OERI:4 ORA-600 [4454] ORA-600 [kcbgcur_9] Possible bugs: Fixed in: <Bug:2722809 </metalink/plsql/showdoc?db=Bug&id=2722809>> OERI:kcbgcur_9 o n direct load into AUTO space managed segment 9.1.0. 1 <Bug:1785175 </metalink/plsql/showdoc?db=Bug&id=1785175>> OERI:kcbgcur_9 f rom CLOB TO CHAR or BLOB TO RAW conversion 9. 10G <Bug:1371820 </metalink/plsql/showdoc?db=Bug&id=1371820>> OERI:4506 / OERI :4000 possible against transported tablespace 8.

0.1 19.1>> ] <Note:197737.1>> _9] "Block class pinning violation" ORA-600 [qerrmOFBu1].1 </metalink/plsql/showdoc?db=Not&id=207319.1 </metalink/plsql/showdoc?db=Not&id=139037. **************** The ADJUST_SCN event is useful in some recovery situations where the current SCN needs to be incremented by a large value to ensure it is ahead of the highest SCN in the database.1>> Bu1] .1>> n / Internal Errors possible after Upgrading to 9.References: <Note:114058.1 Subject: EVENT: ADJUST_SCN .3.1 </metalink/plsql/showdoc?db=Not&id=114058.2.45: ADJUST SCN: ================== Note 1 Adjust SCN: -----------------Doc ID: Note:30681.2 to Oracle7 are Not Supported ORA-600 [kcbgcur SQL*PLUS CRASH I ORA-600 [qerrmOF ALERT: Connectio ORA-600 [ktsgsp5] or ORA-600 [kdddgb2] Possible bugs: Fixed in: <Bug:2384289 </metalink/plsql/showdoc?db=Bug&id=2384289>> ORA-600 [KDDDGB2 ] [435816] [2753588] & PROBABLE INDEX CORRUPTION 9.Quick Reference Type: REFERENCE Status: PUBLISHED Content Type: TEXT/PLAIN Creation Date: 20-OCT-1997 Last Revision Date: 04-AUG-2000 Language: USAENG ADJUST_SCN Event ~~~~~~~~~~~~~~~~ *** WARNING *** This event should only ever be used under the guidance of an experienced Oracle analyst.1>> ns from Oracle 9.0. this indicates some form of database corruption. If an SCN is ahead of the current database SCN."Error during remote row fetch operation <Note:207319. [1003] Possible bugs: Fixed in: <Bug:2308496 </metalink/plsql/showdoc?db=Bug&id=2308496>> N TTC LOGGING INTO ORACLE 7.1 </metalink/plsql/showdoc?db=Not&id=197737. This is typically required if either: ORA-600 [kdddgb2 ORA-600 [ktsgsp5 ALERT: Corruptio .2.1 </metalink/plsql/showdoc?db=Not&id=139180.1 </metalink/plsql/showdoc?db=Not&id=209363.1>> ] <Note:139180.2 References: <Note:139037. The database should be rebuilt after bumping the SCN.4 DATABASE References: <Note:209363.

Ie: The event steps the SCN to known levels. alter session set events '10015 trace name adjust_scn level 1'. otherwise you get ORA 600 [2251].ora or the instance will crash as soon as SMON or PMON try to do any clean up.See below.. [65535]. You cannot use the same level twice. **NOTE: You can check that the ADJUST_SCN event has fired as it should write a message to the alert log in the form "Debugging event used to advance scn to %s". ~~~~~~~~~~~~~~~~~~~~~~~~~~ If the database *IS* OPEN: ~~~~~~~~~~~~~~~~~~~~~~~~~~ You can increase the SCN thus: alter session set events 'IMMEDIATE trace name ADJUST_SCN level 1'. LEVEL: Level 1 is usually sufficient . Always use it with the "alter session" command. If you get an ORA 600:2256 shutdown. (NB: You can only use IMMEDIATE here on an OPEN database.a. Do *NOT* set this event in init. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If the database will NOT open: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Take a backup. use a higher level and reopen. ORA-1555 errors keep occuring after forcing the database open or ORA-604 / ORA-1555 errors occur during database open. [4294967295] ) alter database open. If you try to raise the SCN to a level LESS THAN or EQUAL to its current setting you will get <OERI:2256> . If a database has been forced open used _ALLOW_RESETLOGS_CORRUPTION (See <Parameter:Allow_Resetlogs_Corruption> ) The ADJUST_SCN event acts as described below. (Note: If startup reports ORA-704 & ORA-1555 errors together then the ADJUST_SCN event cannot be used to bump the SCN as the error is occuring during bootstrap.. An ORA-600 [2662] error is signalled against database blocks or b.it raises the SCN to 1 billion (1024*1024*1024) Level 2 raises it to 2 billion etc. You can use event 10015 to trigger an ADJUST_SCN on database open: startup mount. Repeated startup/shutdown attempts may help if the SCN mismatch is small) or c. If this message is NOT present in the alert log the event has probably not fired. . If the database is only mounted use the 10015 trigger to adjust SCN.

This will give you the level to use in the adjust_scn to get the correct wrap number. From 7. which we will refer to as type I and type II.5 Source: kcrf.3): Oracle is in the process of writing a block to a log file.2.3 this internal error can be logged for two separate reasons.3 onwards type II no longer exists. *NOT DOCUMENTED HERE* --------------------------------------------------------------------------Argument Description: Until version 7.2. c) Next.0. If the calculated block checksum is less than or equal to 1 (0 and 1 are reserved) ORA-600 [2662] is returned. The two types can be distinguished by the number of arguments: Type I has four or five arguments after the [2662]. Type II has one argument after the [2662]. This is a problem generating an offline immediate log marker (kcrfwg). 4/5 argument forms The SCN found on a block (dependant SCN) was ahead of the current SCN. Type I ~~~~~~ . add the following value to the level to get the desired base value as well : Add to Level Base ~~~~~~~~~~~~ ~~~~~~~~~~~~ 0 0 1 1073741824 2 2147483648 3 3221225472 Note 2: Adjust SCN -----------------Subject: OERR: 600 2662 Block SCN is ahead of Current SCN Creation Date: 21-OCT-1997 ORA-600 [2662] [a] [b] [c] [d] [e] Versions: 7.16 .h =========================================================================== Meaning: There are 3 forms of this error.8. See below for this 1 Argument (before 7.Calculating a Level from 600 errors: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To get a LEVEL for ADJUST_SCN: a) Determine the TARGET scn: ora-600 [2662] See <OERI:2662> Use TARGET >= blocks SCN ora-600 [2256] See <OERI:2256> Use TARGET >= Current SCN b) Multiply the TARGET wrap number by 4.2.0.

"buffer tsn" in Oracle8 dumps) this will bring you to a blockdump which usually represents the 'real' source of OERI:2662 WARNING: There may be more than one buffer pinned to the process so ensure you check out all pinned buffers. Getting started: ~~~~~~~~~~~~~~~~ (1) is the error raised during normal database operations (i. block number == 0 in change vector). From kcrf. then the dba is for block 0 of the relevant datafile. If it comes from undo$ because the undo segment is not available then the undo segment number is saved.search for: 'buffer' ("buffer dba" in Oracle7 dumps.investigate trace file this will be a user trace file normally but could be an smon trace too . For diagnosis we can split up startup-issues and no-startup-issues. when the database is up) or during startup of the database? (2) what is the SCN difference [d]-[b] ( subtract argument 'b' from arg 'd')? (3) is there a fifth argument [e] ? If so convert the dba to file# block# Is it a data dictionary object? (file#=1) If so find out object name with the help of reference dictionary from second database (4) What is the current SQL statement? (see trace) Which table is refered to? Does the table match the object you found in step before? Be careful at this point: there may be no relationship between DBA in [e] and real source of problem (blockdump). there are different situations and coherences where ORA-600 [2662] type 'I' can be raised. d. b. c. Usually the startup-issues are more critical. which looks like a block from file 0. checksum -> log block checksum . If the SCN is for a media recovery redo (i.e. .h: If the SCN comes from the recent or current SCN then a dba of zero is saved.a. Type II ~~~~~~~ a. Current SCN WRAP Current SCN BASE dependant SCN WRAP dependant SCN BASE Where present this is the DBA where the dependant SCN came from. If it comes from a TX lock then the dba is really usn<<16+slot. e. Deeper analysis: ~~~~~~~~~~~~~~~~ .zero if none (thread # in old format) --------------------------------------------------------------------------Diagnosis: ~~~~~~~~~~ In addition to different basic types from above.e. If it is from another database for distribute xact then dba is DBAINF().

6] [NOTE:74903. Articles: ~~~~~~~~~ Solutions: [NOTE:30681.restoring a control file and not doing a RECOVER DATABASE USING BACKUP CONTROLFILE . like a faulty controller.** You can bump the SCN on open using <Event:ADJUST_SCN> See [NOTE:30681.If Parallel Server check both nodes are using the same lock manager instance & point at the same control files.doing an open resetlogs with _ALLOW_RESETLOGS_CORRUPTION enabled .1] [NOTE:41399.? -> what kind of blockdump is it? (a) rollbacksegment header (b) datablock (c) other SEE BELOW for EXAMPLES which demonstrate the sort of output you may see in trace files and the things to check.1] Be aware that you should really rebuild the database if you use this option. .if the SCNs in the error are very close: Attempting a startup several times will bump up the dscn every time we open the database even if open fails.9] Known Bugs: CHECK INIT. . Check list and possible causes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .a bug Solutions: .ORA SETTING _DISABLE_LOGGING How to Force the Database Open (_ALLOW_RESETLOGS_CORRUPTION) Forcing the database open with `_ALLOW_RESETLOGS_CORRUPTION` OERI:2662 DURING CREATE SNAPSHOT AT MASTER SITE .problems with the DLM in a parallel server environment .-> does the blockdump match the dba from e.having _DISABLE_LOGGING set during crash recovery .shut down any other instances to be sure) Possible causes: .If not Parallel Server check that 2 instances haven't mounted the same database (Is there a second PMON process around ?? .restoring parts of the database from backup and not doing the appropriate recovery . resulting in a failed write to the control file or the redo logs .Once this has occurred you would normally want to rebuild the database via exp/rebuild/imp as there is no guarantee that some other blocks are not ahead of time.a hardware problem. . The database will open when dscn=scn.6] alter system checkpoint Possible Causes: [NOTE:1021243.1] Details of the ADJUST_SCN Event [NOTE:1070079.1] [NOTE:851959.

[71183]..71183 = 12 -> convert [b] to hex: 71195 = 0x1161B so this value can be found in blockdump: *** TRN TBL:: index state cflags wrap# uel scn dba -----------------------------------------------------------------. [0]. Argumente: [2662].4..3. [] -> [e] > 0 and represents dba from block which is in trace -> [d]-[b] = 71195 . [71195].1.3 Bug:195115 Miscalculation of SCN on startup for distributed TX ? 7.7 Bug:297197 Port specific Solaris OPS problem 7.1. ~~~~~~~~~~ CASE (a) ~~~~~~~~~~ blockdump should look like this: *** buffer dba: 0x05000002 inc: 0x00000001 seq: 0x0001a9c6 ver: 1 type: 1=KTU UNDO HEADER Extent Control Header ----------------------------------------------------------------Extent Control:: inc#: 716918 tsn: 4 object#: 0 *** -> interpret: dba: 0x05000002 -> 83886082 (0x05000002) = 5.1.2 XXX tsn: 4 -> this is rollback segment 4 tsn: 4 -> this rollback segment is in tablespace 4 ORA-00600: Interner Fehlercode. 0x4e 9 0x00 0x00d6 0xffff 0x0000.3 Bug:336196 Port specific IBM SP AIX problem -> dlm issue 7. [0].0001161b 0x00000000 .5 Bug:851959 OERI:2662 possible from distributed OPS select ----------------------------------------------------------------------------------------------------------------------------------------------------Examples: ~~~~~~~~ Below are some examples of this type of error and the information you will see in the trace files. Bug No.14 BUG:153638 7. [83886082].5 BUG:229873 7.0. Description ---------+------------+---------------------------------------------------7. *** -> possible cause .. [].~~~~~~~~~~~ Fixed In.2.6..

block#=:4..0005fed4 data_block_dump =============== .0138. [0].303 0x12f) *** SVRMGR> SELECT SEGMENT_NAME.00a. []. SEGMENT_TYPE FROM DBA_EXTENTS 2> WHERE FILE_ID = 1 AND 303 BETWEEN BLOCK_ID AND 3> BLOCK_ID + BLOCKS .user#=:6.file#=:3.0005fed7 0x0000.xactsqn=:8.status$=:5. [392916].5fed6 itc: 2 flg: O typ: 1 . arguments: [2662].0000037b 0x0100261d.0000036c 0x0100261c.10 ==> 16777519 (0x0100012f) = (0x1 1. undosqn=:7.so in this case the CURRENT SCN is LOWER than the SCN on this transaction ie: The current SCN looks like it has decreased !! This could happen if the database is opened with the _allow_resetlogs_corruption parameter -> If some recovery steps have just been performed review these steps as the mismatch may be due to open resetlogs with _allow_resetlogs_corruption enabled or similar.DATA fsl: 0 fnx: 0x0 Itl 0x01 0x02 Xid Uba Flag Lck Scn/Fsc 0x0000. *** interpret: dba: 0x0100012f -> 8. [0]. [0].scnbas=:9.1.0138. SEGMENT_NAME SEGMENT_TYPE ---------------------------------------------------------. See <Parameter:Allow_Resetlogs_corruption> for information on this parameter. [] *** . *** -> current sql-statement (trace): *** update undo$ set name=:2.inst#=:11 where us#=:1 ksedmp: internal or fatal error ORA-00600: internal error code.00b.----------------UNDO$ TABLE 1 row selected.01 --U1 fsc 0x0000.. [392919].04 --U1 fsc 0x0000.scnwrp=:10. -----------------------------------------------------------------~~~~~~~~~~ CASE (b) ~~~~~~~~~~ blockdump looks like this: *** buffer dba: 0x0100012f inc: 0x00000815 seq: 0x00000d48 ver: 1 type: 6=trans data Block header dump: dba: 0x0100012f Object id on Block? Y seg/obj: 0xe csc: 0x00.

to hex: = 0x5FED7 so this value can be found in blockdump -> see ITL slot 0x01! ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Some more internals: ~~~~~~~~~~~~~~~~~~~~ I will try to give another example in oder to answer question if current SCN is decreased or dependant SCN increase. Statement processed. SCN# ---------392942 1 row selected. SQL> -. check database SCN before! Prerequisits: _allow_resetlogs_corruption = true in init<SID>. hypothesis: current SCN decreased Evidence: reproduced ORA-600 [2662] by aborting tx and using _allow_resetlog_corruption while open resetlogs. Statement processed. SVRMGR> select * from tx. SCN# ---------392942 392943 2 rows selected. SVRMGR> insert into tx values( userenv('COMMITSCN') ). 1 row processed.ora shutdown/startup db *** BEGIN TESTCASE SVRMGR> drop table tx.-> -> -> -> e.392916 = 3 dba from blockdump matches the object from current sql statement convert b. SQL> update emp set sal=sal+1. 13 rows processed. ************ another session ************** SQL> connect scott/tiger Connected. SVRMGR> create table tx (scn# number).no commit here ******************************************* SVRMGR> insert into tx values( userenv('COMMITSCN') ). . = 0 info not available d-b = 392919 . SVRMGR> select * from tx. 1 row processed.

this breaks tx SVRMGR> startup mount pfile=e:\jv734\initj734. SVRMGR> recover database until cancel. SVRMGR> create table tx (scn# number). [0]. SVRMGR> insert into tx values( userenv('COMMITSCN') ).1 Content Type: TEXT/X-HTML Subject: ORA-600 [2662] "Block SCN is ahead of Current SCN" Creation .ora ORACLE instance started.arc ORA-00280: Change 392925 for thread 1 is in sequence #2 Specify log: {<RET>=suggested | filename | AUTO | CANCEL} cancel Media recovery cancelled. 1 row processed. that current SCN has decreased after solving the problem with: shutdown abort/startup -> works SVRMGR> drop table tx.so current SCN will be 392943 SVRMGR> shutdown abort ORACLE instance shut down. arguments: [2662]. [0]. [392928]. []. ORA-00279: Change 392925 generated at 10/26/99 17:13:03 needed for thread 1 ORA-00289: Suggestion : e:\jv734\arch\arch_2. Statement processed. SVRMGR> select * from tx. SVRMGR> alter database open resetlogs. Total System Global Area 11018952 bytes Fixed Size 35760 bytes Variable Size 7698200 bytes Database Buffers 3276800 bytes Redo Buffers 8192 bytes Database mounted. Statement processed.html>: Note:28929.-. so we have exactly reached the current SCN from before 'shutdown abort' So current SCN was bumpt up from 392928 to 392942. [0]. alter database open resetlogs * ORA-00600: internal error code. SCN# ---------392943 1 row selected. [] *** END TESTCASE because we know current SCN before (392943) we see. -. [392931]. Note 3: Adjust SCN -----------------Doc ID </help/usaeng/Search/search.

The information here is only applicable to the versions listed and is provided only for guidance. If not using Parallel Server.0 to 10.1 </met alink/plsql/showdoc?db=NOT&id=146580.1 DESCRIPTION: A data block SCN is ahead of the current SCN. Thanks. the contents are not necessarily accurate and care should be taken when dealing with customers who have encountered this error. The ORA-600 [2662] occurs when an SCN is compared to the dependent SCN stored in a UGA variable. ERROR: ORA-600 [2662] [a] [b] [c] [d] [e] VERSIONS: versions 6. If the SCN is less than the dependent SCN then we signal the ORA-600 [2662] internal error. . what it means and possible actions. check that 2 instances have not mounted the same database. It can be raised on startup or duing database operation. As such. FUNCTIONALITY: File and IO buffer management for redo logs IMPACT: INSTANCE FAILURE POSSIBLE PHYSICAL CORRUPTION SUGGESTIONS: There are different situations where ORA-600 [2662] can be raised.Date: 21-OCT-1997 Type: REFERENCE Last Revision Date: Status: PUBLISHED <Internal_Only> 15-OCT-2004 This note contains information that was not reviewed by DDR.1> PURPOSE: This article discusses the internal error "ORA-600 [2662]". PAA Internals Group </Internal_Only> Note: For additional ORA-600 related information please read Note 146580. ARGUMENTS: Arg [a] Arg [b] Arg [c] Arg [d] Arg [e] Current SCN WRAP Current SCN BASE dependent SCN WRAP dependent SCN BASE Where present this is the DBA where the dependent SCN came from.

8> Digital Unix ONLY: OERI:2662 could occur under heavy load Fixed: 8. If the SCNs in the error are very close.8 Type II: .3: Type I: 4/5 argument forms The SCN found on a block (dependent SCN) is ahead of the current SCN.8 > Minimise risk of a false OERI[2662] Fixed: 9. If the Known Issues section below does not help in terms of identifying a solution.5. 10.3. *NOT DOCUMENTED HERE* See Note 2054025.NOT FOR PUBLICATION OR DISTRIBUTION TO CUSTOMERS ======================================================================== There were 2 forms of this error until 7.4.8> OERI:2662 possible from distributed OPS select Fixed: 7.5. 8. please submit the trace files and alert.4.8 </metalink/plsql/showdoc?db=NOT&id=2899477.2.2.2 Bug# 2764106 > False OERI[2662] possible on SELECT which can crash the instance Fixed: 9.0.0 <Internal_Only> INTERNAL ONLY SECTION .1 Bug# 851959 See Note 851959.2. This is a problem generating an offline immediate log marker (kcrfwg).0.2.0.0. Known Issues: Bug# 2899477 See Note 2899477.log to Oracle Support Services for further analysis. See below for this 1 Argument (before 7. then try to shutdown and startup the instance several times.5.0.8 See Note 2764106. 9.2 Bug# 2054025 > OERI:2662 possible on new TEMPORARY index block Fixed: 9. Check the SCN difference [argument d]-[argument b].2.1.8 </metalink/plsql/showdoc?db=NOT&id=2764106.0. Keep track of the number of times you attempted a startup.0.3 only): Oracle is in the process of writing a block to a log file.Check for SMON traces and have the alert.0. If the calculated block checksum is less than or equal to 1 (0 and 1 are reserved) ORA-600 [2662] is returned.3. the SCN increment during startup may permit the database to open.1. In some situations. 10.2.8 </metalink/plsql/showdoc?db=NOT&id=2054025.8 </metalink/plsql/showdoc?db=NOT&id=851959.5 Bug# 647927 P See Note 647927.8 </metalink/plsql/showdoc?db=NOT&id=647927.log and trace files ready to send to support.1.

Type II ~~~~~~~ a. there are different situations where ORA-600 [2662] type I can be raised. -> does the blockdump match the dba from e. when the database is up) or during startup of the database? (2) what is the SCN difference [d]-[b] ( subtract argument 'b' from arg 'd')? (3) is there a fifth argument [e] ? If so convert the dba to file# block# Is it a data dictionary object? (file#=1) If so find out object name with the help of reference dictionary from second database (4) What is the current SQL statement? (see trace) Which table is refered to? Does the table match the object you found in previous step? Be careful at this point: there may be no relationship between DBA in [e] and the real source of problem (blockdump). then the dba is for block 0 of the relevant datafile. Deeper analysis: ~~~~~~~~~~~~~~~~ (1) investigate trace file: this will be a user trace file normally but could be an smon trace too (2) search for: 'buffer' ("buffer dba" in Oracle7 dumps. checksum -> log block checksum . d.? . If it comes from undo$ because the undo segment is not available then the undo segment number is saved.e. Getting started: ~~~~~~~~~~~~~~~~ (1) is the error raised during normal database operations (i. block number == 0 in change vector).h: If the SCN comes from the recent or current SCN then a dba of zero is saved. If it is from another database for a distributed transaction then dba is DBAINF(). Current SCN WRAP Current SCN BASE dependent SCN WRAP dependent SCN BASE Where present this is the DBA where the dependent SCN came from.e. e.Type I ~~~~~~ a. If it comes from a TX lock then the dba is really usn<<16+slot. "buffer tsn" in Oracle8/Oracle9 dumps) this will bring you to a blockdump which usually represents the 'real' source of OERI:2662 WARNING: There may be more than one buffer pinned to the process so ensure you check out all pinned buffers. If the SCN is for a media recovery redo (i. From kcrf. c. b.zero if none (thread # in old format) --------------------------------------------------------------------------Diagnosis: ~~~~~~~~~~ In addition to different basic types from above. which looks like a block from file 0.

1 </metalink/plsql/showdoc?db=NOT&id=41399.1 </metalink/plsql/showdoc?db=NOT&id=30681.1 </metalink/plsql/showdoc?db=NOT &id=30681.1>).9 </metalink/plsql/showdoc?db=NOT&id=851959. (2)You can bump the SCN either on open or while the database is open using <Event:ADJUST_SCN> (see Note 30681.6 </metalink/plsql/showdoc?db=NOT&id=1021243.ORA S ETTING _DISABLE_LOGGING Note 41399. Articles: ~~~~~~~~~ Solutions: Note 30681. The database will open when dscn=scn.-> what (a) (b) (c) kind of blockdump is it? rollback segment header datablock other Check list and possible causes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If Parallel Server check both nodes are using the same lock manager instance & point at the same control files.6> Alter System Che ckpoint Possible Causes: Note 1021243. resulting in a failed write to the control file or the redo logs (3) restoring parts of the database from backup and not doing the appropriate recovery (4) restoring a control file and not doing a RECOVER DATABASE USING BACKUP CONTROLFILE (5) having _DISABLE_LOGGING set during crash recovery (6) problems with the DLM in a parallel server environment (7) a bug Solutions: (1) if the SCNs in the error are very close. attempting a startup several times will bump up the dscn every time we open the database even if open fails. like a faulty controller. Once this has occurred you would normally want to rebuild the database via exp/rebuild/imp as there is no guarantee that some other blocks are not ahead of time. Possible causes: (1) doing an open resetlogs with _ALLOW_RESETLOGS_CORRUPTION enabled (2) a hardware problem.9> OERI:2662 DURING CREATE SNAPSHOT AT MASTER SITE Known Bugs: ~~~~~~~~~~~ .6> CHECK INIT.1> Details of the ADJ UST_SCN Event Note 1070079.1> Forcing the databa se open with `_ALLOW_RESETLOGS_CORRUPTION` Note 851959.6 </metalink/plsql/showdoc?db=NOT&id=1070079. Be aware that you should rebuild the database if you use this option.

3. You should only use it if all other recovery options have been exhausted. but some datafiles would have blocks in the future. Description ---------+------------+---------------------------------------------------7. the read only open allows you to assess better which recovery option you w . and yo u cannot open the database read/write. It is new for 8i. a database forced open in this way would be in a crazy state because the current SCN would reflect the extent of the incomplete recovery. Once again. Of course.3 Bug 195115 </metalink/plsql/showdoc?db=Bug&id=195115> Miscalculation of SCN on startup for distributed TX ? 7. then you might need this parameter. the intent is to export.1. import and then assess the damage. Once in t his position.Fixed In.4 Bug 2177050 </metalink/plsql/showdoc?db=Bug&id=2177050> OERI:729 spac e leak possible (with tags "define var info"/"oactoid info") can corrupt UGA and cause OERI:2662 --------------------------------------------------------------------------Ensure that this note comes out on top in Metalink when searched ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 2662 2662 2662 2662 2662 2662 2662 2662 2662 2662 2662 2662 2662 2662 2662 2662 2662 2662 </Internal_Only 19. Not pleasant. the only thing to do would be to do a full database export.1.5 Bug 851959 </metalink/plsql/showdoc?db=Bug&id=851959> OERI:2662 poss ible from distributed OPS select Not fixed Bug 2216823 </metalink/plsql/showdoc?db=Bug&id=2216823> OERI:2662 rep orted when reusing tempfile with restored DB 8.4. The new _allow_read_only_corruption provides a much cleaner solution to the same problem.1. rebuild and import . Previously there was only _allow_resetlogs_corruption which allowed you to do a RESETLOGS open of the database in such situations. rebuild the database .1. Also.5 Bug 229873 </metalink/plsql/showdoc?db=Bug&id=229873> 7.47: _allow_read_only_corruption ================================== If you have a media failure and for some reason (such as having lost an archived log file) you cannot perform a complete recovery on some datafiles.7 Bug 297197 </metalink/plsql/showdoc?db=Bug&id=297197> Port specific Solaris OPS problem 7.2.7. Bug No.3 Bug 336196 </metalink/plsql/showdoc?db=Bug&id=336196> Port specific IBM SP AIX problem -> dlm issue 7. but sometimes better than going back to an older usable backup and performing incomplete recov ery to a consistent state.6. which would lead to lots of nasty ORA-00600 err ors (although there is an ADJUST_SCN event that could be used for relief).

startup the database and try to open it 4.ora _allow_resetlogs_corruption = true 3. it worked only with 4096.1 I had. if the database can't be opened. I was succeful too in opening a db after loosing controlfile and online redo log s . #or if previous doesn't work increase the level to 2 alter session set events '10015 trace name adjust_scn level 4096'.48: _allow_resetlogs_corruption ================================== log problem: Try this approach to solve problems with redolog files: 1. however Oracle support made it pretty clear that the only usage for the database afterwards is to do a full export and recreate it from that. 2. then mount it and try to issue: alter session set events '10015 trace name adjust_scn level 1'. Using event 10015 you are forcing a SCN jump that will eventually syncronize the SCN values from your datafiles and controlfiles. The level controls how much the SCN will be incremented with. With this procedure I succesfully recovered from loosing my redolog files. So you have to dump those headers and compare the SCNs inside before and after t he event 10015. alter database open You can try with recover database until cancel and then open iz with resetlogs o ption.ant to take without committing you to either. redolog files and controlfiles. however it may be that even a level of 1 to 3 would make the SCN jump 1 million.49: ORA-01503: CREATE CONTROLFILE failed ============================================ ORA-01503: CREATE CONTROLFILE failed ORA-01161: database name PEGACC in file header does not match given name of PEGSAV ORA-01110: data file 1: '/u02/oradata/pegsav/system01.set next initialization parameter in init. In the case of a 9 . It would be better if Oracle support walk s you through this procedure.dbf' Note 1: ======= . create a backup of all datafiles. 19. 19. 5.0.

References: Note 1084048. You should then be able to create the controlfile.Problem: You are attempting to recreate a controlfile with a 'createcontrolfile' script and the script fails with the following error when it tries to access one of the datafiles: ORA-1161. Oracle uses REUSE as the d efault option when you do the alter database backup controlfile to trace. The error comes in the create control file statement. Note 3: ======= We ran into a similar problem when trying to create a new instance with datafile s from another database. You must change the properties of the file by right-clicking on the file in Windows Explorer and then deselecting the check box marked "Hidden" under the General tab. if the db_name in the init. ORA-01161: on Create Controlfile. Oracle does not see them when it tries to recreate the controlfile. remove any old controlfiles present in the specified directory. . Solution: Check the file's properties in Windows Explorer and verify that it is not a "Hidden" file. Hope this helps. Options. View. database name <name> in file header does not match given name You are certain that the file is good and that it belongs to that database. If any or all datafiles are marked as 'hidden' files. If you delete REUSE then the new dat abase name you will change all the header information in all the database datafiles and you will be able to start up the instance. Also.6 ORA-01503. Note 2: ======= This message may result. you are able to see 'hidden' files that other users and/or applications cannot. Explanation: If you have set the "Show All Files' option under Explorer. Thanks.ora does not match with the set "db_name" given while creating the controlfile.

ora" can be found in the following locations (listed by search or der): $TNS_ADMIN/sqlnet.ora Depending upon your operating system. These groups are compiled into the 'oracle' exe cutable and so are the same for all databases running from a given ORACLE_HOME directory.[cs] The line '#define SS_DBA_GRP "group"' should name the chosen OSDBA group. The actual groups bein g used for OSDBA and OSOPER can be checked thus: cd $ORACLE_HOME/rdbms/lib cat config. ORA-12705..ora $ORACLE_HOME/network/admin/sqlnet. The line '#define SS_OPER_GRP "group"' should name the chosen OSOPER group. ORA-06401.ora $HOME/sqlnet..ora .ORA Checks: --------------------1.50. The "sqlnet.ORA-09925." instead of "CREATE CONTROL FILE REUSE DATABASE. ORA-03113. ORA-01034. it may also be located in: /var/opt/oracle/sqlnet. 19.1 Content Type: TEXT/PLAIN Subject: UNIX: Checklist for Resolving Connect AS SYSDBA Issues Creation Date: 20-APR-1999 Type: TROUBLESHOOTING Last Revision Date: 31-DEC-2004 Status: PUBLISHED Introduction: ~~~~~~~~~~~~~ This bulletin lists the documented causes of getting ---> prompted for a password when trying to CONNECT as SYSDBA ---> errors such as ORA-01031." I think it would be better. Note 2: ------Bookmark Fixed font Go to End Doc ID: Note:69642. ORA-09817. ORA-12547 a) SQLNET.Note 4: ======= Try this command "CREATE CONTROLFILE SET DATABASE... ORA-01031 ================ Note 1: ------The 'OSDBA' and 'OSOPER' groups are chosen at installation time and usually both default to the group 'dba'.

move the file so that it will not be found by this search: % mv sqlnet. Next.sh" or edit the permissions on the "sqlnet. then verify the contents of th e file: a) SQLNET. As root. search for other "sqlnet.sh " runs during installation. (This setting is added to the "sqlnet. The one being used will be the first one found according to the search order listed above.ora" files being used. "tnsnames . If it is. locate the "sqlnet.ora" resolves the issue. If it still fails. or one with security options set. Set the permissions correctly in the "TNS_ADMIN" files.NONE) b) SQLNET.ora" file. "tnsnames. comment this line out or try setting it to: SQLNET. will cause a 'connect internal' request to prompt for a password.or a".ora".ora". and "listener.ora sqlnet.ora A corrupted "sqlnet.ora" files reside.ora If moving the "sqlnet.ora" files by hand as follows: . The environment variable TNS_ADMIN defines the directory where the "sqlnet. If this does not resolve the issue.CRYPTO_SEED This should not be set in a "sqlnet. which are set when "root./etc/sqlnet.ora_save sqlnet.ora" files back where they were before you made the change: % mv sqlnet.ora" that is being us ed.ora" if it is built by one of Oracle's network cofiguration products shipped wi th client products) c) AUTOMATIC_IPC If this is set to "ON" it can force a "TWO_TASK" connection. and "listener.ora_save Try to connect internal again.ora".ora" file on UNIX.AUTHENTICATION_SERVICES = (BEQ. comment the line out. Try setting this to "OFF": AUTOMATIC_IPC = OFF 2.AUTHENTICATION_SERVICES If you are not using database links. use the move command to put all the "sqlnet.ora" files according to the searc h order listed above and repeat using the move command until you are sure there are no other "sqlnet. To determine if this is the problem. run "root. These files must contain the correct permissions.

ora -rw-r--r--rw-r--r--rw-r--r-1 oracle dba 1 oracle dba 1 oracle dba 1628 Jul 12 15:25 listener.3.3.3 If your "ORACLE_HOME" contains a link or the instance was started with the "ORACLE_HOME" set to another value.3.ora tnsnames.3" and start the instance.ora $ ls -l sqlnet.ora listener.3.$ cd $TNS_ADMIN $ chmod 644 sqlnet. but .3 $ export ORACLE_HOME csh: ---% setenv ORACLE_HOME <path_to_ORACLE_HOME> Example: % setenv ORACLE_HOME /u01/app/oracle/product/7.ora b) Software and Operating System Issues: ---------------------------------------1. Otherwise you may be able to connect internal but you will receive an ORA-01034 "Oracle not available" error.ora 82274 Jul 12 15:23 tnsnames.3 % svrmgrl SVRMGR> connect internal If this prompts for a password then most likely the combination of your "ORACLE_HOME" and "ORACLE_SID" hash to the same shared memory address of another running instance. Be sure $ORACLE_HOME is set to the correct directory and does not have any typing mistakes: % cd $ORACLE_HOME % pwd If this returns a location other than your "ORACLE_HOME" or is invalid. An example of this might be: You have "ORACLE_HOME" set to "/u01/app/oracle/product/7.ora listener.ora tnsnames.ora 586 Jun 1 12:07 sqlnet. Oracle recommends that links not be used as part of the "ORACLE_HOME".3. In most cases using a link as part of your "ORACLE_HOME" is fine as long as you are consistent.3 /u01/app/oracle/7. the instance may try to start using the memory location that another instance is using.3. you will need to reset the value of this environment variable: sh or ksh: ---------$ ORACLE_HOME=<path_to_ORACLE_HOME> $ export ORACLE_HOME Example: $ ORACLE_HOME=/u01/app/oracle/product/7.3 % setenv ORACLE_HOME /u01/app/oracle/7. Then you do something like: % ln -s /u01/app/oracle/product/7.

their use is supported. 2.or echo $TWO_TASK csh: ---setenv |grep -i two If any lines are returned such as: TWO_TASK= . If you are running Oracle release 8. do the following: sh. and upon starting "svrmgrl" you receive an ORA-06401 "NETCMN: invalid driver designator" error.1.6 for more information. (including capitalization). .or TWO_TASK=PROD You will need to unset the environment variable "TWO_TASK": sh or ksh: ---------unset TWO_TASK csh: ---unsetenv TWO_TASK Example : $ TWO_TASK=V817 $ export TWO_TASK $ sqlplus /nolog SQL*Plus: Release 8. ksh or on HP/UX only csh: ----------------------------env |grep -i two . 3.4.0.0.Production on Fri Dec 31 10:12:25 2004 (c) Copyright 2000 Oracle Corporation. Ensure $TWO_TASK is not set. To check if "TWO_TASK" is set. Check that $ORACLE_SID is set to the correct SID.7. and does not have any typos: % echo $ORACLE_SID Refer to Note:1048876. SQL> conn / as sysdba ERROR: ORA-01031: insufficient privileges $ unset TWO_TASK $ sqlplus /nolog SQL> conn / as sysdba Connected.0 . All rights reserved. you should also unset two_task.

which is typically "dba".1] section 3 for more details.c". To verify the operating system groups the user belongs to. "USERNAME".ascii "dba\0" If these do not match. it will issue the ORA-03113 error.The login connect string may be getting its value from the TWO_TASK environment variable if this is set for the user. To do this. When Oracle cannot do this (either because of permissions or because of the "alert. or 6751. This error may occur while creating a database. "osdba" group checks: a. When you start up "nomount" an Oracle pseudo process will try to write the "alert. Refer to entry [NOTE:50507.log" file in "udump". or modify the "config" file and relink the "oracle" binary. do the following as the "oracle" software owner: % chmod 6751 oracle If you receive an ORA-03113 "end-of-file on communication" error followed by a prompt for a password. Be sure you are not logged in as the "root" user and that the environment variables "USER".s" or "config. the alert. do the followin g: % id uid=1030(oracle) gid=1030(dba) The "gid" here is "dba" so the "config. Typically this is set to "dba". and "LOGNAME" are not set to "root".log must not be greater than 2 Gigabytes in size. group dba. then you may also need to check the ownership and permissions on the dump directories. 4.s" or "$ORACLE_HOME/rdbms/lib/config.log" being greater than 2 Gigabytes in size). you either need to add the operating system user to the group as it is seen in the "config" file. These directories must belong to Oracle. The "root" user is a special case and cannot connect to Oracle as the "internal" user unless the effective group is changed to the "osdba" group . b. Permissions should be: 755 (drwxr-xr-x) Also. either modify the "/etc/password" file (not recommended) or . 5. (or the appropriates name s for your installation). Make sure the operating system user issuing the CONNECT INTERNAL belongs to the "osdba" group as defined in the "$ORACLE_HOME/rdbms/lib/config. If the permissions are incorrect. Check the permissions on the Oracle executable: % cd $ORACLE_HOME/bin % ls -l oracle ('ls -n oracle' should work as well) The permissions should be rwsr-s--x.c" may contain an entry such as: /* 0x0008 15 */ .

6. Keep this in mind if you plan on executing scripts as the "root" user. 7. * * * * Please call Oracle Support Services for assistance * * if you have any doubts about removing shared memory * * segments. c. Verify that the "osdba" group is only listed once in the "/etc/group" file : % grep dba /etc/group dba::1010: dba::1100: If more than one line starting with the "osdba" group is returned. Check that the oracle user uid and gid are matching with /etc/passwd and /etc/group : $ id uid=500(oracle) gid=235(dba) $ grep oracle /etc/passwd oracle:x:500:235:oracle:/home/oracle:/bin/bash ^^^ $ grep dba /etc/group dba:x:253:oracle ^^^ The mismatch also causes an ORA-1031 error. d. and this may * * cause database corruption.use the "newgrp" command: # newgrp dba "newgrp" always opens a new shell. Consult your operating system documentation or your operating system vendor for instruction on modifying mount options. * * * ****************************************************************** If an instance crashed or was killed off using "kill" there may be shared . as seen in this example. you will need to unmount the filesystem and mount it without the "nosuid" option. Verify that the file system is not mounted no set uid: % mount /u07 on /dev/md/dsk/d7 nosuid/read/write If the filesytem is mounted "nosuid". you need to remove the ones that are not correct. It is not possible to have more than one group use a group name. so you cannot issue "newgrp" from within a shell script. Please read the following warning before you attempt to use the information in this step: ****************************************************************** * * * WARNING: If you remove segments that belong to a running * * instance you will crash the instance.

Shared Seg Id Address 2016 80000000 Total: # of segments ance. do the following: Check your "pfile".3. you can connect into each instance that is up and identify the shared memory owned by that instance: % svrmgrl SVRMGR> connect internal SVRMGR> oradebug ipc In Oracle8: ----------Area #0 `Fixed Size'. c. size = 4308992 Note the "Shmid" for Oracle8 and "Seg Id" for Oracle7 for each running inst . By process of elimination find the segments that do not belong to an instance and remove them. If your Oracle software is release 7.ora. If you are prompted for a password and then receive error ORA-09925 "unable to create audit trail file" or error ORA-09817 "write to audit file failed". where "<your_sid>" is the value of memory -------------Size 4308992 = 1.memory segments hanging around that belong to the down instance.root 0x0eedcdb8 --rw-r----. b. Shut down all the instances on the machine and remove whatever shared memory still exists that is owned by the software owner.oracle In this case the "ID" of "1601" is owned by "oracle" and if there are no other instances running in most cases this can safely be removed: % ipcrm -m 1601 If your SGA is split into multiple segments you will have to remove all segments associated with the instance. If there are other instances running. you can do the following: a.3 or newer. 8. Reboot the machine. and you are not sure which memory segments belong to the failed instance. Minimum Subarea size 00000000 Subarea Shmid Size Stable Addr 0 7205 000000000000c000 80000000 In Oracle7: -----------------------. containing Subareas 0-0 Total size 000000000000b8c0. It is typically in the "$ORACLE_HOME/dbs" directory and will be named "init<your_sid>. If there are no other instances running on the machine you can issue: % ipcs -b T ID Shared Memory: m 0 m 1601 KEY MODE OWNER GROUP root dba SEGSZ 68 4530176 0x50000ffe --rw-r--r-. along with "SVR4 Error: 28: No space left on device".

You are looking for the parameter "audit_file_dest". For C-shell. Ensure that you have enough space to create the audit file.3.ora" file has the "ifile" parameter set. verify you can write to the directory: % touch afile If it could not create the called "afile". you are running the "startup. you need to verify the settings for "ORA_NLS".4 export ORACLE_HOME 12.4 is a separate "oracle_home". otherwise change to the "$ORACLE_HOME/rdbms/audit" directory.4 For Bourne or Korn shell."ORACLE_SID" in your environment.0.1: oracle_home/bin/svrmgrl fatal relocation error symbol not found kgffiop RDBMS v7. If the "init<your_sid>. "ORA_NLS32". Verify environment variable settings. You will need to consult your Installation and Configuration Guide for the proper settings for these environment variables. Ensure that the disk the instance resides on has not reached 100% capacity. as this is the default location for audit files. create it.so. you need to change the permission s on your audit directory: % chmod 751 9. and you are attempting to have it coexist.0.sql" script and receive the following error: ld:so.2 is installed. You need to ensure that "ORACLE_HOME" and "LD_LIBRARY_PATH" are set correctl y. If in SVRMGRL (Server Manager line mode). If connect internal prompts you for a password and then you receive an ORA-12705 "invalid or unknown NLS parameter value specified" error. If you have installed Oracle software and are trying to connect with Server Manager to create or start the database. please refer to Note:1064635. change to that directory. "ORA_NLS33" or "NLS_LANG". type: $ $ $ $ LD_LIBRARY_PATH=$ORACLE_HOME/lib export LD_LIBRARY_PATH ORACLE_HOME=/u01/app/oracle/product/8. RDBMS v8. you will also have to check the included file as well. type: % setenv LD_LIBRARY_PATH $ORACLE_HOME/lib % setenv ORACLE_HOME /u01/app/oracle/product/8. and receive a TNS-12571 "packet writer failure" error. If it does exist. If the directory does not exist. This is due to the wrong version of the client shared library "libclntsh. If "audit_file_dest" is set. . The audit file is generally 600 bytes in size.6 11. 10. 1" being used at runtime.0.

1 13. See Note:45482. otherwise it defaults to the use of the file orapw that consequently causes access proble ms for any other database that has the parameter set to shared. All rights reserved. 8192) 25338: lwp_mutex_wakeup(0xFF3E0778) 25338: lwp_mutex_lock(0xFF3E0778) = 0 = 0 = 0 . Oracle Trace is enabled by default on 7.3 (depends on platform) This can caused high disk space usage by these files and cause a number of apparently mysterious side effects. If Oracle cannot open the password file. this may be the cause of 'connect internal' prompting for a password. be sure that if an instance has REMOTE_LOGIN_PASSWORDFILE set t o exclusive that the file $ORACLE_HOME/dbs/orapw<sid> does exist. Check permissions on /etc/passwd file (Unix only). 2002.dat and regid. Delete process.dat files in $ORACLE_HOME/otrace/admin director y. 15. connect internal fails with ORA-1031. Oracle Corporation.0 . When you get ora-1031 "Insufficient privileges" on connect internal after yo u supply a valid password and you have multiple instances running from the sam e ORACLE_HOME.3.% df -k If it has reached 100% capacity.1.0. since Oracle is not able to verify if the user trying to connect is indeed in the dba group. ERROR: ORA-01031: insufficient privileges Trussing sqlplus will show also the problem: 25338: munmap(0xFF210000.2. Example: -------# chmod 711 /etc/passwd # ls -ltr passwd -rwx--x--x 1 root sys 901 Sep 21 14:26 passwd $ sqlplus '/ as sysdba' SQL*Plus: Release 9.2 and 7.1 for more details. Additional disk space will need to be made available before 'connect interna l' will work. For additional information refer to Note:97849. Set the parameter REMOTE_LOGIN_PASSWORDFILE to shared for all instances that share the common password file and create an exclusive orapw<sid> password files f or any instances that have this set to exclusive.3.Production on Sat Sep 21 16:21:18 2002 Copyright (c) 1982. 14.

3.6 for more details. if you are able to connect internally but then startup fails for some reason. or ORA_DBA. 0xFFBE8B28) = 1032582594 Err#13 EACCES = 0 c) Operating System Specific checks: -----------------------------------1. If you are using Multi-Threaded Server (MTS). successive connect internal attempts might prompt for a password. You will receive a message that "The Oracle user cannot access "/etc/.ORA" file includes a parameter to make a dedicated server connection. This file is a flavor of IPC specific to Solaris which Oracle software is usi ng This can also cause connect internal problems. O_RDONLY) 25338: getrlimit(RLIMIT_NOFILE. then you do not have the correct OS privileges to issue a connect internal. if the file "/etc/. If Parallel Server is not linked in.25338: time() 25338: open("/etc/passwd". This problem occurs when using Parallel Server and the True Cluster software together. See entry Note:1066589. On Windows NT. . Oracle cannot read the file.6 for suggestions on how to resolve this problem 4. A dedicated server connection is required to start up or shutdown the databas e. Please refer to Note:1010852. On OpenVMS. make sure you are using a dedic ated server connection. On Windows NT. then ORA_DBA needs to be removed and granted again to be updated.6 for more details.name_service_door" (permission denied).6 6. See Note:1058680.name_service_door" has incorrect permissions. svrmgrl works as expected. and you receive an ORA-12547 "TNS:lost contact" error and a password prompt. If ORA_<SID>_DBA was added AFTER ORA_DBA. 2. running SVRMGRL (Server Manager line mode). 5. it will make a shared connection to a dispatch er. check that the privileges have been granted at the Operating Syst em level: $ SET DEFAULT SYS$SYSTEM: $ RUN AUTHORIZE If the list returned by AUTHORIZE does not contain ORA_<SID>_DBA. You are on Digital Unix. You may also receive errors such as: ORA-12705: ORA-01012: LCC-00161: ORA-01031: invalid or unknown NLS parameter value specified not logged on Oracle error (possible syntax error) insufficient privileges Refer to entry Note:1027964. check if DBA_AUTHORIZATION is set to BYPASS in the registry. Unless the database alias in the "TNSNAMES. On Solaris.

If you are logged on as "oracle/dba" and an attempt to log in to Server Manag er using "connect/internal" prompts you for a password. 7.0. There is two workarounds and one solution. you will be prompted for a password regardless . Apply the patch. Obtain the patch for TCR 1. 2. Any questions about this APAR should be directed to IBM.0.X '/ as sysdba' does not work as well.3 after applying ML5 or higher you can not longer connect as inter nal or if on 9. Relink Oracle Another possibility is that you need to raise the value of kernel parameter per-proc-stack-size when increased from its default value of 2097152 to 83886080 resolved this pr oblem.3. If the "/etc/passwd" file is newer than the index it will not use the password file index: # touch /etc/passwd 3) Obtain APAR IY22458 from IBM. You can determine if the patch is applied by running: % nm /usr/ccs/lib/libssn. This patch is for the MC SCN and adds the symbol "adjustSequenceNumber" to the library /usr/ccs/lib/libssn.a. You are on version 6. This is a known AIX bug and it occurs on all RS6000 ports including SP2.2 of the Silicon Graphics UNIX (IRIX) operating system and you have recently installed RDBMS release 8. They are as follows: 1) Use mkpasswd command to remove the index. In the "Oracle7 Administrator's Reference for UNIX". 3.5 from Digital.Oracle V8.a | grep adjust If this returns nothing.6 8. if you are connecting remotely.5 requires an Operating System patch which previous versions of Oracle did not require. then you need to: 1. The above patch allows svrmgrl to communicate with the TCR software. users who are members of the dba group on the remote machine are able to connect as INTERNAL without a password. there is a note that sta tes: If REMOTE_OS_AUTHENT is set to true. However.3. On AIX 4. you should refer to entr y Note:1040607. This is valid until a new user is added to "/etc/passwd" or modified: # mkpasswd -v -d 2) Touch the "/etc/passwd" file. d) Additional Information: -------------------------1. that is connecting via anything except the bequeath adapter.

6] L [NOTE:97849.6] ORA-00106 or ORA-01031 ERROR when trying to STARTUP or SHUTDOW N DATABASE [NOTE:1066589. Grant the required privilege like so: grant create table to user_lacking_privilege. Startup If someone receives this error while trying to startup the instance. Note 5: ------I am not sure it is the same.0. but I got this error today in windows when sql_aut .of the value of "REMOTE_OS_AUTHENT".6] UNIX: Connect Internal asks for password when TWO_TASK is set [NOTE:1040607.1] [NOTE:50507.6] LCC-00161 AND ORA-01031 ON STARTUP [NOTE:1058680. Note 4: ------ORA-01031: insufficient privileges In most cases. view. the user receiving this error lacks a privilege to create an obj ect (such as a table.6] UNIX: Connect internal prompts for password after install [NOTE:1064635.1] [NOTE:18089. procedure and the like). Refer to bug 644988 References: ~~~~~~~~~~~ [NOTE:1048876. the logged on user must belong to the ora_dba group on Windows or dba group on Unix.3 INSTAL Connect internal Requires Password SYSDBA and SYSOPER Privileges in Oracle8 and Oracle7 UNIX: Connect INTERNAL / AS SYSBDA Privilege on Oracle 7/8 REMOTE_OS_AUTHENT=TRUE: NOT ALLOWING USERS TO CONNECT INTERNAL Search Words: ~~~~~~~~~~~~~ svrmgrm sqldba sqlplus sqlnet remote_login_passwordfile Note 3: ------ORA-01031: insufficient privileges Cause: An attempt was made to change the current username or password without th e appropriate privilege. Action: Ask the database administrator to perform the operation or grant the req uired privileges.6] ORA-12571: PACKET WRITER FAILURE WHEN STARTING SVRMGR [NOTE:1010852. This error also occurs if attempting to install a database without the necessary operating system privileges.1] [BUG:644988] WITHOUT PASSWORD SGI: ORA-01012 ORA-01031: WHEN USING SRVMGR AFTER 8.6] OPENVMS: ORA-01031: WHEN ISSUING "CONNECT INTERNAL" IN SQL*DBA OR SERVER MANAGER [NOTE:1027964.

51 ORA-00600: internal error code.hentication in sqlnet.html>: Note:138554.No underlying data corruption. 19. The information here is only applicable to the versions listed and is provided only for guidance. Changing it to NTS solved the problem. SUGGESTIONS: One symptom of this error is that the session will appear to hang for a period of time prior to this error being reported.1&p_database_id=NOT> PURPOSE: This article discusses the internal error "ORA-600 [17059]".1] <ml 2_documents.log to Oracle Support Services for further analysis.1 DESCRIPTION: While building a table to hold the list of child cursor dependencies relating to a given parent cursor. please submit the trace files and alert. what it means and possible actions. Issuing this SQL as SYS (SYSDBA) may help show any problem objects in the dictionary: select do. arguments: [17059]: ========================================================= Note 1: ------Doc ID </help/usaeng/Search/search. ARGUMENTS: Arg [a] Object containing the table FUNCTIONALITY: Kernel Generic Library cache manager IMPACT: PROCESS FAILURE NON CORRUPTIVE . ERROR: ORA-600 [17059] [a] VERSIONS: versions 7. If the Known Issues section below does not help in terms of identifying a solution.obj#. we exceed the maximum possible size of the table. .ora was NONE.1 to 10.1 Content Type: TEXT/PLAIN Subject: ORA-600 [17059] Creation Date: 02-APR-2001 Type: REFERENCE Last Revision Date: 09-DEC-2004 Status: PUBLISHED Note: For additional ORA-600 related information please read [NOTE:146580.showDocument?p_id=146580.

0.8] <ml2_documents.2. 8.status=1 /*parent is valid*/ and po.2. decode(sign(po.1 .2 Bug# 1115424 See [NOTE:1115424.8 &p_database_id=NOT> OERI:17059 accessing view after ADD / SPLIT PARTITION Fixed: 9.2.3.status=1 /*dependent is valid*/ and po. sys.8] <ml2_documents.showDocument?p_id=631335.2 Bug# 2626347 See [NOTE:2626347. 8.6.0.8 &p_database_id=NOT> Hang / OERI:[17059] after adding a list value to a partition Fixed: 9.stime!=p_timestamp /*parent timestamp not match*/ order by 2. p_timestamp.1.po.5.3.SET_DML_HANDLER Fixed: 9.'*DIFFER*') X from sys.0.'SAME'. sys.7.8 &p_database_id=NOT> OERI:17059 / OERI:kqlupd2 / PLS-907 after adding partitions to Partitioned IOT Fixed: 9.showDocument?p_id=2626347.8] <ml2_documents.8&p_ database_id=NOT> OERI:17059 from extensive re-user of a cursor Fixed: 8.stime-p_timestamp).showDocument?p_id=558160. 10.showDocument?p_id=1115424.8] <ml2_documents.1.2.2 Bug# 2306331 See [NOTE:2306331.0.can impact shared poo l / OERI:17059 Fixed: 8.showDocument?p_id=2636685.obj# .2.obj# and do.1. Normally the above select would return no rows.8&p_ database_id=NOT> OERI:17059 from granting privileges multiple times .0 Bug# 631335 See [NOTE:631335. Known Issues: Bug# 3555003 See [NOTE:3555003. 10.2.0.8] <ml2_documents.8 &p_database_id=NOT> View compilation hangs / OERI:17059 after DBMS_APPLY_ADM.4. po.6 Bug# 2707304 See [NOTE:2707304.6.0.8] <ml2_documents. If any rows are returned the listed dependent objects may need recompiling.0.obj$ po where P_OBJ#=po.0.0.obj#(+) and D_OBJ#=do.dependency$ d.2.5.0.stime . 8.0 Bug# 558160 See [NOTE:558160.1.8] <ml2_documents. 10.0.showDocument?p_id=2306331.showDocument?p_id=2707304.showDocument?p_id=3555003.2 Bug# 2636685 See [NOTE:2636685.1.8 &p_database_id=NOT> Cursor authorization and dependency lists too long .obj$ do.0.0. 8.8] <ml2_documents.3.1.2.8 &p_database_id=NOT> Hang / OERI[17059] on view after SET_KEY or SET_DML_INVOKATION on base tab le Fixed: 9.

0.5.Fixed: 8.4. where DDL (such as adding/dropping partitions) is performed on the table.4.Enterprise Edition fact: Partitioned Tables / Indexes symptom: ORA-600 [17059] Error When Compiling A Package symptom: When Compiling a Package symptom: The Package Accesses a Partitioned Table symptom: ORA-00600: internal error code. [%s]. [352251864] symptom: Calling Location kglgob symptom: Calling Location kgldpo symptom: Calling Location kgldon symptom: Calling Location pkldon symptom: Calling Location pkloud symptom: Calling Location .1 Content Type: TEXT/X-HTML Subject: ORA-600 [17059] Error When Compiling A Package Creation Date: 19-FEB-2003 Type: PROBLEM Last Revision Date: 24-AUG-2004 Status: PUBLISHED fact: fact: Oracle Server .2.phnnrl_name_resolve_by_loading cause: This is due to <bug:2073948 </metalink/plsql/showdoc?db=bug&id=2073948>> fixed in 10i. [%s].3. [%s]. [%s]. 8. One-off patches are available for 8.2. arguments: [17059]. fix: This is fixed in 9. A workaround is to flush the shared pool.1.0 Note 2: ------Doc ID </help/usaeng/Search/search.0.1. and occurs when accessing a partitioned table via a dblink within the package. Note 3: ------- .4. [%s].0.html>: Note:234457.1.2 & 10i. arguments: [%s]. [%s] symptom: internal error code. 9.7.0. 8.0.

2. dba_indexes. dba_ ind_partitions etc Creation Date: 28-MAY-2003 Type: PROBLEM Last Revision Date: 13-AUG-2004 Status: PUBLISHED Problem: ~~~~~~~~ The information in this article applies to: Internal Error ORA-600 [17059] when querying Data dictionary views like dba_tabl espaces.[%s].[%s]. column 0 ORA-00600: internal error code. [275].sql scripts. dba_ind_partitions etc. .2 PL/SQL ERROR 0 at line 0. [%s]. dba_indexes. getting internal error ORA-600 [17059] Change(s) ~~~~~~~~~~ You probably altered some objects or executed some cat*.Version: 9. [0x11360BC]. arguments: [17003].2. dba_indexes.7 to 9.0. Fix ~~~~ Connect SYS run $ORACLE_HOME/rdbms/admin/utlrp.52: ORA-00600: internal error code. []. [%s].sql and make sure all the objects are valid. arguments: [%s].Doc ID </help/usaeng/Search/search. [1].0. 19. Cause ~~~~~~~ Some SYS objects are INVALID.html>: Note:239796. []. [].1 Content Type: TEXT/PLAIN Subject: ORA-600 [17059] when querying dba_tablespaces.2 This problem can occur on any platform.12 Oracle Server . Symptoms The following error occurs when compiling a form or library ( fmb / pll ) agains t RDBMS 9.Version: 9.Enterprise Edition . [] The error reproduces everytime. dba_ind_partitions etc Symptom(s) ~~~~~~~~~~ While querying Data dictionary views like dba_tablespaces. arguments: [17003] ========================================================= Note 1: ------The information in this article applies to: Oracle Forms . Errors ORA 600 "internal error code.

The information here is only applicable to the versions listed and is provided only for guidance. There is no backport fix available for Forms 9i (9.1 DESCRIPTION: The error indicates that we have tried to lock a library cache object by using the dependency number to identify the target object and have found that no such dependency exists.1 Content Type: TEXT/PLAIN Subject: ORA-600 [17003] Creation Date: 02-APR-2001 Type: REFERENCE Last Revision Date: 15-OCT-2004 Status: PUBLISHED Note: For additional ORA-600 related information please read [NOTE:146580.4). The compilation error occurs when the form contains a call to a stored database function / procedure which has two DATE IN variables receiving DEFAULT values su ch as SYSDATE. Under this situation we will raise an ORA-600 [17003] if the dependency number that we are using exceeds the number of entries in the dependency table or the dependency entry is not marked as invalidated.1&p_database_id=NOT> PURPOSE: This article discusses the internal error "ORA-600 [17003]". ARGUMENTS: Arg [a] Library Cache Object Handle Arg [b] Dependency number .0.0 to 10. For example. ERROR: ORA-600 [17003] [a] [b] [c] VERSIONS: versions 7. Reference: <Bug:2713384> Abstract: INTERNAL ERROR [1401] WHEN COMPILE FUNCTION WITH 2 DEFAULT DATE VARIABLES ON 9.0.1] <ml 2_documents.html>: Note:138537.0. pass the DEFAULT value SYSDATE indirectly to the stored database pr ocedure/ function by first assigning it to a local variable in the form. Note 2: ------Doc ID </help/usaeng/Search/search. The error does not occur when compiling against RDBMS 9. Cause This is a known bug / issue. modify the offending calls to the stored database procedure/ fun ctions so that DEFAULT parameter values are not passed directly . what it means and possible actions.2) To work-around.1 or lower.showDocument?p_id=146580.2 Fix The bug is fixed in Oracle Forms 10g (9.Triggers / local program units in the form / library contain calls to stored database procedures and / or functions.

The information here is only applicable to the versions listed and is provided only for guidance. ------Doc ID: Subject: Note:222876.1. what it means and possible actions.2 Bug# 3073414 XDB may not work after applying a 9. there are some XDB related bugs which can lead to this error being reported. [] ================================================================================ ================= Note 1.53: ORA-00600: internal error code.0.1 .5 19.0. arguments: [qmxiUnpPacked2]. ERROR: ORA-600 [qmxiUnpPacked2] [a] VERSIONS: versions 9. []. If a patchset has recently been applied.8] <ml2_documents. [121].2 to 10.2 patch set Fixed: 9. 10. Known Issues: Bug# 2611590 See [NOTE:2611590. Specifically.Arg [c] 1 or 2 (indicates where the error was raised internally) FUNCTIONALITY: Kernel Generic Library cache manager IMPACT: PROCESS MEMORY FAILURE NO UNDERLYING DATA CORRUPTION. please confirm that there were no errors associated with this upgrade.showDocument?p_id=2611590.1 Content Type: ORA-600 [qmxiUnpPacked2] TEXT/PLAIN Creation Date: 09-DEC-2002 Type: REFERENCE Last Revision Date: 15-OCT-2004 Status: PUBLISHED Note: For additional ORA-600 related information please read [NOTE:146580.2.8 &p_database_id=NOT> OERI:[17003] running XDBRELOD.1] PURPOSE: This article discusses the internal error "ORA-600 [qmxiUnpPacked2]". [].SQL Fixed: 9. [ ]. [].2.0.3. []. SUGGESTIONS: A common condition where this error is seen is problematic upgrades.

ARGUMENTS: Arg [a] Type of XOB FUNCTIONALITY: Qernel xMl support Xob to/from Image IMPACT: PROCESS FAILURE NON CORRUPTIVE . or the article isn't applicible to your environment then ensure that the upgrade to current version was completed succesfully without error.No underlying data corruption.SQL 9.2 Note 2. SUGGESTIONS: Please review the following article on Metalink : [NOTE:235423.3 Bug# 2734234 CONSOLIDATION BUG FOR ORA-600 [QMXIUNPPACKED2] DURING CATPATCH.SQL fails Fixed: 9. please submit the trace files and alert.0.1] How to resolve ORA-600 [qmxiUnpPacked2] during upgrade If you still encounter the error having tried the suggestions in the above article. ------- Doc ID: Note:235423. Known Issues: Bug# 2607128 See [NOTE:2607128. 64-bit .8] OERI:[qmxiUnpPacked2] if CATPATCH.log to Oracle Support Services for further analysis.2.DESCRIPTION: When unpickling an XOB or an array of XOBs an unexpected datatype was found. If the Known Issues section below does not help in terms of identifying a solution.2 Multiple Platforms.2.2.0. Generally due to XMLType data that has not been successfully upgraded from a previous version.1 Content Type: TEXT/X-HTML Subject: How to resolve ORA-600 [qmxiUnpPacked2] during upgrade Creation Date: 14-APR-2003 Type: HOWTO Last Revision Date: 18-MAR-2005 Status: PUBLISHED The information in this article applies to: Oracle 9.SQL/XDBPATCH.0.

sql having taken a backup of the original file first 4/ Restart the instance with: startup migrate. 2/ Get the xdbpatch. In some case you may need to use larger pool sizes.sql was executed.2.1 . In some case you may need to use larger pool sizes.0.0. Error is generally seen as ORA-600: internal error code.Symptom(s) ~~~~~~~~~~ ORA-600 [qmxiUnpPacked2] [] Cause ~~~~~ If the error is seen after applying 9.0.2.2 on a 9.2. 2/ Get the xdbpatch.1 database or if using DBCA in 9. 5/ spool catpatch @?/rdbms/admin/catpatch.sql script from Note 237305.sql script from Note 237305. [121] There are 3 options to proceed from here:Fix ~~~~ Option 1 ======== If your shared_pool_size and java_pool_size are less than 150Mb the do the following :1/ Set your shared_pool_size and java_pool_size to 150Mb each.1 seed database) then it is very likely that either shared_pool_size or java_pool_size was too small when catpatch.sql to $ORACLE_HOME/rdbms/admin/xdbpatch. In which case do the following :1/ Set your shared_pool_size and java_pool_size to 150Mb each.1 3/ Copy xdbpatch. arguments: [qmxiUnpPacked2].sql Option 2 ======== If you already have shared_pool_size and java_pool_size set at greater than 150Mb then the problem may be caused by the shared memory allocated during the JVM upgrade is not released properly.2 to create a new database (which is using the 9.2.0.

sql <XDB_PASSWD> <TABLESPACE> <TEMP_TABLESPACE> If the error is seen during normal database operation.sql to perform the upgrade startup migrate.2 Note 237305.sql to $ORACLE_HOME/rdbms/admin/xdbpatch.sql @?/rdbms/admin/catqm. [ ].54 ORA-00600: internal error code. [] ================================================================================ ========= .0.sql Option 3 ======== If XDB is NOT in use and there are NO registered XML Schemas an alternative is to drop. arguments: [kcbget_37].sql script and add the following as the first line in the script:alter system flush shared_pool. if so connect as sys and run catqm.3/ Edit the xdbpatch. 3/ Copy xdbpatch.sql 2/ You can then run catpatch. Once this is confirmed attempt to reproduce the error. []. and maybe re-install XDB :1/ To drop the XDB subsystem connect as sys and run @?/rdbms/admin/catnoqm. @?/rdbms/admin/catpatch.sql 19. []. 4/ spool catpatch @?/rdbms/admin/catpatch.sql 3/ Once complete you may chose to re-install the XDB subsystem. []. ensure that upgrade to current version was completed succesfully without error. if successful forward ALERT. [].2. References ~~~~~~~~~~~ Bug 2734234 CONSOLIDATION BUG FOR ORA-600 [QMXIUNPPACKED2] DURING CATPATCH.LOG. trace files and full error stack to Oracle Support Services for further analysis.SQL 9. [1].sql having taken a backup of the original file first 3/ Restart the instance with: startup migrate.1 Modified xdbpatch.

ORA-00600: internal error code. [1]. [].2. []. []. [].1.3 19. []. arguments: [kcbso1_1].0.55 ORA-00600: internal error code.8 Subject: Bug 4036717 .Truncate table in exception handler can causes OERI:kcbz wb_4 Type: PATCH Status: PUBLISHED Content Type: TEXT/X-HTML Creation Date: 25-FEB-2005 Last Revision Date: 09-MAR-2005 Click here for details of sections in this note. []. []. Affects: Product (Component) Oracle Server (RDBMS) Range of versions believed to be affected Versions < 10G Versions confirmed as being affected 8.7. []. [ ] ORA-00600: internal error code. []. [] Doc ID: Note:2652771.8 Subject: Support Description of Bug 2652771 Type: PATCH Status: PUBLISHED Content Type: TEXT/X-HTML Creation Date: 13-AUG-2003 Last Revision Date: 14-AUG-2003 Click here for details of sections in this note. Bug 4036717 Truncate table in exception handler can causes OERI:kcbzwb_4 . []. [] ================================================================================ ======= Doc ID: Note:4036717.2.2. []. []. arguments: [kcbzwb_4]. Bug 2652771 AIX: OERI[1100] / OERI[KCBGET_37] SGA corruption This note gives a brief overview of bug 2652771.4 9.2 Platforms affected Aix 64bit 5L Aix 64bit 433 Fixed: This issue is fixed in 9. [].8] AIX: OERI[1100] / OERI[KCBGET_37] SGA corruption Fixed: 9.0. []. [].3 (Server Patch Set) Symptoms: Memory Corruption Internal Error may occur (ORA-600) ORA-600 [1100] / ORA-600 [kcbget_37] Known Issues: Bug# 2652771 P See [NOTE:2652771. arguments: [kcbget_37]. []. [].0.

0. Affects: Product (Component) PL/SQL (Plsql) Range of versions believed to be affected Versions < 10.2.0.3 Platforms affected Generic (all / most platforms affected) Fixed: This issue is fixed in 9.This note gives a brief overview of bug 4036717.7 (Server Patch Set) 10. Workaround: Turn off or deinstall the fix for bug 3768052. Bug 4036717 Truncate table in exception handler can causes OERI:kcbzwb_4 This note gives a brief overview of bug 4036717. Doc ID: Note:4036717.3 Platforms affected Generic (all / most platforms affected) Fixed: This issue is fixed in 9.0.1.8 Subject: Bug 4036717 .2 Versions confirmed as being affected 10.0.7 (Server Patch Set) 10.Truncate table in exception handler can causes OERI:kcbz wb_4 Type: PATCH Status: PUBLISHED Content Type: TEXT/X-HTML Creation Date: 25-FEB-2005 Last Revision Date: 09-MAR-2005 Click here for details of sections in this note. Note that the procedure containing the affected transactional commands will have to be recompiled after backing out the bug fix.2.2 Versions confirmed as being affected 10. Affects: Product (Component) PL/SQL (Plsql) Range of versions believed to be affected Versions < 10.1.0.1.1.4 (Server Patch Set) 10g Release 2 (future version) .0.4 (Server Patch Set) 10g Release 2 (future version) Symptoms: Related To: Internal Error May Occur (ORA-600) ORA-600 [kcbzwb_4] PL/SQL Truncate Description Truncate table in exception handler can cause OERI:kcbzwb_4 with the fix for bug 3768052 installed.

arguments: [kcbgtcr_6].1 DESCRIPTION: Two buffers have been found in the buffer cache that are both current and for the same DBA (Data Block Address). As such. [] . []. what it means and possible actions. 19. []. the contents are not necessarily accurate and care should be taken when dealing with customers who have encountered this error. .1 Subject: ORA-600 [kcbgtcr_6] Type: REFERENCE Status: PUBLISHED Content Type: TEXT/X-HTML Creation Date: 18-SEP-2003 Last Revision Date: 25-MAR-2004 <Internal_Only> This note contains information that has not yet been reviewed by DDR. Thanks.56 ORA-00600: internal error code. [] ================================================================================ ======== Doc ID: Note:248874. []. [].Symptoms: Related To: Internal Error May Occur (ORA-600) ORA-600 [kcbzwb_4] PL/SQL Truncate Description Truncate table in exception handler can cause OERI:kcbzwb_4 with the fix for bug 3768052 installed. []. The information here is only applicable to the versions listed and is provided only for guidance. Note that the procedure containing the affected transactional commands will have to be recompiled after backing out the bug fix.1 PURPOSE: This article discusses the internal error "ORA-600 [kcbgtcr_6]". ERROR: ORA-600 [kcbgtcr_6] [a] VERSIONS: versions 8. PAA Internals Group </Internal_Only> Note: For additional ORA-600 related information please read Note 146580. Workaround: Turn off or deinstall the fix for bug 3768052.0 to 10.

We should not have two 'current' buffers for the same DBA in the cache.2.0.3 or patch for Bug 2652771 has been applied. this is incorrect. Argument Description: None --------------------------------------------------------------------------Explanation: We have identified two 'CURRENT' buffers for the same DBA in the cache.5 .10. and this error will be raised.7) from Metalink.No underlying data corruption.c . <Internal_Only> ORA-600 [kcbgtcr_6] Versions: 8. Does the error still occur after an instance bounce? If using 64bit AIX then ensure that minimum version in use is 9. ARGUMENTS: Arg [a] Buffer class Note that for Oracle release 9. Known Issues: Bug 2652771 Shared data structures corrupted around latch code on 64bit AIX ports.2.0. Fixed 9.0. if this is the case then this error is raised.1 Meaning: We have two 'CURRENT' buffers for the same DBA. FUNCTIONALITY: Kernel Cache Buffer management IMPACT: PROCESS FAILURE POSSIBLE INSTANCE FAILURE NON CORRUPTIVE . please submit the trace files and alert.log to Oracle Support Services for further analysis.1. If the Known Issues section below does not help in terms of identifying a solution.2 and earlier there are no additional arguments reported with this error.3 backports available for older versions (8. --------------------------------------------------------------------------Diagnosis: Source: kcb. SUGGESTIONS: Retry the operation.

57 ORA-00600: internal error code.70000003ffe9868] ckptq: [NULL] fileq: [NULL] st: XCURRENT md: NULL rsop: 0x0 tch: 2 LRBA: [0x0.1 Subject: ORA-600 [1100] Type: REFERENCE Status: PUBLISHED Content Type: TEXT/X-HTML Creation Date: 28-MAR-2001 Last Revision Date: 08-FEB-2005 Note: For additional ORA-600 related information please read Note 146580. --------------------------------------------------------------------------Known Bugs: Bug 2652771 Shared data structures corrupted around latch code on 64bit AIX ports.0.0] Here it is clear that we have two current buffers for the dba. [] ================================================================================ ===================================== Doc ID: Note:138123.Fixed 9. []. arguments: [1100].ffffffff] HSUB: [255] RRBA: [0x0.700000006fb8d68] ckptq: [NULL] fileq: [NULL] st: XCURRENT md: NULL rsop: 0x0 tch: 1 LRBA: [0x0. .0] HSCN: [0xffff. [].70000003ffe9800] lru: [700000012fbaf68.2.0.0] BH (0x70000000efa9b00) file#: 39 rdba: 0x09c131e6 (39/78310) class 1 ba: 0x70000000e4f6000 set: 6 dbwrid: 0 obj: 11450 objn: 11450 hash: [70000004d53a870. []. [].e :BH (0x70000003ffe9800) file#: 39 rdba: 0x09c131e6 (39/78310) class 1 ba: 0x70000003fcf0000 set: 6 dbwrid: 0 obj: 11450 objn: 11450 hash: [70000000efa9b00.70000004d53a870] lru: [70000000efa9b68. Most likely cause for this is 64bit AIX Bug 2652771.0] HSCN: [0xffff.0. If this isn't the case check the error reproduces consistently after bouncing the instance? Via SQLplus? What level of concurrency to reproduce? Is a testcase available? Check OS memory for errors.0.3. backports available for older versions.ffffffff] HSUB: [255] RRBA: [0x0.1 .0. [0 x7000002FDF83F40].Check the trace file. [0x7000002FDF83F40]. this will show the buffers i. 19.

0. The information here is only applicable to the versions listed and is provided only for guidance.7.1.1. SUGGESTIONS: Known Issues: Bug# 3724548 See Note 3724548.8 CTRL-C During a truncate crashes the instance Fixed: 8.PURPOSE: This article discusses the internal error "ORA-600 [1100]". 10. Additional information will accompany this internal error.0 to 9.2. A dump of the link and often a core dump will coincide with this error. FUNCTIONALITY: GENERIC LINKED LISTS IMPACT: PROCESS FAILURE POSSIBLE INSTANCE FAILURE IF DETECTED BY PMON PROCESS No underlying data corruption. ERROR: ORA-600 [1100] [a] [b] [c] [d] [e] VERSIONS: versions 6.6.1.2. Generally.4.1. 8.8 AIX: OERI[1100] / OERI[KCBGET_37] SGA corruption Fixed: 9.3.1.0 <Internal_Only> .0.0. 9.8 OERI[kglhdunp2_2] / OERI[1100] under high load Fixed: 9.2 DESCRIPTION: This error relates to the management of standard double-linked (forward and backward) lists.0.2. 10.8 OERI[17067]/ OERI[26599] / dump (kgllkdl) from JavaVM / OERI:1100 from PMO N Fixed: 10.2.0.7.3 Bug# 1951929 See Note 1951929.4.1 Bug# 959593 See Note 959593. if the list is damaged an attempt to repair the links is performed. 10.8 ORA-7445 in KQRGCU/kqrpfr/kqrpre possible Fixed: 8.3.1. This is a problem with a linked list structure in memory. 9.2 Bug# 2652771 P See Note 2652771. what it means and possible actions.2 Bug# 3691672 + See Note 3691672.0.6.

The full bug text (if published) can be seen at <Bug:3724548> (This link will no .4 (Server Patch Set) 10g Release 2 (future version) Symptoms: Related To: Memory Corruption Internal Error May Occur (ORA-600) ORA-600 [kglhdunp2_2] ORA-600 [1100] (None Specified) Description When an instance is under high load it is possible for sessions to get ORA-600[KGLHDUNP2_2] and ORA-600 [1100] errors.2.OERI[kglhdunp2_2] / OERI[1100] under high load Type: PATCH Status: PUBLISHED Content Type: TEXT/X-HTML Creation Date: 24-SEP-2004 Last Revision Date: 13-JAN-2005 Click here for details of sections in this note.0. Bug 3724548 OERI[kglhdunp2_2] / OERI[1100] under high load This note gives a brief overview of bug 3724548.2.4 9.2. Ensure that this note comes out on top in Metalink when searched ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 ora-600 1100 1100 1100 1100 1100 1100 1100 1100 1100 1100 1100 1100 1100 1100 1100 1100 1100 1100 1100 1100 </Internal_Only> Note 2: ------Doc ID: Note:3724548. This can also show as a corrupt linked list in the SGA.0.0.0.5 Platforms affected Generic (all / most platforms affected) Fixed: This issue is fixed in 9.2 Versions confirmed as being affected 9.6 (Server Patch Set) 10.NOT FOR PUBLICATION OR DISTRIBUTION TO CUSTOMERS No internal information at the present time.8 Subject: Bug 3724548 .INTERNAL ONLY SECTION . Affects: Product (Component) Oracle Server (Rdbms) Range of versions believed to be affected Versions < 10.1.

2 running under 32-bit and it is looking at the oracle's lib directory which has 64 bit libraries. changing the references to Oracle's .o. After some digging I found out that this is because the machine is AIX 5. 3./lib to .o) could not be loaded. Stop./lib32..2.0/lib/libclntsh.5/a ix/auto/DBD/Oracle/Oracle.1.t work for UNPUBLISHED bugs) You can search for any interim patches for this bug here <Patch:3724548> (This l ink will Error if no interim patches exist) 19.58 Compilation problems DBI DBD: =================================== We upgraded Oracle from 8.2. 0509-022 Cannot load module /u00/oracle/product/9..pm line 230. Now I have an application which can be customised to call perl scripts and when I call this test script from that application it fails with: install_driver(Oracle) failed: Can't load '/usr/local/perl/lib/site_perl/5. Now when I ran "make" it went smoothly.8. I edited the Makefile 1. collect2: ld returned 8 exit status make: 1254-004 The error code from the last command is 1.so.libclntsh.a(sh r. So after running "perl Makefile.0/lib/libclntsh. I ran my own simple perl testfile which connects to the Oracle and gets some info and it works fine.5/aix/auto/DBD/Oracle/Oracle. changing change crt0_64. 0509-150 Dependent module /u00/oracle/product/9.8. Perhaps a required shared library or dll isn't installed where expected at /opt/dscmdevc/src/udps/test_oracle_dbd.PL".8.a.o to crt0_r.Unfortunately it will take too long for the application developers to change this in their . 2.o: XCOFF64 object files are not allowed in 32-bit mode.5 and I tried to rebuild the DBD::Oracle module but it threw errors like: . so did make test and make install. gcc: unrecognized option `-q64' ld: 0711-736 ERROR: Input file /lib/crt0_64.a co uld not be loaded.so' for module DBD::Oracle: 0509-022 Cannot load mod ule /usr/local/perl/lib/site_perl/5.a .5/aix/DynaLoader.0. at (eval 3) line 3 Compilation failed in require at (eval 3) line 3.2. Remove the -q32 and/or -q64 options from the list of libraries to link with.6 to 9.2. 0509-150 Dependent module /u00/oracle/product/9. 0509-103 The module has an invalid magic number.pl line 45 whats happening here is that the application sets its own LIBPATH to include oracle's lib(instead of lib32) in the beginning and that makes perl look at the wrong place for the file . at /usr/local/perl/lib/5.0/lib/libclntsh.

2/lib32/libclntsh. .2/lib/libclntst9./apps/oracle/product/9.9.a . use DBI./apps/oracle/product/9. I have a work around for it: write a wrapper ksh script which exports the LIBPATH and then calls the perl script which works fine but I was wondering if there is a way to set the libpath or do something else inside the current perl script so that it knows where to look for the right library files inspite of the wrong LIBPATH? Or did I miss something when I changed the Makefile and did not install everything right? Is there anyway I check this? (the make install didnot throw any errors) Any help or thoughts on this would be much appreciated. Thanks! Rachana.59 Listener problem: IBM/AIX RISC System/6000 Error: 13: Permission denied ----------------------------------------------------------------------------When starting listener start listener TNS-12546: TNS:permission denied . $dbuser.a . $dbpwd) or die "Can't connect to $datasource: $DBI::errstr". my $dbh = DBI->connect($connect_string. .2/lib/libclntsh. use strict./apps/oracle/product/9. The test script is something like: use Env.application and I am looking for a quick solution. #use lib qw( $ORACLE_HOME/lib32 ) . $ENV{'LIBPATH'} = "${ORACLE_HOME}/lib32:$ENV{'LIBPATH'}" .a . .0 P550:/ # 19. . my $datasource="d1ach2".a . use lib qw( /opt/harvest/common/perl/lib ) .2/lib32/libclntst9. -name "libclnt*" -print . my $connect_string="dbi:Oracle:". Adding 'use lib' or using'$ENV{LIBPATH}' to change the LIBPATH is not working because I need to make this work in this perl script and the "use DBI" is run (or whatever the term is) in the compile-phase before the LIBPATH is set in the run-phase./apps/oracle/product/9. note 12: -------P550:/ # find ./apps/oracle/oui/bin/aix/libclntsh.so.

. Welcome to LSNRCTL.0 .(640). So host resolution is not possible.TNS-12560: TNS:protocol adapter error TNS-00516: Permission denied IBM/AIX RISC System/6000 Error: 13: Permission denied Note 1: 'TNS-12531: TNS:cannot allocate memory' may be misleading. All rights reserved. Thank you! BUGS WITH REGARDS TO PRO*COBOL ON 9i: 10.. .Production on 12-OCT2007 08:29:14 Copyright (c) 1991.3. because of per mission problems. Oracle. The problem really was in permissions of /etc/hosts on the node2. 2006. so if you try the following LSNRCTL> status <listener_name> You might have a correct response.2. A possible rea son is: Oracle (more specific the listener) is unable to read /etc/hosts. It was -rw-r---.59 Listener problem: IBM/AIX RISC System/6000 Error: 79: Connection refused -----------------------------------------------------------------------------d0planon@zb121l01:/data/oracle/d0planon/admin/home/$ lsnrctl LSNRCTL for IBM/AIX RISC System/6000: Version 10. type "help" for information. . Now it is -rw-rw-r-.(664) and everything goes ok. it seems to be a perm ission problem (see also IBM/AIX RISC System/6000 Error: 13: Permission denied).0.. LSNRCTL> status Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error TNS-00511: No listener IBM/AIX RISC System/6000 Error: 79: Connection refused Answer 1: Check if the oracle user can read /etc/hosts Answer 2: Maybe there are multiple instances of the listener.

I applied the 9.8. I ignored the error to complete the patch application.996 . The 9.3 ON AIX-5L BOX -------------------------------------------------------------------------------Bookmark Fixed font Go to End Monitor Bug Bug No.2.2.2.2.3 Pro*Cobol capability fix either so the rtsora relinking fails as well. is facing the same problem on 9. but the one-off patch has been provided in the Bug#2440385 to resolve the issue.0.1 to 9.77 precompiler to work with the MicroFocus Server Express 2.1 RDBMS and the other is for 9.2.3 on a AIX 5L 64-Bit Box and is not seeing the 64-bit Procob executable. says ============================ This is the original bug # 2440385.0.0.* Database Version 9.19.2. Pertinent configuration information (MTS/OPS/distributed/etc) .0.1 install.2 RDBMS patch to the 9.0.0. This is what the Cst.0. problem has been fixed in 9.0.2. Then I used the patch for the 2440385 bug to get 64 bit procob/rtsora executables (the patch actually provides executables rather than performing a successful relinking) to get the Pro*Cobol 1.There are two versions of the patch for the bug: one is for the 9. 2859282 Filed 19-MAR-2003 Updated 01-NOV-2003 Product Precompilers Product Version Platform AIX5L Based Systems (64-bit) 9.1 install did.2. 2.0.0.0. . Clear description of the problem encountered: . ========================= PROBLEM: .2.2.2.2. The fix provides 64 bit versions of Pro*Cobol.3 also.0.11 (64 bit) without encountering "bad magic number" error.2.3 Affects Platforms Port-Specific Severity Severe Loss of Service Status Closed.2.2 to 9.3. As per the Bug.0.2.2. . Thus I don't have a working Pro*Cobol precompiler to allow me to generate our Cobol programs against the database. has upgraded from 9. Duplicate Bug Base Bug 2440385 Fixed in Product Version No Data Problem statement: 64BIT PRO*COBOL IS NOT THERE EVNN AFTER UPGRDING TO 9.61: 64BIT PRO*COBOL IS NOT THERE EVNN AFTER UPGRDING TO 9.0.2.3 Platform Version 5.2.3 ON AIX-5L BOX *** 03/19/03 10:13 am *** 2889686.2. . The current install that I am performing I've downloaded the Oracle 9. cst. Actually the same problem existed when upgraded from 9. .0. So the last time I hit this issue.0. 1.2 patch also experienced the relinking problem on rtsora just like the 9.0. But My Cst.0.

Technical impact on the customer.0.0. . Sequence of events leading to the problem . 3.2.2.2. 9.9205 procob32 or procob18_32.2 # Product Patched : RDBMS # 9201. ========================= REPRODUCIBILITY: .0. ========================= DIAGNOSTIC ANALYSIS: .2.2/9.9204. 1. 5.0.2.0.3 as provided on top of 9.9202.0. indicate where and predictability . .2 FOR AIX5L PORT 212 Patchset Exception: 2663624 / Base Bug 2440385 #------------------------------------------------------------------------# # DATE: November 26. 4.3 . Patch 2663624: (Cobol patch for 9202 AIX 5L) ----------------------------------------------PSE FOR BUG2440385 ON 9.2.3. ========================= WORKAROUND: . 2440385 .9203. Include persistent after effects. List any versions in which the problem has not reproduced Further notes on PRO*COBOL: =========================== Note 1: ======= 32 bit cobol: 64 bit cobol: PATCHES: 1. One-off patch should be provided on top of 9. ========================= RELATED BUGS: . procob or procob18 . Indication of the frequency and predictability of the problem . List the versions in which the problem has reproduced . 2.1 . 2002 # ----------------------# Platform Patch for : AIX Based Systems (Oracle 64bit) for 5L # Product Version # : 9. State if the problem is reproducible.

.zip Set your current directory to the directory where the patch is located: % cd 2663624 Ensure that the directory containing the opatch script appears in your $PATH...3 27-APR-2003 34M 2440385 Pro*COBOL: PATCH FOR SUPPORTING 64BIT PRO*COBOL 9..^ PCC-S-0018: Expected "PICTURE clause"......# # # # # # # # # # # # # # # # # # # Bugs Fixed by this patch: ------------------------2440385 : PLEASE PROVIDE THE PATCH FOR SUPPORTING 64BIT PRO*COBOL Patch Installation Instructions: -------------------------------To apply the patch....2. Hi. we recently upgraded to 9i.. Some of my compiles have worked successfully.0...... but found "9" at line 1834 in file What's strange is that if I compile the program against the same DB using procob instead of procob18_32. unzip the PSE container file.. However. However...2 26-NOV-2002 17M 2440385 Pro*COBOL: PATCH FOR SUPPORTING 64BIT PRO*COBOL 9.....1 01-OCT-2002 17M 3. .2.. 7SA 350 1834 .. Provide the patch for supporting 64-bit Pro*COBOL.. % unzip p2440385_9202_AIX64-5L. I'm receiving the follow error in one of my compiles: 1834 183400 01 IB0-STATUS PIC 9.0.... so we're us ing the procob18_32 precompiler to compile our programs..0. then enter the following command: % opatch apply 2.... Patch 3501955 9205: ---------------------Also includes 2440385.2. we still have 32 bit Cobol... Note 2: ======= Problem precompiling Cobol program under Oracle 9i... Patch 2440385: ----------------Results for Platform : AIX5L Based Systems (64-bit) Patch Description Release Updated Size 2440385 Pro*COBOL: PATCH FOR SUPPORTING 64BIT PRO*COBOL 9.

0.mk: . and that resolved my proble m. it had this message: System default option values taken from: /u01/app/oracle/product/9.cfg Yet. $ORACLE_HOME/precomp/demo/procob/demo_procob_32.0.2.1 Content Type: TEXT/X-HTML Subject: Pro*COBOL Application Fails in Runtime When Using Customized old Make Files With Signal 11 (MF Errror 114) Creation Date: 20-NOV-2003 Type: PROBLEM Last Revision Date: 04-APR-2005 Status: MODERATED The information in this article applies to: Precompilers .4 This problem can occur on any platform.0. Execution error : file 'sample1' error code: 114.2.0.0. Fix Use the Oracle Supplied make templates or change the customized old make files f or 32-bit application builds $ORACLE_HOME/precomp/demo/procob2/demo_procob_32.4.3.4.mk and $ORACLE_HOME/precomp/demo/procob/demo_procob18_32. Hi.0 application are failing with cobol runtime error 114 when using 32-bit builds. seg=0 114 Attempt to access item beyond bounds of memory (Signal 11) Changes Upgraded from 9. Cause The customized old make files for building 32-bit applications invoked the 64-bi t precompilers procob or procob18 instead of procob32 or procob18_32.2.cfg .0. call=1.4/precomp /admin/pcbcfg.mk invoke the wrong precompiler.0.0.2. when I used procob.0. I noticed in my compile that failed using procob18_32.2.mk.0 to 9.3 which does not support 64-bit builds with Micro Focus Server Express 2.3.3. I started using procob32 instead of procob18_32.4/precomp /admin/pcccob. Thanks for any help you may have already started to provide. Note 3: ======= Doc ID: Note:257934. Platform is AIX 4. pc=0.2.Version: 9.2..11. . To fix the problem add the following to $ORACLE_HOME/precomp/demo/procob2/demo_procob_32. Symptoms After upgrading from Oracle server and Pro*COBOL 9.it compiles cleanly.0 to 9.. it h ad the following message: System default option values taken from: /u01/app/oracle/product/9.

as we've got a lot a program like this.mk: PROCOB_32=procob32 Using $ORACLE_HOME/precomp/demo/procob/demo_procob18_32. Amit Joshi 05-Jan-05 06:26 Subject: Re : PROCOB18_32 Problem at execution ORA-00933 . We've got problems with a lot of procobol programs using host table variables in PL SQL blocks like: EXEC SQL EXECUTE BEGIN FOR nIndice IN 1.7.1. The problem seems to appear only if the host table variable is used inside a SEL ECT.. A workaround consists to assign host table variables into oracle table variables and replace inside SQL command host table variables by oracle table variables. Thread Status: Closed From: Jean-Daniel DUMAS 23-Nov-04 16:39 Subject: PROCOB18_32 Problem at execution ORA-00933 PROCOB18_32 Problem at execution ORA-00933 We try to migrate from Oracle 8. For the INSERT VALUES command.fr From: Oracle.PROCOB=procob32 Using $ORACLE_HOME/precomp/demo/procob/demo_procob_32.5.2.:WI-NB-APPELS-TFO009S LOOP UPDATE tmp_edition_erreur SET mon_nb_dec = :WTI-S2-MON-NB-DEC (nIndice) WHERE mon_cod = :WTC-S2-MON-COD (nIndice) AND run_id = :WC-O-RUN-ID. we don't enjoy to do this. Have somebody another idea ? jddumas@eram. we've got "ORA-00933 SQL command not properly ended".0.UPDATE or DELETE command. END LOOP.mk PROCOB18_32=procob18_32 The change can be added to the bottom of the make file. END-EXEC At execution. it seems that we've got no problem.4 to Oracle 9.Procobol App Fails114 Attempt To Access Item Beyond Bounds Of Memo ry (Signal 11) Note 4: ======= Displayed below are the messages of the selected thread. END. References Bug 3220095 . But.

Again.note well. or $ORACLE_HOME/lib for 64-bit If you wish to recreate those executables. 32-bit or 64-bit -. Oracle provide two versions of Pro*COBOL.then the effective commands to use to re-link the run-time correctly are as follows (logged in under your Oracle user ID) : either mode: <set up COBDIR. it seems you are hitting the same. say if you've updated your COBOL environment since installing Oracle. The 64-bit edition of Oracle 9i on AIX 5.$ORACLE_HOME/lib32 for 32-bit.2 Hi Wayne (and Panos) Apologies if you're aware of some of this already. that these are separate products on this platform -.e. Best Regards Amit Joshi Note 5: ======= Re: Server Express 64bit and Oracle 9i problem (114) on AIX 5.for the mode in which you wish to use Oracle. you need to use the correct one depending on whether you're creating a 32-bit or 64-bit application. i.mk EXE=rtsora32 rtsora32 64-bit: export LIBPATH=$COBDIR/lib:$ORACLE_HOME/lib:$LIBPATH cd $ORACLE_HOME/precomp/lib make -f ins_precomp. It's imperative that you use the correct edition of Server Express.the 64-bit version of the run-time -.Hi Please refer to bug 3802067 on Metalink. In addition.mk and env_precomp. ORACLE_SID as appropriate for your installation> export PATH=$COBDIR/bin:$ORACLE_HOME/bin:$PATH 32-bit : export LIBPATH=$COBDIR/lib:$ORACLE_HOME/lib32:$LIBPATH cd $ORACLE_HOME/precomp/lib make LIBDIR=lib32 -f ins_precomp. ORACLE_BASE.the 32-bit version of the run-time. then from looking at the makefiles -ins_precomp. but I just wanted to clarify the steps involved in creating and executing a Pro*COBOL application with Micro Focus Server Express on UNIX.x creates rtsora -. as the precompiler will . From the details provided . When installing Pro*COBOL on UNIX (as part of the main Oracle installation). in order for the installer to relink a COBOL RTS containing the Oracle support libraries (rtsora/rtsora32/rtsora64).mk rtsora Regarding precompiling your application.mk -. you need to ensure that LIBPATH is set to point to the correct Oracle 'lib' directory -.and rtsora32 -. ORACLE_HOME. you need to have your COBOL environment setup.

g. which will invoke the correct version of Pro*COBOL under the covers. e. However if the COBOL has embedded Oracle SQL our procomp makes try to access ADA. you can also compile using the Cobsql preprocessor. it appears as if you're not picking up the correct Pro*COBOL binary. please let me know. Re: Re: Server Express 64bit and Oracle 9i problem (114) on AIX 5. allowing for a single precompile-compile step.g. A bit of background: we are "upgrading" from Oracle8i. Solaris.generate different code.0.5 to AIX 5L. So can you give us any clues as to why we are suffer ing an ADA plague :-)) Wayne Re: Server Express 64bit and Oracle 9i problem (114) on AIX 5. See the Server Express Database Access manual. SAS8 and MF Server Express COBOL.2 Hi Wayne. e. you need to use : 32-bit : procob32 / procob18_32 .2 Hi Simon (and anyone else) Thanks for that. procob myapp.4.2. e. Regards. If you invoke 'procob' from the command line.2 SP1 or later.Production on Mon Apr 19 13:38:07 2004 .cob rtsora myapp.g. procob32 myapp. SAS6. On the surface. cob -ik myapp.pco cob -it myapp.if you're still having problems.pco -C "p(cobsql) csqlt==oracle8 endp" This method also aids debugging.2 SP1.cob rtsora32 myapp. rather than the output from the precompiler.int If you're using Server Express 2. Oracle9i.int or 64-bit : procob / procob18 . We do not use ADA. I hope this helps -. SimonT. If invoking Pro*COBOL directly. We still seem to be getting a very unusual error with our c ompiles in or makes. as you will see the original source code while animating. Cobsql only supported the creation of 32-bit applications.0 . I thought this must have been included by accident. Prior to SX 2. MF COB OL 4.pco cob -it myapp. you should see something along the lines of : Pro*COBOL: Release 9. When we attempt to compile our COBOL it works fine. but can find no flag or install option for it.

then if you invoke 'whence procob'.2. does it show procob as being picked up from your Oracle bin directory (/home/oracle/9. SimonT.0/bin/procob in my case) ? If you're either not seeing the correct Pro*COBOL banner. Regards. Cheers Wayne Note 6: ======= Doc ID: Note:2440385. We have the solution to our problem: The problem is resolved by modifying the line in the job from: make -f $SRC_DIR/procob. with the Oracle environment set up : cd $ORACLE_HOME/precomp/lib make -f ins_precomp. or Pro*Fortran)? Assuming you see something other than a Pro*COBOL banner.cob SYSDATE. or do you see a different banner (say. Logged in under your Oracle user ID.followed by a list of Pro*COBOL options.cob CNTLG ET. or it's not located in the correct directory. Re: Re: Server Express 64bit and Oracle 9i problem (114) on AIX 5. cob" EXE=$SRC_DIR/PFEM025A to make -f $SRC_DIR/procob. All is working fine.mk build COBS="$SRC_DIR/PFEM025A.mk COBS="$SRC_DIR/PFEM025A. I'd suggest rebuilding the procob and procob32 binaries.mk procob32 procob and then try your compilation process again.cob" EXE=$SRC_DIR/PFEM025A It appears this (build keyword) is not a requirement for the job to run on S olaris but is for AIX.cob SYSDATE. Pro*ADA. Bug 2440385 AIX: Support for 64 bit ProCobol . Do you see this.cob CN TLGET.8 Content Type: TEXT/X-HTML Subject: Support Description of Bug 2440385 Creation Date: 08-AUG-2 003 Type: PATCH Last Revision Date: 15-AUG-2003 Status: PUBLISHED Click here for details of sections in this note.2 Hi Simon Firstly. it was greatly appreciated. thanks for all your help.

o make: 1254-004 The error code from the last command is 1.2.4 (Server Patch Set) Symptoms: (None Specified) Related To: Pro* Precompiler Description Add support for 64 bit ProCobol The full bug text (if published) can be seen at Bug 2440385 This link will not work for UNPUBLISHED bugs. Affects: Product (Component) Precompilers (Pro*COBOL) Range of versions believed to be affected Versions >= 7 but < 10G Versions confirmed as being affected Platforms affected Aix 64bit 5L Fixed: 9.0. My environment variable is as follows: COBDIR=/usr/lpp/cobol LD_LIBRARY_PATH=$ORACLE_HOME/lib:/app/oracle/product/9.0.2.0/precomp/l ib/rtsora rtsora32 Linking /app/oracle/product/9.3 This issue is fixed in 9.0. Stop. Note 7: ======= Displayed below are the messages of the selected thread.mk LIBDIR=lib32 EXE=/app/oracle/product/9.This note gives a brief overview of bug 2440385.mk relink EXENAME=rtsora /bin/make -f ins_precomp.0/network/lib SHLIB_PATH=$ORACLE_HOME/lib64:/app/oracle/product/9.0/lib32 I added 'define=bit64' on precomp config file.11 $>make -f ins_precomp. Any ideas on what could be wrong.0/precomp/lib32/cobsqlintf. Thanks.0.3 (I believe my patch is up-to-date).2.2. Our Micro Focus compiler version is 2. .0/precomp/lib/rtsora cob64: bad magic number: /app/oracle/product/9.2.2. make: 1254-004 The error code from the last command is 2. Thread Status: Closed From: Cathy Agada 18-Sep-03 21:40 Subject: How do I relink rtsora for 64 bit processing How do I relink rtsora for 64 bit processing I have the following error while relinking "rtsora" on AIX 5L/64bit platform on oracle 9.2.2.

2. Amit Chitnis 19-Sep-03 05:26 Subject: Re : How do I relink rtsora for 64 bit processing Cathy.2. ==OR== You can dowload and apply the latest 9.2.0.1 Content Type: TEXT/X-HTML Subject: Building Pro*COBOL Programs Fails With "cob64: bad magic number: " Creation Date: 08-APR-2003 Type: PROBLEM Last Revision Date: 15-APR-2003 Status: PUBLISHED fact: Pro*COBOL 9.0.3 One-Off patch for Pro*COBOL 9.2 has been provided in Metalink Patch Number 2440385 Reference: How to Download a Patch from Oracle Note 9: ======= .2.0/precomp/lib32/cobsqlintf.1 was provided through one off pat ch for bug 2440385 You will need to download and apply the patch for bug 2440385.4 patchset where the bug is fixed.0.0.From: Oracle.2. Support for 64 bit Pro*Cobol 9.o cause: Bug 2440385 AIX: Support for 64 bit ProCobol fix: This is fixed in Pro*COBOL 9. Note 8: ======= Doc ID: Note:215279.2.0.2.0.2 fact: Pro*COBOL 9. Amit Chitnis.1 fact: AIX-Based Systems (64-bit) symptom: Building Pro*COBOL programs fails symptom: cob64: bad magic number: %s symptom: /oracle/product/9.3 on AIX 5. Thanks.

0. then from looking at the makefiles -ins_precomp. ORACLE_SID as appropriate for your installation> export PATH=$COBDIR/bin:$ORACLE_HOME/bin:$PATH 32-bit : export LIBPATH=$COBDIR/lib:$ORACLE_HOME/lib32:$LIBPATH cd $ORACLE_HOME/precomp/lib make LIBDIR=lib32 -f ins_precomp.then the effective commands to use to re-link the run-time correctly are as follows (logged in under your Oracle user ID) : either mode: <set up COBDIR.62: ORA-12170: ================= Connection Timeout. Then just copy the procobol files to the cobol directory. try to get the pro cobol patch for 9203.mk -.5. ORACLE_HOME. 19. ORACLE_BASE. Description of parameter SQLNET. Please use the MetaLink "Feedback" button to advise Oracle of any issues related to this article. in seconds.2.mk rtsora Note 10: ======== On 9. for a client to connect with the database serve r and provide the necessary authentication information.INBOUND_CONNECT_TIMEOUT Creation Date: 26-MAY-2004 Type: BULLETIN Last Revision Date: 10-FEB-2005 Status: MODERATED *** This article is being delivered in Draft form and may contain errors.mk and env_precomp. say if you've updated your COBOL environment since installing Oracle. Doc ID: Note:274303. *** PURPOSE ------To specify the time.If you wish to recreate those executables.1 Content Type: TEXT/X-HTML Subject: Description of parameter SQLNET.mk EXE=rtsora32 rtsora32 64-bit: export LIBPATH=$COBDIR/lib:$ORACLE_HOME/lib:$LIBPATH cd $ORACLE_HOME/precomp/lib make -f ins_precomp.INBOUND_CONNECT_TIMEOUT ------------------------------------------------------- .

Without this parameter. To protect both the database server and the listener.INBOUND_CONNECT_TIMEOUT=3 RELATED DOCUMENTS ----------------Oracle9i Net Services Reference Guide.INBOUND_CONNECT_TIMEOUT parameter to specify the time.ora file. then the database server terminates the connection. consider the following recommendations: *Set both parameters to an initial low value. whereby malicious clients attempt to flood database servers with connect requests that consume resources. Part Number A96581-02 SQLNET. Oracle Corporation recommends setting this parameter in combination with the INBOUND_CONNECT_TIMEOUT_listener_name parameter in the listener. for a client to connect with the database server and provide the necessary authentication information.EXPIRE_TIME: ------------------Purpose: Determines time interval to send a probe to verify the session is alive See Also: Oracle Advanced Security Administrator's Guide Default: None . This has to be configured in sqlnet.log file. then increment the time as needed.This parameter has been introduced in 9i version.INBOUND_CONNECT_TIMEOUT parameter. For example.2). Connections without authentication can introduce possible denial-of-service attacks. If the client fails to establish a connection and complete authentication in the time specified. If clients are unable to complete connections within the specified time due to system or network delays that are normal for the particular environment. The client receives either an ORA-12547: TNS:lost contact or an ORA-12637: Packet receive failed error message. Release 2 (9. *Set the value of the INBOUND_CONNECT_TIMEOUT_listener_name parameter to a lower value than the SQLNET. By default is set to None Example SQLNET. the database server logs the IP address of the client and an ORA-12170: TNS:Connect timeout occurred error message to the sqlnet. Use the SQLNET. When specifying values for these parameters. you can set INBOUND_CONNECT_TIMEOUT_listener_name to 2 seconds and INBOUND_CONNECT_TIMEOUT parameter to 3 seconds. in seconds.ora file. a client connection to the database server can stay open indefinitely without authentication. In addition.

This parameter must be set on the server PROBLEM: Long query (20 minutes) returns ORA-01013 after about a minute. The architecture to do that means that the server will send a probe packet to th e client. The manual part number is A54757. Oracle Net Services . It was not intended for that feature but it is a byproduct of the design.1 Subject: SQL*Net.ORA-01013 sqlnet.expire_time should be set on the server. The parameter was changed to.. the server process exits.ORA. sqlnet. If not. You won't need to change your firewall. That will in short reset the idle timers on the firewall. SOLUTION: The SQLNET..SQLNET.expire_time=10 sqlnet. The server sends keep alive traf fic over connections that have already been established. Keywords: SQLNET. SQLNET.expire_time Enables dead connection detection. If you happen to have the disconnects from idle timers then it may help. that is.ORA parameter SQLNET.EXPIRE_TIME was set to a one(1). after the specifed time (in minutes) the server checks if the client is still connected.63: Tracing SQLNET: ====================== Note 1: ------- Doc ID: Note:219968. This is documented in the Oracle Troubleshooting manual on page 324.Minimum Value: 0 minutes Recommended Value: 10 minutes Example: sqlnet.Tracing and Logging at a Glance Type: BULLETIN .EXPIRE_TIME=2147483647 This allowed the query to complete. Net8. That probe packet is viewed by the most firewalls as traffic on the line.expire_time is actually intended to test connections in order to allow or acle to clean up resources from connection that abnormally terminated. 19.01.EXPIRE_TIME.

Status: PUBLISHED Content Type: TEXT/X-HTML Creation Date: 20-NOV-2002 Last Revision Date: 26-AUG-2003 TITLE ----SQL*Net. TRACE_LEVEL_[CLIENT|SERVER|LISTENER] TRACE_FILE_[CLIENT|SERVER|LISTENER] TRACE_DIRECTORY_[CLIENT|SERVER|LISTENER] TRACE_UNIQUE_[CLIENT|SERVER|LISTENER] TRACE_TIMESTAMP_[CLIENT|SERVER|LISTENER] TRACE_FILELEN_[CLIENT|SERVER|LISTENER] TRACE_FILENO_[CLIENT|SERVER|LISTENER] LOG_FILE_[CLIENT|SERVER|LISTENER] LOG_DIRECTORY_[CLIENT|SERVER|LISTENER] LOGGING_LISTENER TNSPING. PURPOSE ------The purpose of Oracle Net tracing and logging is to provide detailed information to track and diagnose Oracle Net problems such as connectivity issues. the document also serves as a quick reference. SCOPE & APPLICATION ------------------The aim of this document is to overview SQL*Net.x]) and Net8 (Oracle8/8i [v8. Net8. Oracle Net Services . Net8. abnormal disconnection and connection delay. The article does not intend to describe trace/log file contents or explain how to interpret them.Tracing and Logging at a Glance.TRACE_LEVEL = = = = = = = [0-16|USER|ADMIN|SUPPORT|OFF] <FILE NAME> <DIRECTORY> [ON|TRUE|OFF|FALSE] [ON|TRUE|OFF|FALSE] #Oracle8i+ <SIZE in KB> #Oracle8i+ <NUMBER> #Oracle8i+ = <FILE NAME> = <DIRECTORY NAME> = [ON|OFF] = [0-16|USER|ADMIN|SUPPORT|OFF] . Logging reports summary. Oracle Net Services is the replacement name for the Oracle Networking product formerly known as SQL*Net (Oracle7 [v2. The document provides the reader with the minimum information necessary to generate trace and log files with a view to forwarding them to Oracle Support Services (OSS) for further diagnosis. Tracing provides varying degrees of information that describe connection-specific internal operations during Oracle Net usage. Although only basic information on how to enable and disable tracing and logging features is described. the term Oracle Net is used thoughout this article and refers to all Oracle Net product versions. status and error messages.0/8. For consistency. The intended audience includes novice Oracle users and DBAs alike. Oracle Net Services tracing and logging facilities.1]). LOG & TRACE PARAMETER OVERVIEW -----------------------------The following is an overview of Oracle Net trace and log parameters.

TRC SQLNET.LOG_DIRECTORY NAMES. Verify which Oracle Net configuration files are in use. the suffix name should be the actual Listener name.TRC SQLNET.TRACE_FILE NAMESCTL. 3. CONFIGURATION FILES ------------------Files required to enable Oracle Net tracing and logging features include: Oracle Net Listener Oracle Net . Oracle Net tracing and logging can consume vast quantities of disk space. For parameters suffixed with LISTENER. 2.ORA on SQLNET. an example trace parameter name would be TRACE_LEVEL_PROD_LSNR=OFF. Oracle Net tracing should only be enabled for the duration of the issue at .ORA on NAMES. For example. /tmp is used for swap space. Although generally writable by all users.Server TNSPING Utility Oracle Name Server Oracle NAMESCTL Oracle Connection Manager LISTENER.Client Oracle Net .LOG_FILE NAMES.TRACE_UNIQUE NAMES. Oracle Net configuration files are sought and resolved from the following locations: TNS_ADMIN environment variable (incl.ORA on CMAN.TNSPING. Windows Registry Key) /etc or /var/opt/oracle (Unix) $ORACLE_HOME/network/admin (Unix) %ORACLE_HOME%/Network/Admin or %ORACLE_HOME%/Net80/Admin (Windows) Note: User-specific Oracle Net parameters may also reside in $HOME/sqlnet.ORA client server client/Server server LISTENER.LOG_UNIQUE NAMESCTL. Monitor for sufficient disk space when tracing is enabled.TRACE_UNIQUE = <DIRECTORY> = = = = = = = = = = = [0-16|USER|ADMIN|SUPPORT|OFF] <FILE NAME> <DIRECTORY> [ON|OFF] <FILE NAME> <DIRECTORY> [ON|OFF] [0-16|USER|ADMIN|SUPPORT|OFF] <FILE NAME> <DIRECTORY> [ON|OFF] Note: With the exception of parameters suffixed with LISTENER.TRACE_LEVEL NAMESCTL.TRACE_DIRECTORY NAMES.TRACE_LEVEL NAMES. if the Listener name is PROD_LSNR.TRACE_DIRECTORY NAMES.ORA SQLNET. By default.ora file. An Oracle Net server installation is also a client. this is not an ideal location for trace/log file generation. On some Unix operating systems.ORA SQLNET.TRC TNSPING.TRC CONSIDERATIONS WHEN USING LOGGING/TRACING ----------------------------------------1.TRACE_DIRECTORY NAMESCTL.ORA on SQLNET. all other parameter suffixes and prefixes [CLIENT|NAMES|NAMESCTL|SERVER|TNSPING] are fixed and cannot be changed.TRACE_FILE NAMES.TRC NAMES.

Trace file is automatically appended with '. Directory should be writable by the connecting user and/or Oracle software owner. . LOG & TRACE PARAMETERS ---------------------This section provides a detailed description of each trace and log parameter. Oracle Net tracing should always be disabled after problem resolution. Configuration file is SQLNET. TRACE LEVELS TRACE_LEVEL_[CLIENT|SERVER|LISTENER] = [0-16|USER|ADMIN|SUPPORT|OFF] Determines the degree to which Oracle Net tracing is provided.TRC. Any valid operating system file name.provides no tracing. LISTENER. Trace file names are automatically appended with '_<PID>. Configuration file is SQLNET. Configuration file is SQLNET. the trace level is OFF. SUPPORT (equivalent to 16) trace information required by OSS for troubleshooting. Oracle Net (client/server) tracing takes immediate effect after tracing parameters are added to SQLNET.hand.ORA. LISTENER. Large trace/log files place an overhead on the processes that generate them.ORA. Default trace file name is SQLNET. Alternatively. LISTENER. Ensure that the target trace/log directory is writable by the connecting user. TRACE FILE NAME TRACE_FILE_[CLIENT|SERVER|LISTENER] = <FILE NAME> Determines the trace file name. LISTENER.ORA.ORA. In the absence of issues. Listener tracing requires the Net Listener to be reloaded or restarted after adding trace parameters to LISTENER.ORA. OFF USER ADMIN (equivalent to 0) disabled .TRC. (equivalent to 6) traces to identify installation-specific problems.TRC'. By default.ORA.level 16 is the most verbose tracing level.ORA.ORA. UNIQUE TRACE FILES TRACE_UNIQUE_[CLIENT|SERVER|LISTENER] = [ON|TRUE|OFF|FALSE] Allows generation of unique trace files per connection. the disabling of tracing and/or logging will improve Oracle Net overall efficiency.ORA. LISTENER. 5. TRACE DIRECTORY TRACE_DIRECTORY_[CLIENT|SERVER|LISTENER] = <DIRECTORY> Determines the directory in which trace files are written. Level 0 is disabled .TRC'. 4. regularly truncating log files will also improve efficiency.ORA. Default trace directory is $ORACLE_HOME/network/trace. Any valid operating system directory name. Configuration file is SQLNET. (equivalent to 4) traces to identify user-induced error conditions. Oracle software owner and/or user that starts the Net Listener.

Default log file name is SQLNET. Any valid operating system directory name.ORA. DISABLING LOGGING LOGGING_LISTENER = [ON|OFF] Disables Listener logging facility.ORA. MAXIMUM TRACE FILE LENGTH TRACE_FILELEN_[CLIENT|SERVER|LISTENER] = <SIZE> Determines the maximum trace file size in Kilobytes (Kb). LISTENER. Suitable when disk space is limited or when tracing is required to be enabled for long periods. LOG FILE NAME LOG_FILE_[CLIENT|SERVER|LISTENER] = <FILE NAME> Determines the log file name. Available from Oracle8i onwards.ORA. Configuration file is SQLNET. Configuration file is SQLNET.ORA.ORA Suitable for hanging or slow connection issues. Default value is 1 (file). Configuration file is SQLNET.Unique tracing is ideal for sporadic issues/errors that occur infrequently or randomly. Log file is automatically appended with '.ORA. Configuration file is LISTENER.SS] is recorded against each operation traced by the trace file.LOG. Default value is OFF TRACE TIMING TRACE_TIMESTAMP_[CLIENT|SERVER|LISTENER] = [ON|TRUE|OFF|FALSE] A timestamp in the form of [DD-MON-YY 24HH:MI. TRACE FILE CYCLING TRACE_FILENO_[CLIENT|SERVER|LISTENER] = <NUMBER> Determines the maximum number of trace files through which to perform cyclic tracing. Configuration file is SQLNET. LISTENER. LISTENER. Default value is is OFF.ORA. Default value is UNLIMITED. Directory should be writable by the connecting user or Oracle software owner.ORA. LISTENER. LOG DIRECTORY LOG_DIRECTORY_[CLIENT|SERVER|LISTENER] = <DIRECTORY NAME> Determines the directory in which log files are written. Available from Oracle8i onwards. May be any valid operating system file name. Available from Oracle8i onwards.LOG'.LOG.ORA. LISTENER. Default value is ON. .ORA. LISTENER. Default directory is $ORACLE_HOME/network/log.ORA. Configuration file is SQLNET.

1/network/trace trace_timestamp_listener = on trace_filelen_listener = 100 trace_fileno_listener = 2 logging_listener = off log_directory_listener = /u01/app/oracle/product/9.trace_level = 16 names.1/network/log tnsping.1/network/trace trace_unique_client = on trace_timestamp_client = on trace_filelen_client = 100 trace_fileno_client = 2 log_file_client = cli log_directory_client = /u01/app/oracle/product/9.trace_unique = on LISTENER (LISTENER.0.trace_level = admin SERVER (SQLNET.0.trace_file = namesctl namesctl.trace_directory = /u01/app/oracle/product/9.ORA) trace_level_client = 16 trace_file_client = cli trace_directory_client = /u01/app/oracle/product/9.ORA) names.0.1/network/log log_file_listener=listener NAMESERVER TRACE (NAMES.ORA) trace_level_server = 16 trace_file_server = svr trace_directory_server = /u01/app/oracle/product/9.1/network/trace namesctl.ORA) trace_level_listener = 16 trace_file_listener = listener trace_directory_listener = /u01/app/oracle/product/9.0.0.0.0.1/network/trace trace_unique_server = on trace_timestamp_server = on trace_filelen_server = 100 trace_fileno_server = 2 log_file_server = svr log_directory_server = /u01/app/oracle/product/9.ORACLE NET TRACE/LOG EXAMPLES ----------------------------CLIENT (SQLNET.trace_directory = /u01/app/oracle/product/9.trace_level = 16 namesctl.trace_directory = /u01/app/oracle/product/9.0.1/network/log namesctl.ORA) tracing = yes RELATED DOCUMENTS ----------------- .trace_unique = off CONNECTION MANAGER TRACE (CMAN.1/network/trace names.0.1/network/trace tnsping.trace_file = names names.

Note Note Note Note Note Note 16658. shows the state of the TNS software at various layers. by way of the error stack. This article is based on usage of SQL*NET v2. ________________________________________ 1. The log file provides additional information for an administrator when the error on the screen is inadequate to understand the failure.1 111916. What is the Log Facility? ============================ All errors encountered in SQL*Net are logged to a log file for evaluation by a network or database administrator.1 73988. The properties of the log file are: .1 39774.3.1 Subject: LOG & TRACE Facilities on NET v2.6 (7) Tracing SQL*Net/Net8 SQLNET.6 1030488. Type: FAQ Status: PUBLISHED Content Type: TEXT/X-HTML Creation Date: 25-JUL-1996 Last Revision Date: 31-JAN-2002 LOG AND TRACE FACILITIES ON SQL*NET V2 ====================================== This article describes the log and trace facilities that can be used to examine application connections that use SQL*Net. It explains how to invoke the trace facility and how to use the log and trace information to diagnose and resolve operating problems. The log file.1 1011114. You may require further information from the Oracle operating system-specific documentation for some details of your specific operating environment.ORA Logging and Tracing Parameters Log & Trace Facilities on Net v2 How to Get Cyclic SQL*Net Trace Files when Disk Space is Limited SQL*Net V2 Tracing Net8 Tracing Note 2: ------Doc ID: Note:39774. Following topics are covered below: o What the log facility is o What the trace facility is o How to invoke the trace facility o Logging and tracing parameters o Sample log output o Sample trace output Note: Information in this section is generic to all operating system environments.

a Names server's operational events are written to a specified logfile.Abnormal termination of established connections .o Error information is appended to the log file when an error occurs. o The Navigator and Connection Manager components of the MultiProtocol Interchange may have logging turned on or off. ________________________________________ 2. If on.Difficulties in establishing connections . and listener cannot be disabled. This is an essential feature that ensures all errors are recorded. when the log file does not provide a clear indication of the cause.the Connection Manager and pumps . What is the Trace Facility? ============================== The trace facility allows a network or database administrator to obtain more information on the internal operations of the components of a TNS network than is provided in a log file. o The Names server may have logging turned on or off. logging includes connection statistics. a log file can only be replaced or erased by an administrator.) o Logging of errors for the client. Attention: The trace facility uses a large amount of disk space and may have a significant impact upon system performance. Components that can be traced using the trace facility are: o Network listener o SQL*Net version 2 components .the Navigator o Oracle Names .Names Control Utility The trace facility can be used to identify the following types of problems: .Names server .SQL*Net client . You set logging parameters using the Oracle Network Manager. The trace facility is typically invoked during the occurrence of an abnormal condition. Tracing an operation produces a detailed sequence of statements that describe the events as they are executed. (Note that in general it is bad practice to delete these files while the program using them is still actively logging. All trace output is directed to trace output files which can be evaluated after the failure to identify the events that lead up to an error.SQL*Net server o MultiProtocol Interchange components . server. Therefore. o Generally.Fatal errors occurring during the operation of TNS network components . although client log files can be deleted by the user whose application created them. If on. you are cautioned to turn the trace facility ON only as part of a diagnostic procedure and to turn it OFF promptly when it is no longer necessary.

LOG): **************************************************************** Fatal OSN connect error 12533. What is the Difference between Logging and Tracing? ====================================================== While logging provides the state of the TNS components at the time of an error. When an error occurs. a trace file can be generated for more information.0.0 . Reported Error (On the screen in SQL*Forms): ERROR: ORA-12533: Unable to open message file (SQL-02113) Logged Error (In the log file.14.0.Developer's Release Oracle Bequeath NT Protocol Adapter for SunOS: Version 2.Developer's Release Unix Domain Socket IPC NT Protocol Adaptor for SunOS: Version 2. This can often uncover low level errors in interaction with the underlying protocols. and misspelled the word "PORT" as "POT" in the connect descriptor. There are three levels of diagnostics. each providing more information than the previous level.0. 2. connecting to: (DESCRIPTION=(CONNECT_DATA=(SID=trace)(CID=(PROGRAM=)(HOST=lala) (USER=ginger)))(ADDRESS_LIST=(ADDRESS=(PROTOCOL=ipc) (KEY=bad_port))(ADDRESS=(PROTOCOL=tcp)(HOST=lala)(POT=1521)))) VERSION INFORMATION: TNS for SunOS: Version 2.0 Developer's Release Time: 07-MAY-93 17:38:50 Tracing to file: /home/ginger/trace_admin. It is not important that you understand in detail the contents of each of these results.) In the following example.Developer's Release TCP/IP NT Protocol Adapter for SunOS: Version 2.0. The reported error from Oracle7 or tools. a simple error message is displayed and a log file is generated.0. that using the trace facility has an impact on your system performance.0 . SQLNET. this is the single error that is commonly returned to the user. the user failed to use Oracle Network Manager to create a configuration file. The three levels are: 1.14. Optionally. The trace file containing English statements describing what the TNS software has done from the time the trace session was initiated until the failure is recreated.0. and therefore provides additional information about events prior to an error. 3.trc Tns error struct: . however. (Remember. this example is intended only to provide a comparison. tracing provides a description of all software events as they occur. The log file containing the state of TNS at the time of the error.0 .14.14.0.________________________________________ 3.0.

SQLNET.trc" level is 4 CONFIGURATION INFORMATION ENDS --- --.PARAMETER SOURCE INFORMATION FOLLOWS --Attempted load of system pfile source /private1/oracle/network/admin/sqlnet. contains the following information: --New New --TRACE trace trace TRACE CONFIGURATION INFORMATION FOLLOWS --stream is "/private1/oracle/trace_user.NOTE: FILE CONTAINS ERRORS. error stack follows -<ERROR>.TRC at the USER level.LOG CONFIGURATION INFORMATION FOLLOWS --Attempted open of log stream "/tmp_mnt/home/ginger/sqlnet.ora -<ERROR>.LOG CONFIGURATION INFORMATION ENDS --Unable to get data from navigation file tnsnav.failure.tnsnames.ora local names file is /home/ginger/.PARAMETER SOURCE INFORMATION ENDS ----.nr err code: 12206 TNS-12206: TNS:received a TNS error while doing navigation ns main err code: 12533 TNS-12533: TNS:illegal ADDRESS parameters ns secondary err code: 12560 nt main err code: 503 TNS-00503: Illegal ADDRESS parameters nt secondary err code: 0 nt OS err code: 0 Example of Trace of Error ------------------------The trace file.log" Successful stream open --.ora Parameter source was not loaded Error stack follows: NL-00405: cannot open parameter file Attempted load of local pfile source /home/ginger/. SOME NAMES MAY BE MISSING Calling address: (DESCRIPTION=(CONNECT_DATA=(SID=trace)(CID=(PROGRAM=)(HOST=lala)(USER=gi nger))) (ADDRESS_LIST=(ADDRESS=(PROTOCOL=ipc)(KEY=bad_port))(ADDRESS=(PROTOCOL=t cp)(HOST Getting local community information Looking for local addresses setup by nrigla No addresses in the preferred address list .NL-00427: bad list -<ERROR>.ora Parameter source loaded successfully -> PARAMETER TABLE LOAD RESULTS FOLLOW <Some parameters may not have been loaded See dump for parameters which loaded OK -> PARAMETER TABLE HAS THE FOLLOWING CONTENTS <TRACE_DIRECTORY_CLIENT = /private1/oracle trace_level_client = USER TRACE_FILE_CLIENT = trace_user --.ora system names file is /etc/tnsnames.sqlnet.

nsres: id=0.nt OS err code: 0 .nr err code: 12206 -<ERROR>.nt (2) err code: 0 -<ERROR>..nsres: id=0. ns=12541.. ns=12533. resnt[0]=511. ns2=12560. op=13. No community entries so iterate over address list This a local community access Got routable address information Making call with following address information: (DESCRIPTION=(EMPTY=0)(ADDRESS=(PROTOCOL=ipc)(KEY=bad_port))) Calling with outgoing connect data (DESCRIPTION=(CONNECT_DATA=(SID=trace)(CID=(PROGRAM=)(HOST=lala)(USER=gi nger))) (ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=lala)(POT=1521)))) (DESCRIPTION=(EMPTY=0)(ADDRESS=(PROTOCOL=ipc)(KEY=bad_port))) KEY = bad_port connecting. No community information so all addresses are "local" Resolving address to use to call destination or next hop Processing address list. nt[2]=0 connect attempt failed Call failed. resnt[2]=0 -<ERROR>. nt[1]=2. resnt[1]=2.nt main err code: 503 -<ERROR>.unable to open transport -<ERROR>. Call made to destination Processing address list so continuing Getting local community information Looking for local addresses setup by nrigla No addresses in the preferred address list TNSNAV..sd=8. No community entries so iterate over address list This a local community access Got routable address information Making call with following address information: (DESCRIPTION=(EMPTY=0)(ADDRESS=(PROTOCOL=tcp)(HOST=lala)(POT=1521))) Calling with outgoing connect data (DESCRIPTION=(CONNECT_DATA=(SID=trace)(CID=(PROGRAM=)(HOST=lala)(USER=gi nger))) (ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=lala)(POT=521)))) (DESCRIPTION=(EMPTY=0)(ADDRESS=(PROTOCOL=tcp)(HOST=lala)(POT=1521))) -<FATAL?>..ORA is not present.ORA is not present.. Exiting NRICALL with following termination result -1 -<ERROR>. nt[2]=0 Call failed..failed to recognize: POT -<ERROR>.... nt[0]=503. Getting local address information Address list being processed. No local communities entry. opening transport. -<ERROR>.. Getting local address information Address list being processed.ns main err code: 12533 -<ERROR>.. No community information so all addresses are "local" Resolving address to use to call destination or next hop Processing address list. op=1. nt[0]=511.. ns2=12560...error from nricall -<ERROR>.. nt[1]=0.ns (2) err code: 12560 -<ERROR>.TNSNAV. No local communities entry. op=1..

LOG LISTENER.stamp. any valid string can be used to create a log file name.-<ERROR>. Using Log Files ================== Follow these steps to track an error using a log file: 1. note that unexpected events are preceded with an -<ERROR>. In this example trace file. These events may represent serious errors. More serious and probably fatal errors are stamped with the -<FATAL?>. ________________________________________ 4. returning 12533 In the trace file.Couldn't connect.LOG Contains client and/or server information Contains listener information Contains Connection Manager and pump information Contains Navigator information Contains Names server information You can control the name of the log file. you can see that the root problem." is indicated by the trace line: -<FATAL?>. See your Oracle operating system specific manuals for platform specific restrictions.LOG NAVGATR. For each component. Browse the log file for the most recent error that matches the error number you have received from the application.failed to recognize: POT Most tracing is very similar to this.prefix.LOG INTCHG. If you have a basic understanding of the events the components will perform. minor errors. Notice that an entry or error stack in the log file is usually many lines in length.LOG NAMES. Log File Names ================= Log files produced by different components have unique names. This is almost always the last entry in the log file. The default file names are: SQLNET. you can identify the probable cause of an error in the text of the trace. _____________________________________ 5. The parameters are of the form: LOG_FILE_component = string For example: LOG_FILE_LISTENER = TEST Some platforms have restrictions on the properties of a file name. or merely unexpected results from an internal operation. In the example earlier in this . the misspelling of "PORT.

chapter. If the cause of the error is still not clear. Be sure to turn tracing off after you have re-executed the command. If the trace component configuration files are modified while the component is running. ________________________________________ 6.ORA for Client Tracing. ORA. LISTENER. Execute or start the component to be traced. move up the error stack to the second to last error and so on. Save existing trace file if you need to retain information on it.ORA. the last non-zero entry is the "ns" error 12560. NAMES. This appends Process Id to each file. 3. 4. For any component. This is usually the actual cause. For Names Control Utility.ORA. "Interpreting Error Messages. Specifically for each component: . 3. look up to the first non-zero entry in the error report.ORA. For Example: For Names server tracing. 5. see the previous chapter. files if unique trace files are require d. (For example. you can invoke the trace facility by editing the component configuration file that corresponds to the component traced.TRACE_UNIQUE=ON needs to be set in NAMES. 1. Look up the first non-zero entry in later chapters of this book for its recommended cause and action. Starting at the bottom. INTCHG. By default most trace files will overwrite an existing ones.ORA. 2. turn on tracing and re-execute the statement that produced the error message. the modified trace parameters will take effect the next time the component is invoked or restarted. The use of the trace facility is described in detail later in this chapter.) To understand the notation used in the error report. you would find the "ns" error 12560 under ORA-12560. ORA file. TRACE_UNIQUE_CLIENT=ON in SQLNET. The component config. NAMESCTL. In the example earlier in this chapter. and NAMES. files are SQLNET. the error number was 12207.TRACING_UNIQUE=TRUE needs to be in SQLNET. Each step is fully described in subsequent sections. Choose the component to be traced from the list: o o o o o o o Client Server Listener Connection Manager and pump (cmanager) Navigator (navigator) Names server Names Control Utility 2. TRACE_UNIQUE parameter need s to be included in appropriate config. If that error does not provide the desired information. Using the Trace Facility =========================== The steps used to invoke tracing are outlined here." 4.

The trace parameters must be created or edited manually.ORA | SQLNET. NAVIGATOR:Again. Set the trace parameters in the server-side SQLNET.TRC | | Server | | SQLNET.TRC | |-------------------|-----------------|------------------| | Listener | LISTENER.ORA and start the Names Control Utility 5. and their trace files are controlled by the trace parameters for the Connection Manager.ORA | LISTENER. NAMES CONTROL UTILITY: Set the trace parameters in SQLNET. SERVER: LISTENER: Set the trace parameters in the LISTENER.ORA and start the Connection Manager from the Interchange Control Utility or command line.ORA CONNECTION MANAGER: Set the trace parameters in INTCHG. ________________________________________ 7. The pumps are started automatically with the Connection Manager.ORA and start the Navigator NAMES SERVER: Trace parameters needs to be set in NAMES.TRC | | TNSPING Utility | | TNSPING.CLIENT: Set the trace parameters in the client-side SQLNET.ORA. The next process started by the listener will have tracing enabled.TRC | |-------------------|-----------------|------------------| .TRC | | Names Control | | | | Utility | | NAMESCTL. Setting Trace Parameters =========================== The trace parameters are defined in the same configuration files as the log parameters. set the trace parameters in INTCHG. Table below shows the configuration files for different network components and the default names of the trace files they generate. -------------------------------------------------------| Trace Parameters | Configuration | | | Corresponding to | File | Output Files | |-------------------|-----------------|------------------| | | | | | Client | SQLNET.ORA and start the Names server. a Pro*C application. Be sure to turn tracing off when you do not need it for a specific diagnostic purpose. such as SQL*Plus. or any application that uses the Oracle network products.ORA and invoke a client application.

TRC | |___________________|_________________|__________________| The configuration files for each component are located on the computer running that component. Similarly. The trace characteristics for two or more components of an Interchange are controlled by different parameters in the same configuration file. the configuration files contain the following information: o A valid trace level to be used (Default is OFF) o The trace file name (optional) o The trace file directory (optional) ________________________________________ 7a.TRC | |-------------------|-----------------|------------------| | Names server | NAMES.ORA file.| Interchange | INTCHG.TRC | | Pumps | | PMP. and at what level.ORA | | | Connection | | | | Manager | | CMG. For example. if there are multiple listeners on a single computer. UNIX server) | | | | | |------------------------|----------------|------------------------------------| |Parameters for Client | |===================== | |------------------------------------------------------------------------------| | | | | | TRACE_LEVEL_CLIENT | OFF/USER/ADMIN | TRACE_LEVEL_CLIENT=USER | | | | | | TRACE_FILE_CLIENT | string | TRACE_FILE_CLIENT=CLIENT | | | | | | TRACE_DIRECTORY_CLIENT | valid directory| TRACE_DIRECTORY_CLIENT=c:\NET\ADMIN| | | | | | TRACE_UNIQUE_CLIENT | OFF/ON | TRACE_UNIQUE_CLIENT=ON | | | | | .ORA Diagnostic Parameters ========================================== The SQLNET. Valid SQLNET.ORA caters for: o Client Logging & Tracing o Server Logging & Tracing o TNSPING utility o NAMESCTL program -----------------------------------------------------------------------------| | | | | PARAMETERS | VALUES | Example (DOS client.TRC | | Navigator | | NAV. For each component. there are separate sets of parameters for the Connection Manager and the Navigator that determine which components will be traced. each listener is controlled by parameters that include the unique listener name in the LISTENER.ORA | NAMES.

TRACE_LEVEL | OFF/USER/ADMIN | TNSPING. UNIX server) | | | | | |------------------------|----------------|------------------------------------| | |Parameters for TNSPING | |====================== | |------------------------------------------------------------------------------| | | | | | TNSPING.TRACE_UNIQUE | TRUE/FALSE |NAMESCTL. You cannot create them using Oracle Network M anager.log | | | | | | LOG_DIRECTORY_SERVER | valid directory| LOG_DIRECTORY_SERVER=/tmp/trace | |------------------------------------------------------------------------------| ---(SQLNET.TRACE_DIRECTORY= | | | | /oracle7/network/trace | | | | | |------------------------------------------------------------------------------| |Parameters for Names Control Utility | |==================================== | |------------------------------------------------------------------------------| | | | | | NAMESCTL.ORA file.TRACE_DIRECTORY| directory |TNSPING.TRACE_LEVEL=user | | | | | | NAMESCTL.)--------------------------------------------------------| | | | | PARAMETERS | VALUES | Example (DOS client.| LOG_FILE_CLIENT | string | LOG_FILE_CLIENT=CLIENT | | | | | | LOG_DIRECTORY_CLIENT | valid directory| LOG_DIRECTORY_CLIENT=c:\NET\ADMIN | |------------------------------------------------------------------------------| |Parameters for Server | |===================== | |------------------------------------------------------------------------------| | | | | | TRACE_LEVEL_SERVER | OFF/USER/ADMIN | TRACE_LEVEL_SERVER=ADMIN | | | | | | TRACE_FILE_SERVER | string | TRACE_FILE_SERVER=unixsrv_2345.ORA file. .TRACE_UNIQUE=TRUE or ON/OFF| | | | | -----------------------------------------------------------------------------Note: You control log and trace parameters for the client through Oracle Network Manager.ORA Cont.TRACE_FILE=nc_south.TRACE_DIRECTORY| directory |NAMESCTL.TRACE_DIRECTORY=/o7/net/trac e| | | | | | NAMESCTL.TRACE_FILE | file |NAMESCTL.TRACE_LEVEL | OFF/USER/ADMIN |NAMESCTL.trc | | | | | | TRACE_DIRECTORY_SERVER | valid directory| TRACE_DIRECTORY_SERVER=/tmp/trace | | | | | | LOG_FILE_SERVER | string | LOG_FILE_SERVER=unixsrv.trc | | | | | | NAMESCTL. Parameters for Names Control Utility & TNSPING Utility need to be added manually to SQLNET.TRACE_LEVEL=user | | | | | | TNSPING. You control log and trace parameters for the server by manually adding the desired parameters to the SQLNET.

Valid INTCHG. UNIX server ) | | | (default)| | |------------------------|--------------------|-----------------------------------| | | | | |TRACE_LEVEL_CMANAGER | OFF|USER|ADMIN | TRACE_LEVEL_CMANAGER=USER | | | | | |TRACE_FILE_CMANAGER | string (CMG.ORA Diagnostic Parameters ============================================ The following table shows the valid LISTENER.TRC) | TRACE_FILE_CMANAGER=CMANAGER | . UNIX server) | | | | | |------------------------|----------------|------------------------------------| | | | | |TRACE_LEVEL_LISTENER | USER | TRACE_LEVEL_LISTENER=OFF | | | | | |TRACE_FILE_LISTENER | string | TRACE_FILE_LISTENER=LISTENER | | | | | |TRACE_DIRECTORY_LISTENER| valid directory| TRACE_DIRECTORY_LISTENER=$ORA_SQLNET V2 | | | | | |LOG_FILE_LISTENER | | string | | LOG_FILE_LISTENER=LISTENER | | | |LOG_DIRECTORY_LISTENER | valid directory| LOG_DIRECTORY_LISTENER=$ORA_ERRORS | | | | | -----------------------------------------------------------------------------________________________________________ 7c.ORA Diagnostic Parameters ========================================== The following table shows the valid INTCHG.ORA parameters used in logging and tracing of the listener.________________________________________ 7b. --------------------------------------------------------------------------------| | | | | PARAMETERS | VALUES | Example (DOS client. Valid LISTENER. -----------------------------------------------------------------------------| | | | | PARAMETERS | VALUES | Example (DOS client.ORA parameters used in logging and tracing of the Interchange.

TRC)| TRACE_FILE_NAVIGATOR=NAVIGATOR | | | | | |TRACE_DIRECTORY_NAVIGATOR| valid directory | TRACE_DIRECTORY_NAVIGATOR=C:\ADM IN | | | | | |LOG_FILE_NAVIGATOR |string (NAVGATR. ________________________________________ 7d.| | | | |TRACE_DIRECTORY_CMANAGER| valid directory | TRACE_DIRECTORY_CMANAGER=C:\ADMI N | | | | | |LOG_FILE_CMANAGER | string (INTCHG. Valid NAMES.LOG)| LOG_FILE_NAVIGATOR=NAVIGATOR | | | | | |LOG_DIRECTORY_NAVIGATOR | valid directory | LOG_DIRECTORY_NAVIGATOR=C:\ADMIN | | | | | |LOGGING_NAVIGATOR | OFF/ON | LOGGING_NAVIGATOR=OFF | | | | | |LOG_LEVEL_NAVIGATOR | ERRORS|ALL (ERRORS)| LOG_LEVEL_NAVIGATOR=ERRORS | | | | | --------------------------------------------------------------------------------Note: The pump component shares the trace parameters of the Connection Manager. but it generates a separate trace file with the unchangeable default name PMPpid.ORA Diagnostic Parameters .TRC.LOG)| LOG_FILE_CMANAGER=CMANAGER | | | | | |LOG_DIRECTORY_CMANAGER | valid directory | LOG_DIRECTORY_CMANAGER=C:\ADMIN | | | | | |LOGGING_CMANAGER | OFF/ON | LOGGING_CMANAGER=ON | | | | | |LOG_INTERVAL_CMANAGER | Any no of minutes | LOG_INTERVAL_CMANAGER=60 | | | (60 minutes)| | |TRACE_LEVEL_NAVIGATOR | OFF/USER/ADMIN | TRACE_LEVEL_NAVIGATOR=ADMIN | | | | | |TRACE_FILE_NAVIGATOR | string (NAV.

ORA file includes the following line: TRACE_LEVEL_CLIENT = ADMIN The following trace file is the result of a connection attempt that failed because the hostname is invalid.TRACE_UNIQUE=TRUE or ON/OFF | | | | | | NAMES. which is the listener. (B) An event is received (connection request). The trace output is a combination of debugging aids for Oracle specialists and English information for network administrators.TRACE_DIRECTORY=/o7/net/trace| | | | | | NAMES. as follows: -<FATAL?>.***hostname lookup failure! *** .log | | | directory | | NAMES. (C) A connection is established over the available transport (in this case TCP/IP).trc)| NAMES.ORA parameters used in logging and tracing of the Names server. the SQLNET.TRACE_UNIQUE | TRUE/FALSE | NAMES.TRACE_LEVEL | OFF/USER/ADMIN | NAMES. (D) The connection is refused by the application.LOG_DIRECTORY= /o7/net/log | | | | | -----------------------------------------------------------------------------________________________________________ 8.log)| NAMES.LOG_DIRECTORY | | file(names. UNIX server) | | | (default)| | |------------------------|----------------|------------------------------------| | | | | | NAMES. (E) The trace file shows the problem. -----------------------------------------------------------------------------| | | | | PARAMETERS | VALUES | Example (DOS client. Several key events can be seen by analyzing this output from beginning to end: (A) The client describes the outgoing data in the connect descriptor used to contact the server.TRACE_FILE | file(names.TRACE_DIRECTORY | directory | NAMES. Example of a Trace File =========================== In the following example.LOG_FILE=nsrv1.trc | | | | | | NAMES.TRACE_LEVEL=ADMIN | | | | | | NAMES.========================================= The following table shows the valid NAMES.LOG_FILE | | NAMES.TRACE_FILE=nsrv3.

the most likely incorrect value is the node name. error stack follows -<ERROR>.NL-00405: cannot open parameter file -<ERROR>. SOME NAMES MAY BE MISSING . ++++++ NOTE: TRACE FILE EXTRACT +++++++ --New New --TRACE trace trace TRACE CONFIGURATION INFORMATION FOLLOWS --stream is "/private1/oracle/trace_admin. If you look up Error 12545 in Chapter 3 of this Manual.failure.(F) Error 12545 is reported back to the client.tnsnames.ora local names file is /home/ginger/.ora system names file is /etc/tnsnames.LOG CONFIGURATION INFORMATION FOLLOWS --Attempted open of log stream "/private1/oracle/sqlnet. Action: Ensure the ADDRESS parameters have been entered correctly.tnsnames.NOTE: FILE CONTAINS ERRORS.trc" level is 6 CONFIGURATION INFORMATION ENDS --- ++++++ NOTE: Loading Parameter files now. +++++++ --.ora -<ERROR>.ora Parameter source loaded successfully -> PARAMETER TABLE LOAD RESULTS FOLLOW <Some parameters may not have been loaded See dump for parameters which loaded OK -> PARAMETER TABLE HAS THE FOLLOWING CONTENTS <TRACE_DIRECTORY_CLIENT = /private1/oracle trace_level_client = ADMIN TRACE_FILE_CLIENT = trace_admin --.ora Parameter source was not loaded Error stack follows: NL-00405: cannot open parameter file Attempted load of local pfile source /home/ginger/. you will find the following description: ORA-12545 TNS:Name lookup failure Cause: A protocol specific ADDRESS parameter cannot be resolved. +++++++ --.ora initial retry timeout for all servers is 500 csecs max request retries per server is 2 default zone is [root] Using nncin2a() to build connect descriptor for (possibly remote) databa se.PARAMETER SOURCE INFORMATION ENDS --++++++ NOTE: Reading Parameter files.LOG CONFIGURATION INFORMATION ENDS --Unable to get data from navigation file tnsnav.log" Successful stream open --. initial load of /home/ginger/.sqlnet.PARAMETER SOURCE INFORMATION FOLLOWS --Attempted load of system pfile source /private1/oracle/network/admin/sqlnet.

. No community entries so iterate over address list This a local community access Got routable address information ++++++ NOTE: Calling first address (IPC). op=1.NL-00427: bad list -<ERROR>. No local communities entry. .sd=8. No community information so all addresses are "local" Resolving address to use to call destination or next hop Processing address list. Getting local address information Address list being processed. Call made to destination Processing address list so continuing ++++++ NOTE: Looking for Routing Information. Getting local address information Address list being processed. resnt[0]=511.. SOME NAMES MAY BE MISSING Inserting IPC address into connect descriptor returned from nncin2a().ORA is not present.. resnt[2]=0 -<ERROR>.failure..nsres: id=0. +++++++ Getting local community information Looking for local addresses setup by nrigla No addresses in the preferred address list TNSNAV.ORA is not present... nt[2]=0 connect attempt failed Call failed. op=1. No local communities entry. +++++++ Making call with following address information: (DESCRIPTION=(EMPTY=0)(ADDRESS=(PROTOCOL=ipc)(KEY=bad_host))) Calling with outgoing connect data (DESCRIPTION=(CONNECT_DATA=(SID=trace)(CID=(PROGRAM=)(HOST=lala) (USER=ginger)))(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp) (HOST=lavender)(PORT=1521)))) (DESCRIPTION=(EMPTY=0)(ADDRESS=(PROTOCOL=ipc)(KEY=bad_host))) KEY = bad_host connecting. opening transport... nt[0]=511. error stack follows -<ERROR>.initial load of /etc/tnsnames. +++++++ Calling address: (DESCRIPTION=(CONNECT_DATA=(SID=trace)(CID=(PROGRAM=)(HOST=lala) (USER=ginger)))(ADDRESS_LIST=(ADDRESS=(PROTOCOL=ipc (KEY=bad_host))(ADDRESS=(PROTOCOL=tcp)(HOST=lavender) (PORT=1521)))) Getting local community information Looking for local addresses setup by nrigla No addresses in the preferred address list TNSNAV..NOTE: FILE CONTAINS ERRORS. ns=12541.. ++++++ NOTE: Looking for Routing Information.. nt[1]=2. ns2=12560. -<ERROR>..ora -<ERROR>. resnt[1]=2.unable to open transport -<ERROR>.

+++++++ Making call with following address information: (DESCRIPTION=(EMPTY=0)(ADDRESS=(PROTOCOL=tcp) (HOST=lavender)(PORT=1521))) Calling with outgoing connect data (DESCRIPTION=(CONNECT_DATA=(SID=trace)(CID=(PROGRAM=)(HOST=lala) (USER=ginger)))(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp) (HOST=lavender) (PORT=1521)))) (DESCRIPTION=(EMPTY=0)(ADDRESS=(PROTOCOL=tcp) (HOST=lavender)(PORT=1521))) port resolved to 1521 looking up IP addr for host: lavender -<FATAL?>. ns2=12560.nr err code: 12206 -<ERROR>. notices the . "error freeing extent (%s) of rollback segment (%s))" Cause: Some error occurred while freeing inactive rollback segment extents.ns main err code: 12545 -<ERROR>. you can identify the probable cause of an error in the text of the trace. A rollback segment has extended beyond OPTIMAL.*** hostname lookup failure! *** -<ERROR>. Action: Investigate the accompanying error.64 ORA-01595: error freeing extent (2) of rollback segment (9)): =================================================================== Note 1: ORA-01595.ns (2) err code: 12560 -<ERROR>..nt (2) err code: 0 -<ERROR>.nsres: id=0.nt OS err code: 0 -<ERROR>.. ns=12545.Couldn't connect. nt[0]=515.No community information so all addresses are "local" Resolving address to use to call destination or next hop Processing address list.. Exiting NRICALL with following termination result -1 -<ERROR>. What happens is that the first process gets to the end of an extent. 19. returning 12545 Most tracing is very similar to this. No community entries so iterate over address list This a local community access Got routable address information ++++++ NOTE: Calling second address (TCP/IP). op=13. 00000. nt[1]=0.. Note 2: Two factors are necessary for this to happen. If you have a basic understanding of the events the components will perform.nt main err code: 515 -<ERROR>.error from nricall -<ERROR>. There are two or more transactions sharing the rollback segment at the time of t he shrink. nt[2]=0 Call failed.

65: OUI-10022: oraInventory cannot be used because it is in an invalid state =============================================================================== Note 1: ------If there are other products installed through the OUI. The alternative solution is to raise OPTIMAL to reduce the risk of the error. That is the number of rollback segments you need.66: Failure to extend rollback segment because of 30036 condition ==================================================================== Not a serious problem. These errors happen sometimes when oracle is shrinking the rollback segments upto the optimal size. Run the installer using the -invPtrLoc parameter (eg: runInstaller -invPtrLoc /PATH/oraInst. Its not a failure per se . Look in V$RESOURCE_LIMIT for the high-water -mark of transactions. Do some undo tuning. since oracle will retry and succeed. You can try (and probably should) set optimal to null and maxextents to unlimited (which might minimize the frequency of these errors). This will retain the existing oraInventory directory and create a new = one for use by the new product. it throws this warning. But the next transaction blunders past the end of that extent before the recursive transaction has been committed. Modify the inventory_loc parameter to point to a different location for = the OUI to create the oraInventory directory. 19.loc file (depending on the UNIX system.67: ORA-06502: PL/SQL: numeric or value error: character string buffer too sm all ================================================================================ === ..loc). 19. So when it attempts to shrink the same rollback segment where its trying to write the undo. The undo data for shrinking is also kept in the rollback segments. create a copy of = the oraInst.need to shrink and begins the recursive transaction to do so. 19. Note 3: This error is harmless. possibly in /etc or /var/opt/oracle). The preferred solution is to have sufficient rollback segments to eliminate the sharing of rollback segments between processes.

END. Anyway I have a stored procedure similar to the following: PROCEDURE myproc(a_user IN VARCHAR2. BEGIN my_proc ('USER'. END. but if I replace the sql statement with p_1 := 'AB'. mtae. p_2 FROM my_table WHERE user_id = a_user. bec ause the variables I am selecting into are defined as the same types as the columns I'm selecting. it would suggest that a varia ble is not large enough to cope with a value being assigned to it. -.v2).<my_second_column>%TYPE) IS BEGIN SELECT my_first_column.<my_first_column>%TYPE. But I'm fairly sure that isn't the p roblem. it still fai ls.g.v1. DECLARE v1 varchar2(1). p_1 OUT <my_table>. Has anyone seen this before or anything similar that they might be able to help me with please? Thanks. my_second_column INTO p_1. / . e. I am having a strange problem with an ORA-06502 error I am getting and don't und erstand why. I would expect this error to be quite easy to fix. It succeeds if I do p_1 := 'A'. The variable I am selecting into is in fact a VARCHAR2(4). / The procedure is larger than this.Note 1: Hi. v2 varchar2(1). p_2 OUT <my_table>. But I don't understand why I'm getting the ORA-06502. but using error_position variables I have tra cked it down to one SQL statement.Answer 1: It is the code from which you are calling it that has the problem.

/ Comment from mtae Date: 07/28/2004 04:24AM PDT Author Comment It was the size of the variable that was being used as the actual parameter bein g passed in. I have not seen any problems. p_2 := v_2. []. [].1 seems to indicate it can be ignored: Cause This is due to unpublished Bug 4483084 'ORA-600 [LIBRARYCACHENOTEMPTYONCLOSE]' This is a bug in that an ORA-600 error is reported when it is found that somethi ng is still going on during shutdown. [].<my_first_column>%TYPE. p_1 OUT varchar2. Solution . END. 19. arguments: [LibraryCacheNotEmptyOnClose]. []. [] ================================================================================ ========================== thread: see this error every time I shutdown a 10gR3 grid control database on 10. v_2 <my_table>.2.<my_second_column>%TYPE. even though all opmn and OMS processes are down. Feeling very silly. BEGIN SELECT my_first_column.3 R DBMS. v_2 FROM my_table WHERE user_id = a_user. So far. but thanks. apart from the annoyin g shutdown warning.0. Note 365103. my_second_column INTO v_1. It does not indicate any damage or a problem in the system. sometimes you can look at a problem too long.Answer 2 try this: PROCEDURE myproc(a_user IN VARCHAR2. p_2 OUT varchar2) IS v_1 <my_table>. []. p_1 := v_1. [].-.68 ORA-00600: internal error code.

thread: ORA-00600: internal error code. [].69: ORA-12518 Tns: Listener could not hand off: ------------------------------------------------->>>> thread 1: Q: ORA-12518 Tns: Listener could not hand off client conenction Posted: May 31. ORA-12518: TNS:listener could not hand off client connection A: Your server is probably running out of memory and need to swap memory to disk. . Ram thread: 19. You need to Ignore this error.[]. []. although this has not been finalised.2. arguments: [LibraryCacheNotEmptyOnClose]. The error is harmless so it is unlikely that this will be backported to 10. [] 14-DEC-06 05:15:35 GMT Hi. as there is absolutely no impact to the database due to this error. [].ora and rest art the listener: DIRECT_HANDOFF_TTC_LISTENER=OFF You might need to increase the value of large_pool_size. 2007 2:02 AM Reply Dear exeprts. []. The error can be safely ignored as it does not indicate a problem with the datab ase. it is likely that the fix will be to report a more meani ngful external error. There is no patch available for the bug 4483084. A possible workaround is to set following parameter in the listener. Regards.At the time of writing. Plz tell me how can I resolve ORA-12518 Tns: Listener could not hand off client conenction. Thanks. []. One cause can be an Oracle process consuming too much memory.

But still i'm getting this error.>>>> thread 2: Q: Hi All. you could be running into firewall problems . contact Oracle Support Services.ora and listner. Action: Turn on listener tracing and re-execute the operation. i have used system name itself for HOST flag instead of IP address. -------So what does the listener trace indicate? A: Did you by any chance upgrade with SP2? If so. Frank van Bortel >>>> thread 3: Q: I install Oracle9i and Oracle8i on Win2000 Server. the initial contact made.1521 is open. Verify that the listener and database instance are properly configured for direct handoff.ora files entry. I found this error:ORA-12518: TNS:listener could not hand off client connectionw hen I logged on database.. -Regards. A: From Oracle's error messages docco. they seems to be ok. after sometime it works fine. My dat abase based on Oracle8i. If the problem persists. But. we see -------TNS-12518 TNS:listener could not hand off client connection Cause: The process of handing off a client connection to another process failed. but the handoff to a random (blocked!) port fails. Java programmers will be accessing the database. I checked tnsnames. I used Listener of 9i. Frequently they will get "ORA-12518: TNS:listener could not hand off" error and through sqlplus also i'll get this error. If I restarted database and listener it run but a few minutes it failed.. Can u h elp me??? . I'm using oracle 10g in window XP system. Can anybody tell me what might be the problem? Thanks.

majority of my users are away on easter brea k so when they return I will know whether this tweak has paid off or not.ora file. so 60% of RAM was being used by SGA a nd 40% by Windows. you might need to increase the value of large_pool_size. try DIRECT_HANDOFF_TTC_<listener name> = OFF in listener.ora. >>>> thread 5 ORA-12518: TNS:listener could not hand off client connection Your server is probably running out of memory and need to swap memory to disk.A: Are you usting MTS? First start the listener and then the database ( both the databases). Regards A: I think I've resolved the problem. I then installed our application on it. Basically my SGA settings were quite high. service on the database all looks ok. I had 3 users logged in to test the installation and everything was ok. Has anyone ever come across a issue like this in Oracle 10g. I basically reduced the total SGA to 800 MB and i've had no connection problems.5MHz each with 3GB RAM and 300GB harddisk on RAID 1. >>>> thread 4 Q: This weekend I installed Oracle Enterprise 10g release 2 on Windows 2003 server. that went smo othly as well. The server is a Xeon dual processor 2.ora file and sqlnet. ever since.ora and rest art the listener: DIRECT_HANDOFF_TTC_LISTENER=OFF Should you be working with Multi threaded server connections. The installation was fine. but majority got the ORA error above and have no access. I also restarted the listener service on the server. I checked the tnsnames. Now check the status of listener. Today morning we had 100 users trying to login and some got access. I've also increased no of sessions to 1000. . if nothing works. but I still get this error message. One cause can be an Oracle process consuming too much memory. A possible workaround is to set following parameter in the listener.

19.log Fri Feb 10 10:31:21 2006 Thread 1 cannot allocate new log. sequence 5416 Private strand flush not complete Current log# 8 seq# 5415 mem# 0: /db/oradata/bioprd/redo081.log What causes the "private strand flush not complete" message? A: This is not a bug.log Thread 1 advanced to log sequence 5416 Current log# 13 seq# 5416 mem# 0: /db/oradata/bioprd/redo131. it's the expected behavior in 10gr2. When you switch redo logs you will see this alert log message since all private strands have to be flushed to the current redo log. I'm using the Oracle 10g R2 in a server with Red Hat ES 4.log Current log# 8 seq# 5415 mem# 1: /u02/oradata/bioprd/redo082.log Current log# 8 seq# 5415 mem# 1: /u02/oradata/bioprd/redo082. Oracle Metalink note 372557.log Current log# 2 seq# 508 mem# 1: /usr/local/o1_mf_2_2cx5wrjk_. -. and can be disregarded because it relates to internal cache redo file management . somebody knows this error? The part of log. and it's related to the log_parall elism parameter. The note says that the number of strands depends on the cpu_count.log .70: Private strand flush not complete: -----------------------------------------. The "private strand flu sh not complete" is a "noise" error. and i received the following message in alert log "Private strand flush not complete".0. where I found this error is: Fri Feb 10 10:30:52 2006 Thread 1 advanced to log sequence 5415 Current log# 8 seq# 5415 mem# 0: /db/oradata/bioprd/redo081.thread: Q: HI. It notes that a strand is a new mechanism to assign redo latches to multiple processes.log Current log# 13 seq# 5416 mem# 1: /u02/oradata/bioprd/redo132.1 says that a "strand" is a new 10gr2 term for redo latches. sequence 509 Private strand flush not complete Current log# 2 seq# 508 mem# 0: /usr/local/o1_mf_2_2cx5wnw5_.thread: Q: I just upgraded to Oracle 10g release 2 and I keep getting this error in my aler t log Thread 1 cannot allocate new log.

maybee some ideas or info..log Error message :Thread 1 cannot allocate new log ----------------------------------------------Note 1: ------Q: Hi Iam getting error message "Thread 1 cannot allocate new log".. Private strand flush not complete What could this posible mean ?? Thu Feb 9 22:03:44 2006 Thread 1 cannot allocate new log..com/docs/cd/B19306_01/server.thread: Q: Hi.Thanks. A: Hi. -.htm#sthref4478 regards log file switch (private strand flush incomplete) User sessions trying to generate redo. sequence40994 .1 has brief explanation of this message.oracle. Note:372557. wait on this event when LGWR waits for DB WR to complete flushing redo from IMU buffers into the log buffer. Private strand flush not complete Current log# 2 seq# 386 mem# 0: Thread 1 advanced to log sequence Current log# 3 seq# 387 mem# 0: Thanks A: see http://download-uk. Wait Time: 1 second Parameters: None sequence 387 /path/redo02..log 387 /path/redo03. I`m having such info in alert_logfile. when DBWR is complete LGWR can then finish writing the cur rent log.102/b14237/waitevents 003. and then switch log files. Best Regards.

can any one help me out . the following corresponding messages: Thread 1 advanced to log sequence 248 Current log# 2 seq# 248 mem# 0: /prod1/oradata/logs/redologs02. Three reasons may explain this difference: .txt file. but the corresponding checkpoint associated is not terminated. Give me a solution. Rick Sometimes. The two statistics are: . This situation may also be checked by tracing two statistics in the BSTAT/ESTAT report.Background checkpoint completed. .log Thread 1 cannot allocate new log. Keep in mind the goal of only one log switch per hour. This situation may be encountered particularly when the transactional activity is important. you can see in your alert. your database hangs on checkpoints. regards A: Perhaps this will provide some guidance. how to overcome this problem.A checkpoints are starting but not completing . In this case.A DBWR which writes too slowly. which ideally . LGWR is unable to continue writing the next transactions until the checkpoints complete. If this is not true. Oracle must wait until the checkpoint is completely realized.Background checkpoint started. These two statistics must not be different more than once. The number of checkpoints completed and started as indicated by these statistics should be weighed against the duration of the bstat/estat report.A frequency of checkpoints which is too high. sequence 249 Checkpoint not complete This message indicates that Oracle wants to reuse a redo log file.log file. .

add more redo log groups . What are the post occurance measures/solutions for this. sequence xxx Checkpoint not complete I would appreciate a discussion on the following 1. .increase LOG_CHECKPOINT_INTERVAL . it is necessary to increase this value.increase size of online redo logs 3) Improve the efficiency of checkpoints enabling the CKPT process with CHECKPOINT_PROCESS=TRUE 4) Set LOG_CHECKPOINT_TIMEOUT = 0. The way to resolve incomplete checkpoints is through tuning checkpoints and logs: 1) Give the checkpoint process more time to cycle through the logs . What is the preventive measure to be taken / Methods to detect its occurance 3. Thread 1 advanced to log sequence xxx Current log# 2 seq# 248 mem# 0: /df/sdfds Thread 1 cannot allocate new log. The parameter linked to this task is: DB_BLOCK_CHECKPOINT_BATCH. When you want to accelerate the checkpoints. What are the basic reasons for this warning 2. Note 2: ------Q: Hi All. 5) Another means of solving this error is for DBWR to quickly write the dirty buffers on disk.should equate to one checkpoint per hour as well.increase the size of the redo logs 2) Reduce the frequency of checkpoints . DB_BLOCK_CHECKPOINT_BATCH specifies the number of blocks which are dedicated inside the batch size for writing checkpoints. Lets generate a good discussion thread for this database performance issue. Regards A: Increase size of your redo logs. This disables the checkpointing based on time interval. Sometimes this message is found in the alert log generated.

Some reports refer to a bug affecting Oracle versions op to 10. increasing the size of your logfiles should help (each log group should have at least 2 members on separate disks). data loading) may use up all three redo logs before the first redo log completes the archive and becomes available. also try adding an additional arch process. A: Configuring redo logs is an art and you may never archieve 100% of the time that there is no waiting for available log files. be aware of what type of hardware you are using.71: tkcrrsarc: (WARN) Failed to find ARCH for message (message:0x10): ------------------------------------------------------------------------. A checkpoint could not be completed because a new log is trying to be allocated while it is still in use (or hasn't been archived yet). If it slips below this ratio. thus Oracle will halt until the archive is completed.thread 1: Q: tkcrrsarc: (WARN) Failed to find ARCH for message (message:0x1) tkcrrpa: (WARN) Failed initial attempt to send ARCH message (message:0x1) Most repords speak of a harmless message. I have not found this to be helpful (for my particular databases).2 . raid-5 is slower for writes than raid-1. If you are not archiving. If you are archiving and have increased the size of the redo logs. but if your disk controller is slow. Also.0. But in my opinion. 19. a large transaction (for example. make sure to monitor the ratio of redo log entries to requests (it should be around 5000 to 1).2. This can happen if you are running very long transactions that are producing large amounts of redo (which you did not anticipate) and the redo logs are too small to handle it. I have read plenty of conflicting documentation on how to resolve this problem. Typically.A: Amongst other reasons. you may want to consider adding addtional members to your log groups and increasing their size. In the future. One of the "solutions" is to increase the size of your logbuffer. the best bet for your situation is to add one (or more) redo log instead of increase the size of the redo logs. Because even if your redo logs are huge. this happens when redo logs are not sized properly.

e. it is essential to have a re producible testcase to correctlydiagnose the underlying cause. For example. i.72 ORA-600 12333 ------------------thread 1: ORA-600[12333] is reported with three additional numeric values when arequest is being received from a network packet and the request code inthe packet is not recognized. arguments: [12333]. thread 2: We just found out that it was related to Block option DML RETURNINGVALUE in Forms4. or the clientapplication may have sent wrong data. [] Hello. The three additional values report theinvalid request values received. etc. 19. network hardware problems.. []. [3]. In one such bug. Where do you see or when do you get this error? Do you have any idea what was going on at the time of this error? Which process received it. the developer indicated that "The problem does not normally have any bad side effects. and the problem was solved Thanks anyway thread 3: From: Oracle.5 We set it to NO. There are many bugs logged for this error which are closed as 'could not reproduce'.19. It is not indicative of a problem with the database itself." So suggest you try to isolate what is causing it as much as possible. There can be many reasons for this: Network errors.73: SMON: Parallel transaction recovery tried: ------------------------------------------------Note 1: ------- . []. The error can be due to underlying network problems as well. or the data in the network bu ffermay have been overwritten. Kalpana Malligere 05-Oct-99 22:09 Subject: Re : ORA-00600: internal error code. If operating system network logs areavailable. anetwork erro r may have caused bad data to be received. Since there are many potential causes of thiserror. The error may have a number of different root causes. was it a background or user process? Were you running sql*loader? Does this error have any adverse impact on the application or database? We cannot generally progress unless there is reproducible test case or reproducible environment. An ORA-600 12333 occurs because there has been a client/server protocol violation. it is advis able to check them for evidence of networkfailures which may indicate network transmission problems. [81]. [0].

23:58:40 CST Note 3: ------Q: SMON: Parallel transaction recovery tried We found above message in alert_sid.453 *** 2006-06-29 21:33:05..1) 2006-06-29 21:33:05.EXE *** 2006-06-29 21:33:05. SMON start recovery in parrallel but failed and done in serial mode.695 SMON: Parallel transaction recovery tried A: Hi.000. This is an expected message when cleanup is occuring and you have fast_start_par allel_rollback set to cleanup rollback segments after a failed transaction Note 2: ------You get this message if SMON failed to generate the slave servers necessary to p erform a parallel rollback of a transaction. Check the value for the parameter. Note 4: . FAST_START_PARALLEL_ROLLBACK (default is LOW) . in my alert file I found the following message : "SMON: Parallel transaction rec overy tried" here the content of the smon log file: Redo thread mounted by this instance: 1 Oracle process number: 6 Windows thread id: 2816. it is information message .log file. A: No need to worry about it.484 *** SESSION ID:(5. LOW limits the number of rollback processes to 2 * CPU_COUNT. image: ORACLE..000 records in a table and the connection has been killed. You may want to set the value of this parameter to FALSE. HIGH limits the number of rollback processes to 4 * CPU_COUNT.484 SMON: Restarting fast_start parallel rollback *** 2006-06-30 02:50:54. Received on Wed Mar 10 2004 .Q: I was inserting 2.

With Real Application Clusters. at instance s tartup.74: KGX Atomic Operation: ============================ Oracle Database 10g Enterprise Edition Release 10.3.64bit Production With the Partitioning.. image: oracle@pl003 (TNS V1-V3) *** 2008-03-20 07:22:28.698) 2008-03-20 07:22:28. If any terminated transactions were skipp ed during instance recovery because of file-read or offline errors. OLAP and Data Mining options ORACLE_HOME = /dbms/tdbaaccp/ora10g/home System name: AIX Node name: pl003 Release: 3 Version: 5 Machine: 00CB560D4C00 Instance name: accptrid Redo thread mounted by this instance: 1 Oracle process number: 16 Unix process pid: 2547914.570 KGX cleanup.0. 0) idn 0 oper EXAM Cursor Parent uid 161 efd 5 whr 26 slp 0 oper=DEFAULT pt1=700000039ce1c30 pt2=700000039ce1e18 pt3=700000039ce2338 pt4=0 u41=0 stt=0 Note 1: ------Q: Hi there.571 *** SERVICE NAME:(SYS$USERS) 2008-03-20 07:22:28.What I want to know that how this concept is implemented in Oracledatabase? . SMON is also responsible for cleaning up temporary segments that are no longer in use and for coalescing contiguous free extents within dictionary managed tablespaces. SMON checks regularly to see whether it is needed. SMON recovers them when the tablespace o r file is brought back online. KGX Atomic Operation Log 700000036eb4350 Mutex 70000003f9adcf8(161. 19.2. the SMON process of one instance can perform ins tance recovery for a failed CPU or instance..0 .------The system monitor process (SMON) performs recovery. Questions 1)What is mutex?I know mutex are mutual exclusions and they are the concept of m ultiple threads. Other processes can call SMON if they detect a need for it. if necessary.570 *** SESSION ID:(161. Oracle has started using mutexes and it is said that they are more efficient as compared to latches.

they can be taken in s hared or exclusive mode. So if you have a cursor open (or cached in session cursor cache) you don't need to get the library cache latch (which was previously needed for changing cursor pin status).. the mutexes address o nly the pinning issue in library cache 2) mutexes are currently used for library cache cursors (not other objects like PL/SQL stored procs. Therefore you have much higher scalability when pinning/unpinning cursors (no li brary cache latching needed.which wouldn't be used for cursors anymore) 19. Thanks and regards Aman.. table defs etc) 3) As mutexes are a generic mechanism (not library cache specific) they're used in V$SQLSTATS underlying structures too 4) When mutexes are enabled. 2) The main advantages over latches are that mutexes requires less memory and ar e faster to get and release. latches and mutexes are different things and managed using different modules. you won't see cursor pins from X$KGLPN anymore (as X$KGLPN is a fixed table based on the KGL pin array . but you can modify the cursor's mutex refcount directly (with help of pointers in open cursor state area in sess ions UGA).. A: 1) Simply put mutexes are memory structures. Second. But the main scalability benefit comes from that there's a mutex structure in ea ch child cursor handle and the mutex itself acts as cursor pin structure.75: ktsmgtur(): TUR was not tuned for 361 secs: ================================================== . As Chris said.2) How they are better than latches?both are used for low level locking so how o ne is better than the other? Any input is welcome. A: In Oracle. First. general mutex operatins require less CPU instructions than latch operations (as they aren't as sophisticated as latches and don't maintain get/miss counts as latches do). IMHO their most important characteristics are two. They are used to serialize the acce ss to shared structures. getting a mutex can be done in wait or no-wait mode. KSL* modules for latches and KGX* for mutexes. Few notes: 1) library cache latching is still needed for parsing etc. virtually no false contention) and no separate pin structures need to be allocat ed/maintained.

811 ktsmgtur(): TUR was not tuned for 361 secs What does this mean? Note 1: ------Tur works along with a pathchecker.0.0 .trc /dbms/tdbaprod/prodrman/admin/dump/bdump/prodrman_mmnl_1011950.811 *** SESSION ID:(105.3 we can find: .590 > Maximum redo generation record size = 132096 bytes > Maximum redo generation change vector size = 98708 bytes > tkcrrsarc: (WARN) Failed to find ARCH for message (message:0x10) > tkcrrpa: (WARN) Failed initial attempt to send ARCH message (message:0x10) No good answer yet.0.2. and if a SAN connection is lost.76: tkcrrpa: (WARN) Failed initial attempt to send ARCH message: =================================================================== > *** SERVICE NAME:() 2008-03-22 14:56:43.trc Oracle Database 10g Enterprise Edition Release 10.841 *** SERVICE NAME:(SYS$BACKGROUND) 2008-03-25 06:58:08. OLAP and Data Mining options ORACLE_HOME = /dbms/tdbaprod/ora10g/home System name: AIX Node name: pl101 Release: 3 Version: 5 Machine: 00CB85FF4C00 Instance name: prodrman Redo thread mounted by this instance: 1 Oracle process number: 12 Unix process pid: 1011950. Otherwise you should dive into undo tuning.64bit Production With the Partitioning.1) 2008-03-22 14:56:43. Here is means that TUR was not tuned for 361 seconds.77: Weird errors 1: ====================== In a trace file of an Oracle 10. If these are occasional messages.2. TUR will co mplain. 19. image: oracle@pl101 (MMNL) *** 2008-03-25 06:58:08.1) 2008-03-25 06:58:08. it is not to worry about. Note 2: ------The MMNL process does also tracking query lengths and is involved in tuning undo _retention. 19.3.[pl101][tdbaprod][/dbms/tdbaprod/prodrman/admin/dump/bdump] cat prodrman_mmnl_10 11950.3 db on AIX 5.590 > *** SESSION ID:(221.

??) + 0x150 > 0x00000001000006d8 main(??. ??. ??. ??.294 At other instances we find: >>>> DATABASE CALLED PRODRMAN 06:01:41 . ??. ??) + 0x94 > 0x000000010010ba00 ksliwat(??. ??) + 0x84 > 0x00000001002c8fb0 ksvrdp() + 0x550 > 0x00000001041c8c34 opirip(??. ??. ??. ??. ??) + 0x24 > 0x0000000100170374 kskthbwt(0x0. 0x15ab3c. ??) + 0x98 > 0x0000000100000360 __start() + 0x90 > *** 2008-04-01 06:01:43. ??. ??. 0x1. ??. 0x0. ??. ??.13 > swap info: free_mem = 49. ??. 0xfffffff. ??. ??) + 0x84 > 0x00000001021d4fcc kkjsexe() + 0x32c > 0x00000001021d5d58 kkjrdp() + 0x478 .00M > alloc = 2078. ??. 0x15ab10. ??.09 1.trc > OS pid = 3997922 > loadavg : 1.>>>> DATABASE CALLED PRODTRID: > OS pid = 3907726 > loadavg : 1.25M > F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD > 240001 A tdbaprod 3907726 1 0 60 20 1cfff7400 90692 06: 00:39 . ??. ??. ??) + 0x448 > 0x000000010409df30 sou2o(??.0:00 ora_j000_prodrman > open: Permission denied > 3997922: ora_j000_prodrman > 0x00000001000f81e0 sskgpwwait(??. ??. ??) + 0x640 > 0x0000000100116744 kslwaitns_timed(??.trc Warning: Errors detected in file /dbms/tdbaprod/prodrman/admin/dump/bdump/prodrm an_cjq0_1003754. ??. ??. ??. ??) + 0x94 > 0x000000010010ba00 ksliwat(??.0:00 ora_m000_prodtrid > open: Permission denied > 3907726: ora_m000_prodtrid > 0x00000001000f81e0 sskgpwwait(??. ??. ??.91M avail = 6144. 0x0. 0x7000000) + 0x214 > 0x0000000100116884 kslwait(??. 0x7000000. ??.16M rsv = 24. ??. 0x7000000.09 1.00M swap_free = 4065. ??) + ?? > 0x00000001000f5c54 skgpwwait(??.75M avail = 6144. ??. ??. ??.00M swap_free = 4056. ??. ??. ??. ??.12 1. ??) + 0x24 > 0x0000000100170374 kskthbwt(0x0.00M > alloc = 2087. ??. ??) + 0x554 > 0x0000000102ab4ba8 opidrv(??. ??) + 0x640 > 0x0000000100116744 kslwaitns_timed(??. ??) + ?? > 0x00000001000f5c54 skgpwwait(??. ??) + 0x90 > 0x0000000100000870 opimai_real(??. ??.09M > F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD > 240001 A tdbaprod 3997922 1 4 62 20 1322c8400 91516 05: 43:28 . 0x0. ??. ??.00 1. ??. ??. ??. 0xfffffff. ??. ??. ??. ??. ??. 0x7000000. ??. ??.Check for changes since lastscan in file: /dbms/tdbaprod/prodrman/adm in/dump/bdump/prodrman_cjq0_1003754. 0x28284288 .17 > swap info: free_mem = 62. ??. 0x7000000) + 0x214 > 0x0000000100116884 kslwait(??.76M rsv = 24.

Check for changes since lastscan in file: /dbms/tdbaprod/prodrman/adm in/dump/bdump/prodrman_cjq0_1003754.64bit Productio n > > > > > > > > > > > > > > > > > > With the Partitioning. image: oracle@pl101 (CJQ0) *** 2008-04-01 05:46:17. ??) + 0x150 0x00000001000006d8 main(??. ??.trc > Oracle Database 10g Enterprise Edition Release 10.trc Warning: Errors detected in file /dbms/tdbaaccp/accpross/admin/dump/bdump/accpro ss_cjq0_1970272.trc > /dbms/tdbaprod/prodrman/admin/dump/bdump/prodrman_cjq0_1003754. ??) + 0x98 0x0000000100000360 __start() + 0x90 *** 2008-04-01 05:46:23.0 .170 05:46:20 . ??) + 0x448 0x000000010409df30 sou2o(??.0 .trc > Oracle Database 10g Enterprise Edition Release 10. ??) + 0x90 0x0000000100000870 opimai_real(??.709 Dumping diagnostic information for J000: >>>> DATABASE CALLED ACCPROSS 06:01:26 . ??.394 *** SESSION ID:(107. ??) + 0x4f0 0x0000000102ab4ba8 opidrv(??.trc Warning: Errors detected in file /dbms/tdbaprod/prodrman/admin/dump/bdump/prodrm an_cjq0_1003754.709 *** SERVICE NAME:(SYS$BACKGROUND) 2008-04-01 05:44:28.1) 2008-04-01 05:44:28.> > > > > > > 0x00000001041c8bd0 opirip(??.3. ??. OLAP and Data Mining options ORACLE_HOME = /dbms/tdbaprod/ora10g/home System name: AIX Node name: pl101 Release: 3 Version: 5 Machine: 00CB85FF4C00 Instance name: prodrman Redo thread mounted by this instance: 1 Oracle process number: 10 Unix process pid: 1003754.3.Check for changes since lastscan in file: /dbms/tdbaaccp/accpross/adm in/dump/bdump/accpross_cjq0_1970272.2.trc > /dbms/tdbaaccp/accpross/admin/dump/bdump/accpross_cjq0_1970272.0.394 Waited for process J000 to initialize for 60 seconds *** 2008-04-01 05:46:17.0. ??.64bit Productio n > > > > > > > > > With the Partitioning. OLAP and Data Mining options ORACLE_HOME = /dbms/tdbaaccp/ora10g/home System name: AIX Node name: pl003 Release: 3 Version: 5 Machine: 00CB560D4C00 Instance name: accpross Redo thread mounted by this instance: 1 .2.

??) + 0x98 > 0x0000000100000360 __start() + 0x90 > *** 2008-04-01 06:01:26.39M F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD > 240001 A tdbaaccp 3645448 1 8 64 20 7566c510 91844 05:5 9:48 .1) 2008-04-01 06:00:48.00M swap_free = 2394. image: oracle@pl101 (CJQ0) > > > > > > > > > > > > > > Oracle process number: 10 Unix process pid: 1970272. OLAP and Data Mining options ORACLE_HOME = /dbms/tdbaprod/ora10g/home System name: AIX Node name: pl101 Release: 3 Version: 5 Machine: 00CB85FF4C00 Instance name: prodross Redo thread mounted by this instance: 1 Oracle process number: 10 Unix process pid: 2068516.18 1. ??. ??. ??.28 1.792 >>>> DATABASE CALLED PRODROSS 05:15:00 . ??) + 0x24 > 0x0000000100170374 kskthbwt(0x0. ??. ??) + 0x150 > 0x00000001000006d8 main(??.0 . ??.*** 2008-04-01 06:01:21. 0xfffffff. 0x1. ??.64bit Productio n > > > > > > > > > > > With the Partitioning. ??.16 swap info: free_mem = 107. ??) + ?? > 0x00000001000f5c54 skgpwwait(??. ??.210 *** SERVICE NAME:(SYS$BACKGROUND) 2008-04-01 06:00:48. ??.0.trc > /dbms/tdbaprod/prodross/admin/dump/bdump/prodross_cjq0_2068516.099 Waited for process J001 to initialize for 60 seconds *** 2008-04-01 06:01:21. ??) + 0x94 > 0x000000010010ba00 ksliwat(??.trc > Oracle Database 10g Enterprise Edition Release 10. ??) + 0x84 > 0x00000001021d4fcc kkjsexe() + 0x32c > 0x00000001021d5d58 kkjrdp() + 0x478 > 0x00000001041c8bd0 opirip(??. ??.12M rsv = 24. ??. ??. ??. ??.00M alloc = 3749. ??. ??. image: oracle@pl003 (CJQ0) . ??.099 *** SESSION ID:(217. 0x7000000. ??. 0x7000000) + 0x214 > 0x0000000100116884 kslwait(??. ??.210 Dumping diagnostic information for J001: OS pid = 3645448 loadavg : 1.0:00 ora_j001_accpross > open: Permission denied > 3645448: ora_j001_accpross > 0x00000001000f81e0 sskgpwwait(??. 0x7000000. ??) + 0x90 > 0x0000000100000870 opimai_real(??.61M avail = 6144. 0x0.3. ??) + 0x4f0 > 0x0000000102ab4ba8 opidrv(??. ??) + 0x640 > 0x0000000100116744 kslwaitns_timed(??. ??) + 0x448 > 0x000000010409df30 sou2o(??. ??.Check for changes since lastscan in file: /dbms/tdbaprod/prodross/adm in/dump/bdump/prodross_cjq0_2068516. 0x16656c. ??.trc Warning: Errors detected in file /dbms/tdbaprod/prodross/admin/dump/bdump/prodro ss_cjq0_2068516. ??. ??. ??. ??. ??.2.

??.362 Dumping diagnostic information for J000: OS pid = 1855710 loadavg : 1. ??) + 0x640 > 0x0000000100116744 kslwaitns_timed(??. ??) + 0x448 > 0x000000010409df30 sou2o(??.00M alloc = 2110. ??.0:00 ora_j000_prodroca > open: Permission denied > 1867996: ora_j000_prodroca > 0x00000001000f81e0 sskgpwwait(??.862 *** SESSION ID:(217. 0x7000000. ??. ??.09M > F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD > 240001 A tdbaprod 1867996 1 3 65 22 1078c5400 92656 05: 44:06 .00M > alloc = 2087.*** 2008-04-01 05:13:52. ??) + 0x640 > 0x0000000100116744 kslwaitns_timed(??.15 1. 0x15aab2. ??. ??.trc Warning: Errors detected in file /dbms/tdbaprod/prodroca/admin/dump/bdump/prodro ca_cjq0_757946. ??. ??) + 0x98 > 0x0000000100000360 __start() + 0x90 > *** 2008-04-01 05:13:59. ??. ??. ??.00 1.017 > > > > > > > > > > > > 06:01:42 . ??.91M rsv = 24. ??. 0x1.362 *** SERVICE NAME:(SYS$BACKGROUND) 2008-04-01 05:11:46. ??.20 swap info: free_mem = 63.71M rsv = 24. ??) + 0x24 > 0x0000000100170374 kskthbwt(0x0. ??. 0xfffffff. ??. ??) + 0x94 > 0x000000010010ba00 ksliwat(??.39M F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD > 240001 A tdbaprod 1855710 1 4 66 22 1cb2f5400 92672 05: 10:46 .1) 2008-04-01 05:11:46. ??. ??. ??) + ?? > 0x00000001000f5c54 skgpwwait(??. ??. ??. ??) + 0x4f0 > 0x0000000102ab4ba8 opidrv(??.61M avail = 6144. 0x7000000. ??.91M avail = 6144. 0x15ab10. ??. ??. ??. ??.09 1. ??. ??. ??. ??) + 0x94 > 0x000000010010ba00 ksliwat(??. 0x0. ??) + 0x24 > 0x0000000100170374 kskthbwt(0x0. ??. 0xfffffff. ??.Check for changes since lastscan in file: /dbms/tdbaprod/prodroca/adm in/dump/bdump/prodroca_cjq0_757946. 0x7000000) + 0x214 > 0x0000000100116884 kslwait(??.861 Waited for process J000 to initialize for 60 seconds *** 2008-04-01 05:13:52.17 > swap info: free_mem = 66. ??.00M swap_free = 4056.08 1. ??. ??) + 0x150 > 0x00000001000006d8 main(??. ??. ??. ??) + 0x90 > 0x0000000100000870 opimai_real(??. 0x0.0:00 ora_j000_prodross > open: Permission denied > 1855710: ora_j000_prodross > 0x00000001000f81e0 sskgpwwait(??. ??. ??. ??. 0x7000000. ??. ??. ??) + ?? > 0x00000001000f5c54 skgpwwait(??. 0x1. 0x7000000. ??. ??) + 0x84 > 0x00000001021d4fcc kkjsexe() + 0x32c > 0x00000001021d5d58 kkjrdp() + 0x478 > 0x00000001041c8bd0 opirip(??. ??. ??. ??. ??.00M swap_free = 4033. 0x7000000) + 0x214 . ??.trc > OS pid = 1867996 > loadavg : 1.

> > > > > > > > > > 0x0000000100116884 kslwait(??.Check for changes since in/dump/bdump/alert_prodslot.797 *** SERVICE NAME:(SYS$BACKGROUND) 2008-04-01 06:01:39. ??) + 0x98 0x0000000100000360 __start() + 0x90 *** 2008-04-01 05:46:23.trc Warning: Errors detected in file /dbms/tdbaprod/prodtrid/admin/dump/bdump/prodtr id_mmon_921794. ??.log 06:01:42 . image: oracle@pl101 (MMON) *** 2008-04-01 06:01:39.Check for changes since in/dump/bdump/alert_prodrman.trc > Oracle Database 10g Enterprise Edition Release 10.Check for changes since in/dump/udump/sbtio. ??. ??.Check for changes since in/dump/udump/sbtio. ??) + 0x448 0x000000010409df30 sou2o(??.3.log 06:01:42 . ??) + 0x84 0x00000001021d4fcc kkjsexe() + 0x32c 0x00000001021d5d58 kkjrdp() + 0x478 0x00000001041c8bd0 opirip(??.2.64bit Productio n > > > > > > > > > > > > > > > > > > With the Partitioning. ??.Check for changes since in/dump/udump/sbtio. ??. ??.Check for changes since lastscan in file: /dbms/tdbaprod/prodtrid/adm in/dump/bdump/prodtrid_mmon_921794.385 Waited for process m000 to initialize for 60 seconds *** 2008-04-01 06:01:39.log 06:01:42 .log .Check for changes since in/dump/bdump/alert_prodroca.385 *** SESSION ID:(106.log 06:01:42 . ??) + 0x90 0x0000000100000870 opimai_real(??. OLAP and Data Mining options ORACLE_HOME = /dbms/tdbaprod/ora10g/home System name: AIX Node name: pl101 Release: 3 Version: 5 Machine: 00CB85FF4C00 Instance name: prodtrid Redo thread mounted by this instance: 1 Oracle process number: 11 Unix process pid: 921794.trc > /dbms/tdbaprod/prodtrid/admin/dump/bdump/prodtrid_mmon_921794. ??) + 0x150 0x00000001000006d8 main(??.log 06:01:42 .1) 2008-04-01 06:01:39. ??.log 06:01:42 .Check for changes since in/dump/bdump/alert_prodtrid.Check for changes since in/dump/bdump/alert_prodross.797 Dumping diagnostic information for m000: lastscan in file: /dbms/tdbaprod/prodrman/adm lastscan in file: /dbms/tdbaprod/prodrman/adm lastscan in file: /dbms/tdbaprod/prodroca/adm lastscan in file: /dbms/tdbaprod/prodroca/adm lastscan in file: /dbms/tdbaprod/prodross/adm lastscan in file: /dbms/tdbaprod/prodross/adm lastscan in file: /dbms/tdbaprod/prodslot/adm lastscan in file: /dbms/tdbaprod/prodslot/adm lastscan in file: /dbms/tdbaprod/prodtrid/adm 06:01:42 .398 06:01:42 .0.log 06:01:42 .Check for changes since in/dump/udump/sbtio. ??.log 06:01:42 . ??) + 0x4f0 0x0000000102ab4ba8 opidrv(??.0 .

we're running oracle 10 on AIX 5. error stack: ORA-27300: OS system dependent operation:fork failed with status: 12 ORA-27301: OS failure message: Not enough space ORA-27302: failure occurred at: skgpspawn3 So we think it's oracle's fault. We're experiencing some troubles with paging space. so we're not sure about this.27 0. Can anyone confirm if this is caused by oracle? A: Looks like a bug.696 Dump diagnostics for process q002 pid 786600 which did not start after 120 secon ds: (spawn_time:x10BF1F175 now:x10BF3CB36 diff:x1D9C1) *** 2007-06-18 11:16:54.77M skgpgpstack: fgets() timed out after 60 seconds skgpgpstack: pclose() timed out after 60 seconds ERROR: process 786600 is not alive *** 2007-06-18 11:19:41. I ha d the same problem.56M rsv = 40.152 *** 2007-06-18 11:27:36.Check for changes since lastscan in file: /dbms/tdbaprod/ora10g/home/ network/log/listener. and smoetimes the paging space o ccupation increases and it "freezes" the server (no telnet nor console connection). We're AIX guys. We are running on a Windows 2003 Server Standard edition. We've got 7 GB real mem and 10 GB paging space.668 Dumping diagnostic information for q002: OS pid = 786600 loadavg : 0.28 swap info: free_mem = 9.00M alloc = 4397.3 TL04.07 0. but we're not sure.log File /dbms/tdbaprod/ora10g/home/network/log/listener. We've seen oracle has shown this error: CODE *** 2007-06-18 11:16:49. ORA-27302: failure occurred at: skgpspawn .23M avail = 10240.log 06:01:42 .06:01:42 . Server was not responding anymore after the following errors: ORA-27300: OS system dependent operation:spcdr:9261:4200 failed with status: 997 ORA-27301: OS failure message: Overlapped I/O operation is in progress. not oracle. but no errors detected Note 1: ------Q: Hi.log is cha nged.00M swap_free = 5842.403 Process startup failed.Check for changes since lastscan in file: /dbms/tdbaprod/prodtrid/adm in/dump/udump/sbtio.

??) + 0x80" how do I find out what really went wrong? This error occured after I did an expo rt pump of the DB.1) 2007-02-11 00:35:06.147 Waited for process J000 to initialize for 60 seconds *** 2007-02-11 00:35:20. mainly as: *** SESSION ID:(822. One of the trace displa ys a lot of detail.00M swap_free = 3853. We applied it monday morning and everything is fine up to now. Note 2: ------Q: question: ----------------------------------------------------------my bdump received two error message traces this morning.2.2 because of a big problem in 10. Server is now runn ing normaly.1 (wrong parsing causes client memory problems. Then whole bunch of the pointers and something like this "0x0000000100055800 kgh bshrt(??.2.276 Dumping diagnostic information for J000: OS pid = 811172 loadavg : 0. My system is Oracle 10g R2 on AIX 5.0.3L .0.0. Procobol. ??. goto direct execute and return corrupted data to the client. A: Oracle finally admit there was a bug: BUG 5607984 ORACLE DOES NOT CLOSE TCP CONNECTIONS. ??.55 0.0:00 ora_j000_BAAN open: The file access permissions do not allow the specified action. ??.. about 10 minutes later.And later: O/S-Error: (OS 1450) Insufficient system resources exist to complete the request ed service. ??. Tomorrow I will rise a level 1 TAR indicating we had a crach.0. This bug is also supposed to be solved in the 10. REMAINS IN CLOSE_WAIT STATE.42 0.64M F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD 240001 A oracle 811172 1 0 60 20 5bf12400 86396 00:34:32 .0.0 patchset that is availl able on the Metalink site.44 swap info: free_mem = 3.36M avail = 6272.2. [On Windows 32-bit]. The patch 10 (patch number 5639232) is supposed to solve the problem for 10. plsql developer ect crash because oracle made mistakes skipping the p arse process.50M alloc = 2418.3. We are running the latest patchset 10. This is first time I sae such and the export pump has been for a year. 2.2.77M rsv = 24.

lgwr The log writer process writes redo log entries to disk. all modified database buffers in the system global area are w ritten to the datafiles by DBWn. If the database has a multiplexed redo log. and LGWR writes the redo log entries sequential ly into a redo log file. ckpt At specific times. The database selects an appropriate default settin g for this initialization parameter (or might adjust a user specified setting) based upon the number of CPUs and the number of processor groups. . At timed intervals. The checkpoint process is responsible for sig nalling DBWn at checkpoints and updating all the datafiles and control files of the database to indicate the most recent checkpoint. SMON also cleans up temporary segments that are no longer in use and recovers dead transactions skip ped during system failure and instance recovery because of file-read or offline errors. the local RECO attempts to connec t to remote databases and automatically complete the commit or rollback of the local portion of any pending distributed transacti ons. Oracle Database allows a maximum of 20 database writer processes (DBW0-DBW9 and DBWa-DBWj). the SMON process of one instance can perform instance recovery for other instanc es that have failed. PMON is responsible for cleaning up the cache and freeing resources that the process was using. smon The system monitor performs recovery when a failed instance starts up again. reco The recoverer process is used to resolve distributed transactions that are pendi ng due to a network or system failure in a distributed database. PMON also checks on the dispatcher processes (described later in this table) and server processes and restarts them if they h ave failed. These transactions are eventually recove red by SMON when the tablespace or file is brought back online. Redo log entries are gen erated in the redo log buffer of the system global area (SGA). LGWR writes the redo log entries to a group of redo log files. dbw0 The database writer writes modified blocks from the database buffer cache to the datafiles. In a Real Application Clusters database.Note 3: ------At least here you have an explanation about the Oracle processes: pmon The process monitor performs process recovery when a user process fails. mman Used for internal database tasks. This event is called a checkpoint. The initialization pa rameter DB_WRITER_PROCESSES specifies the number of DBWn processes.

" .a network server process used in a Data Guard (primary) dat abase. the network server (LNSn) process transm its redo data out of the online redo log files on the primary database and no longer interacts directly with the log writ er process. such as session history capture and metrics computation.J999) to run the jobs. mmnl Performs frequent and light-weight manageability-related tasks. Further explaination From "What's New in Oracle Data Guard?" in the Oracle® Data G uard Concepts and Administration 10g Release 2 (10. d000 Dispatchers are optional background processes. incl. s000 Dunno. Used by Oracle Stream s Advanced Queuing.Process SPawner . qmnc Queue monitor background process A queue monitor process which monitors the message queues..cjq0 Job Queue Coordinator (CJQ0) Job queue processes are used for batch processing. (See cjq0) Addition: --------Sep 13. 10gR2 --------------------New in 10gR2 ------------------PSP0 (new in 10gR2) . LNS1(new in 10gR2) .. mmon Performs various manageability-related background tasks. present only when the shared serv er configuration is used. The CJQ0 process dynamically spawns job queue slave processes (J000. NOTE: There is no documentation currently in the Oracle Documentation set on thi s process. j000 A job queue slave.2) "During asynchronous redo transmission. 2006 Oracle Background Processes.to create and manage other Oracle proces ses. This change in behavior allows the log writer (LGWR) process to write redo data to the current online redo log file and continue processing the next request without waiting for inter-process communication or network I/O to complete.

Are a result of user error. . which provides a way to quickly revert an entire Oracle database to the state it was in at a past point in time.Job Queue monitoring process .it serves as SGA Memory Broker and coordinates the sizin g of the memory components. MMON .Have resulted in logical data corruptions. ASMB .which is initiated with the job_queue_proc esses parameter. Jnnn .which is responsible for writing flashback logs which st ores pre-image(s) of data blocks. ARBx . RVWR -Recovery Writer . M000 .MMON background slave (m000) processes. This is not a new process. which keeps track of the sizes of the components and pending resize operations.Change Tracking Writer (CTWR) which works with the new block changed trac king features in 10g for fast RMAN incremental backups. MMON writes out the required statistics for AWR on a scheduled basis. . This is not new. MMNL .Job queue processes which are spawned as needed by CJQ0 to complete sched uled jobs.This is different from traditional point in time recovery.is used to provide information to and from the Cluster Synchronization Se rvices used by ASM to manage the disk resources.which works with the Automatic Workload Re pository new features (AWR) to write out full statistics buffers to disk as needed.Memory MONitor (MMON) process . CJQn . The number of ARBx processes invoked is directly influenced by the asm_power_lim it parameter. RBAL .One can use Flashback Database to back out changes that: .The time required for flashbacking a database to a specific time in past is DIRECTLY PROPORTIONAL to the number of changes made and not on the size of the database. .This feature is not applicable for recovering the database in case of media failure. It is used by Flashback database feature in 10g.It is the ASM related process that performs rebalancing of disk resources controlled by ASM.These processes are managed by the RBAL process and are used to do the ac tual rebalancing of ASM controlled disk resources.Memory MANager . .Memory Monitor Light process . .--------------------New in 10gR1 ------------------MMAN .is associated with the Automatic Workload Repository new features used for automatic problem detection and self-tuning. Used by Automatic Shared Memory Management feature. CTWR . .

ora_qmnc_. They provide the mechanism for message expiration.ora as follows aq_tm_processes=1 or set dynamically via alter system set aq_tm_processes=1. remove processed messages from the queue table and maintain the dequeue IOT. dynami cally spawns slaves named. maintain queue statistics. the architecture of the QMON processes has been cha nged to an automatically controlled coordinator slave architecture.1 and above. does not cause the instance to fail on process failure. For example the parameter can be set in the init. QMNC & Qnnn . depending on the system load up to a maximum of 10 in total. then QMON processes are not created. ora_qXXX_.10g QMON Architecture Beginning with release 10. [].1.It is also used to update statistics and provide a heartbeat mechanism. then that value is taken into account. These optional processes. However. like the job_que ue processes. []. []. if the parameter is not specified or is set to 0. Howev er.01. the number of qXXX processes can be different from what was specified by AQ_TM_PROCESSES.XX onwards it is no longer necessary to set AQ_TM_PROCESSES when Oracle Streams AQ or Streams is used. retry.Pre-10g QMON Architecture The number of queue monitor processes is controlled via the dynamic initialisati on parameter AQ_TM_PROCESSES. [ ]. If this parameter is set to a non-zero value X. Changes about Queue Monitor Processes The QMON processes are optional background processes for Oracle Streams Advanced Queueing (AQ) which monitor and maintain all the system and user owned AQ objects. 19. For version 10.79: WARNING: inbound connection timed out (ORA-3136): ======================================================== Note 1: . if you do specify a value. QMNx . The Queue Monitor Coordinator. QMNC only runs when you have AQ objects in your database. an d delay. arguments: [13080].XX. Oracle creates that number of QM NX processes starting from ora_qmn0_ (where is the identifier of the database) up to ora_qmnX_ .78: ORA-00600: internal error code. 19. []. If AQ_TM_PROCESSES is not specified in versions 10. []. There can be a maximum of 10 QMON processes running on a single instance. []: ================================================================================ ====== When running statement ALTER TABLE ENABLE CONSTAINT this ORA-00600 error appears.

Q: Subject: WARNING: inbound connection timed out (ORA-3136) I have been getting like 50 of these error message a day in my alert_log the past couple of days. A: A good dicussion at freelist. for every listener Sqlnet. I had these when I first went to 10G.INBOUND_CONNECT_TIMEOUT seconds.ora http://www. Please explain following:--------------1.Q: WARNING: inbound connection timed out (ORA-3136) this error appearing in Alert l og . you have a user or process that is un able to connect to the database. especially if you have alert log monitors :(.INBOUND_CONNECT_TIMEOUT=0 . As far as adverse effects in the long run.Is there any adverse effect in long run? 3.How to overcome this error? 2. Before setting SQLNET..org/archives/oracle-l/08-2005/msg01627. A: What the error is telling you is that a connection attempt was made. but the ses sion authentication was not provided before SQLNET. Set the parameters SQLNET.freelists.INBOUND_CONNECT_TIMEOUT and INBOUND_CONNECT_TIMEOUT_li stenername to 0 (indefinite).INBOUND_CONNECT_TIMEOUT the parameters were set to have a defau lt of 60 (seconds).ora: SQLNET..INBOUND_CONNECT_TIMEOUT. verify that there is not a firewa ll or Network Address Translation (NAT) between the client and server. So someone is unhappy about the database/application.ora: INBOUND_CONNECT_TIMEOUT_<LISTENER_NAME>=0 .html In 10gR2. Anybody know what they mean? WARNING: inbound connection timed out (ORA-3136) A: Yep this is annoying. make these changes to get rid of them: Listener.Is it require to SHUTDOWN the DATABASE to solve it. SQLNET. Those are common cause for ORA-3136..

INBOUND_CONNECT_TIMEOUT parameter.. In addition. I tried ''&test' and many more but none of them works:-( . When specifying values for these parameters.log f ile. you can set INBOUND_CONNECT_TIMEOUT_listener_name to 2 seconds and INBOUND_CONNECT_TIMEOUT parameter to 3 seconds. the database server logs the IP address of the client and an ORA-12170: TNS:Connect timeout occurred error message to the sqlnet. Set the value of the INBOUND_CONNECT_TIMEOUT_listener_name parameter to a lower value than the SQLNET.80 How to insert special symbols: ==================================== Note 1: ------Q: Hi.ora fil e. in seconds . Oracle Corporation recomme nds setting this parameter in combination with the INBOUND_CONNECT_TIMEOUT_listener_name parameter in the listener. If the client fails to establish a connection and complete authentication in the time specified. Is there anyone who knows how to insert a value containing "&" into a table? sth like this: insert into test_tab (test_field) values ('&test')..Then the errors stop. To protect both the database server and the listener.INBOUND_CONNECT_TIMEOUT Purpose Use the SQLNET. then the database server terminates the connection.INBOUND_CONNECT_TIMEOUT parameter to specify the time. For example. The client receives either an ORA-12547: TNS:lost contact or an ORA-12637: Packet receive failed error message . whereby malicious clients attempt to flood database servers with connect requests that consume resources. . for a client to connect with the database server and provide the necessary authentication information. Without this parameter. then increment the time as needed. a client connection to the database server can stay op en indefinitely without authentication. 19. consider the following recommendations: Set both parameters to an initial low value. If clients are unable to complete connections within the specified time due to s ystem or network delays that are normal for the particular environment. Connections without authentication can introduce possible denial-of-service atta cks. Note 2: SQLNET.

1 Adding the Metalink note. 4. The below errors are generated in mman trace files every now and then. 1. We have 10gr2 on windows server 2003 standard edition. 1.. 4. 1. 0x2DFE795C.As far as I know Oracle tries to bind a value when it encounters '&sth'. Check Metalink note: 394026. 1.Since ASMM(Automatic Shared Memory Management) is ena bled at instance level. 1. 1. A: This can be safely ignored. 0x2DFF2708. 4.82: AUTO SGA: Not free: ========================== Q: Hi. 19.( BUG : 5201883 for your reference ) did anybody happened to have come across this issue and probably resolved it. AUTO AUTO AUTO AUTO AUTO AUTO AUTO AUTO AUTO AUTO SGA: SGA: SGA: SGA: SGA: SGA: SGA: SGA: SGA: SGA: Not Not Not Not Not Not Not Not Not Not free free free free free free free free free free 0x2DFE78A8. thanks in advance A: Try: set define off Then execute your insert. 4. 4. 4. 0 0 0 0 0 0 0 0 0 0 metalink doesnt give much info either. 1. A: As stated in the bug description. either 1) ignore the messages and delete generated trace files periodically and/or . 1. 0x2DFE7CE0. 4. 4. 4.. 0x2DFE7C2C. 0x2DFE7B78.81: SGA POLICY: Cache below reserve getting from component1: =============================================================== 19. 4. 0x2DFE7A10. 0x2DFE78A8. 1. Any comments are appreciated. 0x2DFE7AC4. 1. 0x2DFE7D94. you might be hitting this bug.

0.DBMS_CDC_UTILITY".399 > oracle. image: oracleplayroca@pl003 > > *** SERVICE NAME:(SYS$USERS) 2008-05-28 12:40:22.399 > *** SESSION ID:(530.3.j .OracleSQLException: ORA-01405: fetched column value is N ULL > ORA-06512: at "SYS.trc > Oracle Database 10g Enterprise Edition Release 10.DBMS_CDC_UTILITY": ============================================ Errormessage in trace file: > /dbms/tdbaplay/playroca/admin/dump/udump/playroca_ora_1667142.2. line 226 > ORA-06512: at line 1 > at oracle. end. OLAP and Data Mining options > ORACLE_HOME = /dbms/tdbaplay/ora10g/home > System name: AIX > Node name: pl003 > Release: 3 > Version: 5 > Machine: 00CB560D4C00 > Instance name: playroca > Redo thread mounted by this instance: 1 > Oracle process number: 27 > Unix process pid: 1667142.84: ORA-06512: at "SYS. begin v_number := 100. if you had the following PLSQL code: declare v_number number(2).2) wait for patchset 10.2. You would receive the following error message: ORA-06502 nummeric or value error.jdbc.0 .0.T2SConnection.83: ORA-06512: ================= Error: ORA-06512: at line <number> Cause: This error message indicates the line number in the PLSQL code that the error r esulted.4 19.jdbc. 19.check_error(T2SConnection. Action: For example.64bit Productio n > With the Partitioning.27892) 2008-05-28 12:40:22.driver. number precision too large ORA=06512 at line 4 So it tells you at which line the error is.driver.

driver.extendWindow(SubscribeApi.OraclePreparedStatement.T2SCallableStatement.driver.driver.jav a:759) > at oracle.java:337) > at oracle.checkError(T2SCallab leStatement. Research on the web revealed that a too low value for "processes" might be the reason.qccsero(SubscriptionWindow. When connecting via JDBC we get intermittend ORA-12519 (reflected as TNS-12519 in listener.driver.jdbc.log). It's been quiet since the last change of this parameter on Tuesday but some minutes ago I got an email notification that the error occurred again.jdbc.java:3514) > at oracle.CDC.java:428) 19.doExecuteWithTimeout(Orac leStatement.jdbc.java:3620) > at oracle.T2SCallableStatement. I guess switching on some trace might be helpful but at the moment I don't have an idea which one would be appropriate.execute(OraclePre paredStatement.ava:153) > at oracle.85: TNS-12519: TNS:no appropriate service handler found: =========================================================== Note 1: ------>> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> > Hi all. So I'd like to first find out what is causing this error before I take further measures.SubscriptionWindow.driver. the value is derived from "parallel_max_servers") and the actual # of processes. sqlldr also has a problem. Also the system is not much utilized and there's enough free resources (CPU wise and memory wise).java:1294) > at oracle.OracleStatement.SubscriptionWindow.executeInternal(O raclePreparedStatement.jdbc.jdbc.) So we increased DB param "parallel_max_servers" to 200.execute(OracleCal lableStatement. I checked job scheduling to check whether there might be a job that eats up connections. although at the moment I can't exactly determine whether it's the same (I'm guessing it is because the happen about the same time). I checked the alert log but there were no significant entries.extendWindow(SubscriptionWindo w.SubscribeApi. I rather not want to increase the value by trial and error since we have only 36 sessions on the database right now and there seems to be a discrepancy between parameter "processes" (at 150 now.OraclePreparedStatement.java:92) > at oracle. Since the error still showed up we went up to 400. but no.java:449) > at oracle. we have an Oracle 10 (version details below) on Linux (RHEL 4).jdbc.executeForRows(T2SCa llableStatement. (The other possible cause I found was non matching versions of DB and client but this is not the case here.OracleCallableStatement. Any ideas? Thanks for any insights! .driver.CDC.CDC.java:5261) > at oracle.

TNS:listener could not find available handler for requested type of server The output of the lsnrctl services command may show that the service handler is in a "blocked" state. e. I had found this article which basically states the same: http://forums. Article-ID: Note 240710. a TNS-12520 error may appear in the listener log. it is not due to your client applica tion -Here is a Metalink note I found . The frequency at which PMON provides SERVICE_UPDATE information varies according to the workload of the instance.1 Title: Intermittent TNS-12516 or TNS-12519 Errors Connecting Via Net Symptom(s) ~~~~~~~~~~ Client connections may intermittently fail with either of the following errors: TNS-12516 TNS:listener could not find instance with matching protocol stack TNS-12519 TNS:no appropriate service handler found Additionally.g. If/when you have many. Maximum load for dedicated connections is determined by the PROCESSES parameter. Cause ~~~~~~~ By way of instance registration.> > > > > > > I fought this battle earlier this month.c om/forums/thread. The maximum interval between these service updates is 10 minutes.oracle. When the count would exceed the processes value the ORA-12519 error is raised. I learns of them only periodically. Perhaps increase in load. The problem is that the more recent version listeners "count" the incominng connection requests. PMON is responsible for updating the listener with information about a particular instance such as load and dispatcher information. '"DEDICATED" established:1 refused:0 state:blocked' Change(s) ~~~~~~~~~~ None necessarily. .jspa?threadID=360226&tstart=0 Note 2: ------This is an issue your DBA needs to address.for further information you will need to conta ct support. many short lived connections you can see this error. The problem is that the listener does not really count the disconnetions.

there can b e a difference between the current instance load according to the listener and the actual instance load. If you see something like the following : . try executing "ls nrctl services".g.. Only when PMON updates the listener via SERVICE_UPDATE is the listener informed of current load. When the listener believes the current number of connections has reached maximum load.. If the problem happens again. a TNS-12520 error may appear in the listener log.. recently i got an error . My application working fine . The output of lsnrctl service may show that the service handler is "blocked".. e. What was the issue? Regards Mani A: It could be a system load issue.. '"DEDICATED" established:1 refused:0 state:blocked' Fix ~~~~ Increase the value for PROCESSES... Since this can take as long as 10 minutes... but after some time connection start working. Note 3: ------Q: Hi all. TNS-12519: TNS:no appropriate service handler found i checked my listener it is working fine..The listener counts the number of connections it has established to the instance but does not immediately get information about connections that have terminated. I installed 10g Release 2 on Windows 2003 . it may set the state of the service handler for an instance to "blocked" and begin refusing incoming client connections with either of the following errors: TNS-12516 TNS:listener could not find instance with matching protocol stack TNS-12519 TNS:no appropriate service handler found Additionally.

status READY. 19.1 Type: BULLETIN Modified Date : 04-AUG-2008 Status: PUBLISHED Scenario -------You have a database in archive log mode.86. in this case there are only 2 groups with 1 log member in each. -If the log is current they should simply perform fake recovery and then open resetlogs connect internal startup mount recover database until cancel. This will give error ora-344 unable to recreate online log <name> search words -----------lost online redo . Instance "test10". If there are only 2 log groups then it will be necessary to add another group before dropping this one. If not available then create it and rerun the resetlogs. The database will open up as required.. so the following needs to be performed Mount the database and check v$log to see if the deleted log is current. -If the log is not current.. When you try to open the database you receive the following errors: ora-313 open failed for memebers of log group 2 of thread 1. ORA-00313: open failed for members of log group 1 of thread 1: ===================================================================== Note 1: ------Subject: Loss Of Online Redo Log And ORA-312 And ORA-313 Doc ID: 117481. shutdown immediate and deleted one of the online redo logs. simply drop the log group (alter database drop logfile group N). providing the log file directory is available. Handler(s): "DEDICATED" established:0 refused:0 state:blocked LOCAL SERVER then you may want to increase PROCESSES initialization parameter. has 1 hand ler(s) for this service. (cancel immediately) alter database open resetlogs.Service "test10" has 1 instance(s). ora-312 online log 2 thread 1 'filename' It is not possible to recover the missing log.

For example: . unarchived. To replace a damaged member of a redo log group: =============================================== Locate the filename of the damaged member in V$LOGFILE. For example. STATUS. or inactive 1) Recovering After Losing a Member of a Multiplexed Online Redo Log Group --------------------------------------------------------------------------If the online redo log of a database is multiplexed. ++ Add a new member to the group.log'. but error messages are written to the log writer trace file and the alert_SID. and if at least one member of each online redo log group is not affected by the media failure. then correct it. to drop member redo01. MEMBER FROM V$LOGFILE WHERE STATUS='INVALID'. The status is INVALID if the file is inaccessible: SQL> SELECT GROUP#. issue: SQL > ALTER DATABASE DROP LOGFILE MEMBER '/oracle/oradata/trgt/redo02. GROUP# ------0002 STATUS MEMBER ----------.--------------------INVALID /oracle/oradata/trgt/redo02. then the database continues functioning as normal.log' TO GROUP 2. ACTION PLAN ============= If the hardware problem is temporary. issue: SQL> ALTER DATABASE ADD LOGFILE MEMBER '/oracle/oradata/trgt/redo02b. The log writer process accesses the previously unavailable online redo log files as if the problem never existed.ora-312 ora-313 Recovering After the Loss of Online Redo Log Files: Scenarios ============================================================= If a media failure has affected the online redo logs of a database.log of the database. active. then the appropriate recovery procedure depends on the following: The configuration of the online redo log: mirrored or non-mirrored The type of media failure: temporary or permanent The types of online redo log files affected by the media failure: current. then it must be the same size as the other group members. If the hardware problem is permanent. to add redo02. If the file you want to add already exists.log from group 2.log ++ Drop the damaged member.log to group 2. For example. then drop the damaged member and add a new member by using the following procedure. and you must specify REUSE.

if you need the cleared log file for recovery of a backup. then you cannot recover that backup. To clear an inactive. enter: ALTER DATABASE CLEAR LOGFILE UNARCHIVED GROUP 2 UNRECOVERABLE DATAFILE. unless the file was taken offline prior to the first change in the log. to clear redo log group 2. If there is an offline datafile that requires the cleared log to bring it online. then start a new instance and mount the database: STARTUP MOUNT Reinitialize the damaged log group. issue: ALTER DATABASE CLEAR LOGFILE UNARCHIVED GROUP 2. issue the following statement: ALTER DATABASE CLEAR LOGFILE GROUP 2. If the failure is . Also. 2) Losing an Inactive Online Redo Log Group =========================================== If all members of an online redo log group with INACTIVE status are damaged.log' REUSE TO GROUP 2.. The procedure depends on whether the damaged group has been archived. online redo log group that has not been archived: If the database is shut down. then the procedure depends on whether you can fix the media problem that damaged the inactive redo log group. Permanent then the damaged inactive online redo log group eventually halts normal database operation. Hence. ... it prevents complete recovery from backups due to the missing log. For example. To clear an inactive. to clear log group 2. This action makes backups unusable if they were started before the last change in the log. then start a new instance and mount the database: STARTUP MOUNT Clear the log using the UNARCHIVED keyword. The datafile and its entire tablespace have to be dropped because the redo necessary to bring it online is being cleared. If the failure is . . For example. online redo log group that has been archived: -------------------------------------------------------------------If the database is shut down. Not-Yet-Archived Redo ======================================== Clearing a not-yet-archived redo log allows it to be reused without archiving it. then the keywords UNRECOVERABLE DATAFILE are required. ACTION PLAN ============ Reinitialize the damaged group manually by issuing the ALTER DATABASE CLEAR LOGFILE You can clear an inactive redo log group when the database is open or closed. Clearing Inactive. LGWR can reuse the redo log group when required. Temporary.. For example.SQL > ALTER DATABASE ADD LOGFILE MEMBER '/oracle/oradata/trgt/redo02b. then Fix the problem. and there is no copy of it.

Failure of CLEAR LOGFILE Operation ---------------------------------------The ALTER DATABASE CLEAR LOGFILE statement can fail with an I/O error due to media failure when it is not possible to: * Relocate the redo log file onto alternative media by re-creating it under the currently configured redo log filename * Reuse the currently configured log filename to re-create the redo log file because the name itself is invalid or unusable (for example.CLEARING_CURRENT. For example.2.6 to 10. Note 2: ------Subject: RMAN Recovery Until Time Failed When Redo-Logs Missed .3 This problem can occur on any platform.All other files (datafiles. the ALTER DATABASE CLEAR LOGFILE statement (before receiving the I/O error) would have successfully informed the control file that the log was being cleared and did not require archiving.Taken a RMAN Backup for Database and Archiving logs -. enter: % cp /disk1/oracle/dbs/*.successful. The I/O error occurred at the step in which the CLEAR LOGFILE statement attempts to create the new redo log file and write zeros to it.1 Type: PROBLEM Modified Date : 05-AUG-2008 Status: PUBLISHED In this Document Symptoms Cause Solution References -------------------------------------------------------------------------------- Applies to: Oracle Server .Immediately back up the whole database with an operating system utility. . due to media failure) In these cases.Enterprise Edition .Version: 9. enter: ALTER DATABASE BACKUP CONTROLFILE TO '/oracle/dbs/cf_backup.2. For example. . Symptoms o Testing rman in this scenario: .f'. ORA -00312 AND ORA-27037 Doc ID: 550077. so that you have a backup you can use for complete recovery without relying on the cleared log group. This fact is reflected in V$LOG. Online redolog files ) are deleted.ORA-00313.0.0.f /disk2/backup Back up the database's control file with the ALTER DATABASE statement.

LOG' ORA-27041: unable to open file OSD-04002: unable to open file O/S-Error: (OS 2) The system cannot find the file specified. when UNTIL TIME or UNTIL CHANGE is used.------.2. .--. archive logs are restored and used for recovery with ALTER DATABASE RECOVER LOGFILE command.ARC' ORA-00283: recovery session canceled due to errors ORA-00313: open failed for members of log group 1 of thread 1 ORA-00312: online log 1 thread 1: 'D:\ORACLE\ORADATA\L102\REDO01.. GROUP# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIME -----. even if the archive log is available.---- .instead of UNTIL TIME.------------. SYSDATE -------------------22-JAN-2008:16:06:35 SQL> select * from v$log . you should use BACKUPED CONTROL FILES. ---Cause Bug:3902506 INCOMPLETE RECOVERY USING RMAN ENDED WITH ORA-313. and Current Controlfile is used for RMAN Point In Time Recovery (Restore/Recover) RMAN Failed with Errors: ---ORA-00283: recovery session canceled due to errors RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile 'D:\ORACLE\PRODUCT\10.-------.0\FLASH_RECOVERY_AREA\L10 2\ARCHIVELOG\2008_01_22\O1_MF_1_12_3SCBO34D_. or UNTIL SCN Example ------SQL> select current_scn from v$database . . ORA-312 AND ORA-2 7037 Bug:3991656 PLEASE ADD DESCRIPTION USING ONLINE REDO LOG WHEN USE UNTIL SCN AND UNTIL TIME If you use "UNTIL TIME" or "UNTIL SCN" clause without online redo log.--------.---------. CURRENT_SCN ----------37079844 SQL> select sysdate from dual . When using 'UNTIL SEQUENCE' clause for incomplete recovery of database.CURRENT CONTROLFILE (with rman-repository data) is still available. it is not used with 'ALTER DATABASE RECOVER LOGFILE' but instead RMAN tries to use the online redo log. However. Solution -------------------Solution/Workaround -------------------o use BACKUP CONTROL FILE o use UNTIL SEQUENCE .

3> restore database .1 3 2 13 10485760 1 YES INACTIVE 37061094 22-JAN-2008:09:34:42 15 10485760 1 NO CURRENT 37075396 22-JAN-2008:14:33:21 14 10485760 1 YES INACTIVE 37068065 22-JAN-2008:12:00:28 *)1 SQL> shutdown immediate. 5> } # RESTORE with UNTIL SCN: where SCN is pointing to an Online REdolog and is already Archived : YES ! RMAN> run { set until scn 37068100 . # which is already Archived : YES ! recover database . and UNTIL SCN ------..mounted using CURRENT COntrolfile # o RMAN RMAN> run { 2> set until time "to_date('22-JAN-2008:12:10:00'. } ------Errors: with UNTIL TIME..ARC' ORA-00283: recovery session canceled due to errors .. Database closed. Restore finished successfull .0\FLASH_RECOVERY_AREA\L10 2\ARCHIVELOG\2008_01_22\O1_MF_1_12_3SCBO34D_. # where SCN is pointing to an Online REdolog restore database check readonly .. RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of recover command at 01/22/2008 16:27:46 ORA-00283: recovery session canceled due to errors RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile 'D:\ORACLE\PRODUCT\10. ORACLE instance shut down. Database dismounted. failed at reocver . 'DD-MON-YYYY:HH24:MI:SS')" ... 4> recover database .2. ---------------------Recovery Actions done: ---------------------o RMAN Online Backup for Database and Archivelogs was taken successfull o Then CURRENT CONTROLFILE will be used for the RMAN Point In Time RECOVERY o The UNTIL TIME CLAUSE is used to point to a time which is actually in the 'ONLINE REDOLOG' which is already Status ARCHIVED : YES *)1 # Mount the instance SQL> Startup MOUNT -.

. you can mark this current controlfile to be a Backup controlfile by starting a Cancel based reocvery in SQL plus To change status of "Current Controlfile" to be a "BACKUP Controlfile" SQL> recover database until cancel using BACKUP CONTROLFILE . ORA-313.Now the "Current Controlfile" is marked to be a "Backup Controlfile" -=> Then Run the RMAN RESTORE/RECOVER will succeed when using a BACKUP CONTROLFILE Note 3: ------Subject: STARTING DATABASE. ORA-279: change 37061094 generated at 01/22/2008 09:34:42 needed for thread 1 ORA-00289: suggestion : D:\ORACLE\. .\ARCHIVELOG\2008_01_22\O1_MF_1_13_%_.. SQL> --..LOG' ORA-27041: unable to open file OSD-04002: unable to open file O/S-Error: (OS 2) The system cannot find the file specified. then type: CANCEL # This will update a FLag in the Current Controfliel to mark it # as a Backup Controlfile # Then the RMAN should succeed with recovery. GETS ERROR.6 Type: PROBLEM Modified Date : 20-JAN-2009 Status: PUBLISHED Problem Description: ==================== Database gives ORA-313 upon startup.ORA-00313: open failed for members of log group 1 of thread 1 ORA-00312: online log 1 thread 1: 'D:\ORACLE\ORADATA\L102\REDO01.ARC ORA-00280: change 37061094 for thread 1 is in sequence #13 Specify log: {<RET>=suggested | filename | AUTO | CANCEL} CANCEL Media recovery cancelled. . Doc ID: 1006148. -------------------------------------------* Using a Backup COntrolfile is a Workaround -------------------------------------------Hint: ----If using the Curretn COntrolfile. -------Example: -------SQL> recover database until cancel using backup controlfile .

then an ORA-00313 is written to the alert. However. is still working just fine.e.ORA-00313: cannot open online '%s' (log #^ %s. if a shutdown and a subsequent startup is issued BEFORE the status of the log member as per V$LOGFILE goes from 'INVALID' (which is expected) to blank entry (i.6 Type: PROBLEM Modified Date : 02-JUL-2007 Status: PUBLISHED Problem Description: ==================== A new redo log member is added to the database. however.. Note 4: ------Subject: ORA-00313 at Startup After a New Redo Log Memeber is Added Doc ID: 1005110. For example: SQLDBA> ALTER DATABASE ADD LOGFILE MEMBER '<path of new log file>' TO GROUP <group_number>. The solution is to find out why they are not available and make them available. Note: The online redo logfiles is another name for redo logfiles.1) ORA-00313: open failed for members of log group 1 of thread 1 The entire database. . 'IN USE').trc') is also dumped. Explanation: ============ The online logs are opened by the database at the time of startup. This scenario takes place after adding a redo log member to the database. you get an ORA-00313 and a trace file is generated. Solution Description: ===================== The Tape backup software had locked the logfile so Oracle could not update it. the above error will occur. Everything worked fine once the tape backup job was terminated. the tape backup software had locked the logfile. Terminating the tape backup job removed the lock on the online log files and made them available to oracle. For the command above. If you shutdown the database before the new member is used at the next startup. Action: Restore online log. such a trace file shows the following: *** SESSION ID:(3. In this particular case. log sequence # %s) Cause: The online log cannot be opened.log file and a trace file (filename 'lgwr_xxxxx. If these online logs are not available (maybe they have been deleted by mistake) or have been locked by a process.

the new redo log member will be then initialized and ready to write redo entries copied from the log buffer. To accomplish this.log file. SQL> desc DBA_ENABLED_TRACES Name Null? ----------------------------------------. it still does not have all file headers properly initialized.2 Oracle 10g: ================ 20.trc) is really not necessary. Development has to come up with a new routine that only dumps warning messages of this nature to the alert. hence its contents cannot be trusted for recovery of any kind. A trace file (lgwr_xxxxx.1 Tracing a session in 10g: -------------------------------The current state of database and instance trace is reported in the data diction ary view DBA_ENABLED_TRACES.log file and NOT to the trace ===================== 20.set_identifier('GUY1'). once a log switch operation switches into the redo log group.-------TRACE_TYPE PRIMARY_ID QUALIFIER_ID1 QUALIFIER_ID2 WAITS BINDS INSTANCE_NAME Type ---------------------------VARCHAR2(21) VARCHAR2(64) VARCHAR2(48) VARCHAR2(32) VARCHAR2(5) VARCHAR2(5) VARCHAR2(16) Note 1: 10g tracing quick start: -------------------------------Oracle s released a few new facilities to help with tracing in 10g. You can set the identifier like this: begin dbms_session.2. . However. DATABASE TRACING: ===================== 20. Since the new log member is still labeled as 'INVALID'. What Development should have done was to just warn the DBA in the alert. here s a real q uick wrap up of the most significant: >>>> Using the new client identifier: You can tag database sessions with a session identifier that can later be used t o identify sessions to trace. however.Solution Description: ===================== This error message is meant to have useful information reported at startup.

INSTANCE_NAME ---------------ghrac11 ghrac11 ghrac11 ghrac13 ghrac13 ghrac12 ghrac12 SERVICE_NA ---------SYS$USERS ghrac1 ghrac1 SYS$USERS MODULE ACTION -----------------------------. You can set this from a login trigger if you don t have access to the source code. => FALSE You can add waits and or bind variables to the trace file using the flags shown. module.melquest.all_actions. FALSE. TRUE.0 ghrac1 SQL*Plus SYS$USERS racgimon@mel601416.melquest. classic 4. actions and (for clusters) instance identifiers.de v.au. module. service_name.qsft (TNS ghrac1 Spotlight On Oracle.serv_mod_act_trace_enable (service_name module_name action_name waits binds instance_name ). NULL .au.exe Spotlight On Oracle. classic 4.mel.de v. => 'GUY1'.0 racgimon@mel601416. The serv_mod_act_trace_enable method allows you to set the tracing on for sessio ns matching particular service. / => => => => => => 'ghrac1'. END. you use DBMS_MONITOR. >>>> Tracing by Module and/or action: Many Oracle-aware applications set Module and action properties and you can use these to enable tracing as well. You can see current values for these u sng the following query: SELECT DISTINCT instance_name.client_id_trace_enable (client_id waits binds ). DBMS_MONITOR. To set trace on for a matching client id. 'SQL*Plus'. I could issue the following command: BEGIN DBMS_MONITOR. END.end.qsft (TNS So to generate traces for all SQL*plus sessions that connect to the cluster from any instance. => TRUE.mel.-----------SQLNav5. action FROM gv$session JOIN gv$instance USING (inst_id).CLIENT_ID_TRACE_ENABLE: BEGIN DBMS_MONITOR.

binds => FALSE ). => 123. binds => TRUE ).---------. END.>>>> Tracing using sid and serial DBMS_MONITOR can enable traces for specific sid and serial as you would expect: SELECT instance_name.session_trace_enable (session_id serial_num => 1826. / BEGIN BEGIN dbms_monitor. . this does no t setup a permanent trace request (simply because the sid and serial# will never be repeated). => 124. waits => TRUE. / => 180. module. waits => FALSE.-----------. Also.session_trace_enable (session_id serial_num => 914. and you can analyze them using tkprof.-----------ghrac11 184 13179 SQL*Plus ghrac11 181 3353 SQLNav5. Providing NULLs for sid and serial# traces the current session. you need to issue this from the same instance if you are in a RAC cluster. SID. END. serial#.exe ghrac13 181 27184 SQL*Plus ghrac13 180 492 SQL*Plus ghrac12 184 18601 SQL*Plus BEGIN dbms_monitor. INSTANCE_NAME SID SERIAL# MODULE ACTION ---------------. action FROM gv$session JOIN gv$instance USING (inst_id) WHERE username = 'SYSTEM'.---------. >>>> Finding and analyzing the trace: This hasn t changed much in 10g. The sid and serial need to be current now unlike the other methods. END. / BEGIN dbms_monitor. waits => TRUE.session_trace_enable (session_id serial_num => 492. the traces are in the USER_DUMP_DEST directory. binds => TRUE ).

1. come from within the application code. Oracle E-Business Suite applications provide module and action name s in the code.serv_mod_act_trace_enable (service_name=>'testenv'. (PL/SQL developers can em bed calls into their applications by using the DBMS_APPLICATION_INFO package to set module and action names. module_name=>'product_update').) The module and action names. I would issue the following commands : [oracle@mel601416 udump]$ trcsess module='SQL*Plus' *. and other paramters such as client_id no l onger causes a round-trip to the database these routines now piggyback on all calls from the application. PL/SQL procedure successfully completed. Since we have a service and a module name. then to feed them into tkprof for analysis. so you can identify these by name in any of the Oracle Enterprise Manager pages.trc sqlplus. trcsess [output=<output file name >] [session=<session ID>] [clientid=<clientid>] [service=<service name>] [action=<action name>] [module=<module name>] <trace file names> output=<output file name> To generate a single trace file combining all the entries from the SQL*Plus sess ions I traced earlier.0. The service name is determined by the connect string used to connect to a servic e.trc output=sqlplus.Production on Wed Sep 27 14:47:51 2006 Note 2: ------Setting Up Tracing with DBMS_MONITOR The DBMS_MONITOR package has routines for enabling and disabling statistics aggr egation as well as for tracing by session ID. if avail able.2. module name.The trcsess utility is a new additional that allows you to generate a trace base d on multiple input files and several other conditions. and action nam e. . For example. but you can specify only the service name.prf TKPROF: Release 10.0 . action. or tracing based upon a combination of service name. or only the service name and module name. we can turn on tracing for this module as follows: SQL> exec dbms_monitor. (These three are associated hierarchically: you can't specify an action without specifying the module and the service name.trc [oracle@mel601416 udump]$ tkprof sqlplus. User sessions not associated with a specific service are handled by sys$users (sys$background is the default service for the background processes).) Note that setting the module.

not just the current sessions.session_trace_enable(139). you can use DBMS_MONITOR to enable tracing for just this session: SQL> exec dbms_monitor.client_id_trace_enable (client_id=>'kimberly'). so the syntax above is effectively the same as the following: SQL> exec dbms_monitor. Also. PL/SQL procedure successfully completed. binds=>false). exec dbms_monitor.session_trace_enable(session_id=>139. . SQL> select sid. With the session ID (SID) and serial number. .We can turn on tracing for the client: SQL> exec dbms_monitor. WAITS are set to true and BINDS to false. The serial number defaults to the current serial number for the SID (unless othe rwise specified). Note that all of these settings are persistent all sessions associated with the se rvice and module will be traced. wai ts=>true. at this point you'd rerun the err ant SQL or application. you need not look any further. so if that's the session and serial number you want to trace.-----------133 4152 SYS 137 2418 SYSMAN 139 53 KIMBERLY 140 561 DBSNMP 141 4 DBSNMP . username from v$session.session_trace_enable(81). look at the Oracle Enter-prise Manager Top Sessions page. serial_num=>53. PL/SQL procedure successfully completed. If you're working in a production environment. . Note that WAITS and BINDS are the same parameters that you might have set in the past using DBMS_SUPPORT and the 10046 event. To trace the SQL based on the session ID. or query the V$SESSION view as you likely currently do. serial#. by def ault. 168 1 169 1 170 1 28 rows selected. SID SERIAL# USERNAME -----------.

M ODULE and ACTION SERV_MOD_ACT_STAT_ENABLE Procedure Enables statistic gathering for a given combination of Service Name. MODULE and ACTION globally unless an instance_name is specified SESSION_TRACE_DISABLE Procedure . Note 3: DBMS_MONITOR: --------------------The DBMS_MONITOR package let you use PL/SQL for controlling additional tracing a nd statistics gathering. MODULE and ACTION SERV_MOD_ACT_TRACE_DISABLE Procedure Disables the trace for ALL enabled instances for a or a given combination of Se rvice Name.and the trace files would be created accordingly. MODULE and ACTION name globally SERV_MOD_ACT_TRACE_ENABLE Procedure Enables SQL tracing for a given combination of Service Name. The chapter contains the following topics: Subprogram Description CLIENT_ID_STAT_DISABLE Procedure Disables statistic gathering previously enabled for a given Client Identifier CLIENT_ID_STAT_ENABLE Procedure Enables statistic gathering for a given Client Identifier CLIENT_ID_TRACE_DISABLE Procedure Disables the trace previously enabled for a given Client Identifier globally fo r the database CLIENT_ID_TRACE_ENABLE Procedure Enables the trace for a given Client Identifier globally for the database DATABASE_TRACE_DISABLE Procedure Disables SQL trace for the whole database or a specific instance DATABASE_TRACE_ENABLE Procedure Enables SQL trace for the whole database or a specific instance SERV_MOD_ACT_STAT_DISABLE Procedure Disables statistic gathering enabled for a given combination of Service Name.

Parameters Table 60-3 CLIENT_ID_STAT_ENABLE Procedure Parameters Parameter Description client_id The Client Identifier for which statistic aggregation is enabled.CLIENT_ID_STAT_ENABLE( client_id IN VARCHAR2).CLIENT_ID_STAT_ENABLE Procedure This procedure enables statistic gathering for a given Client Identifier.CLIENT_ID_STAT_ENABLE('edp$jvl'). Parameters Parameter Description client_id The Client Identifier for which statistic aggregation is disabled.CLIENT_ID_STAT_DISABLE( client_id IN VARCHAR2). Examples To disable accumulation: . Statis tics gathering is global for the database and persistent across instance starts and restarts. including restarts.CLIENT_ID_STAT_DISABLE Procedure This procedure will disable statistics accumulation for all instances and remove the accumulated results from V$CLIENT_STATS view enabled by the CLIENT_ID_STAT_ENABLE Procedure.Disables the previously enabled trace for a given database session identifier ( SID) on the local instance SESSION_TRACE_ENABLE Procedure Enables the trace for a given database session identifier (SID) on the local in stance ---------------------------------------------------------------------------------------------------------------------. EXECUTE DBMS_MONITOR. Syntax DBMS_MONITOR. Statistics are viewable through V$CLIENT_STATS views. -. EXECUTE DBMS_MONITOR. That is.CLIENT_ID_STAT_ENABLE('janedoe'). statistics are enab led for all instances of the same database.CLIENT_ID_STAT_DISABLE('edp$jvl'). Syntax DBMS_MONITOR. Examples To enable statistic accumulation for a client with a given client ID: EXECUTE DBMS_MONITOR.

edp$jvl -. waits If TRUE.CLIENT_ID_TRACE_DISABLE Procedure This procedure will disable tracing enabled by the CLIENT_ID_TRACE_ENABLE Proced ure. waits IN BOOLEAN DEFAULT TRUE. Usage Notes The trace will be written to multiple trace files because more than one Oracle s hadow process can work on behalf of a given client identifier.CLIENT_ID_TRACE_DISABLE( client_id IN VARCHAR2).CLIENT_ID_TRACE_DISABLE ('janedoe'). Parameters Table 60-5 CLIENT_ID_TRACE_ENABLE Procedure Parameters Parameter Description client_id Database Session Identifier for which SQL tracing is enabled. bind information is present in the trace.CLIENT_ID_STAT_DISABLE('janedoe'). Examples EXECUTE DBMS_MONITOR.CLIENT_ID_TRACE_ENABLE Procedure This procedure will enable the trace for a given client identifier globally for the database.EXECUTE DBMS_MONITOR. binds If TRUE. Parameters Table 60-4 CLIENT_ID_TRACE_DISABLE Procedure Parameters Parameter Description client_id The Client Identifier for which SQL tracing is disabled. binds IN BOOLEAN DEFAULT FALSE). wait information is present in the trace. ---------------------------------------------------------------------------------------------------------------------. Syntax DBMS_MONITOR. . Syntax DBMS_MONITOR.CLIENT_ID_TRACE_ENABLE( client_id IN VARCHAR2.

---------------------------------------------------------------------------------------------------------------------. It is a required p arameter. Examples EXECUTE DBMS_MONITOR. An additional qualifier for the service.SERV_MOD_ACT_STAT_DISABLE Procedure This procedure will disable statistics accumulation and remove the accumulated r esults from V$SERV_MOD_ACT_STATS view. module_name IN VARCHAR2. An additional qualifier for the Service and MODULE name. Om itting the parameter (or supplying ALL_ACTIONS constant) means enabling aggregation for all Actions f or a given Server/Module combination. Statistics are accessible by means of the V$SERV_MOD_ACT_STATS view. statistics are aggregated on the module level. service statistics are disabled for instances of the same database (plus dblinks that have been activated as a result of the enable).CLIENT_ID_TRACE_DISABLE ('albert'). EXECUTE DBMS_MONITOR. and ACTION name on all instances for the same database. module_name IN VARCHAR2. action_name IN VARCHAR2 DEFAULT ALL_ACTIONS).SERV_MOD_ACT_STAT_DISABLE( service_name IN VARCHAR2. Syntax DBMS_MONITOR. TRUE. Parameters Table 60-8 SERV_MOD_ACT_STAT_DISABLE Procedure Parameters Parameter Description service_name Name of the service for which statistic aggregation is disabled. That is.CLIENT_ID_TRACE_ENABLE('janedoe'. EXECUTE DBMS_MONITOR. module_name Name of the MODULE. MODULE and ACTION. action_name Name of the ACTION. Statistics disabling is persistent for the database. Syntax DBMS_MONITOR. MODULE name. Parameters . In this case. action_name IN VARCHAR2 DEFAULT ALL_ACTIONS).The tracing is enabled for all instances and persistent across restarts. Calling this procedure enables statistic gathering for a hierarchical combination of Service name. -.CLIENT_ID_TRACE_ENABLE('albert').SERV_MOD_ACT_STAT_ENABLE( service_name IN VARCHAR2.SERV_MOD_ACT_STAT_ENABLE Procedure This procedure enables statistic gathering for a given combination of Service Na me.FALSE).

Using ALL_ACTIONS for a module specification means that aggregation is enabled f or all actions with a given module name. It is a required p arameter. while using NULL (or empty string) means that aggregation is enabled for an acti on whose name is an empty string. --------------------------------------------------------------------------------------------------------------------- .'DEBIT_ENTRY'). An additional qualifier for the Service and MODULE name. statistics are accumulated as foll ows: For the APPS1 service.Table 60-9 SERV_MOD_ACT_STAT_ENABLE Procedure Parameters Parameter Description service_name Name of the service for which statistic aggregation is enabled. For this reason. module_name Name of the MODULE.'GLEDGER'. In this case. because accumulation for each Service Name is the default . Usage Notes Enabling statistic aggregation for the given combination of Service/Module/Actio n names is slightly complicated by the fact that the Module/Action values can be empty strings which are indistinguishable f rom NULLs.SERV_MOD_ACT_STAT_ENABLE( 'APPS1'. For all actions in the PAYROLL Module. Examples To enable statistic accumulation for a given combination of Service name and MOD ULE: EXECUTE DBMS_MONITOR. MODULE and ACTION: EXECUTE DBMS_MONITOR.'PAYROLL'). To enable statistic accumulation for a given combination of Service name.SERV_MOD_ACT_STAT_ENABLE('APPS1'. If both of the preceding commands are issued. For the DEBIT_ENTRY Action within the GLEDGER Module. action_name Name of the ACTION. Om itting the parameter (or supplying ALL_ACTIONS constant) means enabling aggregation for all Actions f or a given Server/Module combination. we adopt the following conventions: A special constant (unlikely to be a real action names) is defined: ALL_ACTIONS constant VARCHAR2 := '###ALL_ACTIONS'. An additional qualifier for the service. statistics are aggregated on the module level.

Syntax DBMS_MONITOR. Syntax DBMS_MONITOR.-. Parameters Table 60-7 DATABASE_TRACE_ENABLE Procedure Parameters Parameter Description waits If TRUE. Parameters . wait information will be present in the trace binds If TRUE.DATABASE_TRACE_ENABLE( waits IN BOOLEAN DEFAULT TRUE. and ACTION name globally. action_name IN VARCHAR2 DEFAULT ALL_ACTIONS. MODULE. Syntax DBMS_MONITOR.DATABASE_TRACE_ENABLE Procedure This procedure enables SQL trace for the whole database or a specific instance. binds IN BOOLEAN DEFAULT FALSE. restricts tracing to the named instance EXECUTE dbms_monitor.database_trace_disable -. bind information will be present in the trace instance_name If set.DATABASE_TRACE_DISABLE Procedure This procedure disables SQL trace for the whole database or a specific instance. instance_name IN VARCHAR2 DEFAULT NULL).SERV_MOD_ACT_TRACE_DISABLE( service_name IN VARCHAR2. module_name IN VARCHAR2. instance_name IN VARCHAR2 DEFAULT NULL). Parameters Table 60-6 DATABASE_TRACE_DISABLE Procedure Parameters Parameter Description instance_name Disables tracing for the named instance --------------------------------------------------------------------------------------------------------------------SERV_MOD_ACT_TRACE_DISABLE Procedure This procedure will disable the trace at ALL enabled instances for a given combi nation of Service Name.database_trace_enable EXECUTE dbms_monitor.DATABASE_TRACE_DISABLE( instance_name IN VARCHAR2 DEFAULT NULL).

Examples To enable tracing for a Service named APPS1: EXECUTE DBMS_MONITOR. Usage Notes Specifying NULL for the module_name parameter means that statistics will no long er be accumulated for the sessions which do not set the MODULE attribute. instance_name IN VARCHAR2 DEFAULT NULL).SERV_MOD_ACT_TRACE_DISABLE('APPS1'). module_name Name of the MODULE. Parameters Table 60-11 SERV_MOD_ACT_TRACE_ENABLE Procedure Parameters . To disable tracing specified in the previous step: EXECUTE DBMS_MONITOR.SERV_MOD_ACT_TRACE_ENABLE( service_name IN VARCHAR2. FALSE. An additional qualifier for the service.NULL).TRUE.Table 60-10 SERV_MOD_ACT_TRACE_DISABLE Procedure Parameters Parameter Description service_name Name of the service for which tracing is disabled. binds IN BOOLEAN DEFAULT FALSE. action_name Name of the ACTION. To enable tracing for a given combination of Service and MODULE (all ACTIONs): EXECUTE DBMS_MONITOR.ALL_ACTIONS.NULL). waits IN BOOLEAN DEFAULT TRUE. DBMS_MONITOR. instance_name If set.SERV_MOD_ACT_TRACE_DISABLE('APPS1'. this restricts tracing to the named instance_name.'PAYROLL'). MODULE and ACTION globally unless an instance_name is specified.FALSE. Syntax DBMS_MONITOR.SERV_MOD_ACT_TRACE_ENABLE('APPS1'. module_name IN VARCHAR2 DEFAULT ANY_MODULE.SERV_MOD_ACT_TRACE_ENABLE('APPS1'.ALL_MODULES. -------------------------------------------------------------------------------SERV_MOD_ACT_TRACE_ENABLE Procedure This procedure will enable SQL tracing for a given combination of Service Name. action_name IN VARCHAR2 DEFAULT ANY_ACTION. DBMS_MONITOR. DBMS_MONITOR.TRUE. To disable tracing specified in the previous step: EXECUTE DBMS_MONITOR. An additional qualifier for the Service and MODULE name.'PAYROLL'.ALL_ACTIONS.

An optional additional qualifier for the Service and MODULE name.FALSE. DBMS_MONITOR. module_name Name of the MODULE.NULL). This tracing is useful when an application MODULE and optionally known ACTION is experiencing poor service levels.ALL_ACTIONS. waits If TRUE. Specifying NULL for the module_name parameter means that statistics will be accu mulated for the sessions which do not set the MODULE attribute. for exa mple. . The specification is strictly hierarchical: Service Name or Service Na me/MODULE. instance_name If set. this restricts tracing to the named instance_name. action_name Name of the ACTION. By default.Parameter Description service_name Name of the service for which tracing is enabled. bind information is present in the trace. Examples To enable tracing for a Service named APPS1: EXECUTE DBMS_MONITOR. so that not specifying an ACTION means all ACTIONs.SERV_MOD_ACT_TRACE_ENABLE('APPS1'. Tracing information is present in multiple trace files and you must use the trcs ess tool to collect it into a single file.ALL_ACTIONS. Usage Notes The procedure enables a trace for a given combination of Service. to exhibit poor service levels. FALSE. Using the ALL_ACTIONS constant achieves the same purpose. DBMS_MONITOR. and ACTION name must be specified. The instance_name para meter is provided to restrict tracing to named instances that are known. MODULE.ALL_MODULES. DBMS_MONITOR. binds If TRUE. MODULE and ACT ION name.NULL). To enable tracing for a given combination of Service and MODULE (all ACTIONs): EXECUTE DBMS_MONITOR.'PAYROLL'. wait information is present in the trace. or Service Name. Omitting a qualifier behaves like a wild-card. An optional additional qualifier for the service. tracing is enabled globally for the database. -------------------------------------------------------------------------------SESSION_TRACE_DISABLE Procedure This procedure will disable the trace for a given database session at the local instance.TRUE.TRUE.SERV_MOD_ACT_TRACE_ENABLE('APPS1'.

SESSION_TRACE_ENABLE( session_id IN BINARY_INTEGER DEFAULT NULL. binds IN BOOLEAN DEFAULT FALSE) Parameters Table 60-13 SESSION_TRACE_ENABLE Procedure Parameters Parameter Description session_id Database Session Identifier for which SQL tracing is enabled. TRUE. It is illegal to specify NULL session_id and non-NULL serial_num.4634. the current us er session is no longer traced. Parameters Table 60-12 SESSION_TRACE_DISABLE Procedure Parameters Parameter Description session_id Name of the service for which SQL trace is disabled. Usage Notes If serial_num is NULL but session_id is specified. Examples To enable tracing for a client with a given client session ID: EXECUTE DBMS_MONITOR.SESSION_TRACE_DISABLE( session_id IN BINARY_INTEGER DEFAULT NULL. -------------------------------------------------------------------------------SESSION_TRACE_ENABLE Procedure This procedure enables a SQL trace for the given Session ID on the local instanc e Syntax DBMS_MONITOR.SESSION_TRACE_DISABLE(7. a session with a given sessio n_id is no longer traced irrespective of its serial number. waits IN BOOLEAN DEFAULT TRUE.4634). serial_num Serial number for this session. serial_num IN BINARY_INTEGER DEFAULT NULL). FALSE). serial_num .SESSION_TRACE_ENABLE(7. To disable tracing specified in the previous step: EXECUTE DBMS_MONITOR. Specifying NULL m eans that my current session should be traced. serial_num IN BINARY_INTEGER DEFAULT NULL. In addition.. If both session_id and serial_num are NULL.Syntax DBMS_MONITOR. t he NULL values are default and can be omitted.

bind information is present in the trace. EXECUTE DBMS_MONITOR. To disable tracing specified in the previous step: EXECUTE DBMS_MONITOR. binds If TRUE. traces the current user session. or EXECUTE DBMS_MONITOR.SESSION_TRACE_ENABLE(7. TRUE. Usage Notes The procedure enables a trace for a given database session.Serial number for this session. or EXECUTE DBMS_MONITOR.30962).SESSION_TRACE_ENABLE(binds=>TRUE). a session with a given sessio n_id is traced irrespective of its serial number. Also. the NULL values are default and can be omi tted. FALSE). wait information is present in the trace. The same can be also expressed using keyword syntax: EXECUTE DBMS_MONITOR.SESSION_TRACE_ENABLE(82.SESSION_TRACE_ENABLE(5. NULL. EXECUTE DBMS_MONITOR. traces the current user session including waits and binds.SESSION_TRACE_ENABLE(NULL.SESSION_TRACE_ENABLE(NULL.4634. Either EXECUTE DBMS_MONITOR. TRUE). Note 4: ------End-to-End Tracing .30962). In addition. If both session_id and serial_num are NULL. It is illegal to specify NULL session_id and non-NULL serial_num. traces the session with session ID of 5. and is still useful for client/server applications. sinc e database sessions do not span instances. Specifying NULL means that any session which ma tches session_id (irrespective of serial number) should be traced. NULL).SESSION_TRACE_ENABLE(). NULL). while either EXECUTE DBMS_MONITOR. This tracing is strictly local to an instance. Examples To enable tracing for a client with a given client session ID: EXECUTE DBMS_MONITOR. the current user session is traced.SESSION_TRACE_ENABLE(5). If serial_num is NULL but session_id is specified. waits If TRUE.SESSION_TRACE_DISABLE(82. The trace is enabled only on the instance to which the caller is connected. TRUE.

Now suppose that BILL's session becomes idle and LORA's session becomes active. the tracing informa tion emitted is not from BILL's session. several shared server processes are created to service th e requests from the users. the approach has a serious limitation in d atabases with shared server architecture. In the above case. which will have completely different information. For instance. When BILL connects to the database. This file can be run throu gh tkprof to get the analyzed output. without s etting any other command inside the code. each session produ ces a different trace file. At this point.A common approach to diagnosing performance problems is to enable sql_trace to t race database calls and then analyze the output later using a tool such as tkprof. this shared server may be assigned to another active session. you can extract information relevant to cli ent identifier account_update to a single file that you can run through tkprof. so the abo ve session will be traced and a trace file will be generated on the user dump destination directory.SET_IDENTIFIER ('account_update') Tracing is active on the sessions with the identifier account_update. To set up the tracing. However. . If another user connec ts to the database and sets her client identifier to account_update. automatically. but from LORA's. In 10g. you would issue: exec DBMS_MONITOR. All sessions with the client identifier account_update will be traced until the tracing is disabled by issuing: exec DBMS_MONITOR.CLIENT_ID_TRACE_DISABLE('account_update'). The resulting trace files can be analyzed by tkprof. For proper problem diagnosis. How do we achieve that? Simple. If this session starts tracing. This command enables tracing on all sessions with the identifier account_update. Using a tool called trcsess. If none is available. the calls made by the shared server process are traced. the dispatcher passes the connection to an available shared server.txt clientid=account_update * This command creates a file named account_update_trc. When LORA's session becomes inactive. A new packa ge called DBMS_MONITOR is available for this purpose. this problem has been effectively addressed through the use of end-to-en d tracing. that session will be traced as well. In this configuration.txt that looks like a regul ar trace file but has information on only those sessions with client identifier account_update. a new one is created. you can go in the user dump destination directory and run: trcsess output=account_update_trc. tracing is not done only by session. he can issue the following to set the client identifier: exec DBMS_SESSION. but by an identifiable name such as a client identifier. you may want to trace all sessions with the identifier account_upd ate. we are interested in the consolidated trace file. However. At that point the shared server originally servicing BILL is assigned to LORA's session. In this case.CLIENT_ID_TRACE_ENABLE('account_update'). When user BILL connects to the database. not individual ones .

set_sql_trace_in_session(sid=>123. binds=>FALSE). le=>0. more difficult method of collecting tr ace information. Note 5: ------Generating SQL Trace Files Oracle Tips by Burleson Consulting The following Tip is from the outstanding book "Oracle PL/SQL Tuning: Expert Sec rets for High Performance Programming" by Dr. module. 2006: There are numerous ways to enable.set_ev(si=>123. SQL> ALTER SESSION SET sql_trace=TRUE. binds=>F ALSE).start_trace(sid=>123. but can be loaded as the SYS user by executing the @$ORACLE_HOME/rdbms/admin/dbmssupp. Like switching sql_trace off. SQL> EXEC DBMS_SYSTEM. nm=>' '). se=>1234. For methods that require tracing levels. or action. serial#=>1234. SQL> EXEC DBMS_SYSTEM. SERV_MOD_ACT_TRACE_ENABLE. Another procedure in the same package. serial=>1234. sql_trac e=>TRUE). SQL> EXEC DBMS_SYSTEM. -. serial=>1234). SQL> ALTER SESSION SET EVENTS '10046 trace name context forever.set_ev(si=>123. se=>1234. disable and vary the contents of this trace. ev=>10046. level 8'.set_sql_trace_in_session(sid=>123.No trace. SQL> EXEC DBMS_SYSTEM.set_sql_trace(sql_trace => FALSE).All versions. the following are valid values: 0 . SQL> ALTER SESSION SET EVENTS '10046 trace name context off'. Furthermore. can enable tra cing in other combinations such as for a specific service. The dbms_support package is not present by default.All versions. tracing is enabled and disabled by some variable such as client identifier. waits=>TRUE. which can be set by dbms_application_info p ackage. SQL> EXEC DBMS_SESSION. sql_trac e=>FALSE). requires DBMS_SUPPORT package to be loaded.set_sql_trace(sql_trace => TRUE).stop_trace(sid=>123.stop_trace. SQL> EXEC DBMS_SUPPORT. -. . serial#=>1234. ev=>10046. nm=>' '). SQL> ALTER SESSION SET sql_trace=FALSE. SQL> EXEC DBMS_SESSION. Oracle ACE of the year.Contrast this approach with the previous. Tim Hall. le=>8. SQL> EXEC DBMS_SUPPORT.sql script. The following methods have been available for several versions of the database. SQL> EXEC DBMS_SUPPORT. SQL> EXEC DBMS_SUPPORT. without calling alter s ession set sql_trace = true from that session.start_trace(waits=>TRUE.

serv_mod_act_trace_disable(service_name=>'db10g'. but with both bind variable values and wait events. along with t he instance_name in RAC environments.2 . The examples below show a few possible variations for enabling and disabling SQL trace in Oracle 10g. binds=>FALSE). action_name=>'running'. set using the dbms_application_info package. waits=>TRUE. serial_num=>1234) . trcsess Activating trace on multiple sessions means that trace information is spread thr oughout many trace files. binds=>FALSE).serv_mod_act_trace_enable(service_name=>'db10g'.Oracle 10g SQL> EXEC DBMS_MONITOR. waits=>TRUE . The same combinations are possible for those methods with boolean parameters for waits and binds. SQL> EXEC DBMS_MONITOR. SQL> EXEC DBMS_MONITOR. module_name=>'test_api'. the SQL tracing options have been centralized and extended using the dbms_monitor package. module_ name=>'test_api'. tracing can be activated for multiple sessions based on various combinat ions of the service_name.The equivalent of regular sql_trace. SQL> EXEC DBMS_MONITOR. . tracing can be enabled on multiple sessions based on the value of the client_identifier column of the v $session view. waits=>TRUE. SQL> EXEC DBMS_MONITOR.client_id_trace_enable(client_id=>'tim_hall').The same as 2. -. module. SQL> EXEC DBMS_MONITOR. but with the addition of wait events.The same as 2.client_id_trace_enable(client_id=>'tim_hall'.serv_mod_act_trace_enable(service_name=>'db10g'. set using the dbms_session package. SQL> EXEC DBMS_MONITOR. With the advent of Oracle 10g. serial_num=>1234.session_trace_enable(session_id=>1234.client_id_trace_disable(client_id=>'tim_hall'). SQL> EXEC DBMS_MONITOR. SQL> EXEC DBMS_MONITOR. action columns in the v$session view. action_name=>'running'). action_name=>'running'). First. The package provides the conventional session level tracing along with two new v ariations.session_trace_enable(waits=>TRUE. this provides a high degr ee of flexibility. binds=>FALSE). SQL> EXEC DBMS_MONITOR.The same as 2. module_name=>'test_api'. 8 . SQL> EXEC DBMS_MONITOR. 4 . serial_num=>1234). SQL> EXEC DBMS_MONITOR.session_trace_enable(session_id =>1234. binds=>FALSE). but with the addition of bind variable values.session_trace_enable.session_trace_disable. With all the possible permutations and default values.session_trace_disable(session_id=>1234. 12 . Second.

The output below lists t he usage notes from the tkprof utility in Oracle 10g. trcsess [output=<output file name >] [session=<session ID>] [clientid=<clientid >] [service=<service name>] [action=<action name>] [module=<module name>] <trace file names> output=<output file name> output destination default being standard output. clientid=<clientid> clientid to be traced. or they can be translated by the tkprof utility into a more human readable form. Session id is a combination of session Index & session serial number e. waits=yes|no Record summary for any wait events found in the trace file. 8.tablename' with 'explain=' option. The trcsess usage is listed below.For this reason Oracle 10g introduced the trcsess utility. <trace_file_names> Space separated list of trace files with wild card '*' suppor ted. session=<session Id> session to be traced. service=<service name> service to be traced.g. $ tkprof Usage: tkprof tracefile outputfile [explain= ] [table= ] [print= ] [insert= ] [sys= ] [sort= ] table=schema. action=<action name> action to be traced. aggregate=yes|no insert=filename List SQL statements and data inside INSERT statements. the consolidated trace file can be as broad or as specif ic as needed.13. allowing trace inform ation from multiple trace files to be identified and consolidated into a single trace file. sys=no TKPROF does not list SQL statements run as user SYS. explain=user/password Connect to ORACLE and issue EXPLAIN PLAN. module=<module name> module to be traced.tablename Use 'schema. print=integer List only the first 'integer' SQL statements. tkprof The SQL trace files produced by the methods discussed previously can be read in their raw form. With all these options. sort=option Set of zero or more of the following sort options: prscnt prscpu prsela prsdsk prsqry prscu prsmis execnt execpu exeela exedsk exeqry execu exerow exemis fchcnt fchcpu fchela fchdsk fchqry number of times parse was called cpu time parsing elapsed time parsing number of disk reads during parse number of buffers for consistent read during parse number of buffers for current read during parse number of misses in library cache during parse number of execute was called cpu time spent executing elapsed time executing number of disk reads during execute number of buffers for consistent read during execute number of buffers for current read during execute number of rows processed during execute number of library cache misses during execute number of times fetch was called cpu time spent fetching elapsed time fetching number of disk reads during fetch number of buffers for consistent read during fetch . record=filename Record non-recursive statements found in the trace file.

2. TRUE). so prior to this version wait i nformation had to be read from the raw trace file. is to build a package of our own to encapsulate DBMS_SYSTEM and expose only what is safe. exec DBMS_SYSTEM.SET_SQL_TRACE_IN_SESSION(23.SET_SQL_TRACE_IN_SESSION(sid. This is especially useful when investigating p roblems with software packages where source code (including SQL) is generally unavailable. TRUE).1 Trace a session: ----------------------Examples: --------exec DBMS_SYSTEM. 20.fchcu number of buffers for current read during fetch fchrow number of rows fetched userid userid of user that parsed the cursor $ The waits parameter was only added in Oracle 9i. 54071. Those of us who are "keyboard-challenged" (or just plain lazy) would certainly a ppreciate not having to type a procedure name with 36 characters. DBMS_SYSTEM has some mysterious and apparently dangerous procedures in it. we can make DBMS_SYSTEM easier to use as well. and the SQL trace facility is one of the best tools available for discovering wh at the database is doing during a user's session. In spite of Oracle's desire to keep DBMS_SYSTEM "under wraps.8i. serial#. In the process." I feel strongly t hat the SET_SQL_TRACE_IN_SESSION procedure is far too valuable to be hidden away in obscurity. So how can we get access to the one program in DBMS_SYSTEM we want without expos ing those other dangerous elements to the public? The answer. of course.2 OLDER ORACLE Versions 8.9i: =================================== 20. Here is the package specification: . DBAs and developer s need to find out exactly what is happening at runtime when a user is experiencing unusual performance pro blems. Obtai ning any information about SET_EV and READ_EV was very difficult and promises to be more difficult in the future since the package header is no longer exposed in Oracle 8. The values of bind variables must be read from the raw files as they are not dis played in the tkprof output.0. I've created a package called trace to cover DBMS_SYSTEM and provide friendlier ways to set SQL tracing on or off in other user's sessions.

DBMS_SYSTEM (or create as SYS) Execution Requirements: /* turn SQL trace on by session id */ PROCEDURE Xon(sid_IN IN NUMBER).FALSE).V_$SESSION EXECUTE on SYS. /* turn SQL trace on by username */ PROCEDURE Xon(user_IN IN VARCHAR2).DBMS_SYSTEM.off(sid_IN=>15).*/ Filename on companion disk: trace. so trace takes care of figuring out the appropriate s erial number behind the scenes. r_rec rr_rec. There should always be only one sess ion per sid at any time connected to the database.sql */* CREATE OR REPLACE PACKAGE trace IS type rr_rec is record ( v_sid number. . v_serial number ). Compare th e following commands. The trace package provides ways to turn SQL tracing on or off by session id or u sername.SET_SQL_TRACE_IN_SESSION with easier to call programs Author: John Beresniewicz.SET_SQL_TRACE_IN_SESSION(15. either of which might be used to turn SQL tracing off in session 15 using SQL*Pl us: SQL> execute trace. SQL> execute SYS. Another improvement (in my mind) is replacing the potentially confusing BOOLEAN parameter sql_trace with two distinct procedures whose names indicate what is being done. /* turn SQL trace off by username */ PROCEDURE off(user_IN IN VARCHAR2). Savant Corp Created: 07/30/97 Compilation Requirements: SELECT on SYS. END trace.SET_SQL_TRACE_IN_SESSION is having to figure out and pass a session serial number into the procedure. One thing that annoys me about DBMS_SYSTEM.4567. /* || || || || || || || || || || || || */ Exposes DBMS_SYSTEM. /* turn SQL trace off by session id */ PROCEDURE off(sid_IN IN NUMBER).

END set_trace. */ FOR sid_rec IN (SELECT sid.sid) ) LOOP SYS. /* || The programs exposed by the package all simply || call set_trace with different parameter combinations.serial# FROM v$session S WHERE S.sid. Why? Because sids are transient and must be looked up at runtime.xon by username will turn tracing on in all of them.S. that multiple sessions may be concurrently connected under the same username. Let's take a look at the trace package body: /* Filename on companion disk: trace.SET_SQL_TRACE_IN_SESSION to turn tracing on || or off by either session id or username. and invoking trace. Affects all sessions || that match non-NULL values of the user and sid parameters. . with versions accepting either the numeric session id or a character string for the session username. Beware. The NVL || function in the cursor WHERE clause allows the single || SELECT statement to filter by either sid OR user. Al lowing session selection by username may be easier than by sids. The xon and off procedures are both overloaded on the single IN parameter.sql */* CREATE OR REPLACE PACKAGE BODY trace IS /* || Use DBMS_SYSTEM.username) AND S. END LOOP.SET_SQL_TRACE_IN_SESSION (sid_rec. sqltrace_TF). END Xon.S.user IN VARCHAR2 DEFAULT NULL .DBMS_SYSTEM. t hough. */ PROCEDURE Xon(sid_IN IN NUMBER) IS BEGIN set_trace(sqltrace_TF => TRUE. sid_rec.serial#.The first method is both more terse and easier to understand. */ PROCEDURE set_trace (sqltrace_TF BOOLEAN . sid => sid_IN).username = NVL(UPPER(user).sid = NVL(sid. whereas username is usually permanently associated with an individual.type='USER' AND S.sid IN NUMBER DEFAULT NULL) IS BEGIN /* || Loop through all sessions that match the sid and user || parameters and set trace on in those sessions.

END off. Since set_trace is always called with either s id or user. One interesting aspect of set_trace is the cursor used to get session identifica tion data from V_$SESSION. END Xon.PROCEDURE off(sid_IN IN NUMBER) IS BEGIN set_trace(sqltrace_TF => FALSE. -. The solution I arr ived at: make use of the NVL function to have a single cursor effectively ignore either t he sid or the user parameter when either is passed in as NULL. but that just did not seem clean enough. Setting sql_trace=true is a prerequisite when using tk prof. I also supplied both the sid and user parameters to set_trace with the default value of NULL so that only the parameter being used for selecti on needs be passed in the call. You can also try: Alter system set sql_trace=true. user => user_IN). All of the real work done in the trace package is contained in a single private procedure called set_trace. PROCEDURE Xon(user_IN IN VARCHAR2) IS BEGIN set_trace(sqltrace_TF => TRUE. I wanted to identify sessions for tracing by either session id or username. the publicly visible procedures were trivial. After all. This is a structure that many packages exhibit: private programs with complex functionality exposed through public programs with simpler interfaces. The public procedures merely call set_trace with different parameter combination s. I co uld have just defined two cursors on V_$SESSION with some conditional logic deciding which cursor to u se. A final note about the procedure name "xon": I wanted to use the procedure name "on. user => user_IN).TRACING a session: ----------------------- ." but ran afoul of the PL/SQL compiler since ON is a reserved word in SQL and PL/SQL. Once set_trace was in place. less code means fewer bugs. PROCEDURE off(user_IN IN VARCHAR2) IS BEGIN set_trace(sqltrace_TF => FALSE. END trace. the NVLs act as a kind of toggle on the cursor. but not both. sid => sid_IN). END off.

trc ora_11598.sql) calls several other scripts in order to create the entire Statspack environment.sql invokes. 3.2 To enable the SQL trace facility for your current session. (Note: You should run only the installation script. storage. TRUE). To enable the SQL trace facility for your instance. This file can be formatted with TKPROF 6. set the value of the SQL_TRACE initialization parameter to TRUE.ORA parameters must be set: #SQL_TRACE = TRUE USER_DUMP_DEST = <preferred directory for the trace output> TIMED_STATISTICS = TRUE MAX_DUMP_FILE_SIZE = <optional. SERIAL# ). NULL ).SET_SQL_TRACE_IN_SESSION(sid. tkprof tkprof tkprof tkprof ora_11598. DBMS_SUPPORT.trc myfilename /tmp/myfilename /tmp/myfilename explain=ap/ap myfilename explain=po/po sort=execpu 7 STATSPACK: -----------Statspack is a set of SQL. Statistics will be collected for all sessions. DBMS_SYSTEM. EXEDSK. and SQL*Plus scripts that allow the collectio n. 4.trc ora 53269.Enable tracing a session to generate a tarce file. serial#. 6.trc ora_11598. not the base scripts that statscre. 2. determines trace output file size> 6. Once the SQL trace facility has been enabled for the instance. The following INIT. enter: ALTER SESSION SET SQL_TRACE = TRUE.START_TRACE_IN_SESSION( SID . The installation script (statscre. automation.3 Examples of TKPROF TKPROF ora53269. and viewing of perfoRMANce data (see Table 2). . you can disable it for an individual session by entering: ALTER SESSION SET SQL_TRACE = FALSE.1. DBMS_SUPPORT.) All the scripts you need for installing and running Statspack are in the ORACLE_HOME/rdbms/admin directory for UNIX platforms and in %ORACLE_HOME%\rdbms\admin for Microsoft Windows NT systems. FCHDSK) PRINT = 10 To analyze the sql statements: 1.prf SORT = (PRSDSK. PL/SQL.43326).START_TRACE_IN_SESSION(86.STOP_TRACE_IN_SESSION( SID .trc ora_23532. or use DBMS_SUPPORT.

sql --. using Statspack job_queue_processes=1 Change the interval of statistics collection by using the dbms_job. GRANT GRANT GRANT GRANT CREATE SeSSion to PERFSTAT.sql contains an example of how to do this.ora file: # Set to enable the job-queue process to start. The file statsauto. Install Statspack: CREATE USER perfstat identified by perfstat default tableSpace TOOLS temporary tableSpace TEMP.snap procedure: SQL> connect perfstat/perfstat SQL> execute statspack. sqlplus sys --. # This allows dbms_job to schedule automatic # statistics collection. When you create a job by using dbms_job.Reverse of spcreate.@?/rdbms/admin/spdrop.The simplest interactive way to take a snapshot is to log in to SQL*Plus as the owner perfstat and execute the statspack. In order to use dbms_job to schedule snapshots automatically. To stop and remove the automatic-collection job: execute dbms_job. Oracle assigns the job a unique number that you can use for changing or removing the job. You can use dbms_job to automate statistics collection. 'SYSDATE+(1/48)'). unlimited tableSpace to PERFSTAT. scheduling a snapshot every hour. reSource to PERFSTAT. SYSDATE+(1/48)' causes the statistics to be gathered each 1/48 day -every half hour. In this case.interval proc edure: execute dbms_job.interval(<job number>.snap.Install Statspack -. you must set the j ob_queue_processes initialization parameter to greater than 0 in the init.sql -- .Drop Statspack -. connect to PERFSTAT.remove(<job number>).sql --.Enter tablespace names when prompted -@?/rdbms/admin/spcreate.

lis. Overig: =========== 20. --.creates the package Check each of the three output files produced (spcusr.lis. spctab.ora parameter timed_s tatistics to true.creates the user and grants privileges spctab .ora parameters t. characterset specificatie bij CREATE DATABASE 2.v. yyyy hh24:mm:ss') snap_time FROM sp$snapshot. De Sever kan wel meerdere locale in runtime laden uit files gespecificeerd in $ export ORA_NLSxx=$ORACLE_HOME/ocommon/nls/admin/data 3.Take a perfoRMANce snapshot -execute statspack.snap. To examine the change in instancewide statistics between two time periods.'MON dd.to_char(snap_time.Get a list of snapshots -column snap_time format a21 SELECT snap_id.li s) by the installation to ensure no errors were encountered.b.SQL file is run while connected to the PERFSTAT user.creates the tables spcpkg .1 NLS: ========= Bij Server: 1. You are prompted for the following: The beginning snapshot ID The ending snapshot ID The name of the report text file to be created =========== 21. Using Statspack (gathering data): sqlplus perfstat --. -NOTE: To include important timing information set the init. spcpkg. the S PREPORT.sql install script automatically calls 3 other scripts needed: spcusr . NLS init. . before continuing on t o the next step.SQL command file is located i n the rdbms/admin directory of the Oracle home. The SPREPORT. de user sessions.The spcreate.

Hierdoor zijn beide hetzelfde. : : : : invloed op sessions op server locale bij client. Doing so will override the default values that are set for the session in the in itialization parameter file. client heeft lokaal een NLS environment setting 2. een session wordt gevormd.' ALTER SESSION SET NLS_NUMERIC_CHARACTERS='.ora parameters. De session NLS kan worden verANDert via ALTER SESSION. dan communiceerd de client dat naar de server session. dan gelden de init. Dit heeft alleen effec t op de PL/SQL en SQL statements executed op de server init.. Is bij de clent de NLS_LANG environment variable gezet.' ALTER SESSION SET NLS_TERRITORY=France. In SQL functions: NLS parameters can be used explicitly to hardcode NLS behavior within a SQL func tion.ora: bij client: Examples: --------Example 1: ---------ALTER SESSION SET nls_date_format = 'dd/mm/yy' ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY' ALTER SESSION SET NLS_LANGUAGE='ENGLISH'. ALTER SESSION SET NLS_TERRITORY=America. character conversions may be necessary at the cost of increased overhead and potential data loss. client: 1. client connect naar database. then choose a superset that includes all client character sets. ALTER SESSION SET NLS_LANGUAGE='NEDERLANDS'.ora parameters bij server environment variables bij client alter session statement expliciet in SQL statement Voorbeeld van override: in init. NLS_SORT=ENGLISH ALTER SESSION SET NLS_SORT=FRENCH. overrides session verANDert de session.If clients using different character sets will access the database. Otherwise. overides init. export NLS_NUMERIC_CHARACTERS='.ora overides alles . en de NLS enviroment wordt gemaakt aan de hAND van de NLS init.ora NLS parameters voor de server ses sion 3. Is er geen NLS_LANG..

env. te zetten via: NLS_CALENDAR NLS_COMP NLS_CREDIT NLS_CURRENCY NLS_DATE_FORMAT NLS_DATE_LANGUAGE NLS_DEBIT NLS_ISO_CURRENCY NLS_LANG init. env. Session altered. 2.---------ap 12. or set for the session by the ALT ER SESSION statement.ora. env. NAME SAL ---------. expliciet in SQL ALTER SESSION environment variable init.ora.set for the client with environment variables.'DD-MON-YYYY'.ora. init. Example 2: ---------SQL> ALTER SESSION SET NLS_NUMERIC_CHARACTERS='.ora. env. 'nls_date_language = FRENCH') SELECT last_name FROM employees WHERE hire_date > TO_DATE('01-JAN-1999'. env alter alter alter alter alter alter session session session session session session . NAME SAL ---------.53 piet 89. For example: TO_CHAR(hiredate. env env. 'DD/MON/YYYY'. SQL> select * from ap2. 3. init.---------ap 12.' 2 . Session altered. init. 'NLS_DATE_LANGUAGE = AMERICAN'). init. 4.'.ora NLS parameters.ora.7 priority: --------1. env env. init. SQL> select * from ap2.53 piet 89.7 SQL> ALTER SESSION SET NLS_NUMERIC_CHARACTERS='..ora..

-------NAME SAL SQL> select * from ap2. env env env env. NLS_INSTANCE_PARAMETERS shows the current NLS instance parameters that have been explicitly set and the values of the NLS instance parameters. env.ora. Name Null? ----------------------------------------. and database NLS parameters by que rying the following data dictionary views: NLS_SESSION_PARAMETERS shows the NLS parameters and their values for the session that is querying the view. Example: -------SQL> desc ap1. NAME ---------ap piet SAL ---------12. It does not show information about the character set..ora.ora. . Name Null? ----------------------------------------.53 piet 89.53 89. NLS_DATABASE_PARAMETERS shows the values of the NLS parameters that were used wh en the database was created.-------NAME SAL SQL> select * from ap1.---------ap 12.. init. init.7 Type ---------------------------VARCHAR2(10) NUMBER Type ------------VARCHAR2(10) VARCHAR2(10) SQL> desc ap2.7 . env.ora. instance. NAME SAL ---------.NLS_LANGUAGE NLS_LIST_SEPERATOR NLS_MONETARY_CHARACTERS NLS_NCHAR NLS_NUMMERIC_CHARACTERS NLS_SORT NLS_TERRITORY NLS_DUAL_CURRENCY DATA DICTIONARY VIEWS: ---------------------- init. . alter alter alter alter alter session session session session session Applications can check the session. init.ora. init.

NVARCHAR2) is in 9i always Unicode but you can perfectly use "normal" CHAR and VARCHAR2 col umns for storing unicode in a database who has a AL32UTF8 / UTF8 NLS_CHARACTERSET. SQL> insert into ap2 2 select * from ap1. Your current value for the NLS_NCHAR_CHARACT ERSET can be found with this select: select value from NLS_DATABASE_PARAMETERS where parameter='NL S_NCHAR_CHARACTERSET'. NCLOB columns.. You cannot have more than 2 charactersets defined in Oracle: The NLS_CHARACTERSET is used for CHAR. UTF8: ======================================= 1) What is the National Character Set? -------------------------------------The National Character set (NLS_NCHAR_CHARACTERSET) is a character set which is defined in addition to the (normal) database character set and is used for data stored in NCHAR.SQL> insert into ap2 2 select * from ap1. The character set identifier is stored with the column definition itself. See Note 260893. Session altered. NVARCHAR2. NLS_NCHAR_CHARACTERSET is defined when the database is created and specified wi th the CREATE DATABASE command. From 9i onwards the NLS_NCHAR_CHARACTERSET can have only 2 values: UTF8 or AL16UTF16 who are Unicode charactersets. Al lot of people think that they *need* to use the NLS_NCHAR_CHARA CTERSET to have UNICODE support in Oracle. VARCHAR2. 20. the CREATE DATABASE command will fail with "ORA-12714 invalid national character set specified". select * from ap1 * ERROR at line 2: ORA-01722: invalid number SQL> ALTER SESSION SET NLS_NUMERIC_CHARACTERS='. AL16UTF16. this is not true. 2) Which datatypes use the National Character Set? -------------------------------------------------There are three datatypes which can store data in the national character set: . See also point 15. The NLS_NCHAR_CHARACTERSET defaults to AL16UTF16 if not hing is specified. CLOB columns. NLS_NCHAR_CHARACTERSET (NCH AR. 2 rows created.'.2 More on AL32UTF8.1 Unicode character sets in the Oracle database for more info ab out the difference between them. NVARCHAR2 and NCLOB columns. The NLS_NCHAR_CHARACTERSET is used for NCHAR. When trying to use another NATIONAL characterset.

TABLE_NAME from DBA_TAB_COLUMNS where DATA_TYPE in ('NC HAR'.com/metalink/plsql/showdoc?db=NOT&id=1448 08.1> Possible action for CLOB/NCLOB storage after 10g upgrade and if you use DBMS_LOB.1> Examples and limits of BYTE and CHAR semantics usage If you use N-types. This has very limited impact.stores national character set data of up to four gigabytes.. The length of the column is ALWAYS defined in characters (it always uses CHAR semantics) NVARCHAR2 .1 <http://metalink. for more info about this please see: Note 258114.1 <http://metalink. These SYS and SYSTEM tables may contain data if you are using: TABLE_NAME -----------------------------ALL_REPPRIORITY DBA_FGA_AUDIT_TRAIL DBA_REPPRIORITY DEFLOB STREAMS$_DEF_PROC USER_REPPRIORITY DEF$_LOB DEF$_TEMP$LOB REPCAT$_PRIORITY .oracle.a fixed-length national character set character string.'NVARCHAR2'.NCHAR . insert into test values(N'this is a NLS_NCHAR_CHARACTERSET string'). then please read Note 144808. 'NCLOB'). The length of the column is ALWAYS defined in characters (it always uses CHAR semantics) NCLOB .1 <http://metalink.LOADFROMFILE see Note 267356.') syntax when coding it so that Literals are denoted as being in the national character set by prepending letter 'N'. DO use the (N'. for ex ample: create table test(a nvarchar2(100)).a variable-length national character set character string. Data is always stored in UCS2 or AL16UTF16. even if the NLS_NCHAR_CHARACTERSET is UTF8.com/metalink/plsql/showdoc?db= NOT&id=267356.1> Character set conversion when using DBMS_LOB If you don't know what CHAR semantics is.. On a 9i database created without (!) the "sample" shema you will see these rows (or less) returned: OWNER -----------------------------SYS SYS SYS SYS SYS SYS SYSTEM SYSTEM SYSTEM 9 rows selected.oracle.com/metalink/plsql/showdoc?db= NOT&id=258114.oracle. 3) How to know if I use N-type columns? --------------------------------------This select list all tables containing a N-type column: select distinct OWNER.

. 4) Should I worry when I upgrade from 8i or lower to 9i or 10g? --------------------------------------------------------------* When upgrading from version 7: The National Character Set did not exist in version 7.com/metalink/plsql/showdoc?db=NOT&id=1 59657. * When upgrading from version 8 and 8i: .If you have only the SYS / SYSTEM tables listed in point 3) then you don't have USER data using N-type columns.oracle. DEF$_TEMP$LOB and REPCAT$_PRIORITY * Advanced Replication or Deferred Transactions functionality -> DEFLOB * Oracle Streams -> STREAMS$_DEF_PROC If you do have created the database with the DBCA and included the sample shema then you will see typically: OWNER TABLE_NAME -----------------------------------------------------------OE BOMBAY_INVENTORY OE PRODUCTS OE PRODUCT_DESCRIPTIONS OE SYDNEY_INVENTORY OE TORONTO_INVENTORY PM PRINT_MEDIA SYS ALL_REPPRIORITY SYS DBA_FGA_AUDIT_TRAIL SYS DBA_REPPRIORITY SYS DEFLOB SYS STREAMS$_DEF_PROC SYS USER_REPPRIORITY SYSTEM DEF$_LOB SYSTEM DEF$_TEMP$LOB SYSTEM REPCAT$_PRIORITY 15 rows selected. So there is nothing to worry about.1> Complete Upgrade Checklist for Manual Upgrades from 8. We recommend that you follow this note: Note 159657. Your database will just have the -default.1 <http://metalink. so you cannot have N-type columns.0.AL16UTF16 NLS_NCHAR_CHARACTERSET declaration and the standard sys/system tables. Your database will just have the -default.X / 9.AL16UTF16 NLS_NCHAR_CHARACTERSET declaration after the upgrade and the standard sys/system tables.* Fine Grained Auditing -> DBA_FGA_AUDIT_TRAIL * Advanced Replication -> ALL_REPPRIORITY.. The OE and PM tables contain just sample data and can be dropped if needed.If you have more tables then the SYS / SYSTEM tables listed in point 3) (and they are also not the "sample" tables) then there are two possible case s: .. USER_REPPRIORITY DEF$_TEMP$LOB . DBA_REPPRIORITY.1 to Orac le9i .. So there is nothing to worry about.

1> Complete Upgrade Checklist for Manual Upgrades from 8. ZHT16BIG5FIXED ZHT32EUCFIXED Then the new NLS_NCHAR_CHARACTERSET will be AL16UTF16 and your data will be converted to AL16UTF16 during the upgrade.com/metalink/plsql/showdoc?db=NOT&id=62107. --------------------------------------------------------------------------------------That may happen if you have not set the ORA_NLS33 environment parameter correct ly to the 9i Oracle_Home during the upgrade.1 <h ttp://metalink.X / 9.1 to O racle9i c) Your current 8 / 8i NLS_NCHAR_CHARACTERSET is NOT in the list of point a) and is NOT UTF8: Then your will need to export your data and drop it before upgrading.com/metalink/plsql/showdoc?db=NOT&i d=159657.1> Complete Upgrade Checklist for Manual Upgrades from 8.1> Complete Upgrade Checklist for Manual Upgrades from 8. We recommend that you follow this note for the upgrade: Note 159657.oracle. We still recommend that you follow this note: Note 159657.oracle.X / 9. ZHT32TRISFIXED KO16KSC5601FIXED . KO16DBCSFIXED .1 <http://metalink. refer to this note and ask to assign the TAR to the . Note 77442.0.* Again.oracle.1 <http://metalink. We recommend that you follow this note: Note 159657. ZHS16DBCSFIXED .1> Complete Upgrade Checklist for Manual Upgrades from 8.1 <http://metalink.oracle.X / 9.0.1> ORA_NLS (ORA_NLS32. JA16DBCSFIXED .1 <http://metalink.1 to O racle9i b) Your current 8 / 8i NLS_NCHAR_CHARACTERSET is UTF8: Then the new NLS_NCHAR_CHARACTERSET will be UTF8 and your data not be touched during the upgrade.1 to O racle9i For more info about the National Character Set in Oracle8 see Note 62107.com/metalink/plsql/showdoc?db=NOT&id=1596 57.0.com/metalink/plsql/showdoc?db=NOT&i d=159657. We recommend that you follow this note: Note 159657. ZHT16DBCSFIXED .oracle. JA16EUCFIXED . the next to points are *only* relevant when you DO have n-type USER d ata * a) Your current 8 / 8i NLS_NCHAR_CHARACTERSET is in this list: JA16SJISFIXED .com/metalink/plsql/showdoc?db=NOT&id=7744 2.X / 9. ORA_NLS10) Environment Variables explained.0.oracle.com/metalink/plsql/showdoc?db=NOT&i d=159657. ORA_NLS33. US16TSTFIXED . ZHS16CGB231280FIXED ZHS16GBKFIXED .1 <http://metalink.1> 5) The NLS_NCHAR_CHARACTERSET is NOT changed to UTF8 or AL16UTF16 after upgradin g to 9i.1 to Oracle9 i Strongly consider to restore your backup and do the migration again or log a TAR.

c) If you want to change to UTF8 because you are using transportable tablespaces from 8i database then check if are you using N-types in the 8i database that are included in t he tablespaces that you are transporting.com/metalink/plsql/showdoc?db=NOT&id=23 6231. ------------------------------------------------------------------------------------a) If you do *not* use N-types then there is NO problem at all with AL16UTF16 because you are simply not using it and we strongly advice you the keep the default AL16UTF16 NLS_NCHAR_CHARACTERSET.1> New Character Sets Not Supported For Use With Developer 6i And Older Ver sions If this is a situation you find yourself in we recommend to simply use UTF8 as NLS_NCHAR_CHARACTERSET or create a second 9i db using UTF8 as NCHAR and us e this as "inbetween" between the 8i and the 9i db you can create views in this new database that do a select from the AL16UTF16 9i db the data will then be converted from AL16UTF16 to UTF8 in the "inbetween" dat abase and that can be read by oracle 8i This is one of the 2 reasons why you should use UTF8 as NLS_NCHAR_CHARACTERSE T. However please do note that not all situations can be corrected. That team can then assist you further.1 <http://metalink. 6) Can I change the AL16UTF16 to UTF8 / I hear that there are problems with AL16 UTF16...oracle. TABLE_NAME from DBA_TAB_COLUMNS where DATA_TYPE in ( 'NCHAR'. select distinct OWNER. If you are NOT using N-type columns with pre-9i clients then there is NO reas on to go to UTF8.1 <http://metalink.NLS/globalization team.com/metalink/plsql/showdoc?db=NOT&id=14 0014. so you might be asked to do the migration again. If yes. provide: .'NVARCHAR2'.1> ALERT Oracle8/8i to Oracle9i/10g using New "AL16UTF16" National Characte r Set Note 236231. then leave it to AL16UTF16 and log a tar for the solution of the ORA19736 and refer to this document. log a tar so that we can assist you.oracle. b) If you *do* use N-types then there will be a problem with 8i clients and lower accessing the N-type columns (note that you will NOT have a problem selecting from "normal" non-N-type columns). d) You are in one of the 2 situations where it's really needed to change from AL 16UTF16 to UTF8. More info about that is found there: Note 140014. 'NCLOB'). If not. then you have the second reason to use UTF8 as as NLS_NCHAR_CHARACTER SET.

For information about the possible AL32UTF8 issue please see Note 237593. copy all scripts and executables found in the zip file you downloaded to your oracle_home overwriting the old versions. From 9i onwards the NLS_NCHAR_CHARACTERSET can have only 2 values: UTF8 or AL16 UTF16. TABLE_NAME.1 <http://metalink. Then run csminst. Then run CSSCAN csscan FULL=Y FROMNCHAR=AL16UTF16 TONCHAR=UTF8 LOG=Ncharcheck CAPTURE=Y ( note the usage of fromNchar and toNchar ) Upload the 3 resulting files and the output of the select while creating the t ar important: Do NOT use the N_SWITCH.'NVARCHAR2'. this will corrupt you NCHAR data !!!!!! 7) Is the AL32UTF8 problem the same as the AL16UTF16 / do I need the same patche s? --------------------------------------------------------------------------------No.sql using these commands and SQL statements: cd $ORACLE_HOME/rdbms/admin set oracle_sid=<your SID> sqlplus "sys as sysdba" SQL>set TERMOUT ON SQL>set ECHO ON SQL>spool csminst.SQL script.log for errors.log SQL> START csminst. 2) a CSSCAN output IMPORTANT: Please *DO* install the version 1.1> Problems connecting to AL32UTF8 databases from older versions (8i and lower) 8) But I still want <characterset> as NLS_NCHAR_CHARACTERSET.com/software/tech/globalization/content.html and use this. like I had in 8(i) ! -------------------------------------------------------------------------------This is simply not possible.2 or higher from TechNet for you version. http://technet.oracle. 'NCLOB').com/metalink/plsql/showdoc?db=NOT&id=237 593. they may look similar but are 2 different issues. . COLUMN_NAME.oracle.1) the output from: select distinct OWNER. CHAR_LENGTH from DBA_TAB_COLUMNS where DATA_TYPE in ('NCHAR'.sql Check the csminst.

There is one condition in which this "limitation" can have a undisired affect. Oracle Corporation. so there is no need for AL32UTF8 as NLS_NCHAR_CHARACTERSET. -----------------------------------------------------------------------in the import log you see something similar to this: Import: Release 9. UTF8 is possible so that you can use it (when needed) for 8.0 . All rights reserved. In all other conditions AL16UTF16 is the preferred and best value.01.2. AL16UTF16 has the same unicode revision as AL23UTF8.4.0.07 via direct path import done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set export server uses WE8ISO8859P1 NCHAR character set (possible ncharset conversio n) This is normal and is not a error condition.2. it doesn't matter if you don't use the types. 11) I have the message "( possible ncharset conversion )" during import.2. refer to this note and ask to assign the TAR to the NLS/globalization team.Production on Fri Jul 9 11:02:42 2004 Copyright (c) 1982. That team can then assist you to work around this issue.64bit Production JServer Release 9.Production Export file created by EXPORT:V08.x backwards compatib ility. 2002.4.0 . .Both UTF8 and AL16UTF16 are unicode charactersets. Connected to: Oracle9i Enterprise Edition Release 9. so they can store whatever <characterset> you had as NLS_NCHAR_CHARACTERSET in 8(i). In that case log a TAR.0.2 What is this NLS_LANG thing anyway?" * NLS_LANG is used to let Oracle know what characterset you client's OS is USING so that Oracle can do (if needed) conversion from the client's characterset to the database characterset. NLS_LANG is a CLIENT parameter has has no influance on the database side.1> NLS_LANG Explained (How does Client-Server Character Conversion Work?) point "1. If you are not using N-types then keep the default AL16UTF16 or use UTF8.0 .4. 9) Do i need to set NLS_LANG to AL16UTF16 when creating/using the NLS_NCHAR_CHAR ACTERSET ? ----------------------------------------------------------------------------------------As clearly stated in Note 158577. when you are importing an Oracle8i Transportable Tablespace into Oracle9i you can run into a ORA-19736 (as wel with AL16UTF16 as with UTF8).com/metalink/plsql/showdoc?db=NOT&id=1585 77. 10) I try to use AL32UTF8 as NLS_NCHAR_CHARACTERSET but it fails with ORA-12714 ------------------------------------------------------------------------------From 9i onwards the NLS_NCHAR_CHARACTERSET can have only 2 values: UTF8 or AL16UTF16.1 <http://metalink.0.oracle.

UTF8 uses 1 up to 3 bytes. Trying to create a database with a AL16UTF16 NLS_CHARACTERSET will fail.1 <http://metalink. AL16UTF16 always 2 bytes. AL16UTF16 can only be used as NLS_NCHAR_CHARACTERSET in 9i and above.oracle. If you have a lot of non-western data (cyrillic.) UTF8 will use in most cases less disk space then AL16UTF16. see point 4) in this note.If you do not use N-types then this is a pure informative message.Frequently Asked Questions 14) Do i need to change the NLS_NCHAR_CHARACTERSET in 8i to UTF8 BEFORE upgradin g to 9i/10g? ------------------------------------------------------------------------------------------No..1 <http://metalink..But even in the case that you use N-types like NCHAR or NCLOB then this is not a problem: * the database will convert from the "old" NCHAR characterset to the new one a utomatically. Hindi langua ges. So no data loss is to be expected. (and . Japanese. 13) I'm inserting <special character> in a Nchar or Nvarchar2 col but it comes b ack as ? or ? . 15) Having a UTF8 NLS_CHARACTERSET db is there a advantage to use AL16UTF16 N-ty pes ? -----------------------------------------------------------------------------------there migth be 2 reasons: a) one possible advantage is storage (disk space). dutch.oracle. Note 260893. . french. spanish.the NLS_LANG has no impact on this conversion during exp/imp) * AL16UTF16 or UTF8 (the only 2 possible values in 9i) are unicode characterse t and so can store any character. portuguese etc.. Chinese. 12) Can i use AL16UTF16 as NLS_CHARACTERSET ? ---------------------------------------------No.com/metalink/plsql/showdo c?db=NOT&id=227330.unlike the "normal" characterset .... ------------------------------------------------------------------------------------------------see point 13 in Note 227330.1> Character Sets & Conversion . they are both encoded a internal fixed-width Unico de character set .) then i can be advantageous to use N-types for those columns.com/metalink/plsql/showdoc?db=NOT&id=2608 93... german. For western data (english.1> Unicode character sets in the Oracle database This is not true for (N)CLOB.

all numbers are CHAR definitions UTF8 (1 to 3 bytes) AL32UTF8 (1 to 4 bytes) AL16UTF16 ( 2 byte s) CHAR VARCHAR2 NCHAR NVARCHAR2 MIN 2000 4000 2000 4000 MAX 666 1333 666 1333 MIN 2000 4000 N/A N/A MAX 500 1000 N/A N/A MIN N/A N/A 1000 2000 MAX N/A N/A 1000 2000 (N/A means not possible) This means that if you try to store more then 666 characters that occupy 3 bytes in UTF8 in a CHAR UTF8 colum you still will get a ORA-01401: inserted value too large for column (or from 10g onwards: ORA-12899: value too large for column ) error. we still have so me physical underlying byte based limits and development has choosen to allow th e full usage of the underlying limits. the character and byte length are the same. making sizing the column more difficult.com/metalink/plsql/showdoc?db=NOT&id=14 4808. NCHAR) are *always* defined in CHAR semantics. Note 144808. Hence the reason why CHAR semantics was introduced.oracle. The MIN col is the maximum size that you can *define* and that Oracle can sto re if all data is the MINIMUM datalength (1 byte for AL32UTF8 and UTF8) for that characet.oracle. The MAX colum is the MAXIMUM amount of CHARACTERS that can be stored occupying the MAXIMUM data len seen that UTF8 and AL32UTF8 are VARRYING charactersets this means that a string of X chars can be X to X*3 (or X*4 for AL32) bytes.Note 258114.1 <http://metalink. This results in the following table giving the maxi mum amount of CHARarcters occupying the MAX datalength that can be stored for a cer datatype in 9i and up. multi-byte character set encodings do not correspond to the bytes.com/metalink/plsql/showdoc?db=NOT&id=25811 4.1> Possible action for CLOB/NCLOB storage after 10g upgrade so they will use the same amount of disk space. N-types (NVARCHAR2..1 <http://metalink.1> Examples and limits of BYTE and CHAR semantics usage Disadvantages using N-types: . you cannot define them in BYTE. However.. even if you have defined the colum as CHAR (2000 CHAR) so here it might be a good idea to define that column as NCHAR that will raise the MAX to 1000 char's . However. b) other possible advantage is extending the limits of CHAR semantics For a single-byte character set encoding.

and NCLOB). it might be faster on some systems. NVARCHAR2. program. but that has more to do with I/O then with the database kerne l.') syntax when coding it so that Literals are denoted as being in the national character set by prepending letter 'N'. * If you use N-types. such as Unicode. which is used for the national character set. . You can store Unicode charac ters in columns of these datatypes even if the database character set is not Unicode. to avoid confusion and possible other limitations who might be imposed by your application or programming language to the usage of N-types. or language. It encodes Unicode data in the UTF-8 encoding. regardless of the platform. otherwise you will run i nto point 13 of this note. * Do not expect a higher *performance* by using AL16UTF16. It encodes Unicode data in the UTF-16 encoding. DO use the (N'. helps to provide unrestricted multilingual support because it supports a very la rge character repertoire. A universal character set. Every point between U+0000 and U+FFFF is a code point.. unrestricted multilingual support The ability to use as many languages as desired. encompassing most modern languages of the world. which is used for the databa se character set. Unicode database A database whose database character set is UTF-8.* You might have some problems with older clients if using AL16UTF16 see point 6) b) in this note * Be sure that you use (AL32)UTF8 as NLS_CHARACTERSET . Normally you will choose to use VARCHAR (using a (AL32)UTF8 NLS_CHARACTERSET) for simplicity. Unicode datatype A SQL NCHAR datatype (NCHAR. Unicode Unicode is a universal encoded character set that allows you information from an y language to be stored by using a single character set. AL32UTF8 An Oracle character set for the SQL CHAR data type.. for e xample: create table test(a nvarchar2(100)). AL16UTF16 The default Oracle character set for the SQL NCHAR data type. Unicode provides a unique code value for every character. 16) I have a message running DBUA (Database Upgrade Assistant) about NCHAR type when upgrading from 8i . insert into test values(N'this is NLS_NCHAR_CHARACTERSET string'). Unicode code point A 16-bit binary value that can represent a unit of encoded text for processing a nd interchange.

It is a variable-width encoding.1.1. One Unicode character can be 2 bytes or 4 bytes in UTF-16 encoding. Wide chara cters are intended to support internal character processing Oracle started supporting Unicode based character sets in Oracle7.0 UTF-8 Oracle database character set with 6-byte supplementary char acter support.1) | | | | | | AL16UTF16 | 9.1. It is an extension of UCS-2 and supports the sup plementary characters defined in Unicode 3.1 (8.7) | | | | 3. Supplementary characters are treated as two separate. UTF-8 The 8-bit encoding of Unicode. Supplementary characters are represented in 4 bytes.0.1 by using a pair of UCS-2 code points. Characters from the E uropean scripts are represented in either 1 or 2 bytes.0-8. It is for ASCII-based platforms. the code point range was allocated for supplementary characters in Unicode 3.0-10g | 3. Supplementary characters are represented in 4 bytes.0-10g | 3.1. UTF-16 The 16-bit encoding of Unicode.0-10g | 2.UTFE A Unicode 3. One Unicode char acter can be 1 byte.0-10g | 2.0-8.7-10g) | | | | | | AL32UTF8 | 9.2) | | | | 3.7) | | | | 3.0) | | | | 3.0 (8. Characters (including ASCII characters) from European scripts and most Asian scr ipts are represented in 2 bytes. fixed-width chunks. two. wide character A fixed-width character format that is useful for extensive text processing beca use it allows data to be processed in consistent. 2 bytes. Characters from most Asian scripts are r epresented in 3 bytes.0 (8. or three bytes.0 (9. It is used only on EBCDIC platforms.1 | | | | | | UTF8 | 8.2-8.7-10g) | | | | | | UTFE | 8.0) | . Here is a summary of the Unicode character sets supported in Oracle: +------------+---------+-----------------+ | Charset | RDBMS | Unicode version | +------------+---------+-----------------+ | AL24UTFFSS | 7.0.2 (10.1 | 1. or 4 bytes in UTF-8 encoding.1 (8. 3 bytes. The UTF8 character set supports Unicode 3. Although specific supplementary characters were not assigned code points in Unic ode until version 3.0 (9. UTF8 The UTF8 Oracle character set encodes characters in one. user-defined characters th at occupy 6 bytes.1.1 (9.

UTFE This is the UTF8 database character set for the EDCDIC platforms. AL32UTF8 is the database character set that supports the latest version (3.1.0. therefore UTF8 has a maximum of 3 bytes per character. the plan is to keep enhancing AL16UTF16 as necessary to support future version of the Unicode standard.7. which is now obsolete. Changing the design of UTF8 would break backward compatibility. Is was introduced in Oracle 7.2 in 10g) of the Unicode standard. So if supplementary characters are inserted in a UTF8 database. Which can be found at http://www. and was upgraded to Unicode version 3.2 in 10g) of the Unicode standard.1 standard between Oracle 8.1&p_database_id=NOT> Changing AL24UTFFSS to UTF8 . . then upgrade the character set to UTF8 before upgrading the database further to 9i or 10g.| | | 3.com/metalink/plsql/ml2_documents. It has the same properties as UTF8 on ASCII based platforms.1 standard.AL32UTF8 wi th ALTER DATABASE CHARACTERSET UTF8 UTF8 was the UTF-8 encoded character set in Oracle8 and 8i. All supplementary characters are stored as 4 bytes. The migration path for existing AL24UTFFSS databases is to upgrade the database to 8. [NOTE:234381. It also provides support for the newly defined supplementary characters. AL16UTF16 This is the first UTF-16 encoded character set in Oracle.1) | +------------+---------+-----------------+ AL24UTFFSS AL24UTFFSS was the first Unicode character set supported by Oracle. The introduction of surrogate pairs should mean that no significant architecture changes are needed in future versions of the Unicode standard. AL16UTF16 supports the latest version (3. We recommend that customers switch to AL32UTF8 for full supplementary character support. It also provides support for the newly defined supplementary characters.6.1.0 in future Oracle releases. All supplementary characters are stored as 4 bytes. 9i and 10g. the allocation for these characters were already defined in 3.oracle. so the plan is to keep enhancing AL32UTF8 as necessary to support future version of the Unicode standard.2 (10.2.0 and 8. it will not corrupt the actual data inside the database.1.1. so a new character set was introduced. AL24UTFFSS has been de-supported from Oracle9i. It followed the Unicode 2. It was introduced in Oracle9i as the default national character set (NLS_NCHAR_CHARACTERSET).unicode.0 for versions 8.1 (9.showDoc ument?p_id=234381.1] <http://metalink. The AL24UTFFSS encoding scheme was based on the Unicode 1.org/unicode/reports/tr16/ AL32UTF8 This is the UTF-8 encoded character set introduced in Oracle9i.0 or 8.2) | | | | 3. occupying 6 bytes in storage. They will be treated as 2 separate undefined characters. To maintain compatibility with existing installations this character set will remain at Unicode 3. AL32UTF8 was introduced because when UTF8 was designed (in the times of Oracle8) there was no concept of supplementary characters.1. The EBCDIC Unicode transformation format is documented in Unicode Technical Report #16 UTF-EBCDIC. As with AL32UTF8.0 in AL32UTF8 in the release after 10. Although specific supplementary characters were not assigned to Unicode until version 3. for example work is now underway to make sure we support Unicode 4.

1.0. Correct me if I'm wrong but I believe that most > >asian character sets can be translated into utf8 without loosing any > >information.AL16UTF16 cannot be used as a database character set (NLS_CHARACTERSET). see: http://www.2.org/unicode/standard/versions/enumerate dversions.com/tech/globalization/pdf/TWP_Unicode_10gR1.x: http://www.0.0: http://www. > > >Furthermore the use of NLS columns on a utf8 database (al32utf8 would be > better by the way) is > >subject to questions. multi-byte set (such as AL16UTF16) as the database character set. txt Unicode Versions 2.1-Update/UnicodeData-3. character Trying to byte EBCDIC as a subset.unicode. The paper itself contains much more information and is available from: http://otn.0-Update/UnicodeData-3. whichever is native to the deployment Therefore.1: http://www.1.org/Public/3. all characters are there referenced with their UCS-2 codepoint Some further notes: =================== Note 1: ------Thanks for the detailed reply. The database character set is used to identify and to hold SQL. it is not possible to use a fixed-width.org/Public/UNIDATA/UnicodeData.html For a glossarry of unicode terms.html Unicode Version 1.org/Public/3. txt Unicode Version 3.1-Update/UnicodeData-1.unicode.5.org/Public/3. The only exception to this statement is for surrogate pairs > >and that's the only difference between al32utf8 and utf8 in Oracle.2-Update/UnicodeData-3.2: http://www. It must have either single byte 7-bit ASCII or single platform. create a database with AL16UTF16 a characterset in 9i and up will give "ORA-12706: THIS CREATE DATABASE CHARACTER SET IS NOT ALLOWED". SQL metadata and PL/SQL source code.unicode.unicode.1: http://www. .unicode. txt A description of the file format can be found at: http://www. only as the national character set (NLS_NCHAR_CHARACTERSET).0.org/glossary/ On above locations you can find the unicode standard.oracle. txt Unicode Version 3.unicode.unicode.0.pdf References ---------The following URLs contain a complete list of hex values and character descriptions for every Unicode character: Unicode Version 3. Further reading --------------All the above information is taken from the white paper "Oracle Unicode database support".org/Public/1.

CHAR columns NCHAR columns do not always have the same sort for identical strings. ucs2. and there is no data conversion upon retrieval and insertion of those surrogate characters. Surrogate pair Unicode characters are stored in the standard 4 bytes representation. Disadvantages ------------1. Surrogate pairs require four bytes. It is for ASCII-based platforms. > > I found from Oracle documentation that UTF8 supports surrogate pairs but > requires 6 bytes for surrogate pairs. For example. UTF8 The UTF8 character set encodes characters in one to three bytes. The binary order for SQL CHAR columns is different from that of SQL NCHAR columns when the data consists of surrogate pair Unicode characters. Also.> >al32utf8 supports surrogate pairs. al24utffss). Surrogate pairs require six bytes. You can specify the length of SQL CHAR types as a number of characters. surrogate characters are treated as one code point rather than the standard of two code points. As a result. AL32UTF8 --------Advantages ---------1. UTF8 ---Advantages ---------1. the storage for those characters requires less disk space than that of the same characters encoded in UTF8. isolatin1. I should have clarified : the jdbc drivers don't support these 6-bytes utf8 surrogate pairs. al32utf8. That's the reason why we introduced al32utf8 as one of the native character set (ascii. utf8. You cannot specify the length of SQL CHAR types in the number of characters (Unicode code points) for surrogate characters. 2. 2. Note 2: ------> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > AL32UTF8 The AL32UTF8 character set encodes characters in one to three bytes. The binary order on the SQL CHAR . It is for ASCII-based platforms.

CHAR columns and NCHAR columns have the same sort for identical strings.0 UTF-8 Universal character set Universal Unicode CESU-8 compliant UTFE EBCDIC form of Unicode 3. then I can enter 40 surrogate characters. EURO. We know that Oracle 9. Note 5: ------Hi Tom. It has 255 characters. EURO MB. way more then 255 characters. Korean data requires a multi-byte character set -. As a result. Disadvantages ------------1. Oracle has to convert data for those surrogate characters.1 UTF-8 Universal character set Universal Unicode UTF8 Unicode 3. Surrogate pair Unicode characters are stored as 6 bytes instead of the 4 bytes defined by the Unicode standard. EURO MB.1.In 8. It is a variable length encoding scheme.1 UTF-16Universal character set Universal Unicode AL32UTF8 Unicode 3. Note 3: ------Universal Character Sets ==================== Character Set Name Description Language. Country or Region ================= ===================================== ========================== AL16UTF16 Unicode 3.2 doesn't have UTF8 but AL32UTF8. It has more then.2.each character could be 1.It remains same in 9. I dont understand the 1st disadvantage of AL32UTF8 encoding !! If surrogate characters are considered 1 codepoint. EURO .7 we used UTF8 character set. 2. Comments ========= MB.0UTF-8 Universal Unicode Universal character set Note 4: ------WE8ISO is a single byte character set.1.2. We migrated our DB 8. As a result. FIXED MB. 3 or more bytes. ASCII. ASCII.> > > > > > > > > > > > > > > > > > > columns is always the same as that of the SQL NCHAR columns when the data consists of the same surrogate pair Unicode characters. then if I declare a CHAR column as of length 40 characters (codepoints) . I don't see it fitting into we8iso unless they use RAW in which case it is just bytes. Can we keep this UTF8 or have to change to AL32UTF8.7 to 9. not characters at all.

4) What is impact on CLOB ? 5) What will be the size of the database? Our production DB size is currently 50GB. It is 80 bytes (you can use the new 9i syntax varchar2( N char ) -. You might find that x := a || b. european characters (except ascii -. We are migrating from oracle 8. All instances have WE8ISO88591P1 character set. fails -.your data model may well have to change.with string to long in your plsql code due to the increased size. . 1) What is the difference between UTF-8.7bit data) all take 2 bytes. That varchar2(80) you have in your database? It might only hold 40 characters of eurpean data (or even less of other kinds of data). Does oracle support that character set? 3) Do we have to change our pl/sql procedure if we move to unicode database ? The reason for this question is our developer is using ascii character for carrage return and line feed like chr(10) and chr(13) and some other ascii character .0 support. What it would be in unicode? Thanks basically utf8 is unicode 3. utf16 is unicode 3.6 to oracle 9 R2. you could find your 80 character description field cannot hold 80 characters.1. I have few questions on this issue. may we do it by : alter database character set AL32UTF8 or we must use exp/imp utility? Regards Followup: what do you mean -. Your plsql routines may will have to change -. Our company is expanding globally so we are thinking to use unicode character set with oracle 9.UTF-16 Is AL32UTF8 and UTF-8 is same character set or they are different? Is UTF-16 and AL16UTF16 is same character set or different ? 2) Which character is super set of all character set? If there is any.utf8 is still a valid character set? Note 6: ------Hi Tom. We have about 14 oracle instance.it'll allocate in characters.1 there is no super super "top" set.If we need to change. So. not bytes). You'll find that in utf.

As unicode is a VARYING WIDTH encoding scheme.it is more complex) chr(10) and chr(13) should work find.You might find that your string intensive routines run slower (substr(x. ROWID -----------------AAAI92AAQAAAFXbAAA AAAI92AAQAAAFXbAAB . they are simple ASCII. The rowid is an 18 byte structure that stores the location of blockid WHERE the row is in. same issues.80) is no longer byte 1 . block_id.. Every row has a rowid. but it will be somewhere between 50 and 200. On clob -.same impact as on varchar2.3 Oracle Rowid's ------------------Rowid's: Every table row has an internal rowid which contains information about object_id. file#. ID --------1 2 NAME -------------------joop gerrit SQL> SELECT rownum FROM charlie. ROWNUM --------1 2 SQL> SELECT rowid FROM SALES. Also you can query on the "logical" number rownum. SQL> SELECT * FROM charlie.xyz. it is impossible to be precise -.xyz.Oracle has to look through the string to find where characters start and stop -.DBMS_ROWID: DBMS_ROWID.xyz. Every row has also an associated logical "rownum" on which you can query.1. byte 80 -. .it is not a fixed width scheme. 21. so we don't know how big your strings will get to be. Your database could balloon to 200gb.

0).null.EVENTLOG WHERE id = 5. object_no := dbms_rowid.put_line('The obj. rownum FROM CHARLIE.rowid_block_number(rowid) FROM TCMLOGDBUSER. SELECT dbms_rowid.ROWID_TO_RESTRICTED(ROWID. / PL/SQL procedure successfully completed.0). then displays the object number: DECLARE object_no INTEGER. using the ROWID_OBJECT function in the DBMS_ROWID package.rowid_block_number(rowid) FROM emp WHERE ename = 'KING'.The old format is the restricted format of Oracle 7 The new format is the extended format of Oracle 8. DBMS_ROWID EXAMPLES: -------------------SELECT DBMS_ROWID. extracts the data obj ect number FROM the ROWID. BEGIN SELECT ROWID INTO row_id FROM TCMLOGDBUSER. DBMS_ROWID. row_id ROWID.EVENTLOG WHERE id=5.null. # is 28954 PL/SQL procedure successfully completed. END. # is '|| object_no).ROWID_TO_EXTENDED(ROWID. OWNER -----------------------------OBJECT_NAME ----------------------------------------------------------SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID . SELECT dbms_rowid.XYZ. SQL> select * from dba_objects where object_id=28954. 8i format: OOOOOOFFFBBBBBRRRR 000000=object_id FFF=relative datafile number BBBBB=block_id RRR=row in block The dbms package DBMS_ROWID has several function to convert FROM the one format to the other. dbms_output. SQL> set serveroutput on SQL> / The obj.rowid_object(row_id). This example returns the ROWID for a row in the EMP table.

Multithreaded agents behave slightly differently. They have to be explicitly sta rted and shut down by a database administrator instead of automatically being spawned by Oracle Net Services.--------.TCMLOGDBUSER EVENTLOG 28954 28954 TABLE 05-DEC-04 05-DEC-04 2004-12-05:22:26:10 VALID N N N 21.-----------------------------.. To access the non-Oracle data store using generic connectivity. Generic connectivity is enabled by Oracle Heterogeneous Services. Oracle8i provides support for the ODBC driver interface. Agent processes are usually started when a user session makes its first non-Oracle system access through a database link. The agent process continues to ru n until the user session is disconnected or the database link is explicitly closed .. Oracle Net Services. the agent works with an ODBC driver. Oracle has Generic Connectivity agents for ODBC and OLE DB that enable you to us e ODBE and OLEDB drivers to access non-Oracle systems that have an ODBC or an OLE DB interface. The driver that you use must be on the same machine as the agent. allowing you to connect to non-Oracle systems with improved performance and thr oughput. you must run a script . An ODBC agent is included as part of your Oracle8i system.------------------STATUS T G S ------.---------. HS datadictonary ------------------To install the data dictionary tables and views for Heterogeneous Services.4 HETEROGENEOUS SERVICES: ---------------------------Generic connectivity is intended for low-end data integration solutions requiring the ad hoc query capability to connect from Oracle8i to non-Oracle database systems.-------------OBJECT_TYPE CREATED LAST_DDL_ TIMESTAMP -----------------. The non-Oracle data stores can reside on the same machine as Oracle8i or a diff erent machine. Setup: -----1. These connections are made usi ng Oracle's remote data access software. which enables both client-server and server-server communication.--------. Generic connectivity is implemented as a Heterogeneous Services ODBC agent.

local machine (PORT=1521) ) (CONNECT_DATA = (SERVICE_NAME=SalesDB) ) (HS = OK) ) TNSNAMES. and p ackages. The agent works with a OLEDB or ODBC driver to connect to target db The DB Server will connect to the agent through NET8. views. tnsnames.that creates all the Heterogeneous Services data dictionary tables. the Oracle9i server starts an agent process through the Oracle Net listener. Just check on existence of the HS% views in the SYS schema. for example. which is why a tnsnames.ora and listener. All normal standard preparations for HS needs to be in place in Oracle 9i. On most systems the script is called caths.loc al machine (CONNECT_DATA = (SID = msql) ) -. To recap this here.HS_FDS_CLASS.ora entry needs to be setup You van also check on HS installation.WORLD = .needs to match the sid in l istener.ora and listener. It will be started as part of the listener.ora and a listener.ORA hsmsql = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = tcp)(host=winhost)(port=1521)) ) -. On NT/2000.sql as SYS on Ora9i DB Server. Check for the existence of Heterogeneous Services data dictionary views. The HS Agent will be installed as part of 9i DB install.ora. 2. SYS.ora -------------------------------To initiate a connection to the non-Oracle system. For the Oracle9i server to be able to connect t o the agent. you must configure tnsnames.sql and resides in $ORACLE_HOME/rdbms /admin. (HS=OK) ) ) TG4MSQL.ora -----------------------------------------------------------------------------tnsnames examples: Sybase_sales= (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp) (HOST=dlsun206) -. if you must install HS from scratch: run caths.

ora. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME=SalesDB) (ORACLE_HOME=/home/oracle/megabase/9.(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ukp15340)(PORT = 1528) ) (CONNECT_DATA = (SID = tg4msql) ) (HS = OK) ) ------------------------------------------------------------------------------listener. create the initialization file: ---------------------------------Create the Initialization file.1) (PROGRAM=tg4mb80) (ENVS=LD_LIBRARY_PATH=non_oracle_system_lib_directory) ) ) LISTENER.ora examples: LISTENER = (ADDRESS_LIST = (ADDRESS= (PROTOCOL=tcp) (HOST = dlsun206) (PORT = 1521) ) ) .4 (4 is verbose) trace file name # non-Oracle system # .trc # Environment variables required for <= <= <= the odbc data_source_name trace levels 0 . Oracle supplies a sample initialization file nam ed "inithsodbc. copy the appropriate sample file and rename the file to initHS_SID.ora. In this example the sid noted in the listener and tnsnames is msql so our new initialization file is called initmsql..ora (ORACLE_HOME = E:\Ora816) (PROGRAM = hsodbc) <== hsodbc is the executable ) ) 3. To create an initialization file.. INITMSQL.ora" which is stored in the $ORACLE_HOME\hs\admin directory.0.ORA LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = winhost)(PORT = 1521)) ) ) SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = msql) <== needs to match the sid in tnsnames.ORA # HS init parameters # HS_FDS_CONNECT_INFO = msql HS_FDS_TRACE_LEVEL = 0 HS_FDS_TRACE_FILE_NAME = hsmsql.

Make sure that at least one of these environment variables is set and that it points to a directory that the agent has access to.exe = ORA-28591 unable to access parameter file.exe = caths. This parameter is required whe n you are using generic connectivity to access data from an ODBC provider on a UNIX machin e. If it does not have a value for AGENT_SID then all commands will fail. . 4.sql What is the difference between agtctl and lsnrctl dbsnmp_start Error: ORA-28591 Text: agent control utility: unable to access parameter file --------------------------------------------------------------------------Cause: The agent control utility was unable to access its parameter file. Common Errors: -------------AGTCTL. Action: The agent control utility puts its parameter file in either the directory pointed to by the environment variable AGTCTL_ADMIN or in the directory pointed to by the environment variable TNS_ADMIN. This could be because it could not find its admin directory or because permissions on directory were not correctly set. Action: Issue the command SET AGENT_SID <value> and then retry the command that failed. SET AGTCTL_ADMIN=\OPT\ORACLE\ORA81\HS\ADMIN Error: ORA-28592 Text: agent control utility: agent SID not set --------------------------------------------------------------------------Cause: The agent needs to know the value of the AGENT_SID parameter before it can process any commands. create a database link: -------------------------CREATE DATABASE LINK sales USING `Sybase_sales'.#set <envvar>=<value> HS_FDS_SHAREABLE_NAME Default value: none Range of values: not applicable HS_FDS_SHAREABLE_NAME: Specifies the full path name to the ODBC library. ORA-28592 agent SID not set agentctl hsodbc.

WE8MSWIN1252 Error: ORA-02085 ---------------HS_FDS_CONNECT_INFO = <SystemDSN_name> HS_FDS_TRACE_LEVEL = 0 HS_FDS_TRACE_FILE_NAME = c:\hs. The shareable file is defined in the init<sid>. a dd the ODBC library path and start the listener with this environment.7/lib.case sensitive HS_DB_DOMAIN = ch. The fol .ora file located in the $ORACLE_HOME/hs/admin directory.What is a database EVENT and how does one set it? Oracle trace events are useful for debugging the Oracle database server.so 21.1.5 SET EVENTS: ---------------Note 1: ------.case sensitive ERROR: ORA-02085 ---------------SET GLOBAL_NAMES TRUE ERORR:ORA-02068 and ORA-28511 ----------------------------LD_LIBRARY_PATH=/u06/home/oracle/support/network/ODBC/lib f the LD_LIBRARY_PATH does not contain the path to the ODBC library.log HS_DB_NAME = exhsodbc -. the agent inherits the environment from the listener and needs to have the ODBC library path in order to access the ODBC shareable file.Error: -----fix: Set the HS_FDS_TRACE_FILE_NAME to a filename: HS_FDS_TRACE_FILE_NAME = test. HS_FDS_SHAREABLE_NAME=/u06/home/oracle/support/network/ODBC/lib/libodbc. export LD_LIBRARY_PATH When the listener launches the agent hsodbc.com -.log or comment it out: #HS_FDS_TRACE_FILE_NAME Error: incorrect characters -----Change the HS_LANGUAGE to a correct NLS like AMERICAN_AMERICA. LD_LIBRARY_PATH=/u01/app/oracle/product/8.oracle.

or.g. event='1401 trace name errorstack. level 4 processstate information if an ORA-1401 "inserted value too large for column" replaced by any other Oracle Server error code that you want to 60 trace name errorstack level 10 Show where in the code Oracle gets a deadlock (ORA-60). They might be version specific .What database events can be set? The following events are frequently used by DBAs and Oracle Support to diagnose problems: 10046 trace name context forever. level 10 10211 trace name context forever. level 2 Data block check 10211 trace name context forever.. level 2 Index block check 10235 trace name context forever. level 10 10231 trace name context forever. Refer to later notes on this page for an expla nation of what these particular events do. level 1 Memory heap check 10262 trace name context forever. and may help to diagnose the problem. alter session set events '10046 trace name context forever.ORA parameter file. 10046 trace name context forever. g.The following list of events are examples only. level 12 This shows both bind variable names and wait events in the SQL trace files 1401 trace name 1401 trace name 1401 trace name Dumps out trace error occurs. . level 4 Trace SQL statements and show bind variables in trace output.lowing two examples are simply to demonstrate syntax. E. level 4'.. so please call Oracle before using them: 10210 trace name context forever. level 2 Memory protect cursor 10210 trace name context forever. whereas change s to the INIT. level 12 errorstack.ORA file will affect all sessions once the database has been restarted. level 8 This shows wait events in the SQL trace files 10046 trace name context forever. level 10 These events prevent database block corruptions 10049 trace name context forever. by issuing an ALTER SESSION SET EVENTS command: E. Events can be activated by either adding them to the INIT. level 300 . errorstack. The 1401 can be trace. . level 12' . The alter session method only affects the user's current session.

make_data_block_address(1. Note 2: ------Doc ID </help/usaeng/Search/search. Eg: variable x varchar2.NOTE: Take 3 successive SYSTEMSTATE dumps. exec :x := dbms_utility.Dump file headers alter session set events 'immediate trace name FILE_HDRS level 10' / -.Convert file and block number to a DBA (database block address).Dump a database block (File/ Block must be converted to DBA address) -.Dump the process state alter session set events 'immediate trace name PROCESSSTATE level 10' / -.12). -. print x alter session set events 'immediate trace name blockdump level 50360894' / ALTER SESSION SET EVENTS '1652 trace name errorstack level 1 '.1 TEXT/PLAIN Subject: Introduction to ORACLE Diagnostic EVENTS Content Type: Creation Date: .Dump Library Cache details alter session set events 'immediate trace name library_cache level 10' / -.Allow 300 bytes memory leak for connections .Dump control file contents alter session set events 'immediate trace name CONTROLF level 10' / -.html>: Note:218105. with 10 minute intervals alter session set events 'immediate trace name SYSTEMSTATE level 10' / -. or alter system set events '1652 trace name errorstack level 1 '.Dump optimizer statistics whenever a SQL statement is parsed (hint: change st atement or flush pool) alter session set events '10053 trace name context forever.Dump redo log headers alter session set events 'immediate trace name REDOHDR level 10' / -.How can one dump internal database structures? The following (mostly undocumented) commands can be used to obtain information a bout internal database structures.Dump the system state -. level 1' / -. alter system set events '1652 trace name errorstack off '.

specific information on how you set a given event should be provided by Oracle Support Services or the Support related article that is suggesting the use of a given event.showDocument?p_id=75713. This note will only provide information of a general nature. How you set an event depends on the nature of the event and the circumstances at the time.11-NOV-2002 Type: BULLETIN Last Revision Date: Status: PUBLISHED PURPOSE ------- 20-NOV-2002 This document describes the different types of Oracle EVENT that exist to help customers and Oracle Support Services when investigating Oracle RDBMS related issues. developers and Oracle Support Services. EVENTS are also used to workaround or resolve problems by changing Oracle's behaviour or enabling undocumented features. please review the following note as it contain some important additional information on Events. Specific information on the usage of a given event should be provided by Oracle Support Services or the Support related article that is suggesting the use of a given event. This note will not provide that level of detail. [NOTE:75713. As stated above. Most events can be set using more than one of the following methods : o As INIT parameters o In the current session o From another session using a Debug tool INIT Parameters . *WARNING* Do not use an Oracle Diagnostic Event unless directed to do so by Oracle Support Services or via a Support related article on Metalink.1] <ml2_documents. SCOPE & APPLICATION ------------------The information held here is of use to Oracle DBAs. Setting EVENTS -------------There are a number of ways in which events can be set. Incorrect usage can result in disruptions to the database services.1&p_database_id=NOT> "Impo rtant Customer information about using Numeric Events" EVENTS are primarily used to produce additional diagnostic information when insufficient information is available to resolve a given problem. Introduction to ORACLE Diagnostic EVENTS ---------------------------------------Before proceeding.

1] <ml2_documents.1] <ml2_documents. EVENT Categories ---------------The most commonly used events fall into one of four categories : o Dump diagnostic information on request .showDocument?p_id=29062. From another Session using a Debug tool ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ There are a number of debug tools : o ORADEBUG o ORAMBX (VMS only) ORADEBUG : ======== Syntax: Prior to Oracle 9i.1] <ml2_documents.showDocument?p_id=160178.showDocument?p_id=29786.6&p_database_id=NOT> " HOW TO ENABLE SQL TRACE FOR ANOTHER SESSION USING ORADEBUG" ORAMBX : on OpenVMS is still available and described under : ====== [NOTE:29062. SVRMGR> oradebug event <event_name> <action> Oracle 9i and above : SQL> oradebug event <event_name> <action> Reference: [NOTE:29786.1&p_database_id=NOT> "SU PTOOL: ORADEBUG 7.6] <ml2_documents.Quick Reference" This note will not enter into additional details on these tools.3+ (Server Manager/SQLPLUS Debug Commands)" [NOTE:1058210.showDocument?p_id=1058210.~~~~~~~~~~~~~~~ Syntax: EVENT = "<event_name> <action>" Reference: [NOTE:160178.1&p_database_id=NOT> How to set EVENTS in the SPFILE Current Session ~~~~~~~~~~~~~~~ Syntax: ALTER SESSION SET EVENTS '<event_name> <action>'.1&p_database_id=NOT> "SU PTOOL: ORAMBX (VMS) .

Dump Diagnostic information when an error occurs (On-Error Dump) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The on-error dump Event is similar to the immediate dump Event with the difference being that the trace output is only produced when the given error occurs. an On-Error dump against the 942 error can help narrow the search. CONTROLF. an ORA-942 "table or view does not exist" error does not include the name of the problem table or view. For example: ALTER SESSION SET EVENTS 'IMMEDIATE trace name ERRORSTACK level 3'. a trace file will be produced that shows (amongst other information) the current SQL statement being executed. Some common immediate dump Events include : SYSTEMSTATE.1] <ml2_documents. This current SQL can now be checked and the offending table or view more easily discovered. These type of events are typically set as INIT parameters. FILE_HDRS and REDOHDR These type of events are typically set in the current session. For example. However.o Dump diagnostic information when an error occurs o Change Oracle's behaviour o Produce trace diagnostic information as the instance runs Dump diagnostic information on request (Immediate Dump) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ An immediate dump Event will result in information immediately being written to a trace file. For example. You can use virtually any standard Oracle error to trigger this type of event. ERRORSTACK. When this is not obvious from the application (due to its complexity). . the next time a session encounters an ORA-942 error.1&p_database_id=NOT> EVENT : 10262 "Do not check for memory leaks" These type of events are typically set as INIT parameters. Change Oracle's behaviour ~~~~~~~~~~~~~~~~~~~~~~~~~ Instance behaviour can be changed or hidden features can be enabled using these type of Event A common event in this category is 10262 which is discussed in [NOTE:21235. then it can be difficult to investigate the source of the problem. using the 942 error : EVENT "942 trace name ERRORSTACK level 3" Once established.showDocument?p_id=21235.

If it is possible to do so. Oracle Support Services (or a Support article) should provide information on the appropriate method to be adopted and syntax to be used when establishing a given event. A common event in this category is 10046 which is discussed in [NOTE:21154.Quick Reference ====================== 22. DBA% and v$ views ====================== .1] <ml2_documents.1&p_database_id=NOT> SUP TOOL: ORAMBX (VMS) . level 4000" Produce trace diagnostic information as the instance runs (Trace Events) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Trace events produce diagnostic information as processes are running.showDocument?p_id=75713.1&p_database_id=NOT> EVE NT: 10046 "enable SQL statement tracing (including binds/waits)" [NOTE:160178. RELATED DOCUMENTS ----------------[NOTE:75713.1] <ml2_documents. great care should be taken when dealing with them.1&p_database_id=NOT> Ho w to set EVENTS in the SPFILE [NOTE:1058210.6] <ml2_documents.1&p_database_id=NOT> Imp ortant Customer information about using Numeric Events [NOTE:21235. The misuse of events can lead to a loss of service.showDocument?p_id=1058210.6&p_database_id=NOT> H OW TO ENABLE SQL TRACE FOR ANOTHER SESSION USING ORADEBUG [NOTE:29786.For example: EVENT "10262 trace name context forever.1] <ml2_documents.showDocument?p_id=29786.1] <ml2_documents. For example: EVENT = "10046 trace name context forever. test an event against a development system prior to doing the same thing on a production system.1] <ml2_documents.1&p_database_id=NOT> EVE NT: 10262 "Do not check for memory leaks" [NOTE:21154.1] <ml2_documents.showDocument?p_id=21235.showDocument?p_id=21154.showDocument?p_id=29062.showDocument?p_id=21154.1&p_database_id=NOT> SUP TOOL: ORADEBUG 7.showDocument?p_id=160178.1] <ml2_documents.1&p_database_id=NOT> EVENT : 10046 "enable SQL statement tracing (including binds/waits)" These type of events are typically set as INIT parameters. level 12" Summary ------EVENT usage and syntax can be very complex and due to the possible impact on the database. They are used to gather additional information about a problem.3+ (Server Manager/SQLPLUS Debug Commands) [NOTE:29062.

NLS: ---VIEW_NAME -----------------------------NLS_DATABASE_PARAMETERS NLS_INSTANCE_PARAMETERS NLS_SESSION_PARAMETERS DBA: ---VIEW_NAME -----------------------------DBA_2PC_NEIGHBORS DBA_2PC_PENDING DBA_ALL_TABLES DBA_ANALYZE_OBJECTS DBA_ASSOCIATIONS DBA_AUDIT_EXISTS DBA_AUDIT_OBJECT DBA_AUDIT_SESSION DBA_AUDIT_STATEMENT DBA_AUDIT_TRAIL DBA_CACHEABLE_OBJECTS DBA_CACHEABLE_TABLES DBA_CACHEABLE_TABLES_BASE DBA_CATALOG DBA_CLUSTERS DBA_CLUSTER_HASH_EXPRESSIONS DBA_CLU_COLUMNS DBA_COLL_TYPES DBA_COL_COMMENTS DBA_COL_PRIVS DBA_CONSTRAINTS DBA_CONS_COLUMNS DBA_CONTEXT DBA_DATA_FILES DBA_DB_LINKS DBA_DEPENDENCIES DBA_DIMENSIONS DBA_DIM_ATTRIBUTES DBA_DIM_CHILD_OF DBA_DIM_HIERARCHIES DBA_DIM_JOIN_KEY DBA_DIM_LEVELS DBA_DIM_LEVEL_KEY DBA_DIRECTORIES DBA_DMT_FREE_SPACE DBA_DMT_USED_EXTENTS DBA_ERRORS DBA_EXP_FILES DBA_EXP_OBJECTS DBA_EXP_VERSION DBA_EXTENTS DBA_FREE_SPACE DBA_FREE_SPACE_COALESCED DBA_FREE_SPACE_COALESCED_TMP1 OWNER -----------------------------SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS OWNER -----------------------------SYS SYS SYS .

DBA_FREE_SPACE_COALESCED_TMP2 DBA_FREE_SPACE_COALESCED_TMP3 DBA_IAS_CONSTRAINT_EXP DBA_IAS_GEN_STMTS DBA_IAS_GEN_STMTS_EXP DBA_IAS_OBJECTS DBA_IAS_OBJECTS_BASE DBA_IAS_OBJECTS_EXP DBA_IAS_POSTGEN_STMTS DBA_IAS_PREGEN_STMTS DBA_IAS_SITES DBA_IAS_TEMPLATES DBA_INDEXES DBA_INDEXTYPES DBA_INDEXTYPE_OPERATORS DBA_IND_COLUMNS DBA_IND_EXPRESSIONS DBA_IND_PARTITIONS DBA_IND_SUBPARTITIONS DBA_INTERNAL_TRIGGERS DBA_JAVA_POLICY DBA_JOBS DBA_JOBS_RUNNING DBA_LIBRARIES DBA_LMT_FREE_SPACE DBA_LMT_USED_EXTENTS DBA_LOBS DBA_LOB_PARTITIONS DBA_LOB_SUBPARTITIONS DBA_METHOD_PARAMS DBA_METHOD_RESULTS DBA_MVIEWS DBA_MVIEW_AGGREGATES DBA_MVIEW_ANALYSIS DBA_MVIEW_DETAIL_RELATIONS DBA_MVIEW_JOINS DBA_MVIEW_KEYS DBA_NESTED_TABLES DBA_OBJECTS DBA_OBJECT_SIZE DBA_OBJECT_TABLES DBA_OBJ_AUDIT_OPTS DBA_OPANCILLARY DBA_OPARGUMENTS DBA_OPBINDINGS DBA_OPERATORS DBA_OUTLINES DBA_OUTLINE_HINTS DBA_PARTIAL_DROP_TABS DBA_PART_COL_STATISTICS DBA_PART_HISTOGRAMS DBA_PART_INDEXES DBA_PART_KEY_COLUMNS DBA_PART_LOBS DBA_PART_TABLES DBA_PENDING_TRANSACTIONS DBA_POLICIES DBA_PRIV_AUDIT_OPTS DBA_PROFILES DBA_QUEUES SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS .

DBA_QUEUE_SCHEDULES DBA_QUEUE_TABLES DBA_RCHILD DBA_REFRESH DBA_REFRESH_CHILDREN DBA_REFS DBA_REGISTERED_SNAPSHOTS DBA_REGISTERED_SNAPSHOT_GROUPS DBA_REPAUDIT_ATTRIBUTE DBA_REPAUDIT_COLUMN DBA_REPCAT DBA_REPCATLOG DBA_REPCAT_REFRESH_TEMPLATES DBA_REPCAT_TEMPLATE_OBJECTS DBA_REPCAT_TEMPLATE_PARMS DBA_REPCAT_TEMPLATE_SITES DBA_REPCAT_USER_AUTHORIZATIONS DBA_REPCAT_USER_PARM_VALUES DBA_REPCOLUMN DBA_REPCOLUMN_GROUP DBA_REPCONFLICT DBA_REPDDL DBA_REPFLAVORS DBA_REPFLAVOR_COLUMNS DBA_REPFLAVOR_OBJECTS DBA_REPGENERATED DBA_REPGENOBJECTS DBA_REPGROUP DBA_REPGROUPED_COLUMN DBA_REPGROUP_PRIVILEGES DBA_REPKEY_COLUMNS DBA_REPOBJECT DBA_REPPARAMETER_COLUMN DBA_REPPRIORITY DBA_REPPRIORITY_GROUP DBA_REPPROP DBA_REPRESOLUTION DBA_REPRESOLUTION_METHOD DBA_REPRESOLUTION_STATISTICS DBA_REPRESOL_STATS_CONTROL DBA_REPSCHEMA DBA_REPSITES DBA_RGROUP DBA_ROLES DBA_ROLE_PRIVS DBA_ROLLBACK_SEGS DBA_RSRC_CONSUMER_GROUPS DBA_RSRC_CONSUMER_GROUP_PRIVS DBA_RSRC_MANAGER_SYSTEM_PRIVS DBA_RSRC_PLANS DBA_RSRC_PLAN_DIRECTIVES DBA_RULESETS DBA_SEGMENTS DBA_SEQUENCES DBA_SNAPSHOTS DBA_SNAPSHOT_LOGS DBA_SNAPSHOT_LOG_FILTER_COLS DBA_SNAPSHOT_REFRESH_TIMES DBA_SOURCE DBA_STMT_AUDIT_OPTS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS .

DBA_SUBPART_COL_STATISTICS DBA_SUBPART_HISTOGRAMS DBA_SUBPART_KEY_COLUMNS DBA_SUMMARIES DBA_SUMMARY_AGGREGATES DBA_SUMMARY_DETAIL_TABLES DBA_SUMMARY_JOINS DBA_SUMMARY_KEYS DBA_SYNONYMS DBA_SYS_PRIVS DBA_TABLES DBA_TABLESPACES DBA_TAB_COLUMNS DBA_TAB_COL_STATISTICS DBA_TAB_COMMENTS DBA_TAB_HISTOGRAMS DBA_TAB_MODIFICATIONS DBA_TAB_PARTITIONS DBA_TAB_PRIVS DBA_TAB_SUBPARTITIONS DBA_TEMP_FILES DBA_TRIGGERS DBA_TRIGGER_COLS DBA_TS_QUOTAS DBA_TYPES DBA_TYPE_ATTRS DBA_TYPE_METHODS DBA_UNUSED_COL_TABS DBA_UPDATABLE_COLUMNS DBA_USERS DBA_USTATS DBA_VARRAYS DBA_VIEWS V_$: ---VIEW_NAME -----------------------------V_$ACCESS V_$ACTIVE_INSTANCES V_$AQ V_$AQ1 V_$ARCHIVE V_$ARCHIVED_LOG V_$ARCHIVE_DEST V_$ARCHIVE_PROCESSES V_$BACKUP V_$BACKUP_ASYNC_IO V_$BACKUP_CORRUPTION V_$BACKUP_DATAFILE V_$BACKUP_DEVICE V_$BACKUP_PIECE V_$BACKUP_REDOLOG V_$BACKUP_SET V_$BACKUP_SYNC_IO V_$BGPROCESS V_$BH V_$BSP V_$BUFFER_POOL SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS OWNER -----------------------------SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS .

V_$BUFFER_POOL_STATISTICS V_$CIRCUIT V_$CLASS_PING V_$COMPATIBILITY V_$COMPATSEG V_$CONTEXT V_$CONTROLFILE V_$CONTROLFILE_RECORD_SECTION V_$COPY_CORRUPTION V_$DATABASE V_$DATAFILE V_$DATAFILE_COPY V_$DATAFILE_HEADER V_$DBFILE V_$DBLINK V_$DB_CACHE_ADVICE V_$DB_OBJECT_CACHE V_$DB_PIPES V_$DELETED_OBJECT V_$DISPATCHER V_$DISPATCHER_RATE V_$DLM_ALL_LOCKS V_$DLM_CONVERT_LOCAL V_$DLM_CONVERT_REMOTE V_$DLM_LATCH V_$DLM_LOCKS V_$DLM_MISC V_$DLM_RESS V_$DLM_TRAFFIC_CONTROLLER V_$ENABLEDPRIVS V_$ENQUEUE_LOCK V_$EVENT_NAME V_$EXECUTION V_$FAST_START_SERVERS V_$FAST_START_TRANSACTIONS V_$FILESTAT V_$FILE_PING V_$FIXED_TABLE V_$FIXED_VIEW_DEFINITION V_$GLOBAL_BLOCKED_LOCKS V_$GLOBAL_TRANSACTION V_$HS_AGENT V_$HS_PARAMETER V_$HS_SESSION V_$INDEXED_FIXED_COLUMN V_$INSTANCE V_$INSTANCE_RECOVERY V_$KCCDI V_$KCCFE V_$LATCH V_$LATCHHOLDER V_$LATCHNAME V_$LATCH_CHILDREN V_$LATCH_MISSES V_$LATCH_PARENT V_$LIBRARYCACHE V_$LICENSE V_$LOADCSTAT V_$LOADISTAT V_$LOADPSTAT SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS .

V_$LOADTSTAT V_$LOCK V_$LOCKED_OBJECT V_$LOCKS_WITH_COLLISIONS V_$LOCK_ACTIVITY V_$LOCK_ELEMENT V_$LOG V_$LOGFILE V_$LOGHIST V_$LOGMNR_CONTENTS V_$LOGMNR_DICTIONARY V_$LOGMNR_LOGS V_$LOGMNR_PARAMETERS V_$LOG_HISTORY V_$MAX_ACTIVE_SESS_TARGET_MTH V_$MLS_PARAMETERS V_$MTS V_$MYSTAT V_$NLS_PARAMETERS V_$NLS_VALID_VALUES V_$OBJECT_DEPENDENCY V_$OBSOLETE_PARAMETER V_$OFFLINE_RANGE V_$OPEN_CURSOR V_$OPTION V_$PARALLEL_DEGREE_LIMIT_MTH V_$PARAMETER V_$PARAMETER2 V_$PQ_SESSTAT V_$PQ_SLAVE V_$PQ_SYSSTAT V_$PQ_TQSTAT V_$PROCESS V_$PROXY_ARCHIVEDLOG V_$PROXY_DATAFILE V_$PWFILE_USERS V_$PX_PROCESS V_$PX_PROCESS_SYSSTAT V_$PX_SESSION V_$PX_SESSTAT V_$QUEUE V_$RECOVERY_FILE_STATUS V_$RECOVERY_LOG V_$RECOVERY_PROGRESS V_$RECOVERY_STATUS V_$RECOVER_FILE V_$REQDIST V_$RESERVED_WORDS V_$RESOURCE V_$RESOURCE_LIMIT V_$ROLLNAME V_$ROLLSTAT V_$ROWCACHE V_$ROWCACHE_PARENT V_$ROWCACHE_SUBORDINATE V_$RSRC_CONSUMER_GROUP V_$RSRC_CONSUMER_GROUP_CPU_MTH V_$RSRC_PLAN V_$RSRC_PLAN_CPU_MTH V_$SESSION SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS .

init.V_$SESSION_CONNECT_INFO V_$SESSION_CURSOR_CACHE V_$SESSION_EVENT V_$SESSION_LONGOPS V_$SESSION_OBJECT_CACHE V_$SESSION_WAIT V_$SESSTAT V_$SESS_IO V_$SGA V_$SGASTAT V_$SHARED_POOL_RESERVED V_$SHARED_SERVER V_$SORT_SEGMENT V_$SORT_USAGE V_$SQL V_$SQLAREA V_$SQLTEXT V_$SQLTEXT_WITH_NEWLINES V_$SQL_BIND_DATA V_$SQL_BIND_METADATA V_$SQL_CURSOR V_$SQL_SHARED_CURSOR V_$SQL_SHARED_MEMORY V_$STATNAME V_$SUBCACHE V_$SYSSTAT V_$SYSTEM_CURSOR_CACHE V_$SYSTEM_EVENT V_$SYSTEM_PARAMETER V_$SYSTEM_PARAMETER2 V_$TABLESPACE V_$TARGETRBA V_$TEMPFILE V_$TEMPORARY_LOBS V_$TEMPSTAT V_$TEMP_EXTENT_MAP V_$TEMP_EXTENT_POOL V_$TEMP_PING V_$TEMP_SPACE_HEADER V_$THREAD V_$TIMER V_$TRANSACTION V_$TRANSACTION_ENQUEUE V_$TYPE_SIZE V_$VERSION V_$WAITSTAT V_$_LOCK SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS SYS ========== 23 TUNING: ========== 1.ctl .ora settings -------------------background_dump_dest = /var/opt/oracle/SALES/bdump control_files = ( /oradata/arc/control/ctrl1SALES.

/oradata/temp/control/ctrl2SALES. r2.ctl .rbig2) sequence_cache_entries = 30 sequence_cache_hash_buckets = 23 shared_pool_size = 750M sort_area_retained_size = 15728640 sort_area_size = 15728640 sql_trace = false timed_statistics = true resource_limit = true user_dump_dest = /var/opt/oracle/SALES/udump utl_file_dir = /var/opt/oracle/utl utl_file_dir = /var/opt/oracle/utl/frontend SORT_AREA_SIZE SORT_AREA_RETAINED_SIZE PROCESSES DB_BLOCK_SIZE DB_BLOCK_BUFFERS SHARED_POOL_SIZE LOG_BUFFER LARGE_POOL_SIZE DBWR_IO_SLAVES DB_WRITER_PROCESSES LGWR_IO_SLAVES= DB_FILE_MULTIBLOCK_READ_COUNT = = = = = = = = (DB_WRITER_PROCESSES) = 2 =16 (minimize io during table scans.arc log_archive_start = true log_buffer = 163840 log_checkpoint_interval = 1250 log_checkpoint_timeout = 1800 log_simultaneous_copies = 4 max_dump_file_size = 100240 max_enabled_roles = 50 oracle_trace_enable = true open_cursors = 2000 open_links = 20 processes = 200 remote_os_authent = true rollback_segments = (r1. rbig.ctl) db_block_size = 16384 db_name = SALES db_block_buffers = 17500 db_block_checkpoint_batch = 16 db_files = 255 db_file_multiblock_read_count = 10 license_max_users = 170 #core_dump_dest = /var/opt/oracle/SALES/cdump core_dump_dest = /oradata/rbs/cdump distributed_transactions = 40 dml_locks = 1000 job_queue_processes = 2 log_archive_buffers = 20 log_archive_buffer_size = 256 log_archive_dest = /oradata/arc log_archive_format = arcSALES_%s. it specifies max number of block 65536 65536 100 8192 3400 52428800 26215400 4194304 8388608 (per PGA.. /oradata/rbs/control/ctrl3SALES. r3. max sort area) (size after sort) (alle processes) (DB_CACHE_SIZE in Oracle 9i) .

sql and utlestat.connect perfstat/perfstat .1.txt 3.execute statspack. STATSPACK: ------------Available as of 8.@$ORACLE_HOME/rdbms/admin/statscre.set timed_statistics=true .s in one io operation during sequential r ead) BUFFER_POOL_RECYCLE BUFFER_POOL_KEEP TIMED_STATISTICES collected or not) OPTIMIZER_MODE PARALLEL_MIN_SERVERS l recovery) PARALLEL_MAX_SERVERS RECOVERY_PARALLELISM se niveau) 2.6 installation: . run utlestat which drop tables and generate report. en paralle . 4.@ORACLE_HOME/rdbms/admin/statsrep. CHOOSE. FIRST_ROWS. QUERIES: ----------= = =TRUE (statistics related to time are =RULE. UTLBSTAT and UTLESTAT -----------------------.if wanted change default tablespace of SYS to TOOLS . ALL_ROWS = 2 = 4 = 2 (set parallel recovery op databa (voor Parallel Query.sql This will ask for beginning snapshot id and ending snapshot id.in $ORACLE_HOME/rdbms/admin you find utlbstat.connect internal . Then you can enter the filename for the report.snap Or use DBMS_JOB to schedule the generation of snapshots Create report: .sql It will create user PERFSTAT who ownes the new statistics tables You will be prompted for TEMP and DEFAULT tablespaces Gather statistices: .sql to create perfoRMANce table and insert baseline: run utlbstat let the database run for some time to gather statistics.connect perfstat/perfstat .

'OK BLEVEL'. segment_type. SELECT index_name. -. set linesize 500 set pagesize 500 set serveroutput on . 2. v$sysstat dbg. sum(reloads)/sum(pins) Ratio FROM v$librarycache.3 Library cache and shared pool Overview memory: SELECT * FROM V$SGA.4. 1.1. next_extent. -.0. Free memory shared pool: SELECT * FROM v$sgastat WHERE name = 'free memory'.name = 'db block gets' cg.value+cg. substr(owner.'OK BLEVEL'. decode(blevel. max_extents FROM dba_segments WHERE extents > max_extents . -.3.4 TABLE OR INDEX REBUILD NECCESARY? SELECT substr(segment_name.value/(dbg.'SYSTEM'). initial_extent. v$sysstat entries req. 10).name = 'physical reads' dbg.4. blevel.value v$sysstat req.4.'OK BLEVEL'.1 HIT RATIO buffercache SELECT FROM WHERE AND AND (1-(pr.name = 'consistent gets'. 30).gets. EXAMPLE OF A SCRIPT THAT YOU MIGHT SCHEDULE ONCE A DAY: -------------------------------------------------------. How often an object has to be reloaded into the cache once it has been loaded SELECT sum(pins) Executions.value)))*100 v$sysstat pr. 1. SELECT gethits.name ='redo log space requests' entries.gethitratio FROM v$librarycache WHERE namespace = 'SQL AREA'. sum(reloads) Misses.'OK BLEVEL'.-.100 AND owner not in ('SYS'.4.2 redo noWait ratio SELECT FROM WHERE AND (req. v$sysstat cg pr. SELECT sum(sharable_mem) FROM v$db_object_cache.report 1.4.'OK BLEVEL'.name='redo entries'. extents.value*5000)/entries.'BLEVEL HIGH') OK FROM dba_indexes WHERE owner='SALES'.

exec dbms_output.50 AND owner not in ('SYS'.'FRONTEND') and blevel > 3.put_line('===================================================') .'SYSTEM'). exec dbms_output. 1.1.4. 10). dbms_output. exec dbms_output.put_line('---------------------------------------------------') . 20). SELECT substr(segment_name. 'DD-MM-YYYY. 1. exec dbms_output.put_line('1.').put_line(' ').put_line('1. blevel. exec dbms_output.put_line('SECTION 1: OBJECTS AND USERS'). exec dbms_output.put_line('1. dbms_output.put_line('DAILY REPORT SALES DATABASE ON SERVER SUPER').put_line(' '). .2 TABLE/INDEX REACHING MAX NO OF EXTENTS:'). initial_extent.put_line(' '). exec dbms_output. dbms_output.0. exec exec .4.put_line('---------------------------------------------------') dbms_output. dbms_output. 2.3.'OK BLEVEL'. exec dbms_output. max_extents FROM dba_segments WHERE extents > max_extents . exec dbms_output.put_line('1.put_line(' ').'OK BLEVEL'.put_line('---------------------------------------------------') .1 INVALID OBJECTS AS FOUND RIGHT NOW:'). 1.'OK BLEVEL'. status FROM dba_objects WHERE status='INVALID'.put_line(' ').HH24:MI')). exec dbms_output.put_line(' '). 1. substr(owner.'). exec dbms_output. dbms_output.put_line('RUNTIME: '||to_char(SYSDATE.put_line(' '). exec dbms_output. exec exec .'). exec exec exec exec . owner. exec dbms_output. extents. SELECT index_name.'). dbms_output. next_extent. takes only 1 minu te. SELECT substr(object_name. segment_type.3 SKEWED or BAD INDEXES with blevel > 3:').put_line('===================================================') . NEW OBJECTS CREATED SINCE YESTERDAY:'). exec dbms_output.'OK BLEVEL'.put_line(' ').put_line(' ').put_line('Please read all sections carefully.put_line(' '). decode(blevel.put_line('---------------------------------------------------') dbms_output.put_line('Remark: If invalid objects are found intervention is required.'OK BLEVEL'. 30). exec dbms_output.set trimspool on spool d:\logs\ exec dbms_output. 30).'BLEVEL HIGH') OK FROM dba_indexes WHERE owner in ('SALES'. exec dbms_output. exec dbms_output. substr(object_type.put_line('Remark: If objects are found intervention is required dbms_output.put_line('Remark: If indexes are found rebuild is required. exec exec dbms_output. owner.put_line(' ').

exec dbms_output. default_tablespace. exec exec dbms_output. SELECT owner. (total_space-Free_space) Used_space. Free_space.put_line('---------------------------------------------------') dbms_output. status FROM dba_data_files. 30).exec dbms_output.v_$tablespace B WHERE a.put_line('2.put_line(' '). last_ddl_time.put_line('===================================================') dbms_output.put_line('2.name ) Total WHERE Free. dbms_output.put_line(' ').put_line('BE AVAILABLE IN EACH OF THE MANIIN% TABLESPACES.put_line('REMARK: FOR MONTHLY INTERNET BILLING AT LEAST 50MB SP ACE MUST').put_line(' '). SELECT substr(username. exec dbms_output.name. exec .put_line(' '). dbms_output. exec dbms_output. SELECT substr(file_name. status FROM dba_objects WHERE created > SYSDATE-5.put_line(' ').ts# = b.put_line('---------------------------------------------------') dbms_output.put_line(' ').put_line(' ').5.name "Tablespace Name". substr(object_name. total_space FROM (SELECT tablespace_name.put_line(' '). SELECT Total.put_line('SECTION 2: TABLESPACES.put_line(' ').put_line('Remark: status of all files should be available ').Tablespace_name = Total. 50). 1. 1. dbms_output. dbms_output.put_line(' '). exec dbms_output. 1. sum(bytes/1024/1024) Free_Space FROM sys. exec dbms_output.1 FREE/USED SPACE OF TABLESPACES RIGHT NOW:').v_$datafile a. ').put_line('---------------------------------------------------') . sum(bytes/1024/1024) TOTAL_SPACE FROM sys. exec dbms_output. exec exec .name. account_status. created. created FROM dba_users WHERE created > SYSDATE -10. . NEW ORACLE USERS CREATED SINCE YESTERDAY:'). (SELECT b.put_line('1.2 STATUS DATABASE FILES RIGHT NOW:').ts# GROUP BY b. exec exec . exec dbms_output.put_line('===================================================') dbms_output. exec dbms_output. tablespace_name. dbms_output. ROLLBACK SEGS'). 20). object_type. exec dbms_output. exec dbms_output.put_line(' '). temporary_tablespace. exec dbms_output. DATAFILES. sys. exec exec . exec exec dbms_output.dba_free_space GROUP BY tablespace_name ) Free.

dbms_output. exec dbms_output.2 FREE MEMORY SHARED POOL:'). 1.put_line('Remark: above Ratio should be high '). exec dbms_output.put_line(' '). PCT_INCREASE FROM DBA_ROLLBACK_SEGS. exec dbms_output. exec exec dbms_output.put_line('---------------------------------------------------') dbms_output. SELECT * FROM v$sgastat WHERE name = 'free memory'. exec exec . sum(reloads) Misses. NEXT_EXTENT. . dbms_output. exec .put_line('---------------------------------------------------') dbms_output.put_line('3.put_line(' ').put_line('---------------------------------------------------') . dbms_output. SELECT substr(segment_name.put_line(' '). dbms_output. sum(reloads)/sum(pins) Ratio FROM v$librarycache.put_line(' ').put_line('3. 20). MAX_EXTENTS. exec dbms_output.put_line(' ').4 DATABASE BUFFERS HIT RATIO:').value+cg.exec dbms_output. 20). v$sysstat cg pr.put_line('2. exec dbms_output.put_line('3.name = 'physical reads' dbg.put_line(' ').put_line('SECTION 3: PERFORMANCE STATS SINCE DATABASE STARTUP') dbms_output. INITIAL_EXTENT.put_line(' '). dbms_output.1 ORACLE MEMORY (SGA LAYOUT):'). dbms_output. exec dbms_output.put_line(' '). SELECT * FROM V$SGA.put_line(' '). exec dbms_output.put_line('---------------------------------------------------') .put_line(' ').put_line('===================================================') dbms_output.3 STATUS ROLLBACK SEGMENTS RIGHT NOW:').name = 'consistent gets'. status.value/(dbg.name = 'db block gets' cg. exec exec .put_line('===================================================') dbms_output.put_line(' '). 1. exec exec . MIN_EXTENTS.value)))*100 v$sysstat pr. exec dbms_output.put_line('Remark: above Ratio should be low '). SELECT sum(pins) Executions. exec exec . exec dbms_output.put_line('3. exec .put_line(' ').put_line('---------------------------------------------------') dbms_output. v$sysstat dbg. dbms_output. exec dbms_output.put_line(' '). SELECT FROM WHERE AND AND (1-(pr. substr(tablespace_name. exec exec dbms_output.3 LIBRARY (pl/sql) HIT RATIO:'). exec exec dbms_output. exec dbms_output.

exec exec dbms_output.put_line('===================================================') dbms_output.LOCKLIST WHERE DATUM > SYSDATE-2 ORDER BY DATUM. command. 'DD-MM-YYYY.OSUSER. 10) substr(s. object_id. session_id.put_line(' '). 1. 10) substr(s.put_line('---------------------------------------------------') dbms_output.put_line('3.session_id substr(l. username. 30) s.object_id l.sid substr(s.put_line('---------------------------------------------------') dbms_output.command l. exec exec .put_line('---------------------------------------------------') dbms_output. schemaname. 1. exec dbms_output.2 PERSISTENT LOCKS SINCE YESTERDAY:'). 10) substr(l. exec dbms_output.put_line(' '). 1.block .schemaname. dbms_output. dbms_output.object_id.value v$sysstat req. program.put_line('4. osuser. OBJECT_NAME.1 OBJECT LOCKS RIGHT NOW:').name='redo entries'.put_line('===================================================') dbms_output.LOCKMODE. 1.put_line(' '). 1. exec exec . dbms_output. objectname SELECT l. dbms_output.SESSION_ID. SELECT FROM WHERE AND exec exec exec exec .name ='redo log space requests' entries. exec exec (req. dbms_output.username. dbms_output. 1. dbms_output. blocked SELECT s. osuser.3 BLOCKED SESSIONS RIGHT NOW:'). exec exec .put_line(' '). sid. 20) FROM v$locked_object l.put_line('4.lmode l. dbms_output. lockmode.5 REDO BUFFERS WAITS:').PROCESS.USERNAME. dbms_output.put_line('SECTION 4: LOCKS').process l.HH24:MI') FROM PROJECTS. 30) l. SELECT OBJECT_ID.put_line(' ').osuser.object_id=o. dba_objects o WHERE l. exec exec . 10) substr(s.object_name. 1. username.put_line(' ').program. process.locked_mode substr(o.put_line('---------------------------------------------------') . dbms_output. lockmode.put_line(' ').put_line('Remark: above Ratio should be very low '). v$sysstat entries req. exec exec dbms_output.put_line('4.value*5000)/entries. to_char(DATUM.put_line(' ').os_user_name.exec dbms_output.put_line(' ').oracle_username. dbms_output.

======== 24 RMAN: ======== $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$ =============== 24. exec exec exit / dbms_output.put_line('---------------------------------------------------') dbms_output. v$lock l WHERE s.1: RMAN 10g: =============== 24.2 rman database is called "RMAN".put_line(' '). dbms_output.sid and schemaname not in ('SYS'. Now we create the RMAN user (schema which will hold. Suppose an Oracle 10.put_line(' ').put_line('scn datafiles: ').'SYSTEM'). dbms_output.put_line('END REPORT 1').put_line('SECTION 5: ONLY NEEDED FOR oracle-dba '). or own.put_line(' '). dbms_output. exec exec exec exec exec exec exec .put_line('===================================================') dbms_output.FROM v$session s.put_line(' '). dbms_output.2 target database is called "TEST10g". dbms_output.1. exec . the metadata) create user rman identified by rman default tablespace rman . exec exec . dbms_output.put_line('scn controlfiles: ').put_line('---------------------------------------------------') dbms_output. dbms_output. dbms_output.sid=l.put_line('latest 20 archived redo: '). dbms_output.put_line(' INFO NEEDED FOR RECOVERY ').put_line('===================================================') dbms_output. dbms_output. exec exec exec .put_line('Thanks a lot for reading this report !!!'). Let's further suppose we have just created the RMAN database.1 Create the catalog and register target database: ------------------------------------------------------10g example: -----------Suppose an Oracle 10.

4> } . C:\oracle>rman catalog=rman/rman@rman target=system/vga88nt@test10g Recovery Manager: Release 10.give the right permissions: grant connect. resource. All rights reserved.temporary tablespace temp. Oracle. 3> delete noprompt obsolete. recovery_catalog_owner to rman. 2005.0.2. database registered in recovery catalog starting full resync of recovery catalog full resync complete 24. default device type to disk.Production on Wed Feb 27 21:31:02 2008 Copyright (c) 1982.2 Backup and recovery examples 10g RMAN: --------------------------------------------Good Examples using RMAN on 10g: ------------------------------->>>> Full Backup First we configure several persistant parameters for this instance: RMAN> configure RMAN> configure RMAN> configure RMAN> configure B_%u_%s_%p'. Set up the catalog and register the target: RMAN> create catalog tablespace "RMAN" recovery catalog created RMAN> exit Recovery Manager complete.1. retention policy to recovery window of 5 days. . channel device type disk format 'C:\Oracle\Admin\W2K2\Backup%d_D Next we perform a complete database backup using a single command: RMAN> run { 2> backup database plus archivelog. connected to target database: TEST10G (DBID=899275577) connected to recovery catalog database RMAN> register database.0 . controlfile autobackup on.1.

then brings it back online: run { . RMAN will apply archive logs as necessary until the recovery is complete. but if you are in doubt you can perform a full resync using the follwoing comman d: RMAN> resync catalog. restores and recovers it.dbf'' REUSE". If the tempfiles are still present you can issue a command like like the followi ng for each of them: sql "ALTER TABLESPACE temp ADD TEMPFILE ''C:\Oracle\oradata\W2K2\temp01. At that point the database is opene d. restore tablespace users. alter database open. } This will result in all datafiles being restored then recovered. sql 'ALTER TABLESPACE users ONLINE'. recover tablespace users. If the tempfiles are missing they must be recreated as follows: sql "ALTER TABLESPACE temp ADD TEMPFILE ''C:\Oracle\oradata\W2K2\temp01. } Recovering a Tablespace in an Open Database The following example takes tablespace TBS_1 offline. restore database. # use abort if this fails startup mount.dbf'' SIZE 100M AUTOEXTEND ON NEXT 64K". >>>> Restore & Recover A Subset Of The Database A subset of the database can be restored in a similar fashion: run { sql 'ALTER TABLESPACE users OFFLINE IMMEDIATE'.The recovery catalog should be resyncronized on a regular basis so that changes to the database structure and presence of new archive logs is recorded. >>>> Restore & Recover The Whole Database If the controlfiles and online redo logs are still present a whole database reco very can be achieved by running the following script: run { shutdown immediate. recover database. Some commands perform partial and full resyncs implicitly.

SCN or sequence number: run { shutdown immediate. recover tablespace tbs_1. sql "ALTER TABLESPACE tbs_1 ONLINE". # set until scn 1000. backup archivelog all delete input .allocate channel dev1 type 'sbt_tape'. sql "ALTER TABLESPACE tbs_1 OFFLINE IMMEDIATE". RMAN allows incomplete recovery to a specified time. } >>>> Example backup to sbt: echo " run { allocate channel t1 type 'sbt_tape' parms 'ENV=(tdpo_optfile=/usr /tivoli/tsm/client/oracle/bin64/tdpo. allocate channel t2 type 'sbt_tape' parms 'ENV=(tdpo_optfile=/usr /tivoli/tsm/client/oracle/bin64/tdpo. backup (spfile) (current controlfile) . sql "ALTER TABLESPACE tbs_1 OFFLINE IMMEDIATE".f'. } >>>> Incomplete Recovery As you would expect. # alternatively. release channel t2. restore tablespace tbs_1. backup full database . set until time 'Nov 15 2000 09:00:00'. sql "ALTER TABLESPACE tbs_1 ONLINE". sql 'alter system archive log current'. restore tablespace tbs_1. } Recovering Datafiles Restored to New Locations The following example allocates one disk channel and one media management channe l to use datafile copies on disk and backups on tape. recover tablespace tbs_1. switch datafile all. set newname for datafile 'disk7/oracle/tbs11. and restores one of the datafiles in tablespace TBS _1 to a different location: run { allocate channel dev1 type disk.f' to 'disk9/oracle/tbs11.opt)'. startup mount. allocate channel dev2 type 'sbt_tape'. you can specify SCN . release channel t1.opt)'.

# alternatively. ARCHIVELOG_CHANGE#-1 -------------------1048438 1 row selected. Beyond this point the recovery would have to make reference to the online redo l ogs which are not present.dbf'' SIZE 100M . To perform disaste r recovery connect to RMAN: C:>rman catalog=rman/rman@w2k1 target=sys/password@w2k2 Once in RMAN do the following: startup nomount. restore database. recover database. } The incomplete recovery requires the database to be opened using the RESETLOGS o ption. restore controlfile. >>>> Disaster Recovery In a disaster situation where all files are lost you can only recover to the las t SCN in the archived redo logs. } If the "until scn" were not set the following type of error would be produced on ce a redo log was referenced: RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of recover command at 03/18/2003 09:33:19 RMAN-06045: media recovery requesting unknown log: thread 1 scn 1048439 With the database open all missing tempfiles must be replaced: sql "ALTER TABLESPACE temp ADD TEMPFILE ''C:\Oracle\oradata\W2K2\temp01. alter database open resetlogs. Disaster recovery is therefore a type of incomplete recovery. recover database.# set until sequence 9923. From SQL*Plus as SYS get the last archived SCN using: SQL> SELECT archivelog_change#-1 FROM v$database. you can specify log sequence numb er restore database. alter database open resetlogs. SQL>Back in RMAN do the following: run { set until scn 1048438. alter database mount.

dbf'. >>>> Archive logs What is the purpose and are the differences of ALTER SYSTEM ARCHIVE LOG CURRENT and ALTER SYSTEM ARCHIVE LOG ALL # When the database is open. T he current incarnation can be listed and altered using the following commands: list incarnation.dbf' TO '/tmp/tools01. then RMAN creates a datafile copy with the name that you specify. or closed.dbf to its default l ocation. open.Lists And Reports RMAN has extensive listing and reporting functionality allowing you to monitor y ou backups and maintain the recovery catalog. Here are a few useful commands: >>>> Restoring a datafile to another location: For example. The recovered database will be registered in the catalog as a new incarnation. assume that you run the following c ommands: SET NEWNAME FOR DATAFILE '?/oradata/trgt/tools01.dbf and records it in the repository. then RMAN restores the file ?/oradata/trgt/tools01.dbf' TO DATAFILECOPY '?/oradata/trgt/tools01. In this case. If you run a SET NEWNAME command before you restore a file. run a SWITCH command so that RMAN considers the restored file as the current dat abase file.dbf to /tmp/tools01. For example: SWITCH DATAFILE '/tmp/tools01. A log switch does not mean that the redo is archived. RMAN creates a datafile copy of ?/oradata/trgt/tools01. you can run the following SQL s tatement to force Oracle to archive all noncurrent redo logs: ALTER SYSTEM ARCHIVE LOG ALL. run the following SQL statement to force Oracle to switch out of the current log and archive it as well as all other unarchived logs: ALTER SYSTEM ARCHIVE LOG CURRENT. # When the database is mounted. RESTORE DATAFILE '?/oradata/trgt/tools01. Once the database is fully recovered a new backup should be perfomed.dbf named /tmp/tools01.dbf and overwrites any file that it finds with t he same filename.dbf i n the control file.dbf'.AUTOEXTEND ON NEXT 64K". For example. reset database to incarnation x. When you execute "'alter system archive log current" you force that the current . if you restore datafile ?/oradata/trgt/tools01. To change the name for datafile ?/oradata/trgt/tools01. The SWITCH command is the RMAN equivalent of the SQL statement ALTER DATABASE RE NAME FILE.dbf'.

Report commands can provide for much more detail. as shown in the following example: RMAN> list backup of tablespace users.---------2 AIRM 2092303715 YES 1 24-DEC-02 -.Example 4: Query on backup of archivelogs: RMAN> list backup of archivelog all.Example 3: Query on database backups RMAN> list backup of database. alter system archive log all: This command will archive all filled redo logs but will not complete current log because it will not be full. so it is safe: you are sure to have all the needed archived logs. >>>> LIST AND REPORT COMMANDS: ============= LIST COMMAND: ============= List commands query the catalog or control file. Backups and proxy copies of a database.Example 1: Query on the incarnations of the target database RMAN> list incarnation of database. About RMAN Reports Generated by the LIST Command You can control how the output is displayed by using the BY BACKUP and BY FILE o ptions of the LIST command and choosing between the SUMMARY and VERBOSE options.--.Example 2: Query on tablespace backups You can ask for lists of tablespace backups. -. datafile. archived redo lo .log to be archived.---------. The primary purpose of the LIST command is to determine which backups are availa ble. List commands provide for basic information. -. you can list: .---------------. to determine which backups or c opies are available. tablespace.-------. RMAN-03022: compiling command: list List of DB Key ------1 Database Incarnations Inc Key DB Name DB ID CUR Reset SCN Reset Time ------. -. For example.

You can also list backups in a summary m ode if the verbose mode generates too much output. # lists backup sets. ================ Report commands: ================ RMAN>report schema. Specify the desired objects with the listObjectList or recordSpec clause. After connecting to the target database and recovery catalog (if you use one). Example: RMAN> LIST BACKUP OF DATABASE. Specify the desired objects with the listObjLis t clause. specifying the desired objects and options. By default the LIST output is detailed. proxy copies. Incarnations of a database By default. tag. you can enter: LIST BACKUP. LIST BACKUPSET. # Show all backup details list backup.g. e xecute LIST BACKUP. path name. or recoverability . By default. You can also list backups by file. or control file . then LIST BACKUP displays all backups. RMAN lists backups by backup. For example. LIST COPY. # lists backup sets. which means that it serially lists eac h backup or proxy copy and then identifies the files included in the backup. and then execute the LIST BACKUP command. For example: LIST BACKUP SUMMARY. but you can also specify that RMAN displ ay the output in summarized form. device type. Backups that have expired . Listing Backups by Backup To list backups by backup. RMAN lists in verbose mode. Backups restricted by time. and proxy copies # lists only backup sets and proxy copies # lists only disk copies . If you do not specify an object. Shows the physical structure of the target database. and disk copies You can also specify the EXPIRED keyword to identify those backups that were not found during a crosscheck: LIST EXPIRED BACKUP SUMMARY. image copies. connect to the target database and recovery catalog ( if you use one).

RMAN> report obsolete; RMAN-03022: compiling command: report RMAN-06147: no obsolete backups found -- REPORT COMMAND: -- --------------About Reports of RMAN Backups Reports enable you to confirm that your backup and recovery strategy is in fact meeting your requirements for database recoverability. The two major forms of REPORT used to determine whe ther your database is recoverable are: RMAN> REPORT NEED BACKUP; Reports which database files need to be backed up to meet a configured or specif ied retention policy Use the REPORT NEED BACKUP command to determine which database files need backup under a specific retention policy. With no arguments, REPORT NEED BACKUP reports which objects need backup under th e currently configured retention policy. The output for a configured retention policy of REDUNDANCY 1 is similar to this example: REPORT NEED BACKUP; RMAN retention policy will be applied to the command RMAN retention policy is set to redundancy 1 Report of files with less than 1 redundant backups File #bkps Name ---- ----- ----------------------------------------------------2 0 /oracle/oradata/trgt/undotbs01.dbf RMAN> REPORT UNRECOVERABLE; Reports which database files require backup because they have been affected by s ome NOLOGGING operation such as a direct-path insert You can report backup sets, backup pieces and datafile copies that are obsolete, that is, not needed to meet a specified retention policy, by specifying the OBSOLETE keyword. If you do not specify any other options, then REPORT OBSOLETE displays the backups that are obsolete accor ding to the current retention policy, as shown in the following example: RMAN> REPORT OBSOLETE; In the simplest case, you could crosscheck all backups on disk, tape or both, us ing any one of the following commands:

RMAN> CROSSCHECK BACKUP DEVICE TYPE DISK; RMAN> CROSSCHECK BACKUP DEVICE TYPE SBT; RMAN> CROSSCHECK BACKUP; # crosshecks all backups on all devices The REPORT SCHEMA command lists and displays information about the database file s. After connecting RMAN to the target database and recovery catalog (if you use on e), issue REPORT SCHEMA as shown in this example: RMAN> REPORT SCHEMA;

# Show items that beed 7 days worth of # archivelogs to recover completely report need backup days = 7 database; report need backup; # Show/Delete items not needed for recovery report obsolete; delete obsolete; # Show/Delete items not needed for point-in-time # recovery within the last week report obsolete recovery window of 7 days; delete obsolete recovery window of 7 days; RMAN> REPORT OBSOLETE REDUNDANCY 2; RMAN> REPORT OBSOLETE RECOVERY WINDOW OF 5 DAYS; RMAN displays backups that are obsolete according to those retention policies, regardless of the actual configured retention policy.

# Show/Delete items with more than 2 newer copies available report obsolete redundancy = 2 device type disk; delete obsolete redundancy = 2 device type disk; # Show datafiles that connot currently be recovered report unrecoverable database; report unrecoverable tablespace 'USERS'; 24.1.3 More on Backup and recovery 10g RMAN: -------------------------------------------24.1.3.1 About RMAN Backups: ---------------------------When you execute the BACKUP command in RMAN, you create one or more backup sets or image copies. By default, RMAN creates backup sets regardless of whether the destination is disk or a medi a manager.

>>>About Image Copies An image copy is an exact copy of a single datafile, archived redo log file, or control file. Image copies are not stored in an RMAN-specific format. They are identical to th e results of copying a file with operating system commands. RMAN can use image copies during RMAN restore an d recover operations, and you can also use image copies with non-RMAN restore and recovery techniques. To create image copies and have them recorded in the RMAN repository, run the RM AN BACKUP AS COPY command (or, alternatively, configure the default backup type for disk as image copies u sing CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COPY before performing a backup). A database server session is used to create the copy, and the server session als o performs actions such as validating the blocks in the file and recording the image copy in the RMAN repos itory. You can also use an operating system command such as the UNIX dd command to crea te image copies, though these will not be validated, nor are they recorded in the RMAN repository . You can use the CATALOG command to add image copies created with native operating system tools in the RMAN repos itory. >>>Using RMAN-Created Image Copies If you run a RESTORE command, then by default RMAN restores a datafile or contro l file to its original location by copying an image copy backup to that location. Image copies are chosen over b ackup sets because of the extra overhead of reading through an entire backup set in search of files to be restored. However, if you need to restore and recover a current datafile, and if you have an image copy of the datafile available on disk, then you do not actually need to have RMAN copy the image cop y back to its old location. You can instead have the database use the image copy in place, as a replacement for the datafile to be restored. The SWITCH command updates the RMAN repository indicate that the image copy shou ld now be treated as the current datafile. Issuing the SWITCH command in this case is equivalent to i ssuing the SQL statement ALTER DATABASE RENAME FILE. You can then perform recovery on the copy. >>>User-Managed Image Copies RMAN can use image copies created by mechanisms outside of RMAN, such as native operating system file copy commands or third-party utilities that leave image copies of files on disk. These copies are known as user-managed copies or operating system copies. The RMAN CATALOG command causes RMAN to inspect an existing image copy and enter its metadata into the RMAN repository. Once cataloged, these files can be used like any other backup with the RESTORE o r SWITCH commands.

Some sites store their datafiles on mirrored disk volumes, which permit the crea tion of image copies by breaking a mirror. After you have broken the mirror, you can notify RMAN of the existence of a new user-managed copy, thus making it a candidate for a backup operation. You must notify RMAN when the copy is no longer available, by using the CHANGE ... UNCATALOG command. In this example, before resilvering t he mirror (not including other copies of the broken mirror), you must use a CHANGE ... UNCATALOG command to upd ate the recovery catalog and indicate that this copy is no longer available. >>>Storage of Backups on Disk and Tape RMAN can create backups on disk or a third-party media device such as a tape dri ve. If you specify DEVICE TYPE DISK, then your backups are created on disk, in the file name space of the target instance that is creating the backup. You can make a backup on any device that can store a datafile. To create backups on non-disk media, such as tape, you must use third-party medi a management software, and allocate channels with device types, such as SBT, that are supported by that software. >>>Backups of Archived Logs There are several features of RMAN backups specific to backups of archived redo logs. Deletion of Archived Logs After Backups RMAN can delete one or all copies of archived logs from disk after backing them up to backup sets. If you specify the DELETE INPUT option, then RMAN backs up exactly one copy of e ach specified log sequence number and thread from an archive destination to tape, and then deletes the specific fi le it backed up while leaving the other copies on disk. If you specify the DELETE ALL INPUT option, then RMAN backs up exactly one copy of each specified log sequence number and thread, and then deletes that log from all arc hive destinations. Note that there are special considerations related to deletion of archived redo logs in standby database configurations. See Oracle Data Guard Concepts and Administration for details. >>>Backups of Backup Sets The RMAN BACKUP BACKUPSET command backs up previously created backup sets. Only backup sets that were created on device type DISK can be backed up, and they can be backed up to any available device type. Note: RMAN issues an error if you attempt to run BACKUP AS COPY BACKUPSET. The BACKUP BACKUPSET command uses the default disk channel to copy backup sets f rom disk to disk. To back up from disk to tape, you must either configure or manually allocate a n

on-disk channel. Uses for Backups of Backup Sets The BACKUP BACKUPSET command is a useful way to spread backups among multiple me dia. For example, you can execute the following BACKUP command weekly as part of the production ba ckup schedule: # makes backup sets on disk BACKUP DEVICE TYPE DISK AS BACKUPSET DATABASE PLUS ARCHIVELOG; BACKUP DEVICE TYPE sbt BACKUPSET ALL; # copies backup sets on disk to tape In this way, you ensure that all your backups exist on both disk and tape. You c an also duplex backups of backup sets, as in this example: BACKUP COPIES 2 DEVICE TYPE sbt BACKUPSET ALL; (Again, control file autobackups are never duplexed.) You can also use BACKUP BACKUPSET to manage backup space allocation. For example , to keep more recent backups on disk and older backups only on tape, you can regularly run the following comm and: BACKUP DEVICE TYPE sbt BACKUPSET COMPLETED BEFORE 'SYSDATE-7' DELETE INPUT; This command backs up backup sets that were created more than a week ago from di sk to tape, and then deletes them from disk. Note that DELETE INPUT here is equivalent to DELETE ALL INPUT; R MAN deletes all existing copies of the backup set. If you duplexed a backup to four locations, t hen RMAN deletes all four copies of the pieces in the backup set. >>> Restoring Files with RMAN Use the RMAN RESTORE command to restore the following types of files from disk o r other media: Database (all datafiles) Tablespaces Control files Archived redo logs Server parameter files

Because a backup set is in a proprietary format, you cannot simply copy it as yo u would a backup database file created with an operating system utility; you must use the RMAN RESTORE command to extract its contents. In contrast, the database can use image copies created by the RMAN BACKUP AS COP Y command without additional processing. RMAN automates the procedure for restoring files. You do not need to go into the operating system, locate the backup that you want to use, and manually copy files into the appropr iate directories. When you issue a RESTORE command, RMAN directs a server session to restore the c orrect backups to either:

- The default location, overwriting the files with the same name currently there - A new location, which you can specify with the SET NEWNAME command To restore a datafile, either mount the database or keep it open and take the da tafile to be restored offline. When RMAN performs a restore, it creates the restored files as datafile image co pies and records them in the repository. The following table describes the behavior of the RESTORE, SE T NEWNAME, and SWITCH commands. >>>Datafile Media Recovery with RMAN The concept of datafile media recovery is the application of online or archived redo logs or incremental backups to a restored datafile in order to update it to the curre nt time or some other specified time. Use the RMAN RECOVER command to perform media reco very and apply logs or incremental backups automatically. RMAN Media Recovery: Basic Steps If possible, make the recovery catalog available to perform the media recovery. If it is not available, or if you do not maintain a recovery catalog, then RMAN uses metadata from the t arget database control file. If both the control file and recovery catalog are lost, then you can still recov er the database --assuming that you have backups of the datafiles and at least one autobackup of the control file. The generic steps for media recovery using RMAN are as follows: -Place the database in the appropriate state: mounted or open. For example, moun t the database when performing whole database recovery, or open the database when performing o nline tablespace recovery. -To perform incomplete recovery, use the SET UNTIL command to specify the time, SCN, or log sequence number at which recovery terminates. Alternatively, specify the UNTIL clause on the RESTORE and RECOVER commands. -Restore the necessary files with the RESTORE command. -Recover the datafiles with the RECOVER command. -Place the database in its normal state. For example, open it or bring recovered tablespaces online. RESTORE DATABASE; RECOVER DATABASE; >>> Corrupt Block recovery Although datafile media recovery is the principal form of recovery, you can also use the RMAN BLOCKRECOVER command to perform block media recovery. Block media recovery recovers an indivi dual corrupt datablock or set of datablocks within a datafile. In cases when a small number of blocks r equire media recovery,

you can selectively restore and recover damaged blocks rather than whole datafil es. For example, you may discover the following messages in a user trace file: ORA-01578: ORA-01110: ORA-01578: ORA-01110: ORACLE data block corrupted (file # 7, block # 3) data file 7: '/oracle/oradata/trgt/tools01.dbf' ORACLE data block corrupted (file # 2, block # 235) data file 2: '/oracle/oradata/trgt/undotbs01.dbf'

You can then specify the corrupt blocks in the BLOCKRECOVER command as follows: BLOCKRECOVER DATAFILE 7 BLOCK 3 DATAFILE 2 BLOCK 235; >>> After a Database Restore and Recover, RMAN gives the error: RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of backup command at 03/03/2008 11:13:06 RMAN-06059: expected archived log not found, lost of archived log compromises recoverability ORA-19625: error identifying file /dbms/tdbaeduc/educroca/recovery/archive/ar ch_1_870_617116679.arch ORA-27037: unable to obtain file status IBM AIX RISC System/6000 Error: 2: No such file or directory Note 1: If you no longer have a particular archivelog file you can let RMAN catalog know this by issuing the following command at the rman prompt after connecting to the rman catalog and the target database change archivelog all crosscheck ; This will check the archivelog folder and then make the catalog agree with what is actually available. rman> DELETE EXPIRED ARCHVIELOG ; Oracle Error :: RMAN-20011 target database incarnation is not current in recovery catalog Cause the database incarnation that matches the resetlogs change# and time of the moun ted target database control file is not the current incarnation of the database Action If "reset database to incarnation <key>" was used to make an old incarnation cur rent then restore the target database from a backup that matches the incarnation and mount it. You wil l need to do "startup nomount" before you can restore the control file using RMAN. Otherwise use "reset database to incarnation <key>" make the intended incarnatio

n current in the recovery catalog. >>> Note about rman and tape sbt and recovery window: Suppose you have a retention period defined in rman, like for example CONFIGURE RETENTION POLICY TO REDUNDANCY 3 This means that 3 backups needs to be maintained by rman, and other backups are considered "obsolete". But those other backups beyond retention, are not expired or otherwise not usabl e. If they are still present, you can use them in a recovery. Besides this, it cannot be known beforehand how the tape subsystem will deal wit h rman commands like "delete obsolete". The tape subsystem has probably its own retention period , and you need much more details about all systems involved, before you know whats going on.

============================================= 24.1.3.2 ABOUT RMAN ERRORS / troubleshooting: ============================================= Err 1: Missing archived redolog: ================================ Problem: If an archived redo is missing, you might get a message similar like th is: RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of backup command at 03/05/2008 07:44:35 RMAN-06059: expected archived log not found, lost of archived log compromises recoverability ORA-19625: error identifying file /dbms/tdbaeduc/educroca/recovery/archive/ar ch_1_817_617116679.arch ORA-27037: unable to obtain file status IBM AIX RISC System/6000 Error: 2: No such file or directory Solution: If archived redo logs are (wrongly) deleted/moved/compressed from disk without b eing backed up, the rman catalog will not know this has happened, and will keep attempting to backup the missing archived redo logs. That will cause rman archived redo log backups to fail altogether with an error like: RMAN-06059: expected archived log not found, lost of archived log compromises re coverability If you can, you should bring back the missing archved redo logs to their origina l location and name, and let rman back them up. But if that is impossible, the workaround is to crosscheck archivelog all , like:

rman <<e1 connect target / connect catalog username/password@catalog run { allocate channel c1 type disk ; crosscheck archivelog all ; release channel c1 ; } e1 Or just go into rman and run the command: RMAN> crosscheck archivelog all; You ll get output like this: validation succeeded for archived log archive log filename=D:REDOARCHARCH_1038.D BF recid=1017 stamp=611103638 for every archived log as they are all checked on disk. That should be the catalog fixed, run an archivelog backup to make sure.

Err 2: online redo logs listed as archives: =========================================== Testcase: a 10g 10.2.0.3 shows after recovery with resetlogs the following in v$archived_log. It looks as if it will stay there forever: SEQ# FIRST 814 17311773 815 17311785 816 17354662 817 17354674 2 17415287 0 0 0 0 0 0 1 -->17402532 1 17402532 2 17404154 NEXT 17311785 17354662 17354674 17402531 2.81E+14 0 0 0 17415287 17404154 17404165 NAME DIFF 12 42877 12 47857 2.8147E+14 0 0 0 12755 1622 11 STATUS D D D D A A A A A D D

redo01.log redo02.log redo03.log redo04.log redo05.log

FIRST_CHANGE# NEXT_CHANGE# SEQUENCE# RESETLOGS_CHANGE# ------------- ------------ ---------- ----------------17311785 17354662 815 1 17354662 17354674 816 1 17354674 17402531 817 1 -->17402532 17404154 1 -->17402532 17404154 17404165 2 17402532 17404165 17415733 3 17402532 We dont know what is going on here.

Err 3: Highlevel overview RMAN Error Codes ========================================== RMAN error codes are summarized in the table below. 0550-0999 Command-line interpreter 1000-1999 Keyword analyzer 2000-2999 Syntax analyzer 3000-3999 Main layer 4000-4999 Services layer 5000-5499 Compilation of RESTORE or RECOVER command 5500-5999 Compilation of DUPLICATE command 6000-6999 General compilation 7000-7999 General execution 8000-8999 PL/SQL programs 9000-9999 Low-level keyword analyzer 10000-10999 Server-side execution 11000-11999 Interphase errors between PL/SQL and RMAN 12000-12999 Recovery catalog packages 20000-20999 Miscellaneous RMAN error messages

Err 4: RMAN-03009 accompinied with ORA- error: ============================================== Q: Here is my problem; When trying to delete obsolete RMAN backupsets, I get an error: RMAN> change backupset 698, 702, 704, 708 delete; List of BP Key ------698 702 704 708 Backup Pieces BS Key Pc# Cp# ------- --- --698 1 1 702 1 1 704 1 1 708 1 1

Status ----------AVAILABLE AVAILABLE AVAILABLE AVAILABLE

Device Type ----------SBT_TAPE SBT_TAPE SBT_TAPE SBT_TAPE

Piece Name ---------df_546210555_706_1 df_546296605_709_1 df_546383776_712_1 df_546469964_715_1

Do you really want to delete the above objects (enter YES or NO)? YES RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03009: failure of delete command on ORA_MAINT_SBT_TAPE_1 channel at 03/02/2005 16:27:06 ORA-27191: sbtinfo2 returned error Additional information: 2 What in the world does "Additional information: 2" mean? I can't find any more useful detail than this. A: Oracle Error :: ORA-27191 sbtinfo2 returned error

Cause sbtinfo2 returned an error. This happens while retrieving backup file informatio n from the media manager"s catalog. Action This error is returned from the media management software which is linked with O racle. There should be additional messages which explain the cause of the error. This error usually requires contacting the media management vendor. A: ---> ORA-27191 John Clarke: My guess is that "2" is an O/S return code, and in /usr/sys/include/errno.h, you'll see that error# 2 is "no such file or directory. Accompanied with ORA-27191, I'd guess that your problem is that your tape library doesn't currently have the tape(s) loaded and/or can't find them. Mladen Gogala: Additional information 2 means that OS returned status 2. That is a "file not found" error. In plain Spanglish, you cannot delete files from tape, only from the disk drives. Niall Litchfield: The source error is the ora-27191 error (http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10744/e24280.htm# ORA-27191) which suggests a tape library issue to me. You can search for RMAN errors using the error search page as well http://otn.oracle.com/pls/db10g/db10g.error_search?search=rman-03009, for exampl e A: ---> RMAN-03009 RMAN-03009: failure of delete command on ORA_MAINT_SBT_TAPE_1 channel at date/ti me RMAN-03009: failure of allocate command on t1 channel at date/time RMAN-03009: failure of backup command on t1 channel at date/time etc.. -> Means most of the time that you have Media Management Library problems -> Can also mean that there is a problem with backup destination (disk not found , no space, tape not loaded etc..) ERR 5: Test your Media Management API: ====================================== Testing the Media Management API On specified platforms, Oracle provides a diagnostic tool called "sbttest". This utility performs a simple test of the tape library by acting as the Oracle database server and attempting to communica te with the media manager.

Obtaining the Utility On UNIX, the sbttest utility is located in $ORACLE_HOME/bin. Obtaining Online Documentation For online documentation of sbttest, issue the following on the command line: % sbttest The program displays the list of possible arguments for the program: Error: backup file name must be specified Usage: sbttest backup_file_name # this is the only required parameter <-dbname database_name> <-trace trace_file_name> <-remove_before> <-no_remove_after> <-read_only> <-no_regular_backup_restore> <-no_proxy_backup> <-no_proxy_restore> <-file_type n> <-copy_number n> <-media_pool n> <-os_res_size n> <-pl_res_size n> <-block_size block_size> <-block_count block_count> <-proxy_file os_file_name bk_file_name [os_res_size pl_res_size block_size block_count]> The display also indicates the meaning of each argument. For example, following is the description for two optional parameters: Optional parameters: -dbname specifies the database name which will be used by SBT to identify the backup file. The default is "sbtdb" -trace specifies the name of a file where the Media Management software will write diagnostic messages. Using the Utility Use sbttest to perform a quick test of the media manager. The following table ex plains how to interpret the output: If sbttest returns... Then... 0 The program ran without error. In other words, the media manager is installed a nd can accept a data stream and return the same data when requested. non-0 The program encountered an error. Either the media manager is not installed or it is not configured correctly. To use sbttest: Make sure the program is installed, included in your system path, and linked wit h Oracle by typing sbttest at the command line:

% sbttest If the program is operational, you should see a display of the online documentat ion. Execute the program, specifying any of the arguments described in the online doc umentation. For example, enter the following to create test file some_file.f and write the output to sbtio.log: % sbttest some_file.f -trace sbtio.log You can also test a backup of an existing datafile. For example, this command te sts datafile tbs_33.f of database PROD: % sbttest tbs_33.f -dbname prod Examine the output. If the program encounters an error, it provides messages des cribing the failure. For example, if Oracle cannot find the library, you see: libobk.so could not be loaded. Check that it is installed properly, and that LD_ LIBRARY_PATH environment variable (or its equivalent on your platform) includes the directory where this file can be found. Here is some additional information on t he cause of this error: ld.so.1: sbttest: fatal: libobk.so: open failed: No such file or directory ERR 6: RMAN-12004 ================= Hi, I m facing this problem any pointers will of great help.... 1. RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-00579: the following error occurred at 12/16/2003 02:46:31 RMAN-10035: exception raised in RPC: RMAN-10031: ORA-19624 occurred during call to DBMS_BACKUP_RESTORE.BACKUPPIECECREATE RMAN-03015: error occurred in stored script backup_db_full RMAN-03015: error occurred in stored script backup_del_all_al RMAN-03007: retryable error occurred during execution of command: backup RMAN-12004: unhandled exception during command execution on channel t1 RMAN-10035: exception raised in RPC: ORA-19506: failed to create sequential file, name="l0f93ro5_1_1", parms="" ORA-27028: skgfqcre: sbtbackup returned error ORA-19511: Error received from media manager layer, error text: sbtbackup: Failed to process backup file. RMAN-10031: ORA-19624 occurred during call to DBMS_BACKUP_RESTORE.BACKUPPIECECREATE OR another errorstack RMAN-12004: unhandled exception during command execution on channel disk13 RMAN-10035: exception raised in RPC: ORA-19502: write error on file "/db200_back up/archive_log03/EDPP_ARCH0_21329_1_492222998",

blockno 612353 (blocksize=1024) ORA-27072: skgfdisp: I/O error HP-UX Error: 2: No such file or directory Additional information: 612353 RMAN-10031: ORA-19624 occurred during call to DBMS_BACKUP_RESTORE.BACKUPPIECECRE ATE OR another errorstack RMAN-12004: unhandled exception during command execution on channel ch00 RMAN-10035: exception raised in RPC: ORA-19599: block number 691 is corrupt in c ontrolfile C:\ORACLE\ORA90\DATABASE\SNCFSUMMITDB.ORA RMAN-10031: ORA-19583 occurred during call to DBMS_BACKUP_RESTORE.BACKUPPIECECRE ATE OR another errorstack Have managed to create a job to backup my db, but I can't restore. I get the fol lowing: RMAN-03002: failure during compilation of command RMAN-03013: command type: restore RMAN-03006: non-retryable error occurred during execution of command: IRESTORE RMAN-07004: unhandled exception during command execution on channel BackupTest RMAN-10035: exception raised in RPC: ORA-19573: cannot obtain exclusive enqueue for datafile 1 RMAN-10031: ORA-19583 occurred during call to DBMS_BACKUP_RESTORE.RESTOREBACKUPP IECE Seems to relate to corrupt or missing Oracle files. $$$$ ERR 7: ORA-27211 ================ Q: Continue to get ORA-27211 Failed to load media management library A: had a remarkably similar experience a few months ago with Legato NetWorker and p erformed all of the steps you listed with the same results. The problem turned out to be very simple. Th e SA installed the 64-bit version of the Legato Networker client because it is a 64-bit server. However, we were running a 32-bit version of Oracle on it. Installing the 32-bit client solved the problem. A: Cause: User-supplied SBT_LIBRARY or libobk.so could not be loaded. Call to dlope n for media library returned error. See Additional information for error code. Action: Retry the command with proper media library. Or re-install Media managem ent module for Oracle. A:

Exact Error Message ORA-27211: Failed to load Media Management Library on HP-UX system Details: Overview: The Oracle return code ORA-27211 implies a failure to load a shared object libra ry into process space. Oracle Recovery Manager (RMAN) backups will fail with a message "ORA-27211: Fail ed to load Media Management Library" if the SBT_LIBRARY keyword is defined and points to an incorrect library name. T he SBT_LIBRARY keyword must be set in the PARMS clause of the ALLOCATE CHANNEL statement in the RMAN script. This k eyword is not valid with the SEND command and is new to Oracle 9i. If this value is set, it overrides the default search p ath for the libobk library. By default, SBT_LIBRARY is not set. Troubleshooting: If an ORA-27211 error is seen for an Oracle RMAN backup, it is necessary to revi ew the Oracle RMAN script and verify if SBT_LIBRARY is either not set or is set correctly. If set, the filename should be libobk.sl for HP-UX 10, 11.00 and 11.11, but libobk.so for HP-UX 11.23 (ia64) clients. Example of an invalid entry for HP-UX 11.23 (ia64) clients: PARMS='SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.sl' Example of a correct entry for HP-UX 11.23 (ia64) clients: PARMS='SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so' Master Server Log Files: n/a Media Server Log Files: n/a Client Log Files: The RMAN log file on the client will show the following error message: RMAN-00571: =========================================== RMAN-00569: ======= ERROR MESSAGE STACK FOLLOWS ======= RMAN-00571: =========================================== RMAN-03009: failure of allocate command on ch00 channel at 05/21/2005 16:39:17 ORA-19554: error allocating device, device type: SBT_TAPE, device name: ORA-27211: Failed to load Media Management Library Additional information: 25 Resolution: The Oracle return code ORA-27211 implies a failure to load a shared object libra ry into process space. Oracle RMAN backups will fail with a message "ORA-27211: Failed to load Media Ma nagement Library" if the SBT_LIBRARY keyword is defined and points to an incorrect library name. To manually set the SBT_LIBRARY path, follow the steps described below: 1. Modify the RMAN ALLOCATE CHANNEL statement in the backup script to reference the HP-UX 11.23 library file directly:

PARMS='SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so' Note: This setting would be added to each ALLOCATE CHANNEL statement. A restart of the Oracle instance is not needed for this change to take affect. 2. Run a test backup or wait for the next scheduled backup of the Oracle databas e

ERR8: More on DBMS_BACKUP_RESTORE: ================================== Note 1: The dbms_backup_restore package is used as a PL/SQL command-line interface for r eplacing native RMAN commands, and it has very little documentation. The Oracle docs note how to install and configure the dbms_backup_restore packag e: The DBMS_BACKUP_RESTORE package is an internal package created by the dbmsbkrs.sq l and prvtbkrs.plb scripts. This package, along with the target database version of DBMS_RCVMAN, is automati cally installed in every Oracle database when the catproc.sql script is run. This package interfaces with the Oracle data base server and the operating system to provide the I/O services for backup and restore operations as directed by RMA N. The docs also note that The DBMS_BACKUP_RESTORE package has a PL/SQL procedure to normalize filenames on Windows NT platforms. Oracle DBA John Parker gives this example of dbms_backup_restore to recover a co ntrolfile: declare devtype varchar2(256); done boolean; begin devtype:=dbms_backup_restore.deviceallocate( type=>'sbt_tape', params=>'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=rdcs,OB2BARLIST=ORA_RDCS_WEEKLY)', ident=>'t1'); dbms_backup_restore.restoresetdatafile; dbms_backup_restore.restorecontrolfileto('D:\oracle\ora81\dbs\CTL1rdcs.ORA'); dbms_backup_restore.restorebackuppiece( 'ORA_RDCS_WEEKLY<rdcs_6222:596513521:1>.dbf', DONE=>done ); dbms_backup_restore.restoresetdatafile; dbms_backup_restore.restorecontrolfileto('D:\DBS\RDCS\CTL2RDCS.ORA'); dbms_backup_restore.restorebackuppiece( 'ORA_RDCS_WEEKLY<rdcs_6222:596513521:1>.dbf', DONE=>done ); dbms_backup_restore.devicedeallocate('t1'); end; Here are some other examples of using dbms_backup_restore: DECLARE

devtype varchar2(256); done boolean; BEGIN devtype := dbms_backup_restore.DeviceAllocate (type => '',ident => 'FUN'); dbms_backup_restore.RestoreSetDatafile; dbms_backup_restore.RestoreDatafileTo(dfnumber => 1,toname => 'D:\ORACLE_BASE\da tafiles\SYSTEM01.DBF'); dbms_backup_restore.RestoreDatafileTo(dfnumber => 2,toname => 'D:\ORACLE_BASE\da tafiles\UNDOTBS.DBF'); --dbms_backup_restore.RestoreDatafileTo(dfnumber => 3,toname => 'D:\ORACLE_BASE\ datafiles\MYSPACE.DBF'); dbms_backup_restore.RestoreBackupPiece(done => done,handle => 'D:\ORACLE_BASE\RM AN_BACKUP\MYDB_DF_BCK05H2LLQP_1_1', params => null); dbms_backup_restore.DeviceDeallocate; END; / --restore archived redolog DECLARE devtype varchar2(256); done boolean; BEGIN devtype := dbms_backup_restore.DeviceAllocate (type => '',ident => 'FUN'); dbms_backup_restore.RestoreSetArchivedLog(destination=>'D:\ORACLE_BASE\achive\') ; dbms_backup_restore.RestoreArchivedLog(thread=>1,sequence=>1); dbms_backup_restore.RestoreArchivedLog(thread=>1,sequence=>2); dbms_backup_restore.RestoreArchivedLog(thread=>1,sequence=>3); dbms_backup_restore.RestoreBackupPiece(done => done,handle => 'D:\ORACLE_BASE\RM AN_BACKUP\MYDB_LOG_BCK0DH1JGND_1_1', params => null); dbms_backup_restore.DeviceDeallocate; END; / Note 2: --------restore controlfile DECLARE devtype varchar2(256); done boolean; BEGIN devtype := dbms_backup_restore.DeviceAllocate(type => '',ident => 'FUN'); dbms_backup_restore.RestoresetdataFile; dbms_backup_restore.RestoreControlFileto('D:\ORACLE_BASE\controlfiles\CONTROL01. CTL'); dbms_backup_restore.RestoreBackupPiece('D:\ORACLE_BASE\Rman_Backup\MYDB_DF_BCK0B H1JBVA_1_1',done => done); dbms_backup_restore.RestoresetdataFile; dbms_backup_restore.RestoreControlFileto('D:\ORACLE_BASE\controlfiles\CONTROL02. CTL'); dbms_backup_restore.RestoreBackupPiece('D:\ORACLE_BASE\Rman_Backup\MYDB_DF_BCK0B H1JBVA_1_1',done => done); dbms_backup_restore.RestoresetdataFile; dbms_backup_restore.RestoreControlFileto('D:\ORACLE_BASE\controlfiles\CONTROL03. CTL'); dbms_backup_restore.RestoreBackupPiece('D:\ORACLE_BASE\Rman_Backup\MYDB_DF_BCK0B H1JBVA_1_1',done => done);

dbms_backup_restore.DeviceDeallocate; END; / --restore datafile DECLARE devtype varchar2(256); done boolean; BEGIN devtype := dbms_backup_restore.DeviceAllocate (type => '',ident => 'FUN'); dbms_backup_restore.RestoreSetDatafile; dbms_backup_restore.RestoreDatafileTo(dfnumber => 1,toname => 'D:\ORACLE_BASE\da tafiles\SYSTEM01.DBF'); dbms_backup_restore.RestoreDatafileTo(dfnumber => 2,toname => 'D:\ORACLE_BASE\da tafiles\UNDOTBS.DBF'); --dbms_backup_restore.RestoreDatafileTo(dfnumber => 3,toname => 'D:\ORACLE_BASE\ datafiles\MYSPACE.DBF'); dbms_backup_restore.RestoreBackupPiece(done => done,handle => 'D:\ORACLE_BASE\RM AN_BACKUP\MYDB_DF_BCK05H2LLQP_1_1', params => null); dbms_backup_restore.DeviceDeallocate; END; / --restore archived redolog DECLARE devtype varchar2(256); done boolean; BEGIN devtype := dbms_backup_restore.DeviceAllocate (type => '',ident => 'FUN'); dbms_backup_restore.RestoreSetArchivedLog(destination=>'D:\ORACLE_BASE\achive\') ; dbms_backup_restore.RestoreArchivedLog(thread=>1,sequence=>1); dbms_backup_restore.RestoreArchivedLog(thread=>1,sequence=>2); dbms_backup_restore.RestoreArchivedLog(thread=>1,sequence=>3); dbms_backup_restore.RestoreBackupPiece(done => done,handle => 'D:\ORACLE_BASE\RM AN_BACKUP\MYDB_LOG_BCK0DH1JGND_1_1', params => null); dbms_backup_restore.DeviceDeallocate; END; /

ERR 9: RMAN-00554 initialization of internal recovery manager package failed: =============================================================================

connected to target database: PLAYROCA (DBID=575215626) RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-00554: initialization of internal recovery manager package failed RMAN-04004: error from recovery catalog database: ORA-03135: connection lost contact keys: RMAN-00554 RMAN-04004

ORA-03135 ORA-3136 >>>> In alertlog of the rman, we can find: WARNING: inbound connection timed out (ORA-3136) Thu Mar 13 23:09:54 2008 >>>> In Net logs sqlnet.log we can find: Warning: Errors detected in file /dbms/tdbaplay/ora10g/home/network/log/sqlnet.l og > *********************************************************************** > Fatal NI connect error 12170. > > VERSION INFORMATION: > TNS for IBM/AIX RISC System/6000: Version 10.2.0.3.0 - Producti on > TCP/IP NT Protocol Adapter for IBM/AIX RISC System/6000: Versio n 10.2.0.3.0 - Production > Oracle Bequeath NT Protocol Adapter for IBM/AIX RISC System/600 0: Version 10.2.0.3.0 - Production > Time: 18-MAR-2008 23:01:43 > Tracing not turned on. > Tns error struct: > ns main err code: 12535 > TNS-12535: TNS:operation timed out > ns secondary err code: 12606 > nt main err code: 0 > nt secondary err code: 0 > nt OS err code: 0 > Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=57.232.4.123)(PORT=35844)) Note 1: ------RMAN-00554: initialization of internal recovery manager package failed Is a general error code. You must turn your attention the the codes underneath t his one. For example: RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-00554: initialization of internal recovery manager package failed RMAN-06003: ORACLE error from target database: ORA-00210: cannot open the specified control file ORA-00202: control file: '/devel/dev02/dev10g/standbyctl.ctl' RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-00554: initialization of internal recovery manager package failed RMAN-04005: error from target database: ORA-01017: invalid username/password;

They still show up in th e list of archive logs in Enterprise Manager. Note 3: ------Q: RMAN-20242: specification does not match any archive log in the recovery ca Posted: Feb 12. Note 2: ------Some of the common RMAN errors are: RMAN-20242: Specification does not match any archivelog in the recovery catalog.Note 2: ------RMAN-04004: error from recovery catalog database: ORA-03135: connection lost con tact ERR 10: RMAN-00554 initialization of internal recovery manager package failed: ============================================================================== Starting backup at 17-MAY-08 released channel: t1 released channel: t2 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of backup command at 05/17/2008 23:30:13 RMAN-06004: ORACLE error from recovery catalog database: RMAN-20242: specific ation does not match any archive log in the recovery catalog Note 1: ------Oracle Error :: RMAN-20242 specification does not match any archivelog in the recovery catalog Cause No archive logs in the specified archive log range could be found. I get the message: . 2008 7:52 AM Reply A couple of archive log files were deleted from the OS. I want to fix this because now whenever I try to run a crosscheck command. Add to RMAN script: sql 'alter system archive log current'. Action Check the archive log specifier.

RMAN-20242: specification does not match any archive log in the recovery catalog I also tried to uncatalog those files.1. then you should be able to delete them. Note 5: ------Q: Hi there! We are having problems with an Oracle backup. . if ther archives are in this list they will show. but this is a common problem ..7 on HP-UX with Legato Networker Thanks. but got the same message. then i think you should do a crosscheck archivelog all. Any suggestions on what to do? Thanks! A: hi.and is addressed in detail in MetaLink notes. or you could be us ing mismatched versions between RMAN and the database (don't know since you didn't provide any version d etails).RMAN-2024 2 . regards Note 4: ------The RMAN error number would be helpful. from rman run the command list expired archivelog. thats not an error. Did anybody experience anything similar? This is 8.. A: If i ask rman to backup archivelogs that are more than 2days old and there are n one. Either the name specification (the one you entered) is wrong. The compiling of the backup command fails with the error message: RMAN-20242: specification does not match any archivelog in the recovery catalog But RMAN is only supposed to backup any archived logs that are there and then insert them in the catalog.

now most companies will force a log switch after a set amount of time during the day so in DR.'test2'). alter database add supplemental log data.ARCHIVE_CHANGE#.CONTROLFILE_SEQUENCE#. Files and tablespaces: >>> User albert creates table TEST CREATE TABLE test ( id number. insert into test values (1. >>> make full RMAN backup BACKUP 1: >>> Some time later. $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$ Now we will do some test of RMAN on a testsystem with Oracle 10g R2 Test Case 1: ============ 10g Database test10g: TEST10G: startup mount pfile=c:\oracle\admin\test10g\pfile\init. >>> make full RMAN backup BACKUP 2: >>> Now investigate some SCN's: SQL> select CHECKPOINT_CHANGE#. albert inserts second record insert into test values (2. commit. archive log start. alter database open. alter database force logging. name varchar2(10)).CURRENT_SCN from v$database.ora alter database archivelog. CHECKPOINT_CHANGE# CONTROLFILE_SEQUENCE# ARCHIVE_CHANGE# CURRENT_SCN .That is when i see it the most. commit. you dont lose days worth of redo that might still be hanging in a redo log if it gets lost.'test1').

--------------------. STATUS from v$log.DBF 2 888936 534906 534907 C:\ORA CLE\ORADATA\TEST10G\UNDOTBS01.GET_SYSTEM_CHANGE_NUMBER() ----------------------------------------890599 SQL> select CHECKPOINT_CHANGE#.LAST_CHANGE#.ARCHIVE_CHANGE#.OFFLINE_CHANGE#.CURRENT_SCN .RL_FIRST_CHANGE#.CURRENT_SCN .DBF 5 888936 0 0 C:\ORA CLE\ORADATA\TEST10G\EXAMPLE01.NAME from v$datafile.-----------.----------------889090 1748 889087 890678 889090 SQL> select file#. DBMS_FLASHBACK.----------. SQL> select RL_SEQUENCE#.CONTROLFILE_SEQUENCE#..ARCHIVE_CHANGE#.FIRST_CHANGE#....-----------------.ONLINE_CHANGE# ..--------------------.-----------------.----------.DBF 6 rows selected.-------------. FILE# CHECKPOINT_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# ONLINE_CHANGE# NAME ---------.RL_NEXT_CHANGE# from V$BACKUP_FILES .archivelog_change# from v$database.----------------889090 1748 889087 890538 889090 SQL> SELECT DBMS_FLASHBACK.--------------.GET_SYSTEM_CHANGE_NUMBER() from dual.--------------. 151 888889 889090 151 888889 889090 SQL> select SEQUENCE#.DBF 3 888936 534906 534907 C:\ORA CLE\ORADATA\TEST10G\SYSAUX01. CHECKPOINT_CHANGE# CONTROLFILE_SEQUENCE# ARCHIVE_CHANGE# CURRENT_SCN ARCHIVELOG_ CHANGE# -----------------.DBF 4 888936 534906 534907 C:\ORA CLE\ORADATA\TEST10G\USERS01.archivelog_change# from v$database.------------------------1 888936 534906 534907 C:\ORA CLE\ORADATA\TEST10G\SYSTEM01.----------888889 1745 889087 889154 SQL> select CHECKPOINT_CHANGE#.CONTROLFILE_SEQUENCE#. CHECKPOINT_CHANGE# CONTROLFILE_SEQUENCE# ARCHIVE_CHANGE# CURRENT_SCN ARCHIVELOG_ CHANGE# -----------------.DBF 6 888936 0 0 C:\ORA CLE\ORADATA\TEST10G\TS_CDC.--------------------. .CHECKPOINT_CHANGE#.--------------.--------------.

commit... alter database open * ERROR at line 1: ORA-01157: cannot identify/lock data file 6 .DBF' >>> startup database SQL> alter database open.. RMAN> RECOVER DATABASE.---------------152 889090 CURRENT 150 887780 INACTIVE 151 888889 INACTIVE SQL> select SEQUENCE#..------------. >>> logon as albert SQL> select * from test.DBF' >>> RECOVER WITH RMAN RMAN> RESTORE DATABASE. 147 880266 882166 148 882166 882431 149 882431 887780 150 887780 888889 151 888889 889090 >>> Some time later.CONTROLFILE_SEQUENCE#..FIRST_CHANGE#. ID ---------3 1 2 NAME ---------test3 test1 test2 >>> logon as system SQL> select CHECKPOINT_CHANGE#.'test3'). >>> shutdown database >>> delete a datafile data file 6: 'C:\ORACLE\ORADATA\TEST10G\TS_CDC.see DBWR trace file ORA-01110: data file 6: 'C:\ORACLE\ORADATA\TEST10G\TS_CDC.NEXT_CHANGE# from v$log_history . ....SEQUENCE# FIRST_CHANGE# STATUS ---------.ARCHIVE_CHANGE#. albert inserts third record insert into test values (3.CURRENT_SCN from v$database.

CHECKPOINT_CHANGE#. CHECKPOINT_CHANGE# CONTROLFILE_SEQUENCE# ARCHIVE_CHANGE# CURRENT_SCN ARCHIVELOG_ CHANGE# -----------------.CHECKPOINT_CHANGE# CONTROLFILE_SEQUENCE# ARCHIVE_CHANGE# CURRENT_SCN -----------------.-----------------.ONLINE_CHANGE# .DBF 4 891236 534906 534907 C:\ORA CLE\ORADATA\TEST10G\USERS01.--------------------.archivelog_change# from v$database. FILE# CHECKPOINT_CHANGE# LAST_CHANGE# OFFLINE_CHANGE# ONLINE_CHANGE# NAME ---------.ONLINE_CHANGE# .----------891236 1780 889087 891702 SQL> select file#.DBF .------------------------1 891236 534906 534907 C:\ORA CLE\ORADATA\TEST10G\SYSTEM01.--------------.DBF 2 893124 534906 534907 C:\ORA CLE\ORADATA\TEST10G\UNDOTBS01.NAME from v$datafil e.--------------.CHECKPOINT_CHANGE#.DBF 6 891236 0 0 C:\ORA CLE\ORADATA\TEST10G\TS_CDC.--------------.-----------.DBF 4 893124 534906 534907 C:\ORA CLE\ORADATA\TEST10G\USERS01.DBF 6 rows selected.-----------------.--------------------.-----------.ARCHIVE_CHANGE#.OFFLINE_CHANGE#.-------------.NAME from v$datafile.DBF 2 891236 534906 534907 C:\ORA CLE\ORADATA\TEST10G\UNDOTBS01.--------------.----------------893124 1785 889087 893131 889090 SQL> select file