Oracle 11g New Features For Administrators - Summary Sheets

Transcription

Oracle 11g New Features for AdministratorsSummary SheetsVersion 2.3Editor: Ahmed BarakaPage 1Oracle 11g New Features for Administrators - Summary Sheets

Usage Terms Anyone is can copy this document to any means of storage and present it in any format to any individualor organization for non-commercial purpose free. No individual or organization may use this document for commercial purpose without a written permissionfrom the editor. There is no warranty of any type for the code or information presented in this document. The editor is notresponsible for any loses or damage resulted from using the information or executing the code in thisdocument. If any one wishes to correct a statement or a typing error or add a new piece of information, please sendan email message to info@ahmedbaraka.comVersion HistoryVersionDateUpdates1.023-Mar-2008Initial document.1.129-Apr-2008- Mapping exam objectives to the document topics- Fixing caught bugs in the code examples.- Fixing caught errata and mistakes in some statements.- Adding new topics.1.1512-Sep-2008- Further explanation on using the new PIVOT operator.- Adding minor details in some sections.1.210-Oct-2008- Adding the section "Adaptive Cursor Sharing"- Adding minor details in some sections.- Fixing caught errata and mistakes in some statements.1.301-Mar-2010- Adding minor details in some sections.2.023-Dec-2010- Adding Oracle 11g Release 2 New Features- Removing the statement "that virtual column cannot be a part of partitioning keycolumn". Thanks to Arshad Taqvi.2.122-Jan-20102.23-Feb-2010- Removing the information about FIXED DATE parameter as it is not a new feature.Thanks to Bhalla Ravinder.Fixing the following statements:- CONNECT role has only CREATE SESSION privilege: this starts from 10g R2.- "Restoring Previous Versions of Statistics" is a 10g feature. It was not removedthough to maintain the informative value of the document.Thanks to Bhalla Ravinder.2.311-Jun-2012- info about DBMS HPROF added- Correction made: Difference between PLS INTEGER and SIMPLE INTEGERcorrected. Thanks to Saurabh Gupta.- Correction made: Results of the flashback queries are not cached in Server ResultCache. Thanks to Mark J. Cippel.- Correction made: slight correction in the code demonstrating SubprogramInlining. Thanks for Ibrahim.Document PurposeThis document aims at briefly explaining Oracle Database 11g New Features with concentration on the practicalcode. It discusses new features related to database administration and application development. The document isedited so that it concentrates on the following: Brief description of the concepts. This includes:o New terms and definitions.o Significant advantages and/or disadvantagesPage 2Oracle 11g New Features for Administrators - Summary Sheets

o Concept limitations and precautions Code examplesOn the other hand, the document avoids the following: Detailed explanation of the concepts Details of using Oracle Grid Control in implementing the concepts.What is not covered?The document discussed new features in Oracle 11g in only the topics as stated in the contents section. Newfeatures introduced in other areas are not covered. To mention some of them, this document does not cover thenew features in the following areas: Oracle Streams Data Guard Oracle RAC Oracle XML DBPrerequisiteTo be able to get advantage of reading this document, you must have solid knowledge on Oracle database 10gadministration.Terms and Acronyms UsedFollowing are list of the terms and acronyms used in this document:Term / AcronymMeaningOracle 11gWhenever Oracle 11g is mentioned in this document, it is meant to be Oracle Database11g.ADRAutomatic Diagnostic RepositoryOracle Grid ControlOracle Grid Control, Database Control or Oracle Enterprise Manager (OEM) are usedinterchangeably in this document.Conventions in the DocumentWhen you are asked to click on several links in the Enterprise Manager, the term "follow the links" is used. Forexample, consider the following statement:To manage created SQL patches, follow the links Database Home page Server tab Query Optimizersection SQL Plan Control SQL Patch tabThis statement means, in the Database Home page you click Server tab where you will see Query Optimizersection. Then you click on SQL Plan Control and then on the SQL Patch tab.ResourcesS/NResource TypeResource Name1BookOracle Database 11g New Features for DBAs and Developers, by Sam R. Alapatiand Charles Kim, Apress, ISBN: 978-1-59059-910-52BookOracle Database 11g New Features by Rober G. Freeman, Oracle Press3Oracle OfficialDocumentation Oracle Database New Features Guide 11g Release 2 (11.2) E17128-03 Oracle Database New Features Guide 11g Release 1 (11.1) B28279-02 Oracle Database Administrator's Guide 11g Release 1 (11.1) B28310-03 Oracle Database Performance Tuning Guide 11g Release 1 (11.1) B28274-01Page 3Oracle 11g New Features for Administrators - Summary Sheets

