0% found this document useful (0 votes)
8 views

Notes Link

The document provides a compilation of resources, FAQs, and best practices related to Oracle databases, covering topics such as SQL monitoring, AWR auto purge, Data Guard, database migration, and index monitoring. It includes links to blogs, community threads, and official Oracle documentation for further reading. Additionally, it addresses various technical questions and troubleshooting tips relevant to database management and performance optimization.

Uploaded by

PGTEST
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Notes Link

The document provides a compilation of resources, FAQs, and best practices related to Oracle databases, covering topics such as SQL monitoring, AWR auto purge, Data Guard, database migration, and index monitoring. It includes links to blogs, community threads, and official Oracle documentation for further reading. Additionally, it addresses various technical questions and troubleshooting tips relevant to database management and performance optimization.

Uploaded by

PGTEST
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Blog Links :

1) Martins Blog
https://martincarstenbach.wordpress.com/2012/06/20/little-things-worth-knowing-
static-and-dynamic-listener-registration/

2) Dominic
https://orastory.wordpress.com/

SQL and PL/SQL FAQ

https://community.oracle.com/message/9362003#9362003

SQL_TRACE (10046), TKProf and Explain Plan - Overview Reference (Doc ID 199081.1)

### How can I generate real-time SQL monitor active reports


set trimspool on
set trim on
set pages 0
set linesize 1000
set long 1000000
set longchunksize 1000000
spool sqlmon_active.html
select dbms_sqltune.report_sql_monitor(type=>'active') from dual;
spool off

How to Enable AWR AUTO PURGE:


You can use shortp_policy = n hour parameter
adrci> set control (SHORTP_POLICY = 360)
http://uhesse.com/2011/06/01/adrci-a-survival-guide-for-the-dba/

Data Guard Cheat:


http://www.datadisk.co.uk/html_docs/oracle_dg/cheatsheet.htm

For Install Support & Certification you can refer this note:

https://community.oracle.com/community/support/support-blogs/database-support-
blog
Question: Direct path read temp

Re: direct path read temp

https://community.oracle.com/thread/3695655?start=0&tstart=0

Question: Where to find Oracle Database 11.2.0.4 server & Client

DB 11.2.0.4 patchset (Patch 13390677) is available on the following platforms

https://community.oracle.com/community/support/support-blogs/database-support-
blog/blog/2014/10/16/oracle-database-11g-release-2-patchset-11204-availability

Question: Where to find Oracle Database 11.2.0.4 client

2) A 12c/32-bit Client is certified on Windows Server 2012 x64.


https://docs.oracle.com/database/121/NTCLI/pre_install.htm#NTCLI1244

Question: Books on Data Warehouse

In DWH there are two main concepts: 1. Kimball 2. Immon. The book from latter is already suggested,
you can read The Data Warehouse Toolkit - Kimball & Ross. You can also search Google for "Kimball
Vs. Immon" to read the battle of ideas.

1- Data Warehousing Guide -- Oracle database v11.2


2- Wiley: Building the Data Warehouse, 4th Edition - W. H. Inmon

Question: Where to find Oracle Database 11.2.0.3 Server & Client

11.2.0.3 - Patch Set - p10404530

Go to Oracle Support and search patch set - p10404530 and you can find both;

Question: Migration 11.2 to 12.1


There are several options for migrating 11.2 database to 12c as below:

1. You can upgrade current 11.2 home to 12.1 using DBUA or Manual. Install 12.1
and start DBUA.
2. Create a new PDB in a CDB, use expdp (11.2) /impdp (12.1) to copy the data
across.
3. Transport Database,
4. You can use Golden Gate

For more information please read


note: http://docs.oracle.com/database/121/UPGRD/toc.htm

Question: Database Upgrade from 11.2.0.4 to 12.1.0.2

http://docs.oracle.com/database/121/UPGRD/toc.htm

For more detailed info refer –


