Tuesday, 22 November 2016

New Background processes in 12c

BWnn  There can be 1 to 100 Database Writer Processes. The names of the first 36 Database Writer Processes are DBW0-DBW9 and DBWa-DBWz. The names of the 37th through 100th Database Writer Processes are BW36-BW99. The database selects an appropriate default setting for the DB_WRITER_PROCESSES parameter or adjusts a user-specified setting based on the number of CPUs and processor groups.

FENC (Fence Monitor Process) Processes fence requests for RDBMS instances which are using Oracle ASM instances
 

IPC0 (IPC Service Background Process) Common background server for basic messaging and RDMA primitives based on IPC (Inter-process communication) methods.
 

LDDn (Global Enqueue Service Daemon Helper Slave) Helps the LMDn processes with various tasks
 

LGnn (Log Writer Worker) On multiprocessor systems, LGWR creates worker processes to improve the performance of writing to the redo log. LGWR workers are not used when there is a SYNC standby destination. Possible processes include LG00-LG99.
 

LREG  (Listener Registration Process) Registers the instance with the listeners
 

OFSD (Oracle File Server Background Process) Serves file system requests submitted to an Oracle instance
 

RPOP (Instant Recovery Repopulation Daemon) Responsible for re-creating and/or repopulating data files from snapshot files and backup files
 

SAnn (SGA Allocator) Allocates SGA  The SAnn process allocates SGA in small chunks. The process exits upon completion of SGA allocation.
 

SCRB (ASM Disk Scrubbing Master Process) Coordinates Oracle ASM disk scrubbing operations
 

SCRn  (ASM Disk Scrubbing Slave Repair Process) Performs Oracle ASM disk scrubbing repair operation
 

SCVn  (ASM Disk Scrubbing Slave Verify Process) Performs Oracle ASM disk scrubbing verify operation

Happy Learning..!!
Cheers..!!

ORA-00018 maximum number of sessions exceeded

ORA-00018 maximum number of sessions exceeded
Cause: All session state objects are in use.
Action: Increase the value of the SESSIONS initialization parameter.

ORA-00018 comes under "Oracle Database Server Messages". These messages are generated 
by the Oracle database server when running any Oracle program.

How to increase SESSION initialization parameter:

1. Login as sysdba
 sqlplus / as sysdba
 
2. Check Current Setting of Parameters
 sql> show parameter sessions
 sql> show parameter processes
 sql> show parameter transactions

3. If you are planning to increase "sessions" parameter you should also plan to increase 
"processes and "transactions" parameters.
A basic formula for determining  these parameter values is as follows:
  processes=x
  sessions=x*1.1+5
  transactions=sessions*1.1
  
4. These parameters can't be modified in memory. You have to modify the spfile only 
(scope=spfile) and bounce the instance.
 sql> alter system set processes=500 scope=spfile;
 sql> alter system set sessions=555 scope=spfile;
 sql> alter system set transactions=610 scope=spfile;
 sql> shutdown abort
 sql> startup 


Cheers..!!
Happy Learning..!!

Monday, 21 November 2016

RMAN-03022 and ORA-03114

I am getting this RMAN-03022 and ORA-03114 error:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of allocate command at 19/13/2015 21:13:22
ORA-03114: not connected to ORACLE



How do I fix this ORA-03114 and RMAN-03002 error?

Option 1) Try flushing the shared as below and check whether it is working now.


Connect to the database and execute the below

sql>alter system flush shared_pool;

Once the shared pool is flushed RMAN should start working.

If the above doesn't help, try next step

Option 2) 

sql>alter system set cursor_sharing=exact scope=both;
 
 
Cheers..!!
Happy Learning..!! 

Oracle 12c silent installation using response file.

Let us assume,You have extracted the RDBMS software zip file, created Oracle user and groups. 

-- Before proceeding with the installation, We need to make few changes in the server ( Pre Checks ).

  1.  Change the kernel parameter in the /etc/sysctl.conf file.

fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
 -- Even we can proceed with the installation without updating the kernel parameters. But in future we may face a performance issue.

-- kernel.shmax and kernel.shmall values already will be there when you installed the OS. However the above values are the recommendation from Oracle.

To make the changes effective, fire the sysctl -p command.

  2. Add the following lines in the /etc/security/limits.conf file.


oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    16384
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768


3. Install the below packages if not already installed.

