run
{
allocate channel c1 type disk;
allocate channel c2 type disk;
set newname for datafile 1 to '/u02/oradata/prod/system.dbf';
set newname for datafile 2 to '/u02/oradata/prod/undo.dbf';
set newname for datafile 3 to '/u02/oradata/prod/sysaux.dbf';
set newname for datafile 4 to '/u02/oradata/prod/users.dbf';
restore database;
switch datafile all;
recover database;
alter database open resetlogs;
release channel c1;
release channel c2;
}
SQL> alter database mount;
Database altered.
SQL> alter database rename file '/u01/app/oracle/oradata/kiwi/redo01.log' to '/u02/oradata/prod/redo01.log';
Database altered.
SQL> alter database rename file '/u01/app/oracle/oradata/kiwi/redo02.log' to '/u02/oradata/prod/redo02.log';
Database altered.
SQL>
Friday, December 30, 2011
Saturday, December 17, 2011
How to change Virtual IP address on Oracle RAC..
[root@vm12 ~]# cd /u02/app/oracle/product/10.2.0/crs/bin/
[root@vm12 bin]# srvctl modify nodeapps -n vm11 -A 192.168.0.151/255.255.255.0/eth0
[root@vm12 bin]# ./srvctl stop nodeapps -n vm12
CRS-0210: Could not find resource 'ora.vm12.LISTENER_VM12.lsnr'.
[root@vm12 bin]# ./srvctl config nodeapps -n vm12 -a
VIP exists.: /vm12-priv.domain.com/192.168.1.52/255.255.255.0/eth0:eth1
[root@vm12 bin]# ./srvctl modify nodeapps -n vm12 -A 192.168.0.152/255.255.255.0/eth0
[root@vm12 bin]# ./srvctl config nodeapps -n vm12 -a
VIP exists.: /vm12-vip.domain.com/192.168.0.152/255.255.255.0/eth0
[root@vm12 bin]# ./crsctl start crs
Attempting to start CRS stack
The CRS stack will be started shortly
[root@vm12 bin]# srvctl modify nodeapps -n vm11 -A 192.168.0.151/255.255.255.0/eth0
[root@vm12 bin]# ./srvctl stop nodeapps -n vm12
CRS-0210: Could not find resource 'ora.vm12.LISTENER_VM12.lsnr'.
[root@vm12 bin]# ./srvctl config nodeapps -n vm12 -a
VIP exists.: /vm12-priv.domain.com/192.168.1.52/255.255.255.0/eth0:eth1
[root@vm12 bin]# ./srvctl modify nodeapps -n vm12 -A 192.168.0.152/255.255.255.0/eth0
[root@vm12 bin]# ./srvctl config nodeapps -n vm12 -a
VIP exists.: /vm12-vip.domain.com/192.168.0.152/255.255.255.0/eth0
[root@vm12 bin]# ./crsctl start crs
Attempting to start CRS stack
The CRS stack will be started shortly
Subscribe to:
Posts (Atom)