You are on page 1of 5

DEFAULT LOCATION OF OCR BACKUP

$ orcrconfig –showbackup

WHAT IS ASM METADATA

An ASM instance manages metadata needed to make ASM files available to Oracle
databases and ASM clients. ASM metadata is stored in disk groups – in metadata
blocks.

Each ASM disk has ASM metadata, with some of this metadata relevant to that disk
only and some relevant to the whole disk group. For example, the ASM disk header
is relevant to that disk only, while the Partnership and Status Table (PST) is relevant
to the whole disk group.

Physically addressed metadata

The physical ASM metadata are the following structures:

 Disk header
 Free Space Table (FST)
 Allocation Table (AT)
 Partnership and Status Table (PST)
what tablespace to can do offline

You cannot take the following tablespaces offline:

 SYSTEM
 The undo tablespace
 Temporary tablespaces

IN WHICH VIEW YOU WILL SEE IF ITS A CUMULATIVE BACKUP OR


INCREMENTAL BACKUP APART FROM LIST BACKUP

RC_BACKUP_SET

BACKUP_TYPE column= D, I or L

The type of the backup: D (full backup or level 0 incremental), I (incremental level
1), L(archived redo log).
HOW TO ANALYZE A TABLE

Oracle will collect statistic on the number of rows, the number of empty data blocks,
the number of blocks below the high water mark, the average row length, and the
number of chained rows in a table when the Oracle ANALYZE TABLE command is
performed:

ANALYZE TABLE scott.emp COMPUTE STATISTICS FOR TABLE;

Error ORA-01555 contains the message, “snapshot too old.”

This message appears as a result of an Oracle read consistency mechanism. .

ORA-01555 relates to insufficient rollback segments or undo_retentions parameter


values that are not large enough. The modified data by performed commits and
rollbacks causes rollback data to be overwritten when the rollback segments are
smaller in size.

To resolve this issue, either increases the parameter of UNDO_RETENTION if you


are in AUM mode.

what is root.sh

orainstRoot.sh

1)It creates the inventory pointer file (/etc/oraInst.loc),This file shows the inventory
location and group it is linked to.
2)It Changes groupname of the oraInventory directory to oinstall group.
eg,

/u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.


The execution of the script is complete.

root.sh

1)This will Creates a /etc/oratab file.This is the file which we use to make automatic
Database shutdown and startup.
How to take backup ( DP ) – using SCN number

RMAN> backup incremental from scn 1289359962 database;

what is control file, if control file is missing how you can recover

RMAN> restore controlfile from '/u03/app/oracle/oradata/orcl/backup/c-


1239150297-20100426-00';

RMAN> alter database mount;

RMAN> restore database;

RMAN> recover database;

RMAN> alter database open resetlogs;

How to Verify archive log gaps

SQL> SELECT SEQUENCE#, APPLIED FROM V$ARCHIVED_LOG;

V$ARCHIVED_LOG: displays archive logs “received” from the primary


V$LOG_HISTORY: displays archive logs that have “started” to be applied (not necessarily
completed)
V$LOG: displays “primary database” logfile information

how to unregister the catalog database

rman catalog=rman/rman@catdb

RMAN> UNREGISTER DATABASE wk21 NOPROMPT;

what package you run during the database creation?

@?/rdbms/admin/catalog.sql - creates all the data dictionary views

@?/rdbms/admin/catproc.sql - Creates system specified stored procedures

@?/sqlplus/admin/pupbld.sql - creates the default roles and profiles.


iP NEED FOR RAC
Using physical IP:
----------------------
If the client request for connection goes to Physical IP of a node and the node1 is down, client will get notified about
after network time out only (which could be as long as 10 minutes). After the client gets this information, he tries to
connect to the alternative address node2.
Con: takes time to throw error so takes time to reconnect.

Using virtual IP:


-------------------
Why must we use a VIP address in an Oracle RAC environment?
The simple answer to this question is to avoid TCP timeouts.
If the client request goes to Virtual IP of the node (VIP) and the node is down, VIP will automatically failover to one of
the surviving nodes without waiting for the network time-out and client gets connected.
server node fail, this VIP is transferred to another server node in order to still provide network connectivity for clients
using the address of the failed server node. VIP in other words provides high availability as despite a server node failing,
network communication to this node will still be supported by another node via the failed node's VIP.
Con:
On a 10 node cluster, if there will be 10 virtual IP addresses with 10 virtual hostnames - which means that many clients
will need to know and use all 10 VIPs in order to make load balanced, or high availability, or TAF, connections.

Using SCAN IP:


--------------------
SCAN will do this on the client side - by providing the client with a Single Client Acces Name to use as oppose to 10 VIPs.
The SCAN listener service knows all cluster services - and can redirect the client to the appropriate VIP listener where
the requested service is available.
Scan has 3 IPs configured in DNS server instead of one IP because to distribute total load on single IP.
Oracle recommends 3 IPs for scan is enough for load distribution among 3 scan IPs and provides ease in
management of cluster nodes (addition or deletion).
You can add new nodes to the cluster without changing your client TNSnames. This is because Oracle will automatically
distribute requests accordingly based on the SCAN IPs which point to the underlying VIPs. Scan listeners do the bridge
between clients and the underlying local listeners which are VIP-dependent.

PROCESS INVOLVED IN STARTING RAC NODE?

1. Start Oracle Clusterware or CRS.


2. Start Node applications running on nodes.
3. Start All ASM instances from all nodes.
4. Start RAC Database Instances on all nodes.
5. Start Oracle Home process accessing database.

WHY WE NEED TO REGISTER IN CLUSRERWARE AFTER ADDING/DELETING NODE?

IN WHICH COMMAND WILL U SEE WHICH PROCESS IS USING THE FILES IN UNIX

Lsof

WHAT WILL U SEE IN EXPLAIN PLAN?

SQL> explain plan for select * from dual;

Explained

SQL> select * from table(dbms_xplan.display);

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
--------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost |
--------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1| 2| 2|
| 1 | TABLE ACCESS FULL | DUAL | 1| 2| 2|
--------------------------------------------------------------------
Note: cpu costing is off

The EXPLAIN PLAN statement displays execution plans chosen by the optimizer for SELECT, UPDATE, INSERT, and
DELETE statements. A statement execution plan is the sequence of operations that the database performs to run the
statement.

WHAT IS BATCH FILE? HOW WILL U CREATE A BATCH FILE?

How to Create a Batch File in Windows. Open a text file, such as a Notepad or WordPad document. Add your
commands, starting with @echo [off], followed by—each in a new line—title [title of your batch script], echo [first
line], and pause. Save your file with the file extension .bat, for example, test.bat.

You might also like