yum install binutils -y
yum install compat-libcap1 -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -y
yum install gcc -y
yum install gcc-c++ -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i686 -y
yum install ksh -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686 -y
yum install libstdc++-devel -y
yum install libstdc++-devel.i686 -y
yum install libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libXext -y
yum install libXext.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install make -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y

 4. Append the below lines in the .bashrc file, which will present in the home directory of the oracle user.


# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=localhost.localdomain
export ORACLE_UNQNAME=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1
export ORACLE_SID=orcl

export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

 5. Create the necessary directories for Oracle home and Inventory location.

$mkdir -p /u01/app/oracle/product/12.1.0/db_1
$mkdir -p /u01/app/oracle/oraInventory 



 6. Preparing response file. Below are the important parameters for installing the Oracle RDBMS software.

oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.1.0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=localhost.localdomain
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oracle/oraInventory
SELECTED_LANGUAGES=en
ORACLE_BASE=/u01/app/oracle/
ORACLE_HOME=/u01/app/oracle/product/12.1.0/db_1
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
oracle.install.db.BACKUPDBA_GROUP=dba
oracle.install.db.DGDBA_GROUP=dba
oracle.install.db.KMDBA_GROUP=dba
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
oracle.installer.autoupdates.option=SKIP_UPDATES



- Installation.

Go the directory where you have extracted the software and run it as Oracle user.

$./runInstaller -showProgress -silent -responseFile <Responsefile location>db_install.rsp

- showProgress with the help of this parameter we can get to know which status are we in and how much percent it got completed.

Once the installation is done, we need to run 2 script as a root user.


/u01/app/oracle/oraInventory/orainstRoot.sh 
/u01/app/oracle/product/12.1.0/db_1/root.sh
 
 
Now you can create your database.
 
Cheers..!!
 
Happy Learning..!!




 
















































 

RMAN backup skip tablespace using EXCLUDE feature

To Skip the tablespace during backup database
 
export ORACLE_SID=PROD

sqlplus / as sysdba

SQL> select * from v$tablespace;
TS# NAME INC BIG FLA ENC
———- —————————— — — — —
0 SYSTEM YES NO YES
1 SYSAUX YES NO YES
2 UNDOTBS1 YES NO YES
3 TEMP NO NO YES
4 USERS YES NO YES
5 PROD_DATA YES NO YES
6 PROD_INDX YES NO YES
10 rows selected.
sql exit
rman target /
rman>show exclude;
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name PROD are:
RMAN configuration has no stored or default parameters
RMAN> CONFIGURE EXCLUDE FOR TABLESPACE PROD_DATA;

Tablespace PROD_DATA will be excluded from future whole database backups

new RMAN configuration parameters are successfully stored
 
RMAN> CONFIGURE EXCLUDE FOR TABLESPACE PROD_INDX;
Tablespace PROD_INDX will be excluded from future whole database backups
new RMAN configuration parameters are successfully stored.

RMAN> show exclude;
RMAN configuration parameters for database with db_unique_name PROD are:
CONFIGURE EXCLUDE FOR TABLESPACE ‘PROD_DATA’;
CONFIGURE EXCLUDE FOR TABLESPACE ‘PROD_INDX’;
 
RMAN> BACKUP DATABASE;
Starting backup at 08-JUNE-10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=129 device type=DISK
file 5 is excluded from whole database backup
file 6 is excluded from whole database backup
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/oradata/SYSTEM01.DBF
…….
We can override the exclude feature explicitly during database backup.
RMAN> show exclude;
RMAN configuration parameters for database with db_unique_name PROD are:
CONFIGURE EXCLUDE FOR TABLESPACE ‘PROD_DATA’;
CONFIGURE EXCLUDE FOR TABLESPACE ‘PROD_INDX’;
RMAN> BACKUP DATABASE NOEXCLUDE;

To Clear the EXCLUDE feature:
RMAN> CONFIGURE EXCLUDE FOR TABLESPACE PROD_DATA CLEAR;
Tablespace PROD_DATA will be included in future whole database backups
old RMAN configuration parameters are successfully deleted
RMAN> CONFIGURE EXCLUDE FOR TABLESPACE PROD_INDX CLEAR;
Tablespace PROD_INDX will be included in future whole database backups
old RMAN configuration parameters are successfully deleted
RMAN> show EXCLUDE;
RMAN configuration parameters for database with db_unique_name PROD are:
RMAN configuration has no stored or default parameters
Note:- This will only work while taking backups with RMAN. While cloning or while duplicating we can use :skip tablespace tbs_name" to skip particular database.
 
Cheers..!!
 
Happy Learning..!!