Wednesday, October 22, 2014

Oracle DataGuard Tips

# Data Gard Issue (Find DB name from primary)
show parameter log_archive_config
archive log list
SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY;
select * from v$dataguard_config;
SELECT DATABASE_ROLE, DB_UNIQUE_NAME INSTANCE, OPEN_MODE, PROTECTION_MODE, PROTECTION_LEVEL, SWITCHOVER_STATUS FROM GV$DATABASE;

set pages 1000
set lines 120
column DEST_NAME format a20
column DESTINATION format a35
column ARCHIVER format a10
column TARGET format a15
column status format a10
column error format a15
select DEST_ID,DEST_NAME,DESTINATION,TARGET,STATUS,ERROR from v$archive_dest
where DESTINATION is NOT NULL;

set linesize 250
column sequence# format 999999999
column name format a100
column applied format a3
column thread# format 9
SELECT thread#,SEQUENCE#,name,APPLIED FROM V$ARCHIVED_LOG where next_time > (sysdate-5/7) order by first_time asc;

Wednesday, September 17, 2014

How to set Crontab Entry for different-2 scenario

# How to set cron
00 0,4,8,12,16,20 * * * sh /u001/scripts/GPASP_Job_email.sh > /u001/log/GPASP_Job_email.log 2>&1

#How to set a cron to run only and only once in his whole life for specific time.
At command in Unix

Saturday, September 28, 2013

Learn Oracle PL/SQL Basic Fundamentals within 24Hr.

Oracle PL/SQL More than Basic and Less than Advanced. 

An Introduction to PL/SQL: 
So, what is PL/SQL? It is the procedural (and sometimes object-oriented) programming extension to SQL, provided by Oracle. The PL in PL/SQL stands for procedural language (PL) superset of the Structured Query Language (SQL). PL/SQL is a proprietary language not available outside the Oracle Database. It is a third-generation language (3GL) that provides programming constructs similar to other 3GL languages, including variable declarations, loops, error handling, etc. You can use PL/SQL to do such things as codifying your business rules through the creation of stored procedures and packages, trigger database events to occur and add programming logic to the execution of SQL commands. Structured Query Language (SQL).

The SQL in PL/SQL stands for structured query language. We use SQL to SELECT, INSERT, UPDATE and DELETE data. We use it to create and maintain objects and Schemas to control access rights to our instances. It actually grew out of the work done by Dr. E.F. Codd and IBM in the early 1970s. The American National Standards Institute (ANSI) recognizes SQL and publishes standards for the language.

It's Free Click Here to Download .pdf File




Hope It will be useful for you Guys, Thank You!!!