Oracle Database Backup and Recovery User's Guide 11g Release 1 (11.1)B28270-02 Oracle Database PL/SQL Packages and Types Reference 11g Release 1 (11.1.)B28419-02 Oracle Database High Availability Overview 11g Release 1 (11.1) B28281-01 Oracle Database Storage Administrator's Guide 11g Release 1 (11.1) B31107-03 Oracle Database PL/SQL Language Reference 11g Release 1 (11.1) B28370-02 Oracle Database VLDB and Partitioning Guide 11g Release 1 (11.1) B32024-01 Oracle Database SecureFiles and Large Objects Developer's Guide 11g Release 1(11.1) B28393-024Oracle MetalinkThe following documents were referenced: Note:453487.1Title: 11g New Features : Top 5 Features In 11g Note:454631.1Title: 11g DBCA New features / Enhancements Note:445116.1Title: Using the workload capture and replay in 11G Note:470199.1Title: 11g feature: Flashback Data Archive Guide Note:444149.1Title: New Background Processes In 11g Note:432776.1 11g New Feature : Transparent Data Encryption at TablespaceLevel5Web Sitewww.oracle-base.com6Web Sitewww.psoug.org7Web Sitewww.orafaq.com8Web Sitehttp://technology.amis.nl9Web ot-operator10Web Sitehttp://www.fadalti.com/oracle/database/oracle database 11g new features.htm11Articles by log Sitehttp://bar-solutions.com/wordpress/13Blog Sitehttp://virag.sharma.googlepages.com/11g14Blog Sitehttp://viveklsharma.blogspot.com15Blog Sitehttp://antognini.ch/blogPage 4Oracle 11g New Features for Administrators - Summary Sheets

ContentsInstallation, Database Upgrades and Change Management9Installation New Features Support 9Role and Privilege Changes 9Deprecated Components 10New Initialization Parameters Affecting Database Creation 10DBCA Enhancements 11Upgrading to Oracle Database 11g 11Database Replay 13The SQL Performance Analyzer 17Patching in Oracle Database Control 21Database Diagnosis and Repair 22Introducing Automatic Diagnostic Repository (ADR) 22Configuring the ADR 22Using adrci Tool 22Using The Support Workbench in the OEM 24Database Health Monitor 25Data Recovery Advisor 26SQL Test Case Builder 27Data Block Corruption Parameters 28Database Administration 29Automatic Memory Management 29Automatic Maintenance Tasks 30Oracle Flashback-Related New Features 32LogMiner Interface in Oracle Enterprise Manager 32Oracle Flashback Transaction Backout 32Flashback Data Archive 33Virtual Columns 35New Data Partitioning Schemes 36DDL Lock Timeout 36Explicit Locking of Tables 36Invisible Indexes 36Read-Only Tables 37Deferred Segment Creation 37Shrinking Temporary Tablespaces and Tempfiles 37Creating an Initialization Parameter File from Memory 38Restore Point Enhancements 38Database Resident Connection Pooling 38Comparing and Synchronizing Database Objects 40Page 5Oracle 11g New Features for Administrators - Summary Sheets

