RMAN notes
**********
STEPS
1) go to /, open 2 windows, check whether u r in PROD and PROJ1 databases.
2) Check whether u have the line *. remote_login_passwordfile='EXCLUSIVE' in the path /u01/oracle/10g/PROD/dbs/spfilePROD.ora and /u04/oracle/10g/PROJ1/dbs/initPROJ1.ora
3) check whether the password files are present in /$ORACLE_HOME/dbs in both the databases.
4) copy the files, folders and directories from /u01/oracle/10g/PROD/network/admin to /u04/oracle/10g/PROJ1/network/admin and from /u01/oracle/10g/PROD/network to /u04/oracle/10g/PROJ1/network.
5) vi listener.ora in /u01/oracle/10g/PROD/network/admin
SID_LIST_PROD =
(SID_LIST =
(SID_DESC =
(SID_NAME = PROD)
(ORACLE_HOME = /u01/oracle/10g/PROD)
)
)
PROD =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.geetha.com)(PORT = 1521))
)
)
vi tnsnames.ora in /u01/oracle/10g/PROD/network/admin
PROD =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.geetha.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PROD)
)
)
PROJ1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.geetha.com)(PORT = 1523))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PROJ1)
)
)
vi listener.ora in /u04/oracle/10g/PROJ1/network/admin
SID_LIST_PROJ1 =
(SID_LIST =
(SID_DESC =
(SID_NAME = PROJ1)
(ORACLE_HOME = /u04/oracle/10g/PROJ1)
)
)
PROJ1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.geetha.com)(PORT = 1523))
)
)
vi tnsnames.ora in /u04/oracle/10g/PROJ1/network/admin
PROD =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.geetha.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PROD)
)
)
PROJ1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.geetha.com)(PORT = 1523))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PROJ1)
)
)
6) Check whether the port number in the PROJ1 database is available or not by using the command
netstat -an | grep 1523 | grep LISTEN
7) In /home/oracle, run lsnrctl start PROD in PROD database and run lsnrctl start PROJ1 in PROJ1 database.
8) give tnsping PROJ1 in /home/oracle in PROD database and tnsping PROD in /home/oracle in PROJ1 database.
9) In PROJ1 database window, in /home/oracle, give sqlplus '/ as sysdba'
> startup
> create user rcat identified by rcat default tablespace SYSTEM;
> grant connect, resource, recovery_catalog_owner to rcat;
> show user (SYS)
> exit
$which rman
/usr/X11R6/bin/rman
$PATH=$ORACLE_HOME/bin:$PATH
$which rman
/u04/oracle/10g/PROJ1/bin/rman
$rman catalog=rcat/rcat
RMAN> create catalog;
RMAN> exit;
[oracle@localhost ~]$ sqlplus rcat/rcat
SQL> show user
USER is "RCAT"
SQL> select name, dbid from rc_database;
no rows selected
A (PROD)
[oracle@localhost ~]$ sqlplus '/ as sysdba'
SQL> startup
SQL> select name, dbid from v$database;
NAME DBID
--------- ----------
PROD 43744046
B(PROJ1)
> exit
[oracle@localhost ~]$ rman catalog=rcat/rcat target=SYS/geetha@PROD
RMAN> register database;
RMAN> exit
[oracle@localhost ~]$ sqlplus rcat/rcat
SQL> select name, dbid from rc_database;
NAME DBID
-------- ----------
PROD 43744046
SQL> exit
[oracle@localhost ~]$ rman catalog=rcat/rcat target=SYS/geetha@PROD
RMAN> show all;
RMAN> configure retention policy to recovery window of 4 days;
RMAN> configure controlfile autobackup on;
make the path /u04/oracle/10g/PROJ1/rman in a new window
RMAN> configure controlfile autobackup format for device type disk to '/u04/oracle/10g/PROJ1/rman/backup_%F';
RMAN> configure channel 1 device type disk format '/u04/oracle/10g/PROJ1/rman/backup_%U';
RMAN> backup database;
go to /u04/oracle/10g/PROJ1/rman and check whether the backup is done.
No comments:
Post a Comment