Random Posts
Blog Archive
ORACLE DBA
Search This Blog
Blog Archive
Thirupal Boreddy. Powered by Blogger.
My Blog List
Followers
Lorem 1
Technology
Circle Gallery
‹
›
Shooting
Racing
News
Lorem 4
REFRESH
sqlplus / nolog <<EOM
CONNECT / AS SYSDBA
STARTUP FORCE NOMOUNT
WHENEVER SQLERROE EXIT FAILURE
SET TIMING ON
EXIT
EOF
RMAN TARGET SYS/PASSWORD catalog rman/password@catdb
auxilary / log=rmandb.log <<EOF
run
{
set untiltime "to_date('31-JUL-15 22:00:00','DD-MON-YY HH24:MI:SSS')";DUPLICATE TARGET DATABASE TO <DBNAME>;'
}
EOF
sqlplus / nolog <<EOM
CONNECT / AS SYSDBA
STARTUP FORCE NOMOUNT
WHENEVER SQLERROE EXIT FAILURE
SET TIMING ON
EXIT
EOF
RMAN TARGET SYS/PASSWORD catalog rman/password@catdb
auxilary / log=rmandb.log <<EOF
run
{
set untiltime "to_date('31-JUL-15 22:00:00','DD-MON-YY HH24:MI:SSS')";DUPLICATE TARGET DATABASE TO <DBNAME>;'
}
EOF
STEPS TO RESTORE THE DB FROM BACKUP
====================================
1)Backups are located in /u01/tmp location
2)Start the db in nomount stage
startup nomount pfile='$ORACLE_HOME/dbs/initxyzdb.ora';
3) Restore the controlfile
4) rman> set dbid=123456;
5) rmna> restore controlfile from backup;
6) start the db in mount stage
7) catalog the files.
catalog start with '/u01/tmp';
8) restore th db
rman target / cmdfile= abc.rman log=/tmp/abc.log
run
{
set newname to data file 1 to '/u01/xyz_1.dbf';
set newname to data file 2 to '/u01/xyz_2.dbf';
--
--
restore database
switch datafile all;
}
9) Create the controlfile
10) Alter database open reset logs;
11) add the temp file
12)creat the spfile;
13)shutdown and start the db with spfile;
====================================
1)Backups are located in /u01/tmp location
2)Start the db in nomount stage
startup nomount pfile='$ORACLE_HOME/dbs/initxyzdb.ora';
3) Restore the controlfile
4) rman> set dbid=123456;
5) rmna> restore controlfile from backup;
6) start the db in mount stage
7) catalog the files.
catalog start with '/u01/tmp';
8) restore th db
rman target / cmdfile= abc.rman log=/tmp/abc.log
run
{
set newname to data file 1 to '/u01/xyz_1.dbf';
set newname to data file 2 to '/u01/xyz_2.dbf';
--
--
restore database
switch datafile all;
}
9) Create the controlfile
10) Alter database open reset logs;
11) add the temp file
12)creat the spfile;
13)shutdown and start the db with spfile;
Subscribe to:
Comments (Atom)
QUERY FOR CPU USAGE
select a.target_name as HOST, to_char(a.rollup_timestamp,' dd-Mon-yy::hh24:mi') as "DAY-TIME", sum(c.cpu_count) as ...

