Professional Documents
Culture Documents
Oracle Notes
Oracle Notes
Installation
groupadd dba
useradd -g dba -d /home/oracle -m oracle
mkdir /u01/oracle
mkdir /u01/oraInventory
chown -R oracle:dba /u01/oracle
chmod -R 775 /u01/oracle
chmod -R 777 /etc/oraInst.loc
chmod -R 777 /u01/oraInventory
vi /etc/oraInst.loc
inventory_loc=/u01/oraInventory
inst_group=dba
save and exit
Display is not set. Set the Display environment variable and restart.
Export DISPLAY=[your IP]: 1.0
E.g: export DISPLAY=127.0.0.1:1.0
root # vncserver
rman clonning
rman target /
RMAN> backup database plus archivelog
1) Create an Oracle password file for your ORCL database.
cd $ORACLE_HOME/dbs
orapwd file=orapworcl password=oracle entries=10
cp orapworcl orapworcaux
2)On orcl database, start listener and configure tnsnames.ora from auxiliary
instance to orcl instance.
$ export TNS_ADMIN=$HOME/network
$ lsnrctl start lis_orcl
3) Create an initialization parameter file for the auxiliary instance from orcl
database.
sqlplus / as sysdba
create pfile='$HOME/initAUX.ora' from spfile;
4) Edit the initAUX.ora initialization parameter file to make the followingchanges
for the auxiliary instance:
-> remove lines starting with *.__
-> db_name='orcaux'
-> *.db_recovery_file_dest='/disk3/oradata/orcaux'
-> *.control_files='/disk1/oradata/orcaux/control.ctl'
-> *.diagnostic_dest='/disk3/oradata/orcaux'
Add the following parameters:
DB_FILE_NAME_CONVERT='/disk1/oradata/orcl','/disk1/oradata/orcaux'
LOG_FILE_NAME_CONVERT=('/disk1/oradata/orcl','/disk1/oradata/orcaux','/disk2/ora
data/orcl','/disk2/oradata/orcaux')
5) Create necessary directories as specified in parameter file.
$ mkdir -p /disk1/oradata/orcaux
$ mkdir -p /disk2/oradata/orcaux
$ mkdir -p /disk3/oradata/orcaux
6) Start the auxiliary instance in NOMOUNT mode using the initAUX.ora file.
ORACLE_SID=orcaux
echo $ORACLE_SID
sqlplus / as sysdba
startup nomount pfile='$HOME/initorcaux.ora'
SQL> create spfile from pfile='$HOME/initorcaux.ora';
7) Verify that your target database (orcl database) is mounted or open.
export ORACLE_SID=orcl
SQL> select open_mode from v$database; ( it should show you read write )
8) On Auxiliary, Start RMAN with a connection to the target database (orcl).
$ rman target sys/oracle1@orcl auxiliary sys/oracle
9) Create the duplicate database by executing the DUPLICATE command.
RMAN> run {
allocate auxiliary channel aux1 device type disk;AKSWAVE Oracle Trainings Page99
duplicate target database to orcaux;
}
10) After the DUPLICATE DATABASE operation completes, exit from RMAN.
sqlplus / as sysdba
select name from v$database;