Showing posts with label Basic. Show all posts
Showing posts with label Basic. Show all posts

Tuesday, April 17, 2012

HP Data Protector integration with Oracle Architecture

 

image

The components of this integration, as shown in Figure 8-1, are
SM The Data Protector Session Manager, which manages the backup and restore sessions.
MA The Data Protector General Media Agent, which reads and writes data from and to media
devices.
Data Protector MML The Data Protector Oracle Integration Media Management Library, which
is a set of routines that enables data transfer between the Oracle server and Data Protector. The
Data Protector MML links Data Protector and Oracle server software.
Ob2rman.pl The Data Protector Oracle Integration agent, which works with RMAN to manage
all aspects of the backup/recovery operations on the Oracle target database.
Backup API The Oracle-defined application programming interface.
IDB The Internal Database, where all the information about Data Protector sessions, including
session messages, objects, data, used devices, and media, is written.
RMAN The Oracle Recovery Manager.

Backup Process

When a backup is started with Data Protector, the following happens in the background:
1. Data Protector executes ob2rman.pl, which starts RMAN on the client and sends the
preconfigured RMAN script.
2. RMAN contacts the Oracle server, which contacts Data Protector via the MML interface
and initiates the backup.
3. During the backup session, the Oracle server reads data from the disk and sends it to
Data Protector for writing to the backup device.
4. Messages from the Data Protector backup session and messages generated by Oracle are
logged to the Data Protector database.

Wednesday, January 04, 2012

Oracle 11g Interactive Quick Reference guide

 

I just came across an essential Oracle 11g Interactive Quick Reference guide – which has the key dictionary views, background processes and architecture diagram.
Hope you may find it useful.  It can be downloaded from

http://www.oracle.com/webapps/dialogue/ns/dlgwelcome.jsp?p_ext=Y&p_dlg_id=9575302&src=7027600&Act=54

Monday, December 19, 2011

What is High Water Mark in Oracle?

 

The high water mark level is just a line separate the used blocks and free blocks.

The blocks above the HWM level is free blocks, they are ready to use.
The blocks below the HWM level is used blocks, they are already used.

For example'

if you delete some huge records from the database, that data will delete but the blocks are not ready to used, because that blocks are still below HWM level, so delete command never reset the HWM level,

At the same time you truncate the date, then the data will delete and that used blocks will goto above the HWM level, now its ready to used. now they consider has free blocks.

with 10g there are two different HWM for a table


After deleting rows high water mark remain same, what will happen if i insert new rows now.where these new rows will be stored? above the HWM or below?
The space freed by deletions is available for new insertions, so it will be below, until this free space is filled.
Otherwise; Above the HWM when using the APPEND hint in the INSERT statement (or using DIRECT=Y in sql*loader)

They will remain under the HWM until the object is rebuilt, truncated, or shrunk (shrinking of a segment is a new Oracle 10g feature that is supported only if the segment is in an ASSM tablespace).

Friday, September 30, 2011

How to monitor ASM Disk group usage on OEM Grid

  1. Connect to OEM
  2. Connect to the Host
  3. From the Host –> Go to Target Tab
    image
  4. From the listed target, select ASM by looking at type as  “Automatic Storage Management
    image

  5. Now select type ASM, then we will be landed at ASM on OEM Grid Control.
  6. On the Home Page of ASM, we can find the Disk group usage
    image
  7. Also from the Home, go to tab Disk Group

    image

Friday, September 23, 2011

How to find the open mode status of database?

Option 1:

select status from v$instance;

Option 2:

select open_mode from v$database;


Option 3:

Search Alert Log for string of “Database” or “alter database”.

How to generate AWR Report?

Method 1:  By Querying

1. Query dba_hist_snapshot to find the snap id for the interval you are looking for.

SELECT dbid, snap_id, begin_interval_time, end_interval_time from dba_hist_snapshot
order by begin_interval_time;

2.

spool siv_awr_201109.lst
SELECT output
FROM TABLE (dbms_workload_repository.awr_report_text(3463084831, 1, 18048, 18050));
spool off

