Thinking Out Loud

November 13, 2009

RMAN duplicate database 10gR2

Filed under: oracle — mdinh @ 4:53 am

Yet another RMAN duplicate database post.

Duplicating a Database on a Remote Host with a Different Directory Structure

The requirement is to duplicate test database (10.2.0.4) for 11gR2 upgrade

If you want to read the manual, it’s here (open in new window)

Existing database: TEST10g

Clone database: DEV01

Configure listener for DEV01, add TEST10g to tnsnames, create password file and (server) parameter file

The following parameters were modified for DEV01:

*.background_dump_dest='/opt/u01/app/oracle/admin/dev01/bdump'
*.control_files='/oracle/oradata/dev01/control01.ctl','/oracle/oradata/dev01/control02.ctl'
*.core_dump_dest='/opt/u01/app/oracle/admin/dev01/cdump'
*.db_name='dev01'
*.instance_name='dev01'
*.log_archive_dest_1='LOCATION=/oracle/oradata/dev01/arch'
*.user_dump_dest='/opt/u01/app/oracle/admin/dev01/udump'
*.db_file_name_convert=(
'/u03/oradata/test10g','/oracle/oradata/dev01',
'/u07/oradata/10gtest','/oracle/oradata/dev01',
'/u08/oradata/test10g','/oracle/oradata/dev01',
'/u04/oradata/test10g','/oracle/oradata/dev01'
)
*.log_file_name_convert=(
'/u04/oradata/test10g','/oracle/oradata/dev01'
,'/u07/oradata/test10g','/oracle/oradata/dev01'
)

Shell script to be execute at clone database server (DEV01):

#!/bin/sh -x
NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"
NLS_LANG="AMERICAN_AMERICA.UTF8"
ORACLE_SID=dev01
export NLS_DATE_FORMAT NLS_LANG ORACLE_SID

BKDIR=/home/mdinh/rman_backups
OUTF=/home/mdinh/rman_backups/rmandupdb.log
RMAN=$ORACLE_HOME/bin/rman
$RMAN msglog $OUTF > /dev/null << END
  connect target sys/password@test10g
  connect auxiliary /;
  startup clone force nomount;
  backup as compressed backupset
    database format '$BKDIR/%d_%T_%U'
    plus archivelog format '$BKDIR/%d_%T_%U';
  duplicate target database to dev01;
  exit
END
exit

November 8, 2009

Looking for Someone

Filed under: Uncategorized — mdinh @ 3:38 pm

There are several people I think are geniuses and Seth Godin is one of them.

Seth Godin writes in his post: Everyone is clueless

You don’t want everyone. You want the right someone.

Someone who cares about what you do. Someone who will make a contribution that matters. Someone who will spread the word.

As soon as you start focusing on finding the right someone, things get better, fast. That’s because you can ignore everyone and settle in and focus on the people you actually want.

Create a free website or blog at WordPress.com.