SQL*Plus New Features 41Online Application Maintenance 42Oracle Advanced Compression Option 42Oracle Scheduler New Features 43Lightweight Jobs 44Remote External Jobs 44Monitoring Job State with Email Notifications 45File Watcher 47Finer-grained Dependency Management 50Enhancements in Oracle Database Resource Manager 50Enhanced TRUNCATE Statement 51Dropping Unused Object Storage 52Performance Tuning 53PL/SQL Native Compilation 53Server Result Cache 54Client Side Result Cache 56Enhanced Oracle Process Monitoring 57Subprogram Inlining 58SQL Tuning Automation 59SQL Access Advisor Enhancements 60Changing Statistics Preferences 63Enhanced Statistics Maintenance 64SQL Plan Management 67ADDM New Features 70AWR New Features 73Setting Metric Thresholds for Baselines 75Performance-Related Changes in Database Control 75Miscellaneous New Performance Tuning Features 75Real-Time SQL Monitoring 76Adaptive Cursor Sharing 77Database Security 78Stronger Password Hash Algorithm 78Security Out of the Box 78Anti Network Attacks Parameters 79Tablespace Encryption 80Fine-Grained Access Control for UTL * Packages 81Further Security New Features 82Backup and Recovery New Features 84Enhanced Block Media Recovery 84RMAN Substitution Variables 84Page 6Oracle 11g New Features for Administrators - Summary Sheets

New RMAN Configuration Parameters 85The Multisection Backups 85Creating Archival Backups 86VALIDATE Command 86Configuring an Archived Redo Log Deletion Policy 87Active Database Duplication 87Importing and Moving Recovery Catalogs 89Virtual Private Catalogs 90Miscellaneous New Features in RMAN 91Data Pump Utilities 92Compression Enhancement 92Encryption Enhancements 92Reusing a Dump File 93Remapping Data 93Renaming Tables During Export or Import 93Data Pump and Partitioned Tables 93Ignoring Nondeferred Constraints 94External Tables Based on Data Pump Driver 94Enhancement in the Transportable Parameter 94Automatic Storage Management (ASM) 95SYSASM Privilege and OSASM Group 95Upgrading ASM using DBUA 95Upgrading ASM Manually 95ASM Restricted Mode 96Diskgroup Attributes 96Checking Diskgroup 98asmcmd Utility Commands 99Fast Rebalance 100The FORCE option with Drop Diskgroup Command 100Miscellaneous ASM New Features 100PL/SQL New Features 102PL/SQL New Features 102Data Warehousing 108SecureFiles 108Accessing a LOB Using SQL and PL/SQL 109Online Redefinition 110Partition Change Tracking (PCT) 111Generating SQL Crosstab Report using PIVOT Operator 111Partitioning Improvements 113Page 7Oracle 11g New Features for Administrators - Summary Sheets

Appendix I Mapping Exam 1Z0-050 Objectives to Document TopicsAppendix II Displaying CLOB Contents in SQL PlusPage 8118121Oracle 11g New Features for Administrators - Summary Sheets

