Tuesday, April 19, 2016

Notes

list archive log all shows all the archivelogs currently know to the controlfile.

list backup of archivelog all will show you the archives that have been backed up

there backup timestamp must be greater than the time when you started the recovery hence 5406,5407 and 5408  didn't recover as they were not backed up in the first place.

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

e.g. ORA-00600: internal error code, arguments: [kkqjpdpvpd: No join pred found.], [], [], [], [], [], [], [], [], [], [], []

First Argument : kkqjpdpvpd: No join pred found.

Fast Start Failover, is avialable through dataguard broker which do automatic failover to the choosen primary database in case of the primary crash. It has a componenet called Observer which can be installed in a

seperate location other than primary and standby databases which takes very less amount of resources, Just we need oracle database s/w or Oracle Client s/w and tnsentry pointing to both primary and standby

databases. The observer will continuously monitor the primary database and due to any reason if primary is unavilable it starts failover to  choosen standby by waiting the ammount specified in FSFThreshold.

FSFLaglimit   - The maxminum ammount of time in Seconds for the permissible data loss. FSFO will runs in Max availability or Max Performance. In Max availibity no data loss where Max Permformance

            30 seconds of dataloss is permissible.

FSFThreshold - 30 Seconds, FSFO waits for 30 seconds before failing it over to the specified standby database

FSFPrmyshutdown - [TRUE|FALSE]. If the parameter is true then primary will be stalled for the FSFThreshold time and shutdowns.

FSPTarget - Using this parameter we will specify the db_unique_name of the standby database to where primary has to  failover.

FSFAutoReinitiate - [TRUE|FALSE]. If the parameter is true then former primary will start re-initiate after the fast start failover.

Fast-Start-Failover has a few restrictions:

We can not change the protection mode of the dataguard broker configuration and logshipping mode of the primary and standby databases.

We can not switchover/failover to the targets(standby databases) which are not part of the FSFTarget

The broker configuration cannot be removed, If FSFO is enabled

Standby database cannot be dropped/deleted.

FSFO is not possible if the observer is not running and.

If the database shutdown normally then FSFO will not perform failover, It will perform only if abort option is used.

Thursday, April 7, 2016

Generating Oracle Query output to a csv file

--Set the linesize large enough to accommodate the longest possible line.
SET LINESIZE 9999
--Turn off all page headings.
SET PAGESIZE 20000
--Turn off feedback
SET FEEDBACK OFF
/*
-- It will not return how many number of rows were returned after executing the query.
*/
--Eliminate trailing blanks at the end of a line.
SET TRIMSPOOL ON

SET TERMOUT OFF
/*
-- The output upon running the command/script will not not returned on the standard output screen.
*/

/*
-- set your column seperator to a comma for CSV file

*/

SET COLSEP ','

SPOOL excel_readable_file.csv

Query

spool off;