Troubleshooting Assistant: Oracle Database/Client Upgrade - Downgrade (Doc ID 1561791.2)
Oracle Database 12c Release 1 (12.1) Upgrade New Features (Doc ID 1515747.1)
Complete Checklist for Manual Upgrades to Oracle Database 12c Release 1 (12.1) (Doc ID
1503653.1)
Oracle Database 12c Release 1 (12.1) DBUA : Understanding New Changes with All New 12.1 DBUA
(Doc ID 1493645.1)
Oracle Database Upgrade Path Reference List (Doc ID 730365.1)

Question: Table Fragmentation;

How to find Objects Fragmented below High water mark (Doc ID 337651.1)
Script to Report Tablespace Free and Fragmentation (Doc ID 1019709.6)

Note 186826.1 Various Aspects of Fragmentation -- also search for fragmentation


in oracle documentation

Note 1020182.6 Script to Detect Tablespace Fragmentation

Note 1019709.6 Script to Report Tablespace Free and Fragmentation

Note 1019716.6 Script to Report Table Fragmentation

Note 1347102.1 Defragmenting Objects with Alter Shrink Method

Question: Delete 1/3 rd data from a billion row data table

https://community.oracle.com/thread/3684816

Nologging can only help for "create table", "alter table move", direct path load on tables, "create
index", "alter index rebuild" anyway. It can't help on a delete. And for the direct path load (also insert
/*+ append */) will eliminate (most of) the logging on the table - index maintenance operations will still
be logged.
Question: Index Monitoring

Enabling Index monitoring won't tell you if that index has been used in hour X or even in the last day.
It will only tell you that the index has been used since monitoring was turned on. So it won't be able to
tell you that the index was only used during business hours. Its possible that the index was used off-
hours. But does that matter? If the index is used, then presumably it is needed, business hours or not.

https://community.oracle.com/thread/2160267

set pages0
spool enable_monitoring.sql
select 'set echo on' from dual;
select 'alter index ' || index_name || ' monitoring usage ;'
from user_indexes
order by 1;
spool disable_monitoring.sql
select 'set echo on' from dual;
select 'alter index ' || index_name || ' nomonitoring usage ;'
from user_indexes
order by 1;
spool off

But enabling monitoring is not the right thing to do for at least --3-- 4 important reasons :
1. It can falsely capture an index that is being incorrectly used by the optimizer -- i.e. a sub-optimal
that the optimizer selects (for whatever reasons, including bad statistics)
2. It can falsely capture an index that is used only once in one query out of a million queries that have
been executed
3. It can falsely NOT capture an index that is used only on specific days -- e.g. month-end reports
which require a few specific indexes not used for the 28 other days of the month
4. It can falsely NOT capture indexes that are required for constraints, simply because they are not
used in queries (although they are important to maintain data consistency !)
5. It can falsely NOT capture FK indexes that are used by Oracle behind the scene to avoid the
locking threat
[http://richardfoote.wordpress.com/2008/09/12/index-monitoring-and-foreign-keys-caution-kid-a/]

Question: AWR Analysis;


http://www.pythian.com/blog/cursor-pin-s-wait-on-x-in-the-top-5-wait-events/

Try looking at the problem via ASH raw data - V$ACTIVE_SESSION_HISTORY and
DBA_HIST_ACTIVE_SESS_HISTORY.
It should help to add information to the blocked/blocker scenarios.
Question: Export / Import help

How to speed up expdp in Oracle 11g


https://community.oracle.com/thread/3685138

1. use flashback_scn to ensure the data is consistent - if you have an outage on that application it
may be OK anyway - but i would always want to include this
2. If you have Oracle EE use parallel - this is where you'll get the most performance improvement
from
3. don't use compression on export it will slow it down (and you need an extra licence anyway)
4 Find out if some of the internal metadata operations are slow (extracting DDL and doing the
estimates etc) - this could be bugs and there may be workarounds
5 If the problem is a certain table - find out why it is so slow - does it have lobs?

Question: Data Guard Cheat Sheet

http://www.datadisk.co.uk/html_docs/oracle_dg/cheatsheet.htm

Question: Data Guard Installation 11 & 12c.

Creating a Standby using RMAN Duplicate (RAC or Non-RAC) (Doc ID 1617946.1)


For best practices you can also refer:
http://www.oracle.com/technetwork/database/features/availability/oracle-database-maa-best-
practices-155386.html

Question: Diff between EE, SE & SE One edition;

Differences Between Enterprise, Standard and Standard One Editions on Oracle 12.1
(Doc ID 1628809.1)

Question: Move database to a new Location on the same server;

1) SHUTDOWN NORMAL you database