Installation, Database Upgrades and Change ManagementInstallation New Features SupportFollowing are the changes you will face when installing Oracle Database 11g: Choosing Oracle Base locationOracle Base (set by the environment variable ORACLE BASE) is the top-level directory for installing Oraclesoftware. Oracle Universal Installer now allows you to specify and edit Oracle base location. Oraclerecommends you to specify the same Oracle base for multiple Oracle homes.If you install Oracle database 11g software with the option of creating a database and you do not specify avalue to ORACLE BASE, the installation proceeds with the default value but a message will be logged in thealert log file. Datafile and Flash Recovery Area LocationsBy default, Datafiles and flash recovery area are located one level below the Oracle base location. In Oracle10g, it is used to be saved under Oracle home directory. Automatic Diagnostic Repository (ADR)ADR is a single directory location for all error and trace data in the database. It replaces the traditionaldiagnostic directories such as bdump, cdump, and udump. ADR location is controlled by the new initializationparameter DIAGNOSTIC DEST. Oracle recommends you choose the same ADR base for all Oracle products. New ComponentsFollowing are new components which are available when installing Oracle 11g:o Oracle Application Express (APEX): APEX is a rapid application development tool for developingdatabase centric web-based applications. In Oracle 11g, it is highly enhanced and available in the Oracledatabase CD.o Oracle SQL Developer: Oracle SQL Developer is a graphical tool for examining database objects andissuing SQL commands. It is automatically installed, if you create a template-based database.o Oracle Real Application Testing: Oracle Real Application Testing option is automatically installed withthe Enterprise Edition installation. This option includes two solutions to test the effect of the systemchanges on the real-world applications: Database Reply and SQL Performance Analyzer. Both of thosesolutions will be discussed in later sections.o Oracle Configuration Manager (OCM): OCM is an optional component and it collects information aboutsoftware configuration in the Oracle home directories and uploads it to the Oracle configuration repository.o Oracle Warehouse Builder: it is a business intelligence (BI) design tool and is automatically installed aspart of the Oracle database software.o Oracle Database Vault: Oracle Database Vault component enables you to secure business data evenfrom DBAs. In Oracle 11g, it is a component available during installation and to install it, you must selectthe Custom installation option.o Oracle Shadow Copy Service: When you install Oracle 11g on Windows 2003 servers, a service namedas Volume Shadow Copy Service (VSS) is installed. This service is an infrastructure that enables the usersto create snapshots called shadow copies. For details on using VSS, refer to the documentation "OracleDatabase Backup and Recovery User's Guide" and Chapter 8 in "Oracle Database Platform Guide forMicrosoft Windows" Other Install Optionso Oracle Data Mining option is selected by default with the Enterprise Edition installation and is automaticallyinstalled when you create a database.o Oracle XML DB is now a mandatory component and thus its option is removed from the installation.Role and Privilege ChangesIn Oracle 11g, there is a new system privilege called SYSASM. This privilege should be granted to users whoneed to perform ASM administrative tasks. Also, in Oracle 11g for Unix/Linux operating systems, you can createosasm OS group. Oracle recommends you grant ASM access only to members of the osasm group. For furtherdetails about using this privilege, refer to the chapter "Automatic Storage Management".Starting from Oracle 10g R2, CONNECT role has only CREATE SESSION privilege. If you upgrade existing databaseto version 11g, CONNECT role will be modified by the upgrade script to have only CREATE SESSION privilege.Page 9Oracle 11g New Features for Administrators - Summary Sheets

