Syed Saad Ali

Oracle ACE Pro

Oracle Solution Architect

Oracle E-Business Suite

Oracle Cloud Infrastructure

Oracle Fusion Middleware

Oracle Database Administration

Oracle Weblogic Administration

Syed Saad Ali

Oracle ACE Pro

Oracle Solution Architect

Oracle E-Business Suite

Oracle Cloud Infrastructure

Oracle Fusion Middleware

Oracle Database Administration

Oracle Weblogic Administration

Installation/Configurations11g

October 1, 2017 RMAN backup and logical backup With Different User
Installation/Configurations10gInstallation/Configurations11gInstallation/Configurations12cOracle Database Material

RMAN backup and logical backup With Different User

Step 1: Create the user

CREATE USER bkp_user IDENTIFIED BY bkp_user DEFAULT TABLESPACE users TEMPORARY 
TABLESPACE temp PROFILE DEFAULT; 
GRANT CONNECT TO bkp_user; 
GRANT exp_full_database TO bkp_user; 
GRANT imp_full_database TO bkp_user; 
GRANT recovery_catalog_owner TO bkp_user; 
GRANT select_catalog_role TO bkp_user; 
GRANT CREATE SESSION TO bkp_user; 

Step 2: Connect RMAN with the Above Created User

$ rman

RMAN> connect target bkp_user/bkp_user

RMAN> backup database;

Note: Script can be written and job can be scheduled to take backup.

 

September 1, 2017 Oracle RMAN Commands List
Installation/Configurations10gInstallation/Configurations11gInstallation/Configurations12cOracle Database Material

Oracle RMAN Commands List

Here is the list of key most RMAN commands that are used for Backup and related activities:

 

LIST Commands

LIST Commands are generic RMAN commands that will show/list various types of information when executed within RMAN utility.

RMAN> list backup;

It lists all the backups taken using RMAN utility.

RMAN> list backup of database;

The above command lists out all the (individual) files that are in the backup.

RMAN> list backup of tablespace system;

The above command lists out all the files that are in the backup that belong to the tablespace ‘system’.

RMAN> list backup of control file;

The above command lists out all backups of the control file.

 

CONFIGURE Commands

CONFIGURE commands in RMAN are used to configure/setup various initial settings:

RMAN>CONFIGURE RETENTION POLICY TO REDUNDANCY2;

The above commands indicates how many days the backup copies need to be retained. Default is 1 day.

RMAN> CONFIGURE RETENTION POLICY CLEAR;

The above command resets the Retention policy to the default value of 1 day.

CONFIGURE BACKUP OPTIMIZATION ON;

The above command verifies to make sure that identical files are NOT backed up to the device specified.

CONFIGURE BACKUP OPTIMIZATION CLEAR;

The above command resets the Optimization option to the default value.

 

SHOW Commands

Show commands are used to show/display the configuration setting values.

RMAN> show all;

The above command shows all the current configuration settings on the screen.

RMAN> show retention policy;

The above command shows the current retention policy.

RMAN> show default device type;

The above command shows the default device type configured for backups.

RMAN> show datafile backup copies;

The above command shows the number of backup copies available in the target database.

 

BACKUP Commands

Backup commands are the real commands which do the actual backup work.

RMAN> backup database;

The above command backs up the database (target).

RMAN> backup database include current controlfile plus archive log;

The above command backs up the target database and the current control file and archive log files.

 

REPORT Commands

Report commands list/report specific information. The difference between report and list command is report command output is in a better format.

RMAN> report obsolete;

The above command reports which backups can be deleted.

 

DELETE Commands

Delete commands delete/remove specific items from the server, repository catalog.

RMAN> delete obsolete;

The above command deletes all the backups that are older based on the retention policy setup.

 

 

September 1, 2017 RAC Voting Disk
Installation/Configurations10gInstallation/Configurations11gInstallation/Configurations12cOracle Database Material

Rac Voting Disk

The Voting Disk File is a file on the shared cluster system or a shared raw device file.

Voting disk a key component of clusterware and its failure can lead to inoperability of the cluster.

In RAC at any point in time the clusterware must know which nodes are member of the rso that

  • it can perform load balancing
  • In case a node fails, it can perform failover of resources as defined in the resource profiles
  • If a node joins, it can start resources on it as defined in OCR/OLR
  • If a node joins, it can assign VIP to it in case GNS is in use
  • If a node fails, it can execute callouts if defined

Adding

crsctl add css votedisk <file>

deleting

