Quantcast
Channel: SCRIPTS – ORACLE-HELP
Browsing all 27 articles
Browse latest View live

FIND THE ARCHIVE LAG BETWEEN PRIMARY AND STANDBY

select LOG_ARCHIVED-LOG_APPLIED “LOG_GAP” from (SELECT MAX(SEQUENCE#) LOG_ARCHIVED FROM V$ARCHIVED_LOG WHERE DEST_ID=1 AND ARCHIVED=’YES’), (SELECT MAX(SEQUENCE#) LOG_APPLIED FROM V$ARCHIVED_LOG WHERE...

View Article



Lists all locked objects for whole RAC

COLUMN owner FORMAT A20 COLUMN username FORMAT A20 COLUMN object_owner FORMAT A20 COLUMN object_name FORMAT A30 COLUMN locked_mode FORMAT A15 SELECT b.inst_id, b.session_id AS sid,...

View Article

Displays information on all long operations

COLUMN sid FORMAT 999 COLUMN serial# FORMAT 9999999 COLUMN machine FORMAT A30 COLUMN progress_pct FORMAT 99999999.00 COLUMN elapsed FORMAT A10 COLUMN remaining FORMAT A10 SELECT s.sid, s.serial#,...

View Article

Extracts DDL statements for specified objects

exec dbms_metadata.set_transform_param( dbms_metadata.session_transform,’SQLTERMINATOR’, TRUE); select dbms_metadata.get_ddl( object_type, object_name, owner ) from all_objects where object_type NOT...

View Article

RMAN BACKUP Scripts

~~~~~~~~~~~~~~~~~~~~~~~~ # RMAN backup history ~~~~~~~~~~~~~~~~~~~~~~~~set lines 150 set pages 900 col start for a20 col end for a20 col status format a11 col input_bytes_display format a10 col...

View Article


Tablespace growth in Oracle

— Find Tablespace growth size in number of days. set feed off set pages 1000 lines 180 column “tablespace_name” heading “Tablespace | Name” format a20 select to_char...

View Article

Importing just 1 view via impdp

Hi, Struggling the right syntax in Unix environment for importing a lost view, here is the proper way: impdp user/password@database directory=dir_dump dumpfile=dump.dmp logfile=imp_MY_VIEW.log...

View Article

How to check hidden parameter in Oracle

Check hidden parameter in Oracleset lines 200 col name for a50 col value for a40 select ksppinm name , ksppstvl value from x$ksppi a, x$ksppsv b where a.indx=b.indx and substr(ksppinm,1,1) = '_'; The...

View Article


FINDING SCHEMA SIZE FOR A ORACLE DATABASE

SQL> BREAK ON REPORT SQL> COMPUTE SUM LABEL TOTAL OF "Size of Each Segment in MB" ON REPORT SQL> select segment_type, sum(bytes/1024/1024) "Size of Each Segment in MB" from dba_segments where...

View Article


Image may be NSFW.
Clik here to view.

Unified Audit Trail In Oracle 12c

This post is about Unified Audit Trail In Oracle 12c . Few starting lines give the overview of ” Unified Audit Trail ” .   With Oracle 12c, unified auditing has been introduced. It consolidates all...

View Article

Export backup with date and time

Data Pump Export (hereinafter referred to as Export for ease of reading) is a utility for unloading data and metadata into a set of operating system files called a dump file set. The dump file set can...

View Article

HOW TO CONVERT SCN TO DATE AND DATE INTO SCN

SQL>select current_scn from v$database; 7705798324 SQL> select timestamp_to_scn(to_timestamp('24/09/2012 14:24:54','DD/MM/YYYY HH24:MI:SS')) as scn from dual; SCN ---------- 7705798324 SQL>...

View Article

check os process id of your session from sql prompt.

 Check os process id of your session from sql prompt. select p.spid, s.username, s.status, s.server, to_char(s.logon_time,'DD-MON-YY HH24:MI') from v$process p, v$session s where p.addr = s.paddr and...

View Article


Find corrupted objects in Oracle using sql query

Find corrupted objects in Oracle using sql query : When you find block corruption in your database use validate database or validate check logical database command of RMAN, it will populate...

View Article

Check os processid of your session from sql prompt.

To check os processid of oracle session , we can check v$process view. SPID column of v$process view shows os processid. We can use following query to check processid, status for specific user.select...

View Article


Image may be NSFW.
Clik here to view.

High Water Mark USAGE

Before start this article we must know about “HWM” . After did lots of R&D i found the technical definition Explanation in Detail: (http://www.dba-oracle.com/t_high_water_mark.html) . The high...

View Article

Image may be NSFW.
Clik here to view.

How to find database growth on a Monthly wise

Today we are going to have look at the Database growth. With the help of the given query. DBA can find the monthly growth of there database. Sometimes little information is too much useful.      select...

View Article


Image may be NSFW.
Clik here to view.

How to Check/Validate That RMAN Backups Are Good

From today’s post, I am going to remind you all about those colleges day when we used to learn about the validation in programming languages. In daily life are aware of validation. In the database...

View Article

Image may be NSFW.
Clik here to view.

HOW TO CONVERT SCN TO DATE AND DATE INTO SCN

Being DBA, we all are well aware SCN. We all known about it’s important. SCN is the most important element of Oracle Database. It helps DBA in the Recovery Database.       Database SCN number some time...

View Article

Image may be NSFW.
Clik here to view.

Schedule rman backup in windows

We are going to learn about the steps which we will use for schedule rman backup in windows. Most probably Organisations use Linux and Unix OS as per there requirements but sometimes as per company’s...

View Article
Browsing all 27 articles
Browse latest View live




Latest Images