Deprecated ComponentsFollowing are the components deprecated in Oracle 11g:o iSQL*Pluso Oracle Workflowo Oracle Enterprise Manager Java Consoleo Oracle Data Mining Scoring Engineo Raw storage support (installer only)New Initialization Parameters Affecting Database CreationAs with any new Oracle database version, in Oracle 11g some new initialization parameters are introduced andsome parameters are deprecated. In this section we will introduce those new parameters you may set whilecreating an Oracle 11g database. Notice that this section is not meant to list all the new initialization parameters. Memory ParametersIn Oracle 11g, the automatic memory management feature is developed. Both the system global area (SGA) andthe program global area (PGA) will expand and shrink based on the instance demands. To enable this feature,you set the following new parameters:MEMORY TARGETthis parameter sets the system-wide usable memory that will be used by the instancefor SGA and PGA.MEMORY MAX TARGETthis parameter sets the maximum value you can set for MEMORY TARGET parameter.Further details about using those parameters will be discussed in Automatic Memory Management section. Automatic Diagnostic Repository (ADR)ADR is a directory that points to all error data raised in the database. You set it by the new parameterDIAGNOSTIC DEST. It replaces USER DUMP DEST, BACKGROUND DUMP DEST and CORE DUMP DEST parameters.DIAGNOSTIC DEST defaults to the following value: ORACLE BASE/diag/rdbms/ INSTANCE NAME/ ORACLE SIDIf you haven’t set the ORACLE BASE variable, the value of the DIAGNOSTIC DEST parameter defaults to ORACLE HOME/log.Further details about using this parameter will be discussed in ADR section. Result Cache ParametersIn Oracle 11g, a new memory component, named as result cache, is introduced. This memory area stores resultsof frequently run queries. It also saves results of PL/SQL function results. Parameters used to control resultcacheare:RESULT CACHE MODE,RESULT CACHE MAX RESULT,RESULT CACHE MAX SIZE,RESULT CACHE REMOTE EXPIRATION, CLIENT RESULT CACHE SIZE and CLIENT RESULT CACHE LAG. Using thoseparameters will be discussed in Server Result Cache and Client Side Result Cache sections. DDL Lock TimeoutThe new parameter DDL LOCK TIMEOUT controls length of time a DDL statement waits for a DML lock. Using thisparameter will be discussed in DDL Lock Timeout section. The DB ULTRA SAFE ParameterThis parameter is used to set the effective values of the parameters: DB BLOCK CHECKING,DB LOST WRITE PROTECT, DB BLOCK CHECKSUM. This parameter takes one of the following values:offdata onlydata and indexPage 10this value means any values you set for any of the three parameters will not beoverridden.The effective value of the parameters will be as follows:ParameterActive ValueDB BLOCK CHECKINGmediumDB LOST WRITE PROTECTtypicalDB BLOCK CHECKSUM.fullThe effective value of the parameters will be as follows:ParameterActive ValueDB BLOCK CHECKINGfullDB LOST WRITE PROTECTtypicalDB BLOCK CHECKSUM.fullOracle 11g New Features for Administrators - Summary Sheets

Security ParametersOracle 11g introduces two important security parameters. Following table illustrated those parameters and theirusages:ParameterDescriptionDefault ValueSEC CASE SENSITIVE LOGONto enable or disable password case-sensitivity.SEC MAX FAILED LOGIN ATTEMPTSOracle drops the connection after the specifiednumber of login attempts fail for any user.true10DBCA EnhancementsIn Oracle 11g, DBCA go through steps similar to the one in Oracle 10g. Following is a list of new DBCA pages inOracle 11g: Security SettingsIn this page you can set the created database to use the new enhanced default security settings in Oracle 11g.Those settings include audit settings, password profiles and revoking grants from the public role. Those settingsare part of a database option named as Secure Configuration.If you choose to disable those security settings, the database will be created with the default security options asfor Oracle Database 10g Release 2. You can still configure the Secure Configuration option later by invoking theDBCA. Creating a ListenerIf you choose to configure the Enterprise Manager, DBCA will search for a listener configured in the Oracle home.If no listener was found, DBCA asks you to create one with the Net Configuration Assistant tool. Network ConfigurationIn Oracle 11g, DBCA allows you to select the listener(s) for which to register the new database. Configuring New Database OptionsIn Oracle Database 11g, you can configure the following options when using DBCA:a) Oracle Application Expressb) Oracle Database Vaultc) Oracle Warehouse BuilderAlso, you no longer see the Data Mining in the DBCA as an option to configure. The data mining schema are bydefault created when the catproc.sql script is run. New Memory ManagementYou can enable using the new automatic memory management feature by specifying amount of memory to beused by both SGA and PGA. Switching a Database from Database Control to Grid Control ConfigurationWith Oracle Database 11g, DBCA provides the Enterprise Manager Configuration plug-in, which automates theprocess to switch configuration of a database from Database Control to Grid Control.Upgrading to Oracle Database 11gUpgrade pathYou can directly upgrade to Oracle 11g, if you current database is 9.2.04 or newer. In other words, it supportsdirect upgrade to versions 9.2.0.4, 10.1 and 10.2. Otherwise, you should follow one of the upgrade paths:7.3.3 - 7.3.4- 9.2.0.8 - 11.18.0.5 - 8.0.6- 9.2.0.8 - 11.18.1.7 - 8.1.7.4 - 9.2.0.8 - 11.19.0.1.3- 9.0.1.4 - 9.2.0.8 - 11.19.2.0.3 (or lower)- 9.2.0.8 - 11.1Oracle 11g client can access Oracle databases of versions 8i, 9i and 10g.Upgrade process and COMPATIBLE parameterThe default compatibility value for Oracle 11g is 11.1. You can, however, upgrade to Oracle 11g with a minimumvalue of the COMPATIBLE parameter of 10.0.0. However, if you upgrade to 11g and keep the COMPATIBLEparameter to 10.0.0, only a small portion of the new features will be available.Page 11Oracle 11g New Features for Administrators - Summary Sheets