Method 2:

@?/rdbms/admin/awrrpt.sql

It is an interactive script that can be used to generate HTML or text reports. The script prompts for type of report
requested and prompts for number of days of snapshots to choose from so based on that it displays snap ids to
choose the start and end snapshot it.

@?/rdbms/admin/awrrpti.sql

Script can be used for the specified database and instance so the script in addition will prompt for dbid and instance number.
@?/rdbms/admin/awrddrpt.sql Script can be used to generate a combine report of 2 different snapshots for comparison of performance in one report so it will prompt for two pairs of snapshot snapshots to compare against.
@?/rdbms/admin/awrinfo.sql Script print AWR information like space usage by AWR, subset of AWR snap ids, Automatic Database Diagnostic Monitor (ADDM), Active Session History (ASH) information.

Saturday, September 17, 2011

Sequence of steps performed when opening up a database

After issuing of SHUTDOWN ABORT command, when opening up database following step are performed

1. SPFile / PFile:             Server Parameter file ( SP File ) or the initialization parameter (initSID.ora / PFILE ) file is read
2. Memory :                      SGA is allocated
3. Background Process: Background process are started
4. Control File :                Control file is read
5. Redo Log File:              Redo Log file is read
6. Data File:                       Data files are checked for consistency
7. Instance Recovery:   Instance Recovery is started

Friday, July 15, 2011

How to delete control file


 

Verify the file specification information for the current control file(s):

SQL> show parameters control_files

If your are using pfile, change CONTROL_FILES to point to the remaining control files. Make sure that the full file specification is used.

vi $ORACLE_HOME/dbs/init<SID>.ora.

CONTROL_FILES = (/oradata/<sid>/data1/control_01.ctl, /oradata/<sid>/data3/control_02.ctl)

If you are using spfile, you may modify the CONTROL_FILES parameter using the ALTER SYSTEM SET command.

SQL> alter system set control_files = /oradata/<sid>/data1/control_01.ctl, /oradata/<sid>/data3/control_02.ctl scope=spfile;

Shutdown and startup the database.

Verify the file specification information for the current control file(s):

SQL> show parameters control_files

If desired, delete the control file from the O/S.

Tuesday, June 28, 2011

Steps to set database on flashback mode in RAC for Oracle 11g

 

---- Check if flashback on?

SELECT flashback_on, log_mode
FROM v$database;

--- Check for Flashback Parameters existing

set linesize 121
col name format a30
col value format a30

SELECT name, value
FROM gv$parameter
WHERE name LIKE '%flashback%';

---- Stop the RAC Database , it will stop all the instances of the DB

srvctl stop database -d sfodb

--- Start the DB in mount state

srvctl start instance -d sfodb -i sfo38u1 -o mount 

-- Set the Flashback on

alter database flashback on;

--- Open the database

alter database open;

--- Start the remaining instances of the RAC

srvctl start instance -d sfodb -i sfo38u2 -o mount exclusive

-- Verify the flashback settings

select INST_ID,Name, FLASHBACK_ON from gv$database;

Wednesday, June 01, 2011

OEM Agent Log Files


The OEM Agent files are placed on AGENT_HOME/sysman/log/ by default.

OEM Agent Log File Management Agent log file emagent.log
OEM Agent Trace File Management Agent trace file emagent.trc
OEM Agent startup log file Management Agent startup log file emagent.nohup

Sunday, May 29, 2011

What is mounting the databases in Oracle?

After starting the instance, the Oracle software associates the instance with specific database. This is called mounting the database.

Oracle Database Memory Structure


image

Sunday, March 27, 2011

Basic Oracle Queries


1. How to check Unix O.S Version?

uname -a

2. How to check Oracle Version?

select * from v$version;

3. How to find the Start up time of Oracle Instance?

SELECT instance_name,host_name,
TO_CHAR(startup_time,'DD-MON-YYY HH:MM:SS AM')
FROM v$instance;