2) Move all files including controlfile, pfile, datafiles, redo logs to new location.
3) Start the database - STARTUP NOMOUNT;
3.1) Show parameter control
4) Update controlfile parameter to point to NEW LOCATION
5) ALTER DATABASE MOUNT ;
6) Check all locations;
SQL> select log_mode from v$database;
SQL> select name from v$datafile;
SQL> select member from v$logfile;
SQL> select name from v$tempfile;
SQL> select name from v$controlfile;
7) ALTER DATABASE RENAME FILE 'old location ' TO ' new location '; -- Repeat for all files above.
8) alter database open;

Question: Wrong number display – without decimal point

https://community.oracle.com/thread/3687755

Question: Oracle 12c Learning Library;

https://apexapps.oracle.com/pls/apex/f?
p=44785:141:0::::P141_PAGE_ID,P141_SECTION_ID:6,84

Question: On BIG Tablespac, is restore slow ?


https://community.oracle.com/thread/3689349

The potential size of bigfile tablespaces is why people use BCT (block change tracking) to minimise
the backup load, and flashback logging to give them some chance of flashing back the database and
then rolling it forward rather than restoring a very large file which (ultimately) is the inevitable threat
with bigfile tablespaces. You need to consider how much you're prepared to pay, and how much
time/data you're prepared to lose, for each type of scenario you will need to recover from before you
can sensibly work out a best (for you) strategy. (And then you need to review the strategy and
underlying assumptions every year or so.)

Question: demerit of BIG Tablespac ?

No specific "demerits" that I can think of, just a couple more opportunities for making a couple more
mistakes.

a) If you're running on filesystem make sure you're using directio to bypass the file system otherwise a
small number of bigfiles could lead to excessive inode contention
b) If you're doing backups with RMAN then remember to specify the section size if you want to
maximise your use of concurrent channels on backup

Things you also expect to do if you think bigfiles are a good idea
a) Enable change tracking to get proper incremental backups from rman
b) Think carefully about the impact of the tablespace being the unit of restore in the event of a
catastrophe

Question: How can you restore latest backup using3 months Old Control file?
Of course you can. A RECOVER DATABASE USING BACKUP CONTROLFILE lets Oracle know
that the controlfile is "old" -- it doesn't matter if the "old"ness is older than the lowest checkpoint SCN
in the database backup.

Question: A very high number of parallel slaves allocated ?

https://community.oracle.com/thread/3689660

Question: What is difference between rowid and row directory pointer?

https://community.oracle.com/thread/3691213

Simple:
1. row directory pointer - the PHYSICAL address of a row within a block
2. rowid - the LOGICAL address of a row within a block

The row can be moved within a block. That WILL change the PHYSICAL location of the row but it will
often NOT CHANGE the logical number of the row in the block.

The PHYSICAL location of a row has NOTHING to do with the ROW NUMBER of that row in the
block. A row stored at physical location starting at byte 1023 could be row 1, 17, 84 or whatever in
that block depending on where the other rows are stored.

the ROW NUMBER is 'an index into the row directory.

Question: Core Dump issue, ORA-07445, ORA-00600 ?

You Can use Oracle Support


ORA-600/ORA-7445/ORA-700 Error Look-up Tool (Doc ID 153788.1)

Question: RMAN BACKUP / RESTORE TO NEW MACHINE ?