Manual Upgrade ProcedureTo manually upgrade a database from 10g to Oracle 11g, perform the following steps:1. Invoke the Pre-Upgrade Information Tool in the database to upgrade.This tool is simply the script ORACLE HOME/rdbms/admin/utlu111i.sql. So, you have to copy this scriptaltogether with the scripts: utlu111s.sql and utlu111x.sql to a staging directory in the database toupgrade.As with previous versions, this tool will examine the target database and display the warnings andrecommendations that you should consider before you start the upgrade process such as removing obsoleteinitialization parameters, setting proper values to some parameters and adding space to key tablespaces.Spool the output of running the script for later review.SQL spool upgrade11g.logSQL @utlu111i.sql.SQL spool off2. Backup the database.3. Set the COMPATIBLE parameter to 11.1.0. You can do so by issuing the following command:ALTER SYSTEM SET COMPATIBLE '11.1.0' SCOPE SPFILE;4. Modify the values of the initialization parameters and remove the obsolete parameters as recommended bythe Pre-upgrade tool in the current initialization parameter file.5. Copy the initialization parameter file to the new Oracle 11g home.6. Shutdown cleanly the database.7. If the database is installed in a Windows system, perform the following steps:a)Stop the Oracle database service. Usually its name has the format OracleService SID .b)Delete the service. You can use the oradim utility for this purpose.oradim -delete –SID sidname c)Use oradim utility in the Oracle 11g home to create a new Oracle Database 11g release instance. Ofcourse, it should use the same SID.oradim -NEW –SID sidname 8. If the database to upgrade is using a password file, move it to the new Oracle 11g home.9. Change the environment variables ORACLE HOME, PATH, and LD LIBRARY PATH so that they point to the newOracle Database 11g directories.10. In the Oracle 11g home, change to directory ORACLE HOME/rdbms/admin and then start the SQL*Plus11. Start the database in upgrade mode and then run the upgrade script (it takes long time). When working inupgrade mode, Oracle allows only SYSDBA connections and sets some initialization parameters to specificvalues that are required to run the upgrade script.SQL login sys/password as sysdbaSQL startup upgrade pfile ORACLE HOME/dbs/initorcl.oraSQL spool upgrade11g.logSQL @ catupgrd.sql.SQL spool off12. After the upgrade script finishes, make sure no error occurred during the upgrade. Usually errors are raisedbecause of lack of shared memory or tablespace size. If there is any error, fix its cause and restart theupgrade script.13. When the upgrade script successfully finishes, restart the database in OPEN mode.14. Rum utlu111s.sql script (referred to as Post-Upgrade Status tool) to view the results of the upgrade. Thistool will view the installed components and their status. If you see a component with invalid status, usuallyrunning the script in the next step will set it to valid.Page 12Oracle 11g New Features for Administra

Oracle Database Backup and Recovery User's Guide 11g Release 1 (11.1) B28270-02 Oracle Database PL/SQL Packages and Types Reference 11g Release 1 (11.1.) B28419-02 Oracle Database High Availability Overview 11g Release 1 (11.1) B28281-01 Oracle Database Storage Administrator's Guide 11g Release 1 (11.1) B31107-03