* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Oracle10g Changes in Initialization and Data Dictionary
Microsoft Access wikipedia , lookup
Entity–attribute–value model wikipedia , lookup
Concurrency control wikipedia , lookup
Ingres (database) wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Functional Database Model wikipedia , lookup
Open Database Connectivity wikipedia , lookup
Microsoft SQL Server wikipedia , lookup
Clusterpoint wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Relational model wikipedia , lookup
Database model wikipedia , lookup
Welcome to Oracle 10g Data Dictionary and Initialization Parameters Paper 520 Presentation by Ari Kaplan CEO, Expand Beyond Corporation www.xb.com 1 © 2003 Expand Beyond Corp. Confidential. Recipient may not © 2003 forward Expand without Beyond permission. Corp. Confidential. Recipient may not forward without permission. Agenda • • Server parameter file Summary – – – – • 10g Details – – – – – – – – • Server Manageability Database Self-Management Database Manual Monitoring / Management / Tuning Database Automatic Statistics Object Management Backup and Recovery High Availability Security Tips – – 2 New initialization parameters New static data dictionary views New dynamic data dictionary views New columns in existing data dictionary views ALTER SYSTEM Viewing undocumented parameters © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. The SPFILE • • • • 3 “Server Parameter” file Stored on server Binary, rather than text Can maintain dynamic changes to parameter values © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. The SPFILE • Example 1: CREATE SPFILE FROM PFILE=‘/u01/oracle/dbs/initPROD.ora’ • Example 2: CREATE SPFILE ‘/u01/oracle/dbs/spfilePROD.ora’ FROM PFILE=‘/u01/oracle/dbs/initPROD.ora’ • Must have SYSDBA or SYSOPER privileges SQLPLUS> SHOW PARAMETERS SPFILE /u01/oracle/dbs/spfilePROD.ora 4 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. The SPFILE • 9iR2 RMAN: BACKUP is used to back-up the SPFILE - RMAN backs up the SPFILE in the backup set If the SPFILE is lost / damaged, use RESTORE SPFILE: - Start the instance without the SPFILE - Run RESTORE SPFILE in RMAN 5 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. The SPFILE • *SPPARAMETER – contents of the SPFILE • *RMAN_CONFIGURATION - maintain the persistent configuration parameters for RMAN, the standard Oracle backup and recovery utility 6 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Initialization Parameter History • Oracle 10g – 27 new parameters – 10 marked “ISDEPRECATED” – 110 in V$OBSOLETE_PARAMETER • Oracle 9iR1 – 46 new parameters – 16 obsolete – 3 renamed • Oracle 8.1 – 28 new parameters – 62 obsolete • Oracle 8.0 – 75 new parameters – 26 obsolete 7 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. 10g Initialization Parameters • New V$PARAMETER columns – ISDEPRECATED (10 parameters are TRUE) • buffer_pool_keep drs_start • fast_start_io_target log_archive_start • max_enabled_roles parallel_server • parallel_server_instances buffer_pool_recycle global_context_pool_size parallel_automatic_tuning plsql_compiler_flags – ISINSTANCE_MODIFIABLE (144 TRUE, 112 FALSE): for clustered databases such as RAC, this shows if the parameter can be modified on global (TRUE) or local (FALSE) • Examples of FALSE: spfile, sessions, processes, sessions, dml_locks, utl_file_dir, … • Examples of TRUE: sga_target, cpu_count, shared_pool_size, log_archive_dest, undo_retention, statistics_level, … 8 – DISPLAY_VALUE: displays data slightly better in some cases. For example, db_cache_size’s VALUE=25165824 and DISPLAY_VALUE=24M db_recovery_file_dest_size’s VALUE=2147483648 and DISPLAY_VALUE=2G © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. 10g initialization parameters In 10g, the init parameters are broken into: – “BASIC”, with 29 parameters that should be modified for tuning – “ADVANCED” for the fine-tuning of databases and to keep us all employed. This is a nice reduction in the number of parameters. For example, shared server environments are handled by Oracle (SHARED_SERVERS init parameter, no longer the DISPATCHER init parameter) 9 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. 10g initialization parameters • “Basic” parameters: – – – – – – – – – – – – – 10 CLUSTER_DATABASE COMPATIBLE CONTROL_FILES DB_BLOCK_SIZE DB_CREATE_FILE_DEST DB_CREATE_ONLINE_LOG_DEST_n DB_DOMAIN DB_NAME DB_RECOVERY_FILE_DEST DB_RECOVERY_FILE_DEST_SIZE DB_UNIQUE_NAME INSTANCE_NUMBER JOB_QUEUE_PROCESSES – – – – – – – – – – – – – – – LOG_ARCHIVE_DEST_n LOG_ARCHIVE_DEST_STATE_n NLS_LANGUAGE, NLS_TERRITORY OPEN_CURSORS PGA_AGGREGATE_TARGET PROCESSES REMOTE_LISTENER REMOTE_LOGIN_PASSWORDFILE ROLLBACK_SEGMENTS SESSIONS SGA_TARGET SHARED_SERVERS STAR_TRANSFORMATION_ENABLED UNDO_MANAGEMENT UNDO_TABLESPACE © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. New 10g initialization parameters • New 10g parameters (to be discussed later): – – – – – – – – – – – – 11 asm_diskgroups asm_diskstring asm_power_limit create_stored_outlines db_flashback_retention_target db_recovery_file_dest db_recovery_file_dest_size db_unique_name ddl_wait_for_locks fileio_network_adapters gcs_server_processes instance_type – – – – – – – – – – – – – ldap_directory_access log_archive_config log_archive_local_first plsql_code_type plsql_debug plsql_optimize_level plsql_warnings resumable_timeout sga_target skip_unusable_indexes smtp_out_server sqltune_category streams_pool_size © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Static Data Dictionary History • Oracle 10g – 497 new static tables • 295 SYS • 202 non-SYS – 127 deprecated static tables • Oracle 9iR2 – • Oracle 9iR1 – – • 166 new static views 113 existing views with changed columns Oracle 8.0 – – 12 96 new static views 117 existing views with changed columns Oracle 8.1 – – • 64 new static views 119 new static views 72 existing views with changed columns © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. 10g Static Data Dictionary • Deprecated tables (from Oracle9iR2): - 46 AQ 22 ODM - 6 Census - 11 QA - 10 CWM2 - 10 LBAC - 6 SA • New tables (from Oracle9iR2): 13 295 SYS (OLAP, AQ, Streams, DIR, WRI / WRH, Rule_Set, Scheduler, …) 7 SYSTEM 7 DBSNMP 15 WMSYS 15 EXFSYS 3 ORDSYS 17 MDSYS 1 XDB 73 OLAPSYS 43 DMSYS 5 CTXSYS 12 WKSYS 12 WK_TEST © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Static Data Dictionary Views • All following views have USER_, ALL_ and DBA_ versions, unless otherwise noted 14 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Dynamic Data Dictionary History • Oracle 10g – 671 new dynamic SYS views – 275 new dynamic non-SYS views (OLAPSYS, ORDSYS, DMSYS, etc.) – 227 deprecated dynamic views • Oracle 9iR2 – 4 new v$views • Oracle 9iR1 – 69 new V$ views – 64 renamed V$ views • Oracle 8.1 – 84 new V$ views – 35 existing views with changed columns • Oracle 8.0 – 180 new V$ views – 20 existing views with changed columns 15 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. 10g Dynamic Data Dictionary • Deprecated views in Oracle 10g (from Oracle9iR2): - 101 EXU7 13 DBA_LBAC - 18 DBA_SA_ - 30 AQ$ - 18 ALL_SA_ • New SYS views in Oracle 10g (from Oracle9iR2): - - - 16 AQ$* views - 2 DATABASE_ - 173 DBA*_ - 27 DBA_ADVISOR_* - 15 DBA_SCHEDULER*_ - 22 EXU10* - 76 GV_$* - USER_ - 77 V_$* New non-SYS Views in Oracle 10g (from Oracle9iR2): - 16 6 ALL_* views 6 DATAPUMP_ 64 DBA_HIST_* 7 DBA_STREAMS*_ 97 KU$_* 91 OLAPSYS 5 ORDSYS 71 DMSYS - 42 WMSYS - 9 MDSYS - 7 CTXSYS - 32 EXFSYS - 6 WK_TEST - 12 WKSYS © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Dynamic views • V$ and GV$ • Can extract individual node from GV$ view 17 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. • • • • • • Server Manageability 10g provides for easier installation, configuration, management (and dropping!) of databases. Much improved Oracle Enterprise Manager Automatically configure RAC clustered environments Automatic Storage Management (this was part of Oracle 9i, but there are additional improvements in 10g): new volume manager for Oracle-based files. Oracle attempts to optimally create and distribute datafiles, log files, and controlfiles. Mirroring and available disks are taken into consideration, and Oracle can redistribute the files for balancing if there are I/O bottlenecks. Transparent gateway: use SELECT to refer to remote functions in non-Oracle databases. 10g Initialization Parameters: – instance_type 18 Description from V$PARAMETER type of instance to be executed Default Value rdbms Notes Two values: RDBMS for a database instance, ASM for an Automatic Storage instance Example ASM © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Server Manageability • 10g Initialization Parameters: – asm_diskgroups Description from V$PARAMETER disk groups to mount automatically Default Value {null} Notes List of disk groups for the ASM to mount at STARTUP or “ALTER_DISKGROUP ALL MOUNT”. Oracle dynamically modifies this parameter when disk groups are mounted/dismounted Example Group1, Group2 – asm_diskstring 19 Description from V$PARAMETER disk set locations for discovery Default Value {null} Notes Oracle uses this parameter to perform automatic discoveries for which disks are available. The instance needs read/write access to the directory to be considered. Example /dev1, /dev2 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Server Manageability • 10g Initialization Parameters: – asm_power_limit Description from V$PARAMETER number of processes for disk rebalancing Default Value 1 Notes ASM power for automatic disk rebalancing. This is on a scale of 1 to 11. 1 takes longer but consumes fewer CPU and i/o resources. 11 is faster but consumes more CPU and i/o. Example 5 – fileio_network_adapters 20 Description from V$PARAMETER Network Adapters for File I/O Default Value {null} Notes Lists the addresses of network adapters to access disks. Useful for NAS (network attached storage). Example otn1.oracle.com, adapt2.ebay.com, … © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Database Self-Management • Automatic Workload Repository: a set of tables that is a repository of workload statistics, enabling Oracle 10G to self-manage. Querying against this repository is a wealth of information, analogous to the BSTAT/ESTAT and tracing options for tuning in Oracle 9. Stored in a separate repository database with OEM. • 10g Views: New columns: – V$AW_CALC (SESSION_ID, CURR_DML_COMMAND, PREV_DML_COMMAND, AGGR_FUNC_LOGICAL_NA, AGGR_FUNC_LOGICAL_NA, AGGR_FUNC_PRECOMPUTE, AGGR_FUNC_CALCS) – V$AW_SESSION_INFO: new columns (SESSION_ID) • Automatic Storage Management: (previously described) • Automatic Database Diagnostic Monitor: Oracle 10G self-analyzes its performance, looks for bottlenecks, and can automatically adjust database configuration. 21 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Database Self-Management • Automatic UNDO RETENTION tuning: Oracle 10G can dynamically adjust the init parameter UNDO_RETENTION, which looks at the space in the UNDO tablespaces and automatically adjusts as new SQL queries are executed. This helps to avoid the “snapshot too old” errors. • 10g Views: – V$UNDOSTAT: new columns • • • • • MAXQUERYID ACTIVEBLKS UNEXPIREDBLKS EXPIREDBLKS TUNED_UNDORETENTION • Automatic Checkpoint tuning: Oracle 10G self-tunes checkpoint frequencies to optimize recovery time. 22 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Database Self-Management • Users can now have more than one TEMP tablespace defined with a “tablespace group”, so creating large objects such as indexes or running large GROUP BY or DISTINCT queries can spill into additional TEMP tablespaces without failing as in Oracle 9 and earlier versions. • • SGA: 10g Initialization Parameter: – sga_target Description from V$PARAMETER Target size of SGA Default Value 0 Notes Total size of DB_CACHE_SIZE, SHARED_POOL_SIZE, LARGE_POOL_SIZE, and JAVA_POOL_SIZE. Oracle’s ASM (Automatic Shared Memory) automatically and dynamically adjusts the SGA components during runtime. Additional pools are not affected: log buffer, KEEP/RECYCLE buffer cache, and Oracle Streams pool. Example • Cache: 500M • 10g View: V$DB_CACHE_ADVICE new columns: • • 23 ESTD_PHYSICAL_READ_TIME ESTD_PCT_OF_DB_TIME_FOR_READS © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Database Manual Monitoring / Management / Tuning • • • SGA: Fixed SGA Size, Redo Buffers, Buffer Cache Size, Shared Pool Size, Large Pool Size, Java Pool Size, Granule Size, Maximum SGA Size, Free SGA Memory Available 10g Initialization Parameters: – BUFFER_CACHE and SHARED_POOL_SIZE are now self-tuning – JAVA_POOL_SIZE is now dynamic • 10g Initialization Parameter: – STREAMS_POOL_SIZE 24 Description from V$PARAMETER size in bytes of the streams pool Default Value 0 Notes Size of the Streams pool in the SGA. By default this is 10% of the shared pool. Example 500M © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Database Manual Monitoring / Management / Tuning • • SGA: 10g Views: – New V$SGAINFO ; more high-level than V$SGASTAT Name Null? Type ---------------------------------- -------- --------------------------INST_ID NUMBER NAME VARCHAR2(25) BYTES NUMBER RESIZEABLE VARCHAR2(3) – V$SGA_DYNAMIC_COMPONENTS: new column: • USER_SPECIFIED_SIZE – V$SHARED_POOL_ADVICE: new columns: • ESTD_LC_LOAD_TIME • ESTD_LC_LOAD_TIME_FACTOR 25 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Database Manual Monitoring / Management / Tuning • • Sessions: 10g Views: V$SESSION: new columns: – – – – – – – – – – – – – – – – – – – – – – – – – 26 SQL_ID SQL_CHILD_NUMBER PREV_SQL_ID PREV_CHILD_NUMBER BLOCKING_SESSION_STATUS BLOCKING_SESSION SEQ# EVENT# EVENT P1TEXT P1 P1RAW P2TEXT P2 P2TAW P3TEXT P3 P3RAW WAIT_CLASS_ID WAIT_CLASS# WAIT_CLASS WAIT_TIME SECONDS_IN_WAIT STATE SERVICE_NAME © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Database Manual Monitoring / Management / Tuning • • Sessions: V$SESSION_EVENT: new column: – EVENT_ID • V$SESSION_LONGOPS: new column: – SQL_ID • V$SESSION_WAIT: new columns: – WAIT_CLASS_ID – WAIT_CLASS# – WAIT_CLASS 27 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Database Manual Monitoring / Management / Tuning • • • WAIT statistics: 10g now stores historical repository of waits, and includes better analysis capabilities to see what sessions are waiting for. 10g Views: new column (HASH) in: – – – – • • • V$LATCH V$LATCH_CHILDREN V$LATCH_PARENT V$LATCHNAME Tablespace: Rename Tablespace: before Oracle 10G, the DBA would need to create a new tablespace, copy (or export/import data) into the new tablespace, and drop the original tablespace. Now you can simply RENAME the tablespace extremely quickly. 10g Views: – DBA_TABLESPACES: new columns: • • – V$TABLESPACE: new columns: • • 28 RETENTION BIGFILE BIGFILE FLASHBACK_ON © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Database Manual Monitoring / Management / Tuning • • • Database: 10g Views: V$DATABASE: new columns: – – – – – – – – – – – • V$DATABASE_INCARNATION: new columns: – – – – 29 SWITCHOVER# PLATFORM_ID PLATFORM_NAME RECOVERY_TARGET_INCARNATION LAST_OPEN_INCARNATION# CURRENT_SCN FLASHNACK_ON SUPPLEMENTAL_LOG_DATA_FK SUPPLEMENTAL_LOG_DATA_ALL DB_UNIQUE_NAME STANDBY_BECAME_PRIMARY_SCN INCARNATION# STATUS RESETLOGS_ID PRIOR_INCARNATION © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Database Manual Monitoring / Management / Tuning • • • SQL Tuning: 10g Views: V$SQL: new columns: – – – – – • SQL_ID PLAN_HASH_VALUE SQL_ID OBJECT_TYPE QBLOCK_NAME PLAN_HASH_VALUE PROJECTION REMARKS OBJECT_ALIAS TIME SQL_ID ANYDATA_TRANSFORMATION DIFFERENT_LONG_LENGTH BIND_UACS_DIFF CHILD_ADDRESS INCOMPLETE_CURSOR LOGICAL_STANDBY_APPLY PLSQL_CMP_SWITCHS_DIFF CHILD_NUMBER TOP_LEVEL_RPI_CURSOR DIFF_CALL_DURN SQL_FULLTEXT SQL_ID V$SQLAREA: new columns: – – – – 30 OBJECT_ALIAS TIME V$SQL_SHARED_MEMORY: new columns: – • PLAN_HASH_VALUE PROJECTION REMARKS V$SQL_SHARED_CURSOR: new columns: – – – – • SQL_ID OBJECT_TYPE QBLOCK_NAME V$SQL_PLAN_STATISTICS_ALL: new columns: – – – • END_OF_FETCH_COUNT CONCURRENCY_WAIT_TIME JAVA_EXEC_TIME OLD_HASH_VALUE PROGRAM_LINE# V$SQL_PLAN_STATISTICS: new columns: – • SQL_ID APPLICATION_WAIT_TIME PLSQL_EXEC_TIME OPTIMIZER_ENV_HASH_VALUE PROGRAM_ID V$SQL_PLAN: new columns: – – – • SQL_FULLTEXT DIRECT_WRITES USER_IO_WAIT_TIME OPTIMIZER_ENV SQL_PROFILE SQL_ID APPLICATION_WAIT_TIME USER_IO_WAIT_TIME OLD_HASH_VALUE END_OF_FETCH_COUNT CONCURRENCY_WAIT_TIME PLSQL_EXEC_TIME PROGRAM_ID © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. DIRECT_WRITES CLUSTER_WAIT_TIME JAVA_EXEC_TIME Database Manual Monitoring / Management / Tuning • • SQL Tuning: 10g Initialization Parameter: – create_stored_outlines Description from V$PARAMETER create stored outlines for DML statements Default Value {null} Notes Tells Oracle if SQL queries automatically create outlines. TRUE creates outlines, FALSE disables the features, and setting to {category_name} stores the outlines linked to the specified category. Example FALSE – ddl_wait_for_locks 31 Description from V$PARAMETER Disable NOWAIT DML lock acquisitions Default Value FALSE Notes TRUE – DDL statements wait to complete if there are blocking locks on the object. FALSE – DDL statements time-out if there are blocking locks Example TRUE © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Database Manual Monitoring / Management / Tuning • • SQL Tuning: 10g Initialization Parameter: – resumable_timeout Description from V$PARAMETER set resumable_timeout Default Value 0 Notes Time (in seconds) SQL statements are allowed to wait before timing out. Example 20000 – sqltune_category Description from V$PARAMETER Category qualifier for applying hintsets Default Value DEFAULT Notes Used with the DBMS_SQLTUNE package to connect SQL profiles for SQL statements with tuning categories Example 32 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Database Manual Monitoring / Management / Tuning • • PL/SQL Tuning: 10g Initialization Parameter: – plsql_code_type Description from V$PARAMETER PL/SQL code-type Default Value INTERPRETED Notes Tells Oracle how PL/SQL is compiled within the database. Two values: INTERPRETED: compiles PL/SQL into bytecode NATIVE: compiles PL/SQL into native (machine) code Example NATIVE – plsql_debug 33 Description from V$PARAMETER PL/SQL debug Default Value FALSE Notes Tells Oracle if PL/SQL can be compiled for debugging purposes. Two values: TRUE: PL/SQL will be compiled in debugging mode. Note that this overrides the plsql_code_type parameter to always be INTERPRETED FALSE: PL/SQL is compiled without debugging Example TRUE © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Database Manual Monitoring / Management / Tuning • • PL/SQL Tuning: 10g Initialization Parameter: – plsql_optimize_level Description from V$PARAMETER PL/SQL optimize level Default Value 0 Notes PL/SQL optimization levels during compilation. This can result in improved compiled code. Three values: 0: compile similar to Oracle9i’s compilation 1: applies several optimization algorithms for PL/SQL compilation 2: applies the most advanced optimization Example 2 – plsql_warnings 34 Description from V$PARAMETER PL/SQL compiler warnings settings Default Value DISABLE:ALL Notes Tells Oracle how much detail, if any, to display with warning messages during PL/SQL compilation. Qualifier values: Example ERROR SEVERE © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Database Automatic Statistics • • Automatic Optimizer Statistics Collection: collects statistics for objects that are either stale or don’t have them at all. 10g Initialization Parameter: – Statistics_level: default is TYPICAL, and the other option is BASIC. The SMON process wakes up every 2-3 hours, reviews the number of rows affected by INSERT / UPDATE / DELETE commands since the last statistics gathering. This process replaces the old DBMS_STATS built-in package. • 10g Views: – • Database Advisors: – – – – – 35 *_TAB_MODIFICATIONS: determines which tables have stale statistics and which should be updated via the SMON background process. Oracle tracks usage more than Tivo. The DBA can collect data on what Oracle functions are being used (Parallel Queries, IOTs, etc) for information and tracking. Segment Advisor: Stores data on object growth trends and helps make DBAs with capacity planning. The Segment Advisor also looks within tables to see if any should be defragmented. This new online defragmentation includes reducing the highwater mark from empty blocks, or if data is out of whack with PCTUSED / PCTFREE, tables can be rebuilt online to compact data. Redo Log Sizing Advisor: self-explanatory SQL Tuning Advisor, SQL Access Advisor: makes suggestions for improving the syntax of SQL statements, the way some 3rd-party vendors did prior to Oracle 10G. Also recommends adding indexes, materialized views, etc. Transaction Rollback and Recovery Monitoring: predict how long a rollback will take, monitor longrunning transactions being recovered for performance. © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. • Object Management Tablespaces: New SYSAUX tablespace is for system auxiliary objects. Now you do not need to put everything into • the SYSTEM tablespace. Object Types:New “Sorted Hash Cluster” object type. Useful to retrieve data in the exact order it was INSERTed • Tables: – DBA_TABLES: • • – – – – • DBA_TAB_COLS: new columns (HISTOGRAM, QUALIFIED_COL_NAME) DBA_TAB_COLUMNS: new column (HISTOGRAM) DBA_TAB_COL_STATISTICS: new column (HISTOGRAM) DBA_TAB_MODIFICATIONS: new column (DROP_SEGMENTS) Indexes: – • MAXTRANS deprecated. New columns COMPRESSION (DISABLED, ENABLED, null) and DROPPED (YES, NO) DBA_INDEXES new columns (IOT_REDUNDANT_PKEY_ELIM, DROPPED) 10g Initialization Parameter: – skip_unusable_indexes 36 Description from V$PARAMETER skip unusable indexes if set to TRUE Default Value TRUE Notes Two values: TRUE: skips error reporting on indexes and index partitions and allows for DML on base tables with UNUSABLE indexes. FALSE: tells Oracle to return an error when DML on base tables with UNUSABLE indexes occurs. Example FALSE © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. • LOBs: – – • DBA_LOG_GROUPS: new columns (TABLESPACE_NAME, FORMAT, PARTITIONED) V$TEMPORARY_LOBS: new column (ABSTRACT_LOBS) Log Groups: – • Object Management DBA_LOG_GROUPS: new columns (LOG_GROUP_TYPE, GENERATED) Materialized Views: – DBA_MVIEWS: new columns (UNKNOWN_TRUSTED_FD, STALE_SINCE) • 37 Online Segment Shrink: This new online defragmentation includes reducing the highwater mark from empty blocks, or if data is out of whack with PCTUSED / PCTFREE, tables can be rebuilt online to compact data. This is possible with tables, indexes, and materialized views. © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Backup and Recovery • • 10g has new automated disk-based backup & recovery features. New / improved commands: – – – – • 10g Views: – – – – – – 38 DROP DATABASE command: physically deletes all datafiles, spfiles, controlfiles, redo logs ALTER DATABASE OPEN RESETLOGS: no longer need to backup the database instance following this command ALTER DATABASE BEGIN BACKUP: No longer need to cycle through each tablespace to put into hot backup mode. Can now do the entire database Automatic TSPITR (tablespace point-in-time recovery) V$ARCHIVE_DEST: new columns (VALID_NOW, VALID_TYPE, VALID_ROLE, DB_UNIQUE_NAME, VERIFY, EXPEDITE) V$ARCHIVE_DEST_STATUS: new columns (DB_UNIQUE_NAME) V$ARCHIVED_LOG (RESETLOGS_ID, IS_RECOVERY_DEST_FILE, FAL) V$FAST_START_SERVERS: new column (XID) V$FAST_START_TRANSACTIONS: new columns (XIS, PXID, RCVSERVERS) V$INSTANCE_RECOVERY: new columns (OPTIMAL_LOGFILE_SIZE, ESTD_CLUSTER_AVAILABLE_TIME, WRITES_MTTR, WRITES_LOGFILE_SIZE, WRITES_LOG_CHECKPOINT_SETTINGS, WRITES_OTHER_SETTINGS, WRITES_AUTOTUNE, WRITES_FULL_THREAD_CKPT) © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Backup and Recovery • 10g Initialization Parameters: – db_flashback_retention_target Description from V$PARAMETER Maximum Flashback Database log retention time in minutes. Default Value 1440 Notes The upper limit for time (in minutes) that the database should retain data for flashing back information. Example 2000 – db_recovery_file_dest Description from V$PARAMETER default database recovery file location Default Value /usr/db/flash_recovery_area Notes This is the “flash recovery” directory or disk group. The “flash recovery” directory contains copies of controlfiles, redo logs, archived redo logs, flashback logs, and RMAN backup files. Example /u01/oracle/recov 39 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Backup and Recovery • 10g Initialization Parameters: – db_recovery_file_dest_size 40 Description from V$PARAMETER database recovery files size limit Default Value 2G Notes The upper limit in size for the “flash recovery” directory. Example 4G © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Backup and Recovery • RMAN: • 10g can automatically create and recover datafiles that have never been backed up. Also when RMAN detects a corrupt backup it can automatically go one backup into the past to recover. The DURATION clause of the BACKUP command sets the seconds that a backup is allowed to run, at which point RMAN can pause and/or resume. Can alert the DBA when the backup is about to run out of space. 10g Views: • • • – – – – – – 41 V$DATAFILE_COPY: new columns (IS_RECOVERY_DEST_FILE, RMAN_STATUS_RECID, RMAN_STATUS_STAMP) V$BACKUP_PIECE: new columns (BYTES, IS_RECOVERY_DEST_FILE, RMAN_STATUS_RECID, RMAN_STATUS_STAMP, COMPRESSED) V$BACKUP_SINC_ID: new columns (RMAN_STATUS_RECID, RMAN_STATUS_STAMP) V$DATAFILE_COPY: new columns (IS_RECOVERY_DEST_FILE, RMAN_STATUS_RECID, RMAN_STATUS_STAMP) V$PROXY_ARCHIVELOG: new columns (TAG, RMAN_STATUS_RECID, RMAN_STATUS_STAMP) V$PROXY_DATAFILE: new columns (RMAN_STATUS_RECID, RMAN_STATUS_STAMP) © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Backup and Recovery 42 • • Flashback Query Improvements: • • FLASHBACK DATABASE: entire database restored to a point-in-time FLASHBACK TABLE command: entire table restored to a point-in-time. Oracle now puts dropped tables into the “recycle bin” for quick and easy recovery. In SQL*Plus you can type “SHOW RECYCLEBIN bin_name” • • • Flashback drop: restore a table that was dropped entirely Flashback version query: view data at the row-level and the history of changes Flashback transaction query: view data and changes on a transaction-level for more finely-grained auditing and investigating. • • 10g Views: New FLASHBACK_TRANSACTION_QUERY: view database transaction-level changes 10g Initialization Parameters: db_flashback_retention_target, db_recovery_file_dest, db_recovery_file_dest_size (previously explained) Can recover an entire database to an earlier point-in-time, reducing or removing the need to use the traditional tape backup and recovery methods. © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Backup and Recovery • • • LogMiner Improvements: 10g’s log miner now supports index-organized tables, LONG datatypes, multibyte data 10g Views: – V$LOGMNR_CONTENTS: new columns (TABLE_NAME, DATA_OBJV#, SAFE_RESUME_SCN, XID, PXID, AUDIT_SESSIONID) – V$LOGMNR_DICTIONARY: new columns (DB_CREATED, DB_VERSION_TIME, DB_CHARACTER_SET, DB_VERSION, DB_STATUS, DB_TXN_SCN) – V$LOGMNR_LOGS: new columns (TYPE, BLOCKSIZE, FILESIZE) – V$LOGMNR_PARAMETERS: new columns (REQUIRED_START_DATE, REQUIRED_START_SCN, OPTIONS) 43 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. High Availability • Data Guard: 10g Initialization Parameters: – db_unique_name Description from V$PARAMETER Database Unique Name Default Value {ORACLE_SID} Notes Helpful for Data Guard, DB_UNIQUE_NAME is the global unique database name. This differentiates different databases with the same DB_NAME and the same DB_DOMAIN Example ORAPROD – log_archive_config Description from V$PARAMETER log archive config parameter Default Value ‘SEND, RECEIVE, NODG_CONFIG’ Notes Tells Oracle information on how to send redo logs to remote destinations in Data Guard environments. SEND/NOSEND (send the redo logs to remote destinations or not) RECEIVE/NORECEIVE (receive redo logs from remote destinations or not) DG-CONFIG/NODG_CONFIG (list of unique database names in the Data Guard configuration. 0-9 unique names are allowed) Example 44 NOSEND NORECEIVE DG_CONFIG=ORA_PROD © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. High Availability • • Data Guard: 10g Initialization Parameters: – log_archive_local_first 45 Description from V$PARAMETER Establish EXPEDITE attribute default value Default Value TRUE Notes For Data Guard configurations: TRUE: uses the ARC background processes to send redo logs to remote destinations once an online log is archived. Good for slow WAN networks. FALSE: uses the ARC background processes to send logs to remote destinations simultaneously to the local archive copying. Good for fast LAN environments. Example FALSE © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. High Availability • • • • • • RAC (Real Application Clusters): As part of the new Enterprise Manager, Oracle now provides clusterware management software similar to the 3rd-party software available prior to Oracle 10G. It provides a nice dashboard of overall node statuses with drilldown capabilities. Automatic Workload Management: DBAs create workloads and then manage CPU resources for each process. Zero Downtime Patching: by using RAC, you can apply patches (database or server) to one node at a time to avoid downtime. Upgrade Oracle versions “online” with the Rolling Upgrade. Uses logical standby databases and SQL apply technology New RAC 10g Views: – • DB_UNIQUE_NAME: can dynamically add a standby database without shutting down the primary database. 10g Initialization Parameter: gcs_server_processes Description from V$PARAMETER 46 Default Value 0 (if CLUSTER_DATABASE=FALSE) 2 (if CLUSTER_DATABASE=TRUE) Notes For RAC, specifies the initial number of server processes. This is part of the Global Cache Services (cache fusion) Example 20 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Security • Kerberos: SASL in addition to PKI. Supports Simple Authentication and Security Layer in addition to • • • Fine-grained auditing: Fine-grained auditing now includes UPDATE, INSERT, DELETE Public Key Infrastructure. Used while communicating among databases. Can also use Kerberos-enabled database links to protect data as it is transmitted. 10g Views: New columns in: – • • Auditing: 10g Views: New columns in: – – – • • DBA_AUDIT_EXISTS, DBA_AUDIT_OBJECT, DBA_AUDIT_STATEMENT, DBA_AUDIT_TRAIL (EXTENDED_TIMESTAMP, PROXY_SESSIONID, GLOBAL_UID, INSTANCE_NUMBER, OS_PROCESS, TRANSACTIONID, SCN, SQL_BIND, SQL_TEXT) DBA_AUDIT_POLICIES (SEL, INS, UPD, DEL, AUDIT_TRAIL, POLICY_COLUMN_OPTIONS) DBA_AUDIT_SESSION (EXTENDED_TIMESTAMP, PROXY_SESSIONID, GLOBAL_UID, INSTANCE_NUMBER, OS_PROCESS) EUS: Enterprise User Security. Single sign-on capabilities. A central OID/LDAP repository. Can manage Oracle Label Security policies and user label authorities. 10g Views: New columns in: – 47 DBA_FGA_AUDIT_TRAIL (STATEMENT_TYPE, EXTENDED_TIMESTAMP, PROXY_SESSIONID, GLOBAL_UID, INSTANCE_NUMBER) DBA_POLICIES: (IDX, POLICY_TYPE, LONG_PREDICATE) © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Security • • VPD (Virtual Private Database): supports parallel query operations. 10g Views: New columns in: – V$VPD_POLICY (SQL_ID) • 10g Initialization Parameter: – ldap_directory_access Description from V$PARAMETER RDBMS's LDAP access option Default Value NONE Notes Three values that determines if / how Oracle authenticates to the Internet Directory: This is for enterprise security. NONE: Oracle doesn’t authenticate at all PASSWORD: connect with the password stored in the database “wallet” SSL: connect with SSL Example SSL 48 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Tips 49 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. ALTER SYSTEM The ALTER SYSTEM command can improve uptime SELECT NAME, VALUE FROM v$parameter WHERE issys_modifiable IN (’DEFERRED’, ‘IMMEDIATE’); ALTER SYSTEM SET max_dump_file_size = 100000; • Oracle9/8i updates for this command • Change the initSID.ora file (unless using SPFile) 50 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. ALTER SYSTEM SELECT NAME, VALUE FFROM v$parameter WHERE issys_modifiable IN (’DEFERRED’,‘IMMEDIATE); NAME Timed_statistics Log_checkpoint_interval Log_checkpoint_timeout Object_cache_optimal_size Background_dump_dest Sort_area_size 51 VALUE False 5000000 21600 102400 /u02/oracle/PHIS/bdump 5096000 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. ISSAYS MOD IMMEDIATE IMMEDIATE IMMEDIATE DEFERRED IMMEDIATE DEFERRED Undocumented Parameters • Each undocumented parameter begins with an underscore • Examples: – _offline_rollback_segments – _corrupted_rollback_segments – _allow_reset_logs_corruption • They should only be used under the direction of a senior DBA or Oracle support. 52 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Undocumented Parameters “Hidden” INIT.ORA: X$KSPPI and X$KSPPSV X$KSPPI X$KSPPSV Name Type Name Type ----------------------------- ---------------------------------------- ----------------------- --------------------------------- ADDR RAW(4) INDX NUMBER INDX NUMBER INST_ID NUMBER INST_ID NUMBER KSPPINM VARCHAR2(64)KSPPSTVL KSPPITY NUMBER KSPPDESC VARCHAR2(64)KSPPSTVF KSPPIFLG NUMBER 53 ADDR RAW(4) VARCHAR2(512) KSPPSTDF VARCHAR2(9) NUMBER © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Undocumented Parameters To see the hidden init.ora parameters and session/instance values: SELECT a.ksppinm "Parameter", a.ksppdesc "Description", b.ksppstvl "Session Value", c.ksppstvl "Instance Value" FROM x$ksppi a, x$ksppcv b, x$ksppsv c WHERE a.indx = b.indx AND a.indx = c.indx AND a.ksppinm LIKE '/_%' escape '/' 54 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Undocumented Parameters To see all init.ora parameters, “regular” and “hidden”, that have been modified directly or indirectly, issue: SQL> SELECT nam.ksppinm || '=' || val.ksppstvl 2 FROM x$ksppi nam, x$ksppsv val 3 WHERE nam.indx = val.indx AND 4 val.ksppstdf ='FALSE’ ORDER BY 1; NAM.KSPPINM||’=’||VAL.KSPPSTVL ------------------------- ------------------------- -------partition_view_enabled=FALSE _affinity_on=FALSE _wait_for_sync=TRUE compatible=8.0.0 55 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Database Resources Oracle Discussion Newsgroups: comp.databases.oracle.server comp.databases.oracle.tools comp.databases.oracle.misc These can be accessed through a newsgroup program or “www.deja.com” Subscribe to LazyDBA: email to oracledba-subscribe@lazydba.com Subscribe to ORACLE-L: email to ListGuru@fatcity.com, in body enter “SUBSCRIBE ORACLE-L your_name_here” 56 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Database Resources Other good Oracle sites with links: www.arikaplan.com : 400 tips ; this presentation www.ioug.org www.orafaq.org www.orafans.com www.orasearch.com www.revealnet.com www.lazydba.com www.dbdomain.com 57 © 2003 Expand Beyond Corp. Confidential. Recipient may not forward without permission. Questions and Answers: Welcome to Oracle 10g Data Dictionary and Initialization Parameters Paper 520 Presentation by Ari Kaplan CEO, Expand Beyond Corporation www.xb.com 58 © 2003 Expand Beyond Corp. Confidential. Recipient may not © 2003 forward Expand without Beyond permission. Corp. Confidential. Recipient may not forward without permission.