ASM Directory or Alias Rename
- From: Thomas Roach <troach@xxxxxxxxx>
- To: Oracle Discussion List <oracle-l@xxxxxxxxxxxxx>
- Date: Mon, 14 Sep 2009 09:28:27 -0400
Hi Group,
I am on Oracle 10.2.0.4. I am migrating databases and consolidating
servers. Unfortunately I have Databases that have the same name. The
issue is that I now need to do a database rename.
I am thinking and have tried several approaches but wanted to get the
feedback of the group for the best way to do what I am trying to do.
ISSUE:
I have a database with the name testdb. In ASM I have everything under
+DATA/testdb.
I rename the Database with db new id 'nid target=/ DB_NAME=testdb1
SETNAME=yes' -- This is because I just need a new DB name and not a
new DBID. This is so the names don't clash under ASM.
Upon opening the DB, I now had a '+DATA/testdb' and '+DATA/testdb1'.
All the files are created under the new location but the old ones are
kept under the old. I went ahead and shut the DB down and removed all
files under the new location (mainly just archivelogs). I then tried
to rename the alias and directory. Both error out.
SQL> alter diskgroup DATA rename directory '+DATA/testdb' to '+DATA/testdb1';
alter diskgroup DATA rename directory '+DATA/testdb' to '+DATA/testdb1'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15177: cannot operate on system aliases
SQL> alter diskgroup DATA rename alias '+DATA/testdb' to '+DATA/testdb1';
alter diskgroup DATA rename alias '+DATA/testdb' to '+DATA/testdb1'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15113: alias name 'TESTDB' refers to a directory
One last option I am thinking of is using RMAN to copy everything over
but instead I figured it would be a good idea to check with the group
to see what ideas they might come up with, so here I am : )
Thanks,
Tom
--
http://www.freelists.org/webpage/oracle-l
Other related posts: