Wednesday, June 14, 2017

Install MONGODB 3.4 On LINUX 6

a)yum install cyrus-sasl cyrus-sasl-plain cyrus-sasl-gssapi krb5-libs libcurl libpcap net-snmp openldap openssl
b)Download Mongo DB  & Extract The TAR
cd $HOME
curl -O https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.4.4.tgz
cd /mongo/
tar -zxvf /home/mongo/mongodb-linux-x86_64-3.4.4.tgz
cp -R -n mongodb-linux-x86_64-3.4.4/ mongodb

c)Add the PATH in /home/mongo/.bash_profile
PATH=/mongo/mongodb/bin:$PATH

d) Create the datafile folder /mongo/data. If we dont specify dbpath ,it will try to  use the default value /data/db.

e)Start the Mongo DB.Run the mongod process at the system prompt.

mongod --dbpath /mongo/data --logpath /tmp/mongo.log --logappend --rest --fork

--dbpath -> Path to our datafiles.
--logpath -->Log file Path
--logappend --> Appending log content to the existing log.
--rest -->Which will enable http interface to the port 28017(default).We can  access it http://localhost:28017
--fork --> It will create the child process and run in background.

     
If we use above command ,datafile from all our databases will be under /mongo/data. If we want to split the datafiles based on database,we have to
specify the parameter  directoryperdb.It will create sub folder with dbname under dbpath.


Ex: mongod --dbpath /mongo/new_data --logpath /tmp/mongo.log --logappend --rest --directoryperdb


[mongo@r12 new_data]$ ls -ld *
drwxrwxr-x 2 mongo mongo  4096 Jun 10 12:38 admin
drwxrwxr-x 2 mongo mongo  4096 Jun 10 13:49 diagnostic.data
drwxrwxr-x 2 mongo mongo  4096 Jun 10 12:38 journal
drwxrwxr-x 2 mongo mongo  4096 Jun 10 12:38 local

Saturday, June 3, 2017

RMAN BASICS

Lets begin with RMAN overviews:
RMAN stands for Recovery Manager, this is client who performs not only backup and recovery for oracle database but also making DBA’s life easier in terms of automation, backup, restore and recovery of database. RMAN consist of some backup utilities and collaborated with your oracle database that combine play a role in database backup.


RMAN components:

Target Database:
Target database is the registered database with the RMAN, on which RMAN is performing backup and recovery operations. All operations performed and practiced ( i.e.metadata is also known as repository. ) by RMAN would be logged in database control file.

RMAN client:
RMAN client is nothing but the executable required to run RMAN and performers its desire task. RMAN client situated in ‘ORACLE_HOME/bin’. No extra efforts would be required to install this client, because this client installed automatically when oracle software being installed.


How RMAN Works Internally:

RMAN backup and recovery operation for a target database are managed by RMAN client. RMAN uses the target database control file to gather metadata about the target database and to store information about its own operations. The RMAN client itself does not perform backup, restore, or recovery operations. When you connect the RMAN client to a target database, RMAN allocates server sessions on the target instance and directs them to perform the operations.The work of backup and recovery is performed by server sessions running on the target database. A channel establishes a connection from the RMAN client to a target or auxiliary database instance by starting a server session on the instance.The channel reads data into memory, processes it, and writes it to the output device.

When you take a database backup using RMAN, you need to connect to the target database using RMAN Client.The RMAN client can use Oracle Net to connect to a target database, so it can be located on any host that is connected to the target host through Oracle Net. For backup you need to allocate explicit or implicit channel to the target database. An RMAN channel represents one stream of data to a device, and corresponds to one database server session. This session dynamically collect information of the files from the target database control file before taking the backup or while restoring.

For example If you give ‘ Backup database ‘ from RMAN, it will first get all the datafiles information from the controlfile. Then it will divide all the datafiles among the allocated channels. ( roughly equal size of work as per the datafile size ). Then it takes the backup in 2 steps. In the first step the channel will read all the Blocks of the entire datafile to find out all the formatted blocks to backup. Note : RMAN do not take backup of the un formatted blocks. In the second step it take backup of the formatted blocks. This is the best advantage of using RMAN as it only take backup of the required blocks. Lets say in a datafile of 100 MB size, there may be only 10 MB of use full data and rest 90 MB is free then RMAN will only take backup of those 10 MB

How to Compile Forms , Reports & Custom.pll in R12.2

How to Compile Custom.pll   cd $AU_TOP/resource  cp CUSTOM.plx CUSTOM.plx_bkup  cp CUSTOM.pll CUSTOM.pll_bkup  frmcmp_batch module=CUSTOM.pl...