Download presentation
Presentation is loading. Please wait.
1
Oracle 10g Database Engine New Features
23. October 2003 OUGF Seminar Autumn 2003 Oracle 10g Database Engine New Features Tanel Poder independent technology consultant 06-Nov-03 OUGF 2003
2
Agenda What’s behind the 10g buzzwords Manageability enhancements
Performance tuning enhancements New export-import tool Data Pump Parameters, views SQL and PL/SQL Recovery and Flashback Wrap-up Questions OUGF 2003
3
Simplicity vs Flexibility
Automatic statistics gathering Advisories Automatic tuning Less than 30 basic (init.ora) parameters Basic, advanced, hidden parameters Easier operations alter tablespace rename “undrop” table etc.. OUGF 2003
4
Manageability SGA_TARGET PGA_AGGREGATE_TARGET
Sets total size for all SGA components Buffer Cache, Shared Pool, Large Pool, Java Pool Dynamically and automatically adjustable PGA_AGGREGATE_TARGET Available since 9i Sets total size for all server processes sort_area_size, sort_area_retained_size, hash_area_size, bitmap_merge_area_size Contents automatically managed OUGF 2003
5
Basic Parameters COMPATIBLE CONTROL_FILES DB_BLOCK_SIZE
DB_CREATE_FILE_DEST DB_CREATE_ONLINE_LOG_DEST DB_DOMAIN DB_NAME DB_RECOVERY_FILE_DEST DB_RECOVERY_FILE_DEST_SIZE INSTANCE_NUMBER JOB_QUEUE_PROCESSES LOG_ARCHIVE_DEST_n LOG_ARCHIVE_DEST_STATE_n NLS_LANGUAGE NLS_TERRITORY OPEN_CURSORS PROCESSES REMOTE_LISTENER REMOTE_LOGIN_PASSWORDFILE ROLLBACK_SEGMENTS SESSIONS SHARED_SERVERS STAR_TRANSFORMATION_ENABLED UNDO_MANAGEMENT UNDO_TABLESPACE OUGF 2003
6
Manageability SYSAUX tablespace for system utilities SYSAUX Module
SYS objects SYSTEM Oracle Data Mining ODM OEM Repository OEM_REPOSITORY Oracle OLAP CWMLITE Oracle interMedia Oracle Spatial Oracle Ultra Search DRSYS RMAN Recovery Catalog TOOLS Sample Schemas Example Workspace Manager Oracle XML DB XDB_RESINFO Workload Repository New in 10g SYSAUX OUGF 2003
7
Online Rebuilds Some functionality since already in 8i, 9i
Online index build, rebuild Online index organized table rebuild Analyze/validate structure online Online table redefinition dbms_redefinition package in 9i change table physical structure online allows adding, changing, removing columns online Enhanced in 10g OUGF 2003
8
Online Segment Shrink Can be recommended by Segment Advisor
alter table enable row movement; alter table t1 shrink space cascade; TABLE HEADER High Water Mark Free Space TABLE HEADER High Water Mark Free Space OUGF 2003
9
Rename Tablespace Useful in Transportable Tablespace scenarios
ALTER TABLESPACE user RENAME to u1; Can’t rename SYSTEM or SYSAUX Tablespace and all datafiles must be online Can also rename READ ONLY tablespaces PROD ARCHIVE OUGF 2003
10
Tablespaces and Groups
Huge tablespaces could be separated for maintenance (backup&recovery) reasons Users still have single point for storing data CREATE TABLESPACE TS DATAFILE ‘xx’ SIZE 1M TABLESPACE GROUP G1; ALTER TABLESPACE NEWTS TABLESPACE GROUP G1; ALTER TABLESPACE NEWTS TABLESPACE GROUP ‘’; CREATE TABLE T(…) TABLESPACE G1; OUGF 2003
11
Bigfile Tablespaces Support for sizes up to 8 Exabytes!
Terabytes Max files in database SYSTEM & SYSAUX can’t be bigfile tablespaces CREATE BIGFILE TABLESPACE bigtbs DATAFILE '/u02/oracle/data/bigtbs01.dbf‘ SIZE 50G EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO; bytes OUGF 2003
12
Crossplatform Transportable TS
RMAN> CONVERT TABLESPACE sales_1,sales_2 2> TO PLATFORM ’Microsoft Windows NT’ 3> FORMAT ’/temp/%U’; ... Transporting Tablespaces Between Databases input datafile fno=00004 name=/u01/oracle/oradata/salesdb/sales_101.dbf converted datafile=/temp/data_D-10_I _TS-EXAMPLE_FNO-4_06ek24vl channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:45 OUGF 2003
13
Data Pump A server-managed data transportation tool
Direct load/extract capabilities Very high performance/efficient with large data sets Replacement for exp/imp old exp/imp remain supported Data Pump Client Data Pump Client Data Warehouse PROD Data Pump Data Pump OUGF 2003
14
Data Pump Commands expdp/impdp
Can use files or direct network transfer Dynamic configuration, resumable operations Client can detach and reconnect Can be parallelized using PARALLEL Even loads to/from external text files Monitored through DBA_DATAPUMP_JOBS OUGF 2003
15
Data Pump Options Fine-Grained Object Selection
exclude=function exclude=procedure exclude=package:”like ‘PAYROLL%’ ” include=table content=metadata_only | data_only | both query=“modify_date > sysdate-1” DDL Transformations, DDL extract table_exists_action skip, append, truncate, replace OUGF 2003
16
FlashBack Database Flash Recovery Area must be configured
Flashback logs are stored there Consisting of old database block images Fast “rollback” of database, no redologs required Server Process Server Process Server Process DB Flashback Log OUGF 2003
17
FlashBack Database Configuration parameters: DB_RECOVERY_FILE_DEST
DB_RECOVERY_FILE_DEST_SIZE DB_FLASHBACK_RETENTION_TARGET Commands: ALTER DATABASE FLASHBACK ON; ALTER DATABASE FLASHBACK OFF; ALTER TABLESPACE test1 FLASHBACK OFF; ALTER TABLESPACE test1 FLASHBACK ON; OUGF 2003
18
FlashBack Options Flashback Query:
exec dbms_flashback.enable_at_time(…); select * from table; exec dbms_flashback.disable; select * from table AS OF timestamp ‘…’; Flashback Table: FLASHBACK TABLE t1 TO SCN 12345; FLASHBACK TABLE t1 TO TIMESTAMP ' :05:00'; OUGF 2003
19
Flashback Row History Useful for auditing
SELECT versions_xid XID, versions_startscn START_SCN, versions_endscn END_SCN, versions_operation OPERATION, empname, salary FROM hr.employees_demo VERSIONS BETWEEN SCN MINVALUE AND MAXVALUE where empno = 111; XID START_SCN END_SCN OPERATION EMPNAME SALARY I Tom 927 D D Mike 555 E I Mike 555 3 rows selected Useful for auditing OUGF 2003
20
Flashback Transaction History
select xid, start_scn, commit_scn, operation, undo_sql, table_name from dba_transaction_query where xid = ’ D’; XID START_SCN COMMIT_SCN OPERATION UNDO_SQL D D insert into "SCOTT"."EMP" ("EMPNO","EMPNAME","SALARY") values ('111','Mike','655') D I delete from "SCOTT"."DEPT" where "DEPTNO" = '20' and "DEPTNAME" = 'Finance' D D update “SCOTT”.”EMP” set “SALARY” = ‘555’ where “EMPNO” = ‘111’ and ”EMPNAME” = ‘Mike’ and “SALARY” = ‘655’ 3 rows selected OUGF 2003
21
Table Recovery using Flashback
DROP TABLE X; Table is renamed, not dropped Indexes & other structures remain SELECT * FROM RECYCLEBIN; Systemwide recyclebin DBA_RECYCLEBIN Or show recyclebin command in sqlplus FLASHBACK TABLE RB$$3560$TABLE$1 TO BEFORE DROP RENAME TO scott.emp; PURGE RECYCLEBIN; DROP TABLE X PURGE; OUGF 2003
22
Performance Tuning RBO is dead, long live the CBO!
Even data dictionary, SYS tables under CBO Optimizer able to use run-time statistics exec dbms_stats.gather_system_statistics(…) OPTIMIZER_DYNAMIC_SAMPLING Multiple Advisors SQL Access & Tuning Advisor Memory Advisors (SGA, Shared Pool, etc..) Segment Advisor (Fragmentation, etc..) Undo Advisor OUGF 2003
23
Advisor Information DBA_ADVISOR_FINDINGS DBA_ADVISOR_RECOMMENDATIONS
DBA_ADVISOR_RATIONALE And many more… All the information is accessible through DBA_ and V$ data dictionary views The reasons and rationale behind recommendations can be seen OUGF 2003
24
Performance Troubleshooting
Automatic Workload Repository MMON background process flushes stats to disk V$SQL_BIND_CAPTURE Captures bind variables for all sessions Faster that sql_trace (10046 trace on level 4) Event, P1, P2, P3 columns in V$SESSION for quick diagnosis the same information that in V$SESSION_WAIT trcsess tool for gathering sessions SQL from in shared server environment OUGF 2003
25
Improved Timing and Statistics
Old methods V$SESSION_EVENT, V$SYSTEM_EVENT V$SYSSTAT, V$SESSTAT, V$FILESTAT, Contained cumulative information since startup New opportunities V$EVENTMETRIC, V$SESSMETRIC, V$SYSMETRIC, V$FILEMETRIC V$SYSMETRIC_HISTORY, V$SESSION_WAIT_HISTORY Contain same statistics, but sampled over interval, also history views OUGF 2003
26
SQLPLUS Changes Improvements SPOOL CREATE | REPLACE | APPEND
SHOW RECYCLE BIN SQLPROMPT runtime variable substitution glogin.sql and login.sql scripts are executed also on CONNECT Deimprovements No graphical sqlplusw.exe in Windows COPY command deprecated OUGF 2003
27
Other dbms_scheduler alter system flush buffer_cache; drop database;
calendar Expressions: Yearly, Monthly, Weekly, Daily, Hourly, Minutely, Secondely alter system flush buffer_cache; drop database; database must be closed mounted exclusively restricted default user tablespace like default temporary tablespace in 9i OUGF 2003
28
Conclusion Lot’s of new features = lot’s of new bugs
Automatic for small to medium systems Big & heavily loaded systems still need care OUGF 2003
29
Oracle 10g Database Engine New Features
Questions? integrid.info OUGF 2003
30
Oracle 10g Database Engine New Features Tanel Poder
Thank you! integrid.info OUGF 2003
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.