Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf
-
Upload
insync2011 -
Category
Documents
-
view
1.310 -
download
3
description
Transcript of Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf
![Page 1: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/1.jpg)
The most comprehensive Oracle applications & technology content under one roof The most comprehensive Oracle applications & technology content under one roof
Oracle11g Top 10 features Not your usual Top 10.
Shan Nawaz Verisign Inc
![Page 2: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/2.jpg)
The most comprehensive Oracle applications & technology content under one roof
WHO AM I • Shan Nawaz
– More than 13 years of experience in Database Technologies(Oracle, DB2, SQL Server)
• Database Engineer at Verisign – Tune mission criJcal applicaJons with millisecond SLA’s
• Industry CerJficaJons – OCP in Oracle7.3/8/9i/10g/11g – IBM CerJfied User specialist in DB2 – MCP in SQL Server 2000
• Recent/Future Technical Sessions – Oracle Open World 2011 – Hotsos 2011 – IOUG 2011 – Oracle Open World 2010 – Verisign Technical Symposium 2009
![Page 3: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/3.jpg)
The most comprehensive Oracle applications & technology content under one roof
Agenda
• About Verisign and Our SLA’s • Not your usual Top 10 features • QA • References
![Page 4: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/4.jpg)
The most comprehensive Oracle applications & technology content under one roof
Our SLA’s
• TransacJons made of complex SQL statements
Command SLA
CHECK DOMAIN 25ms
ADD DOMAIN 50ms
DELETE DOMAIN 100ms
MODIFY DOMAIN 100ms
![Page 5: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/5.jpg)
The most comprehensive Oracle applications & technology content under one roof
Goal/MoJvaJon of this PresentaJon
• To visit Australia
• To talk about the very good features of Oracle11g that are overlooked by the very best features of Oracle 11g
![Page 6: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/6.jpg)
The most comprehensive Oracle applications & technology content under one roof
Very Best Features 1. Database Replay 2. AdapGve Cursor Sharing 3. Flashback Data Archive/Total Recall 4. EdiGon Based redefiniGon 5. Deferred segment creaGon 6. Password Enhancements 7. SQL Plan Management 8. Result Cache 9. Virtual Indexes/Columns 10. Interval/System ParGGoning 11. Extended OpGmizer StaGsGcs 12. Online Patching 13. Recursive With clause 14. PL/SQL NaGve CompilaGon 15. Secure Files
![Page 7: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/7.jpg)
The most comprehensive Oracle applications & technology content under one roof
Poor man’s parallelism
![Page 8: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/8.jpg)
The most comprehensive Oracle applications & technology content under one roof
Poor man’s parallelism DBMS_PARALLEL_EXECUTE
• Supports parallel update of large data sets in smaller chunks.
• Chunks are created by segregaJng the data based on 1. Rowid 2. Numeric column 3. User-‐defined SQL.
![Page 9: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/9.jpg)
The most comprehensive Oracle applications & technology content under one roof
Poor man’s parallelism
• Why is DBMS_PARALLEL_EXECUTE important ? – Unlike other parallel features , DBMS_PARALLEL_EXECUTE does not require Enterprise EdiJon.
– Eliminates much of manual coding and does befer job of distribuJng load uniformly across parallel processes
– Overcome restricJons of parallel DML
![Page 10: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/10.jpg)
The most comprehensive Oracle applications & technology content under one roof
Poor man’s parallelism • Why is DBMS_PARALLEL_EXECUTE important ? (ConJnued) – Break large single transacJon into mulJple chunks (transacJons) • Less impact to dependent systems like Golden Gate or streams
• Less undo space required minimizing the chance of ORA-‐1555
• DuraJon of lock is reduced. – Restart failed chunks (transacJons) since Chunks are commifed individually (Implicit) • Impact of Rollback due to error is not severe.
![Page 11: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/11.jpg)
The most comprehensive Oracle applications & technology content under one roof
Poor man’s parallelism DBMS_PARALLEL_EXECUTE
• How to implement? 1. Create a task with CREATE_TASK procedure 2. Create chunks (size) using one of the following.
– CREATE_CHUNKS_BY_ROWID – CREATE_CHUNKS_BY_NUMBER_COL – CREATE_CHUNKS_BY_SQL
3. Define the DML statement 4. Execute the task in parallel with RUN_TASK 5. Perform error handling and run failed chunks with
RESUME_TASK.
![Page 12: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/12.jpg)
The most comprehensive Oracle applications & technology content under one roof
Poor man’s parallelism
Create a task with CREATE_TASK BEGIN DBMS_PARALLEL_EXECUTE.CREATE_TASK (TASK_NAME => 'UPDATE_TASK'); END;
Create chunks with ROWID. BEGIN DBMS_PARALLEL_EXECUTE.CREATE_CHUNKS_BY_ROWID(TASK_NAME => 'UPDATE_TASK‘, TABLE_OWNER
=> 'SCOTT‘, TABLE_NAME => 'CONTENT‘, BY_ROW=> FALSE, CHUNK_SIZE => 3075); END;
Define the Update statement and running the task DECLARE L_SQL_STMT VARCHAR2(32767); BEGIN L_SQL_STMT := 'UPDATE /*+ ROWID (DDA) */ CONTENT SET EXPIRATION_DATE= SYSDATE+14 WHERE ROWID BETWEEN :START_ID AND :END_ID'; DBMS_PARALLEL_EXECUTE.RUN_TASK(TASK_NAME => 'UPDATE_TASK‘,SQL_STMT=> L_SQL_STMT,LANGUAGE_FLAG
=> DBMS_SQL.NATIVE,PARALLEL_LEVEL=> 4); END;
![Page 13: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/13.jpg)
The most comprehensive Oracle applications & technology content under one roof
Compare and Converge
![Page 14: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/14.jpg)
The most comprehensive Oracle applications & technology content under one roof
Compare and Converge DBMS_COMPARISON
• IdenJfy differences between data sets across databases or same database.
• Report and Synchronize the data set – Either the source or target can act as master.
• Intended mainly for replicated/streams environment but can be used outside of streams environment
• Works with 10g and above version provided one the databases in the comparison is 11g;
![Page 15: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/15.jpg)
The most comprehensive Oracle applications & technology content under one roof
Compare and Converge
• Comparison Modes Supported 1. Full Object comparison
• CMP_SCAN_MODE_FULL 2. Random data comparison
• CMP_SCAN_MODE_RANDOM 3. Cyclic Comparison
• CMP_SCAN_MODE_CYCLIC 4. Customized comparison
• CMP_SCAN_MODE_CUSTOM
![Page 16: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/16.jpg)
The most comprehensive Oracle applications & technology content under one roof
Compare and Converge
• Objects currently supported are – Tables – Single Table Views – Materialize Views – Synonyms for above objects
• Unique Indexes are used for comparison – Non-‐Unique indexes are used if specified manually
• Permits comparing row-‐row OR group of rows – Befer performance with group of rows
![Page 17: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/17.jpg)
The most comprehensive Oracle applications & technology content under one roof
Compare and Converge
• Steps 1. Create comparison object 2. Perform the comparison 3. Analyze the results 4. Converge the data
![Page 18: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/18.jpg)
The most comprehensive Oracle applications & technology content under one roof
Compare and Converge SQL> SELECT COUNT(*) FROM
CONTENT_1; COUNT(*) -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ 10
SQL> SELECT COUNT(*) FROM CONTENT_2;
COUNT(*) -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ 10 SQL> DELETE FROM CONTENT_2 2 WHERE ITEM_ID=484380; 1 row deleted. SQL> COMMIT;
![Page 19: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/19.jpg)
The most comprehensive Oracle applications & technology content under one roof
Compare and Converge
Create Comparison Object SQL> BEGIN 2 DBMS_COMPARISON.CREATE_COMPARISON( 3 COMPARISON_NAME=>'MYCOMPARE', 4 SCHEMA_NAME=>'SCOTT', 5 OBJECT_NAME=>'CONTENT_1', 6 DBLINK_NAME=>NULL, 7 REMOTE_SCHEMA_NAME=>'SCOTT', 8 REMOTE_OBJECT_NAME=>'CONTENT_2'); 9 END; 10 / PL/SQL procedure successfully completed.
SQL> DECLARE 2 COMPARE_VALUE
DBMS_COMPARISON.COMPARISON_TYPE; 3 COMPARE_OUTPUT BOOLEAN; 4 BEGIN 5 COMPARE_OUTPUT := 6 DBMS_COMPARISON.COMPARE ( 7 COMPARISON_NAME=>'MYCOMPARE', 8 SCAN_INFO=>COMPARE_VALUE, 9 PERFORM_ROW_DIF=>TRUE); 10 IF COMPARE_OUTPUT=TRUE 11 THEN 12 DBMS_OUTPUT.PUT_LINE('Tables are IdenGcal'); 13 ELSE 14 DBMS_OUTPUT.PUT_LINE('Tables are not IdenGcal’); 15 END IF; 16* END; 17 / Tables are not IdenJcal, Differences Exist PL/SQL procedure successfully completed.
![Page 20: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/20.jpg)
The most comprehensive Oracle applications & technology content under one roof
Reproducing SQL Test Case
![Page 21: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/21.jpg)
The most comprehensive Oracle applications & technology content under one roof
Reproducing SQL Test Cases
• Remember the Jmes you were unable to resolve SQL issue
• Because – You are unable to reproduce the issue at will in producJon environment.
– Or Unable to reproduce the issue easily in Dev/QA environments. (Recurring issue)
– Or Oracle support was unable to help you because they don’t have the necessary informaJon to reproduce the issue
![Page 22: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/22.jpg)
The most comprehensive Oracle applications & technology content under one roof
Reproducing SQL Test Cases • Help is on the way • Oracle 11g provides a tool called SQL Test case builder or SQL TCB. – As per Oracle documentaJon, If you ever need to contact Oracle Support about a SQL issue, then obtaining a reproducible test case is the single most important factor to ensure a speedy resoluJon.
• Provides as means of good shared language for exchanging informaJon with Oracle Support or DBA’s or developers. – Easy to diagnose , analyze and esJmate the fix.
• Back ported to 10.2.0.4
![Page 23: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/23.jpg)
The most comprehensive Oracle applications & technology content under one roof
Reproducing SQL Test Cases
• Test case can be generated using 1. SQL text 2. SQL cursor 3. SQL from incident file
• SQL TCB can be also be directly with ADRCI command – DDE EXECUTE ACTION INCIDENT <incident_id> ACTIONNAME SQLTCB INVOCATION <invocaJon_id>
![Page 24: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/24.jpg)
The most comprehensive Oracle applications & technology content under one roof
Reproducing SQL Test Cases • What kind of data is collected?
Permanent InformaGon • Always captured • InformaJon like SQL_TEXT,
disk reads, buffer gets, CPU Jme, elapsed Jme, fetches, ExecuJon plan , OpJmizer staJsJcs, Bind variables, rows processed Use of Outlines, SQL profiles or SPM and metadata and user profile.
• Data collecJon is opJonal • No Support for DDL
Transient InformaGon • Captured if Oracle thinks it is
necessary • InformaJon that could
necessarily change like dynamic sampling, degree of parallelism
![Page 25: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/25.jpg)
The most comprehensive Oracle applications & technology content under one roof
Reproducing SQL Test Cases
• How to implement STB? 1. Create a directory or use exisJng directory 2. Export the test case with
DBMS_SQLDIAG.EXPORT_SQL_TESTCASE 3. Import the test case with
DBMS_SQLDIAG.IMPORT_SQL_TESTCASE
![Page 26: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/26.jpg)
The most comprehensive Oracle applications & technology content under one roof
Reproduce SQL Test Cases
• Example
SQL> DECLARE 2 MYTESTCASE CLOB; 3 BEGIN 4 DBMS_SQLDIAG.EXPORT_SQL_TESTCASE ( 5 DIRECTORY=>'DATADIR', 6 SQL_TEXT=>'SELECT DOMAINNAME FROM DOMAIN
WHERE DOMAINNAME=2703255', 7 EXPORTDATA=> FALSE, 8 TESTCASE_NAME=>'MYTEST', 9 TESTCASE=>MYTESTCASE); 10 END; 11 /
![Page 27: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/27.jpg)
The most comprehensive Oracle applications & technology content under one roof
SQL Test Case Builder
• Dump directory files created by SQL TCB.
![Page 28: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/28.jpg)
The most comprehensive Oracle applications & technology content under one roof
Advanced Compression
![Page 29: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/29.jpg)
The most comprehensive Oracle applications & technology content under one roof
ADVANCED COMPRESSION
• With huge amounts of data being the norm than excepJon , compression becomes criJcal in reducing the foot print of almost every component
Database
Network
Backup Server
Buffer Cache
![Page 30: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/30.jpg)
The most comprehensive Oracle applications & technology content under one roof
ADVANCED COMPRESSION
In 11g, there is compression for everyone • Storage – OLTP compression for DML (Structured Data) – SecureFiles Compression (Unstructured Data)
• Network – Data Guard redo Compression
• Backup – RMAN compression – Data pump compression
![Page 31: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/31.jpg)
The most comprehensive Oracle applications & technology content under one roof
ADVANCED COMPRESSION OLTP Compression
• New compression algorithm uses deferred
or batched approach – Data is inserted as is without compression unJl PCTFREE value is reached.
– Compression of data starts once PCTFREE threshold is reached • Can be enabled at table, parJJon or tablespace level • No need of decompressing the data while reading • Recommended for low update acJvity tables • Use Compression advisor(DBMS_COMPRESSION) to
esJmate savings
DATA
PCTFREE
![Page 32: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/32.jpg)
The most comprehensive Oracle applications & technology content under one roof
ADVANCED COMPRESSION Data guard Compression
• Redo is compressed as it is transmifed over a network.
• Helps efficiently uJlize network bandwidth when data guard is across data centers
• Faster resynchronizaJon of Data guard during gap resoluJon.
• Recommended for low network bandwidth
![Page 33: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/33.jpg)
The most comprehensive Oracle applications & technology content under one roof
ADVANCED COMPRESSION
Data guard Compression
• How to implement? – Specify “COMPRESSION” with iniJalizaJon parameter LOG_ARCHIVE_DEST_n
![Page 34: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/34.jpg)
The most comprehensive Oracle applications & technology content under one roof
ADVANCED COMPRESSION
RMAN Compression
• Supports compression of backups using ZLIB algorithm – Faster compression and low CPU uJlizaJon compared to default BZIP2 (10g)
– Low compression raJo compared to BZIP2
![Page 35: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/35.jpg)
The most comprehensive Oracle applications & technology content under one roof
ADVANCED COMPRESSION
RMAN Compression • How to Implement ? – Configured with CONFIGURE COMPRESSION ALGORITHM ‘value’ • With Advanced compression , value can be HIGH, MEDIUM(ZLIP) and LOW(LZO) • Without advanced compression , Only basic can be specified
– Execute backups with ‘AS COMPRESSED BACKUPSET’
![Page 36: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/36.jpg)
The most comprehensive Oracle applications & technology content under one roof
ADVANCED COMPRESSION
Data Pump Compression
• Compression of metadata introduced in 10g • Compression of data introduced in 11g. • Inline operaJon – Save on storage allocaJon – No need to uncompress before Import
![Page 37: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/37.jpg)
The most comprehensive Oracle applications & technology content under one roof
ADVANCED COMPRESSION
Data Pump Compression
• How to implement? – Enabled with expdp COMPRESSION afribute
• ALL • DATA_ONLY • METADATA_ONLY
![Page 38: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/38.jpg)
The most comprehensive Oracle applications & technology content under one roof
Diagnosing and resolving failures
![Page 39: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/39.jpg)
The most comprehensive Oracle applications & technology content under one roof
Diagnosing and Resolving Failures • Database Recovery advisor (DRA) – Diagnosing media Failures – Present repair opJons (with script) – Repair failures (if requested)
• Doesn’t mafer if you are a newbie DBA or highly experienced DBA – When in doubt , use DRA.
• Now you can blame Oracle if the something goes wrong. – And keep your Job, write a blog ……
![Page 40: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/40.jpg)
The most comprehensive Oracle applications & technology content under one roof
Diagnosing and Resolving Failures
• The three RMAN commands to support DRA 1. LIST FAILURE
• Errors are classified as Low, High, CriJcal • Historical support for closed errors.
2. ADVISE FAILURE • Specifies the repair strategy • Supports both manual and automated repair opJons
3. REPAIR FAILURE • Supports preview mode (spooling the script)
![Page 41: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/41.jpg)
The most comprehensive Oracle applications & technology content under one roof
MulGsecGon Backups
![Page 42: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/42.jpg)
The most comprehensive Oracle applications & technology content under one roof
MulJsecJon Backups
• Enables backing up of single datafile in parallel using secJons – SecJon is conJguous range of blocks in a datafile
• Up to 256 SecJons or channels per datafile is supported
• MulJplexed backups will not contain datafiles or secJons from other datafiles.
![Page 43: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/43.jpg)
The most comprehensive Oracle applications & technology content under one roof
MulJsecJon Backups
• Benefits – Improved performance for backup and restore.
• Befer performance when restoring one datafile compared to restoring from large mulJplexed backup set
– Befer restartability. • Restart the failed secJon backup instead of datafile
![Page 44: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/44.jpg)
The most comprehensive Oracle applications & technology content under one roof
MulJsecJon Backups
![Page 45: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/45.jpg)
The most comprehensive Oracle applications & technology content under one roof
MulJsecJon Backups
![Page 46: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/46.jpg)
The most comprehensive Oracle applications & technology content under one roof
MulJsecJon Backups
![Page 47: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/47.jpg)
The most comprehensive Oracle applications & technology content under one roof
DATABASE RESIDENT CONNECTION POOL
![Page 48: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/48.jpg)
The most comprehensive Oracle applications & technology content under one roof
DATABASE RESIDENT CONNECTION POOL
• Shared Server or MTS – Session Resources are not shared – Good for long running transacJons
• Database resident connecJon pool(DRCP) – To support large number of similar client applicaJons or connecJons
– Share or reuse sessions. – TransacJons are very short in nature – No Session affinity is required
![Page 49: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/49.jpg)
The most comprehensive Oracle applications & technology content under one roof
DATABASE RESIDENT CONNECTION POOL
• DRCP is mainly intended for single threaded applicaJons like PHP , PERL – Currently available to clients that use the OCI driver with C, C++, Perl and PHP.
– No support for JDBC thin or JDBC-‐OCI. • More database connecJons are supported compared to
shared server or dedicated server configuraJon – Less memory foot print – Behaves more like dedicated server connecJon once the connecJon is established.
![Page 50: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/50.jpg)
The most comprehensive Oracle applications & technology content under one roof
Database Resident ConnecGon Pool
• Working of DRCP 1. Client makes a request for connecJon 2. Background process connecJon broker picks up
appropriate pooled server and hands-‐off the client to that pooled server.
3. Once connecJon is handed-‐off, the client directly communicates with the pooled server
4. The pooled server is handed back to the broker when the client releases it.
![Page 51: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/51.jpg)
The most comprehensive Oracle applications & technology content under one roof
DATABASE RESIDENT CONNECTION POOL
• Working of DRCP
PGA POOLED SERVERS
Clients/Middle Ger
ConnecGon Broker
![Page 52: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/52.jpg)
The most comprehensive Oracle applications & technology content under one roof
DATABASE RESIDENT CONNECTION POOL
• How to configure? – Start the pool with DBMS_CONNECTION_POOL.START_POOL();
– Add (SERVER = POOLED) to TNS entry – You can also use the following syntax for PHP
• oci_pconnect(“userid", “pwd", “hostname:1526/orcl:POOLED"); – Pool can be stopped with DBMS_CONNECTION_POOL.STOP_POOL();
– Pool properJes like minimum and maximum number of pooled servers , maximum inacJvity Jme etc. can be specified with DBMS_CONNECTION_POOL . CONFIGURE_POOL package
![Page 53: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/53.jpg)
The most comprehensive Oracle applications & technology content under one roof
Server ConsolidaGon
![Page 54: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/54.jpg)
The most comprehensive Oracle applications & technology content under one roof
Server ConsolidaJon • Very simple and effecJve approach to Server ConsolidaJon
• Limit the CPU used by an Instance – Works by limiJng the number of runnable processes
• Administered and maintained by DBA instead of SA’s
• Supports over-‐provisioning • Will not help with licensing if your server has more CPU’s (At least for now, please check with Oracle)
![Page 55: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/55.jpg)
The most comprehensive Oracle applications & technology content under one roof
Server ConsolidaJon
• How to enable instance caging? – Enable the Resource Manager.
• ALTER SYSTEM SET RESOURCE_MANAGER_PLAN = ‘DEFAULT_PLAN;
– Set the CPU_COUNT iniJalizaJon parameter. • ALTER SYSTEM SET CPU_COUNT = 2;
![Page 56: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/56.jpg)
The most comprehensive Oracle applications & technology content under one roof
Server ConsolidaJon
• What is the secret formula? – CPU_COUNT/Total number of acJve instances
• Example: 8 CPU server with 4 instances – Each instance is limited to 2 CPU(CPU_COUNT) – CASE-‐1: If all 4 instances are acJve
• Each instance gets 2/(4*2) =25% of Total CPU – CASE-‐2: If 2 instances are acJve
• Each instance gets 2/(2*2) = 50% of Total CPU
![Page 57: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/57.jpg)
The most comprehensive Oracle applications & technology content under one roof
SQL*Plus Error Logging
![Page 58: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/58.jpg)
The most comprehensive Oracle applications & technology content under one roof
SQL*Plus Error Logging • Records SQL, PL/SQL and SQL*Plus errors in an error table – Default table is SPERRORLOG; – Created automaJcally if the table does not exists
• Captures errors that are not SQL too. – SELCT instead of SELECT
• This is SQL*Plus feature and works with older versions of Oracle database – Only the clients must be 11g or above
• Is it Jme to say bye bye to spooling, Wait not yet
![Page 59: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/59.jpg)
The most comprehensive Oracle applications & technology content under one roof
SQL*Plus Error Logging
• All you have to do is type “SET ERRORLOGGING ON”
• Allows you to idenJfy the session with idenJfier – SET ERRORLOGGING ON IDENTIFIER ‘Core-‐Release 2.3’
• Allows use of user-‐defined table • SET ERRORLOGGING ON TABLE scof.errorlog
• Allows truncaJng of tables before capturing errors – SET ERRORLOGGING ON TRUNCATE
![Page 60: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/60.jpg)
The most comprehensive Oracle applications & technology content under one roof
SQL*Plus Error Logging
![Page 61: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/61.jpg)
The most comprehensive Oracle applications & technology content under one roof
Preprocessor
![Page 62: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/62.jpg)
The most comprehensive Oracle applications & technology content under one roof
Oracle Preprocessor
• Provides the ability to preprocess your data before sending to Oracle external drivers – Reduced disk space consumpJon and faster processing Jme.
– Adds befer control and flexibility to external tables
![Page 63: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/63.jpg)
The most comprehensive Oracle applications & technology content under one roof
Oracle Preprocessor
• Supports OS commands, binaries and scripts • Supports parallelism – File is granular unit for parallelism.
• Back ported to 10.2.0.5 • Other uses – For SQL lovers , run vmstat , df –k or sar report from SQL prompt.
• CauJon – Restrict access to preprocessor directory
![Page 64: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/64.jpg)
The most comprehensive Oracle applications & technology content under one roof
Oracle Preprocessor
![Page 65: Databse & Technology 2 _ Shan Nawaz _ Oracle 11g Top 10 features - not your usual Top 10.pdf](https://reader033.fdocuments.net/reader033/viewer/2022052820/546fa443b4af9f16648b4580/html5/thumbnails/65.jpg)
The most comprehensive Oracle applications & technology content under one roof
References
• Oracle DocumentaJon • Oracle Metalink • asktom.oracle.com • OTN ArJcles • hfp://opJmizermagic.blogspot.com • hfp://kkempf.wordpress.com • hfp://php.net/manual/en/oci8.connecJon.php • And many more …..