crsctl delete css votedisk <file>

querying

crsctl query css votedisk

 

 

September 1, 2017 CRS Administration
Installation/Configurations10gInstallation/Configurations11gInstallation/Configurations12cOracle Database Material

CRS Administration

 

CRS Administration

starting ## Starting CRS using Oracle 10g R1
not possible
## Starting CRS using Oracle 10g R2
$ORA_CRS_HOME/bin/crsctl start crs
stopping ## Stopping CRS using Oracle 10g R1
srvctl stop database -d <database>
srvctl stop asm -n <node>
srvctl stop nodeapps -n <node>
/etc/init.d/init.crs stop

## Stopping CRS using Oracle 10g R2
$ORA_CRS_HOME/bin/crsctl stop crs

disabling/enabling ## use to stop CRS restarting after a reboot

## Oracle 10g R1
/etc/init.d/init.crs [disable|enable]

## Oracle 10g R2
$ORA_CRS_HOME/bin/crsctl [disable|enable] crs

checking $ORA_CRS_HOME/bin/crsctl check crs
$ORA_CRS_HOME/bin/crsctl check evmd
$ORA_CRS_HOME/bin/crsctl check cssd
$ORA_CRS_HOME/bin/crsctl check crsd
$ORA_CRS_HOME/bin/crsctl check install -wait 600

Resource Applications (CRS Utilities)

status $ORA_CRS_HOME/bin/crs_stat
create profile $ORA_CRS_HOME/bin/crs_profile
register/unregister application $ORA_CRS_HOME/bin/crs_register
$ORA_CRS_HOME/bin/crs_unregister
Start/Stop an application $ORA_CRS_HOME/bin/crs_start
$ORA_CRS_HOME/bin/crs_stop
Resource permissions $ORA_CRS_HOME/bin/crs_getparam
$ORA_CRS_HOME/bin/crs_setparam
Relocate a resource $ORA_CRS_HOME/bin/crs_relocate

Nodes

member number/name olsnodes -n
local node name olsnodes -l
activates logging olsnodes -g

Oracle Interfaces

display oifcfg getif
delete oicfg delig -global
set oicfg setif -global <interface name>/<subnet>:public
oicfg setif -global <interface name>/<subnet>:cluster_interconnect

Global Services Daemon Control

starting gsdctl start
stopping gsdctl stop
status gsdctl status

Cluster Configuration (clscfg is used during installation)

create a new configuration clscfg -install
upgrade or downgrade and existing configuration clscfg -upgrade
clscfg -downgrade
add or delete a node from the configuration clscfg -add
clscfg -delete
create a special single-node configuration for ASM clscfg -local
brief listing of terminology used in the other nodes clscfg -concepts
used for tracing clscfg -trace
help clscfg -h

Cluster Name Check

print cluster name cemulto -n

Note: in Oracle 9i the ulity was called “cemutls”

print the clusterware version cemulto -w

Note: in Oracle 9i the ulity was called “cemutls”

Node Scripts

Add Node addnode.sh

Note: see adding and deleting nodes

Delete Node deletenode.sh

Note: see adding and deleting nodes

En queues

displaying statistics SQL> column current_utilization heading current
SQL> column max_utilization heading max_usage
SQL> column initial_allocation heading initial
SQL> column resource_limit format a23;

SQL> select * from v$resource_limit;

Messaging (tickets)

ticket usage select local_nid local, remote_nid remote, tckt_avail avail, tckt_limit limit, snd_q_len send_queue, tckt_wait waiting from v$ges_traffic_controller;
dump ticket information SQL> oradebug setmypid
SQL> oradebug unlimit
SQL> oradebug lkdebug -t

Lighwork Rule and Fairness Threshold

downconvert select cr_requests, light_works, data_requests, fairness_down_converts from v$cr_block_server;

Note: lower the _fairness_threshold if the ratio goes above 40%, set to 0 if the instance is a query only instance.

Remastering

force dynamic remastering (DRM) ## Obtain the OBJECT_ID form the below table
SQL> select * from v$gcspfmaster_info;
## Determine who masters it
SQL> oradebug setmypid
SQL> oradebug lkdebug -a <OBJECT_ID>

## Now remaster the resource
SQL> oradebug setmypid
SQL> oradebug lkdebug -m pkey <OBJECT_ID>

GRD, SRVCTL, GSD and SRVCONFIG Tracing

Enable tracing  $ export SRVM_TRACE=true
Disable tracing  $ export SRVM_TRACE=””