How to Move/Restore DB to New Host and File System using RMAN (Doc ID
1338193.1)

Question: Exadata Migration or Database Migration ?

If you want to move database only, there are different way you can do it;
1) Golden Gate
2) Data Guard - Active Data Guard
3) Data Pump
4) RMAN Backup/Restore
5) Storage level Copy/Move
6) CTAS
If you want to move the whole exadata machine, you need to contact vendor who actually does this
job. In my opinion taking help from Oracle is better.

Question: Exadata Database Move/Migration to new Location ?

We recently had a data center move and moved some exadata machines to a new location.

There are a few things to consider before move happens;

1) Get the network ready on new Data Center and make sure all connectivity (e.g. you can remote
access to it) are working. In our case the new center has same IPs network.
2) Get the Vendor who does transporting of Hardware Machines.
3) On the last day before move, Shutdown the Exadata Machine ( shut down database, RAC,
shutdown db nodes, cell nodes, infinity band etc.. )
4) Power off Exadata Machine
5) Unplug all network cables.
6) Let the Hardware cool down.
7) Transport to new location and move the Machines to correct Bay and wait for machines to be
acclimatized
8) Plug Network cables.
9) Power On Exadata.

I found a Support note which also you can refer; What Needs to be Done When Moving
Cluster Nodes to a New Data Center (Doc ID 1332423.1)

Question: RAC VIRTUAL IP ?

https://community.oracle.com/thread/3691874
https://community.oracle.com/message/11241625#11241625

Question: How can you get a user last logon time

1. select name,spare6 from user$ where type#=1 and spare6 < sysdate - 30 ;
2. If you were on 12.x, you'd have another option (dba_users.last_login).
3. If auditing is enabled you can use select * from DBA_AUDIT_TRAIL where username =
'SCOTT'
DBA_AUDIT_TRAIL.TIMESTAMP – column specifies the logon time.

Question: Creating a Single Instance Physical Standby for a RAC Primary ?


MAA - Creating a Single Instance Physical Standby for a RAC Primary (Doc ID
387339.1)
Creating a Standby using RMAN Duplicate (RAC or Non-RAC) (Doc ID 1617946.1)

Question: ORA-27125 on 12c (12.0.1) database ?

https://community.oracle.com/thread/3695030

"Per process system memlock (soft) limit = 64K"


this Line is
"Per process system memlock (soft) limit = 24G"
when the database is NOT started via SystemD.

The recommendation about per process Memlock does not appear when the database is started
manually.

Question: dbms_metadata.get_ddl column separator ?

How to add separator at the end of ddl retrieval.

https://community.oracle.com/thread/3704819

Question: How to use regexp – regular expression replace ?

select regexp_replace(substr('ABCD-234-3245-A',instr('ABCD-234-3245-
A','-',1,1)),'[^[:digit:]]') position_underscore from dual;

or
select replace(substr('ABCD-234-3245-A',instr('ABCD-234-3245-A','-')) , '-', '')
position_underscore from dual ;

Question: Migrate or Convert single instance to RAC ?

You can also look at this link which caters for 11gR1 as well though title say 10g,

How to Convert 10g Single-Instance database to 10g RAC using Manual Conversion
procedure (Doc ID 747457.1)

http://skillbuilders.com/webinars/webinar.cfm?id=94&w=convert-to-oracle-12c-rac-
in-10-minutes

HTH,
Pradeep
Rconfig Error When Converting From Single Instance To RAC (Doc ID 371519.1)
How to Convert 10g Single-Instance database to 10g RAC using Manual Conversion
procedure (Doc ID 747457.1)
How To Convert A Single Instance Database To RAC In A Cluster File System
Configuration (Doc ID 208375.1)
How to Convert a Single-Instance ASM to Cluster ASM (Doc ID 452758.1)
http://docs.oracle.com/cd/B19306_01/install.102/b14205/cvrt2rac.htm#sthref1165

You might also like