10gqanda

Upload: jack-wang

Post on 04-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 10gQandA

    1/14

  • 7/29/2019 10gQandA

    2/14

    1) Are there 10+ TB production databases working with Dataguard?

    Yes, there are several production sites using dataguard that are bigger than 10TB

    2) How many production sites are using RAC + Dataguard?

    I was able to find specific references for 251 Production sites using Dataguard Physical Standby +RACIn terms of OS they are distributed in this way:

    HPUX 40Solaris 57Linux 83Other 71

    This is not a complete list.

    3) Are uncommitted transactions written to flashback redologs?

    Yes uncommited transactions that are lately rolled-back will be written to flashback archived logs.

    4) Can flashback database be implemented more than once after resetlogs?

    Having this scenario:

    an error was unnoticed at 01:00at 16:00 error was reported and database is flashed back (by error) until 02:00at 18:00 the error with the flashback is noticed.

    1) can be the database flashed back to 01:00 again?

  • 7/29/2019 10gQandA

    3/14

    2) if yes can the txs applied from 02:00 to 18:00 be applied?

    1) Yes. Once a flashback is implemented and the database opened using resetlogs, a second flashback canbe implemented to an SCN that is smaller than that of the first flashback, the database incarnation will be setaccordingly.

    2) No With flashbackYes. Using log mining.

    5) How to get SCN numbers on 9i, 10g

    select sys.dbms_flashback.get_system_change_number from dual;

    6) How to Migrate of 10TB database from 9i to 10g + 10 standby sites

    1. Stop the standby database from applying redo logs2. Stop the redo logs from being shipped3. Upgrade the executables for the primary database server4. Upgrade the executables for the standby database server5. Upgrade the primary database (see Note 316889.1)6. Mount the standby database7. Re-enable the shipping of redo from primary to standby

    8. Restart the managed recovery process on the standby database to progress redo apply

    References:http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14239/upgrades.htm#sthref2055Note 407040.1: How To Upgrade A Primary Database And A Physical Standby To Oracle10gR2 (10.2)

  • 7/29/2019 10gQandA

    4/14

    7) Trigger related information

    http://www.psoug.org/reference/table_trigger.htmlhttp://www.psoug.org/reference/ddl_trigger.htmlhttp://www.psoug.org/reference/system_trigger.htmlhttp://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_triggers.htm#ADFNS012

    8) Public references of 10g production Customer using ASM, Dataguard

    Public available Production Customer references can be found here:

    http://www.oracle.com/customers/products/database.htmlhttp://www.oracle.com/customers/products/rac.html

    9) 10g RAC + Data Guard Physical Standby reference-able production sites

    There are 65 reference-able Dataguard +RAC production sites.

    Reference able customers may be contacted through your Oracle Sales Manager or SDM

    10) 10g + ASM reference-able production sites

    There are 64 reference-able ASM +RAC production sites.

    Reference able customers may be contacted through your Oracle Sales Manager or SDM

  • 7/29/2019 10gQandA

    5/14

    11) Strategies for migration from FS to ASM

    Rman Dbms_file_transfer Online reconfiguration Ftp Alter table move. Gradual migration possible by having datafiles on both FS and ASM The data can be moved over using any available downtime windows and any of the referred

    methods.

    12) Are flashback recovery parameters dynamic?

    Flashback database must be enabled with the database mounted.

    All other parameters are dynamic.

    13) Which is the difference for the statistics level parameter in 9i and 10g

    On Both 9i and 10g statistics_level control auto tuning capabilities.This sql can be used to check available features in both versions:

    col statistics_name for a30 head "Statistics Name"col session_status for a10 head "Session|Status"col system_status for a10 head "System|Status"col activation_level for a10 head "Activation|Level"col session_settable for a10 head "Session|Settable"

    SELECT STATISTICS_NAME,

  • 7/29/2019 10gQandA

    6/14

    SESSION_STATUS,

    SYSTEM_STATUS,ACTIVATION_LEVEL,SESSION_SETTABLE

    FROM v$statistics_levelORDER BY 1/

    10g statistics_level control the following features(highlighted options available on 9i):

    Sessi on System Act i vat i on Sessi onSt at i st i cs Name St at us St at us Level Set t abl e- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Act i ve Sessi on Hi st or y ENABLED ENABLED TYPI CAL NOBi nd Dat a Capt ur e ENABLED ENABLED TYPI CAL NOBuf f er Cache Advi ce ENABLED ENABLED TYPI CAL NOGl obal Cache St at i st i cs ENABLED ENABLED TYPI CAL NO

    Longops St at i st i cs ENABLED ENABLED TYPI CAL NOMTTR Advi ce ENABLED ENABLED TYPI CAL NOModi f i cat i on Moni t or i ng ENABLED ENABLED TYPI CAL NOPGA Advi ce ENABLED ENABLED TYPI CAL NOPl an Execut i on Stat i st i cs DI SABLED DI SABLED ALL YESSegment Level St at i st i cs ENABLED ENABLED TYPI CAL NOShared Pool Advi ce ENABLED ENABLED TYPI CAL NOSt r eams Pool Advi ce ENABLED ENABLED TYPI CAL NO

    Threshol d- based Al er t s ENABLED ENABLED TYPI CAL NO

    Ti med OS St at i st i cs DI SABLED DI SABLED ALL YESTi med St at i st i cs ENABLED ENABLED TYPI CAL YESUl t r af ast Lat ch Stat i st i cs ENABLED ENABLED TYPI CAL NOUndo Advi sor , Al er t s and Fast ENABLED ENABLED TYPI CAL NORamp up

    17 r ows sel ected.

  • 7/29/2019 10gQandA

    7/14

    9i statistics_level control the following features:

    Sessi on System Act i vat i on Sessi onSt at i st i cs Name St at us St at us Level Set t abl e- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Buf f er Cache Advi ce ENABLED ENABLED TYPI CAL NOMTTR Advi ce ENABLED ENABLED TYPI CAL NOPGA Advi ce ENABLED ENABLED TYPI CAL NOPl an Execut i on St at i st i cs DI SABLED DI SABLED ALL YESSegment Level St at i st i cs ENABLED ENABLED TYPI CAL NOShared Pool Advi ce ENABLED ENABLED TYPI CAL NO

    Ti med OS St at i st i cs DI SABLED DI SABLED ALL YESTi med St at i st i cs ENABLED ENABLED TYPI CAL YES

    8 r ows sel ect ed.

    14) Is it possible to do flashback after truncate?

    No, cannot do flashback after a ddl, because it invalidated undo data for the object.

    Both flashback table and flashback query will fail with error:

    ORA-01466: unable to read data - table definition has changed

    15) Can we restore a dropped table after a new table with the same name has been

    created?

    Yes, using the sintax:

    Restore table to before drop rename to ;

  • 7/29/2019 10gQandA

    8/14

    16) Can we export a dropped table?

    No, export can be done for objects as of time using the flashback_time or flashback_scn export parameters.

    Data Definition Language statements that alter the structure of a table, such as drop/modify column, movetable, drop partition, truncate table/partition, and so on, invalidate the old undo data for the table.It is not possible to retrieve a snapshot of data from a point earlier than the time such DDLs were executed.

    To export a dropped table you will need first to execute flashback drop on it.

    17) v$sql_bind_capture, when it samples?

    Sampling is comprehensive.

    * In 10.2 the bind values used at parse time are available, in 9.2 and 10.1 they are not.* The values for user binds are available, the values for system binds are not (cursor_sharing).* Literals replaced by system binds are used for optimization even if _optim_peek_user_binds =false.

    To display the values of user bind variables that were peeked when a statement was parsed, useDBMS_XPLAN.DISPLAY_CURSOR with the undocumented 'ADVANCED' (or 'PEEKED_BINDS')format. The peeked bind values are stored and extracted from the other_xml column of v$sql_plan.

    18) Can bind capture be activated on purpose?

    It will be activated when setting statistics_level =typical and deactivated setting them to basic.It can be deactivated without affecting other awr activity using event awr_flush_table_off, level 56

    References :

  • 7/29/2019 10gQandA

    9/14

    Note 273121.1 - How To Find The Value of a Bind Variable Without Tracing

    Note 296765.1 - Solutions for possible AWR Library Cache Latch Contention Issues in Oracle 10gNote 43808.1 - VIEW: "V$SQL_BIND_DATA" Reference Note

    19) Is Times Ten incorporated into 10g?

    Times Ten is a different product, it's last releast, Version 7, was completely developed inside Oracle, and atighter integration with the Oracle 10g Database was implemented on it.

    It delivers real-time caching for critical enterprise Oracle Databases.

    Oracle TimesTen 7 delivers several key enhancements to help customers capture, access, and manageinformation significantly faster, including:

    * Data type compatibility familiar Oracle Database 10g data types are now available in OracleTimesTen 7 for easier application development and caching data in memory;

    * New SQL features Oracle TimesTen 7 includes enhanced SQL functionality, with similar semanticsand behaviors as Oracle Database 10g;* Globalization functionality more than 50 database character sets and 80 languages are now supportedwith Oracle TimesTen 7;* Automatic data aging and on-demand data loading when used as a cache, data in Oracle TimesTen 7can be dynamically loaded and automatically aged out of memory; and,* Cross-tier high availability data can be automatically synchronized across replicated Oracle TimesTendatabases and Oracle Databases

    The new real-time caching capabilities of Oracle TimesTen 7 support a wide variety of applications whereinstant access to specific types of data from an Oracle database is required. Oracle TimesTen 7 provides out-of-the-box support for the most common caching scenarios:

  • 7/29/2019 10gQandA

    10/14

    * Dynamic, on-demand caching often used in customer-facing applications to load data for a specific

    customer when they first arrive and add or update data as the interaction progresses. In a call-center orcustomer portal application, this helps speed access to information for the specific group of customerscurrently being served;* Sliding time window caching useful in business intelligence and analytics applications, where the last10 minutes of production data or the last 30 days of retail sales data are heavily used for real-time decision-making; and,* Reference data caching useful for customer-facing Web sites or business process acceleration, whereproduct catalogs, business rules and metadata are heavily accessed.

    In each of these scenarios, Oracle TimesTen 7 automatically manages the data movement between the cacheand the underlying enterprise Oracle database, simplifying application development. In addition, OracleTimesTen 7 also supports Oracle Real Application Clusters (RAC), Oracle Fusion Middleware, Oracle SQLDeveloper and Oracle JDeveloper.

    20) How Oracle 10g decides the # of processes to drop a partition table?

    I was not able to find this information on the 10g R2 Administration, New Features, Reference or SQLReference Manuals.This is compilation of the available information:

    Resource Optimized DROP TABLE for Partitioned Tables

    When dropping a large partitioned table in the no recoverable PURGE mode, the DROP operation is

    internally split to drop chunks of partitions.

    Dropping large partitioned tables can affect tens of thousands of partitions that all have to be logicallyremoved from the system. The capability of transparently dropping such an object in an incremental fashionoptimizes the resource consumption and positively affects the run-time behavior.

  • 7/29/2019 10gQandA

    11/14

    To avoid running into resource constraints, the DROP TABLE...PURGE command for a partitioned table

    drops the table in multiple transactions, where each transaction drops a subset of the partitions orsubpartitions and then commits. The table becomes completely dropped at the conclusion of the finaltransaction.

    If the DROP TABLE...PURGE command fails, you can take corrective action, if any, and then restart thecommand. The command resumes at the point where it failed.

    When you drop a partitioned table with the PURGE keyword, the statement executes as a series of

    subtransactions, each of which drops a subset of partitions or subpartitions and their metadata. This divisionof the drop operation into subtransactions optimizes the processing of internal system resource consumption(for example, the library cache), especially for the dropping of very large partitioned tables. As soon as thefirst subtransaction commits, the table is marked UNUSABLE. If any of the subtransactions fails, the onlyoperation allowed on the table is another DROP TABLE ... PURGE statement. Such a statement will resumework from where the previous DROP TABLE statement failed, assuming that you have corrected any errorsthat the previous operation encountered.

    You can list the tables marked UNUSABLE by such a drop operation by querying the status column of the*_TABLES, *_PART_TABLES, *_ALL_TABLES, or *_OBJECT_TABLES data dictionary views, asappropriate.

    References:http://st-doc.us.oracle.com/10/102/server.102/b14231/partiti.htm#ADMIN10062http://st-doc.us.oracle.com/10/102/server.102/b14214/chapter1.htm#sthref360

    http://st-doc.us.oracle.com/10/102/server.102/b14200/statements_9003.htm#i2061306http://st-doc.us.oracle.com/10/102/server.102/b14231/partiti.htm#sthref2746

    21) Are outline_parameters needed on 10g?

    user_stored_outlines and create_stored_outlines parameters are needed to control outline behaviour.

    http://st-doc.us.oracle.com/10/102/server.102/b14231/partiti.htm#ADMIN10062http://st-doc.us.oracle.com/10/102/server.102/b14214/chapter1.htm#sthref360http://st-doc.us.oracle.com/10/102/server.102/b14200/statements_9003.htm#i2061306http://st-doc.us.oracle.com/10/102/server.102/b14231/partiti.htm#sthref2746http://st-doc.us.oracle.com/10/102/server.102/b14231/partiti.htm#sthref2746http://st-doc.us.oracle.com/10/102/server.102/b14200/statements_9003.htm#i2061306http://st-doc.us.oracle.com/10/102/server.102/b14214/chapter1.htm#sthref360http://st-doc.us.oracle.com/10/102/server.102/b14231/partiti.htm#ADMIN10062
  • 7/29/2019 10gQandA

    12/14

    A good article explaining this functionality is found here:

    http://www.ardentperf.com/2007/03/23/tuning-sql-statement-execution-in-10g-part-2/

    22) How to check a profile definition explain plan

    SQL Profile information is displayed in the DBA_SQL_PROFILES view.

    Typically, an accepted SQL Profile is associated with the SQL statement through a special SQL signaturethat is generated using a hash function. This hash function normalizes the SQL statement for case (changesthe entire SQL statement to upper case) and white spaces (removes all extra whites spaces) beforegenerating the signature. The same SQL Profile thus will work for all SQL statements that are essentially

    the same, where the only difference is in case usage and white spaces. However, by settingforce_match to

    true, the SQL Profile will additionally target all SQL statements that have the same text after normalizingliteral values to bind variables. This may be useful for applications that use literal values rather than bind

    variables, since this will allow SQL with text differing only in its literal values to share a SQL Profile. Ifboth literal values and bind variables are used in the SQL text, or if this parameter is set to false (the defaultvalue), literal values will not be normalized.

    It is important to note that the SQL Profile does not freeze the execution plan of a SQL statement, as doneby stored outlines. As tables grow or indexes are created or dropped, the execution plan can change with thesame SQL Profile. The information stored in it continues to be relevant even as the data distribution oraccess path of the corresponding statement change. However, over a long period of time, its content canbecome outdated and would have to be regenerated. This can be done by running Automatic SQL Tuningagain on the same statement to regenerate the SQL Profile.

    Aditional tuning information can be found on

  • 7/29/2019 10gQandA

    13/14

    Advisor information views, such as DBA_ADVISOR_TASKS, DBA_ADVISOR_FINDINGS,

    DBA_ADVISOR_RECOMMENDATIONS, and DBA_ADVISOR_RATIONALE views.

    SQL tuning information views, such as DBA_SQLTUNE_STATISTICS, DBA_SQLTUNE_BINDS, andDBA_SQLTUNE_PLANS views.

    SQL Tuning Set views, such as DBA_SQLSET, DBA_SQLSET_BINDS, DBA_SQLSET_STATEMENTS,and DBA_SQLSET_REFERENCES views.

    Information on captured execution plans for statements in SQL Tuning Sets are displayed in theDBA_SQLSET_PLANS and USER_SQLSET_PLANS views.

    Advisor execution progress information is displayed in the V$ADVISOR_PROGRESS view.

    Dynamic views containing information relevant to the SQL tuning, such as V$SQL, V$SQLAREA,V$SQLSTATS, and V$SQL_BINDS views.

    23) Useful 10g Links

    OTN RAC OTN ASM OTN High Availability

    OTN Grid Control OTN Recovery Manager 10g R2 Online Documentation 10g R2 Documentation Download RAC Customer References Oracle RAC on VMware Oracle Software Download

    http://www.oracle.com/technology/products/database/clustering/index.htmlhttp://www.oracle.com/technology/products/database/asm/index.htmlhttp://www.oracle.com/technology/deploy/availability/index.htmlhttp://www.oracle.com/technology/software/products/oem/index.htmlhttp://www.oracle.com/technology/deploy/availability/htdocs/rman_overview.htmhttp://www.oracle.com/pls/db102/homepagehttp://www.oracle.com/technology/documentation/database10gR2.htmlhttp://www.oracle.com/references/forums/database_archive.htmlhttp://www.oracle.com/technology/tech/linux/vmware/index.htmlhttp://edelivery.oracle.com/EPD/Search/handle_gohttp://edelivery.oracle.com/EPD/Search/handle_gohttp://www.oracle.com/technology/tech/linux/vmware/index.htmlhttp://www.oracle.com/references/forums/database_archive.htmlhttp://www.oracle.com/technology/documentation/database10gR2.htmlhttp://www.oracle.com/pls/db102/homepagehttp://www.oracle.com/technology/deploy/availability/htdocs/rman_overview.htmhttp://www.oracle.com/technology/software/products/oem/index.htmlhttp://www.oracle.com/technology/deploy/availability/index.htmlhttp://www.oracle.com/technology/products/database/asm/index.htmlhttp://www.oracle.com/technology/products/database/clustering/index.html
  • 7/29/2019 10gQandA

    14/14

    Enterprise Linux Download Real Application Clusters Virtual Book ASM Virtual Book Enterprise Manager Virtual Book RMAN Virtual Book Grid Computing Vitrual Book

    http://edelivery.oracle.com/linuxhttp://www.oracle.com/pls/db102/db102.vbook?search=Real+Application+Clustershttp://www.oracle.com/pls/db102/db102.vbook?search=asmhttp://www.oracle.com/pls/db102/db102.vbook?search=enterprise+managerhttp://www.oracle.com/pls/db102/db102.vbook?search=Rmanhttp://www.oracle.com/pls/db102/db102.vbook?search=gridhttp://www.oracle.com/pls/db102/db102.vbook?search=gridhttp://www.oracle.com/pls/db102/db102.vbook?search=Rmanhttp://www.oracle.com/pls/db102/db102.vbook?search=enterprise+managerhttp://www.oracle.com/pls/db102/db102.vbook?search=asmhttp://www.oracle.com/pls/db102/db102.vbook?search=Real+Application+Clustershttp://edelivery.oracle.com/linux