Search my Blog

Follow me on Twitter

How To Duplicate A Filesystem Database to an ASM Database

I have been asked to explore a scenario in which a database that is currently on a file systems is recovered with RMAN into ASM. In this web log the steps i have performed are shared.

Environment:

11.20.3.0

On Linux

For Demo sake source database is called MYFSDB

Database we will create in ASM called MYASMDB

First step make a proper backup of MYFSDB:

Make sure your ORACLE_SID is pointing to the correct Environment.

Commands:

rman

connect target /

backup database plus archivelog;

Preparation Listener:

For the new database make sure listener is set up to listen. Since this is 1120.30 Db should register automatically. But let’s check if My source database has registered already there

lsnrctl status

LSNRCTL for Linux: Version 11.2.0.3.0 – Production on 03-AUG-2012 10:51:41

Service “+ASM” has 1 instance(s).

Instance “+ASM”, status READY, has 1 handler(s) for this service…

Service “MYFSDB” has 1 instance(s).

Instance “MYFSDB”, status READY, has 1 handler(s) for this service…

Service “MYFSDBXDB” has 1 instance(s).

Instance “MYFSDB”, status READY, has 1 handler(s) for this service…

Service “NLRMAN” has 1 instance(s).

Instance “NLRMAN”, status READY, has 1 handler(s) for this service…

Service “NLRMANXDB” has 1 instance(s).

Instance “NLRMAN”, status READY, has 1 handler(s) for this service…

The command completed successfully

So that is a yes

Preparation tnsnames.ora for the auxiliary database

The database that is going to be in ASM is referred to as an auxiliary database. It needs to have proper tnsnames entry

### tnsnames. ora

MYASMDB =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = prod1)(PORT = 33000))

)

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = myasmdb)

)

)

Preparation make a link for the init.ora to $ORACLE_HOME/dbs

### make link so Oracle will know about settings , cause I will be setting up a init.ora manually and make changes needed in that one. I know there are more options but this one I like.. so I stick to a known step by step approach.

ln -s /opt/oracle/MYASMDB/admin/pfile/initMYASMDB.ora initMYASMDB.ora

Preparation alter the Init.ora for the Auxiliary database

Copy the init.ora of the source database to the environment where the new db should be able to access it and start making changes . I will mark them and explain.