Showing posts with label ASM. Show all posts
Showing posts with label ASM. Show all posts

Saturday 26 March 2016

Monitoring ASM Instance and Database

Guideline for Shared pool Size in ASM instance-


Increase shared pool size based on the following guidelines:
·         For disk groups using external redundancy: Every 100 GB of space needs 1 MB of extra shared pool plus a fixed amount of 2 MB of shared pool.

·         For disk groups using normal redundancy: Every 50 GB of space needs 1 MB of extra shared pool plus a fixed amount of 4 MB of shared pool.

·         For disk groups using high redundancy: Every 33 GB of space needs 1 MB of extra shared pool plus a fixed amount of 6 MB of shared pool.


How to check database Size?
 

To obtain the current database storage size that is either already on ASM or will be stored in ASM:

SELECT d+l+t DB_SPACE
FROM
(SELECT SUM(bytes)/(1024*1024*1024) d FROM v$datafile),
(SELECT SUM(bytes)/(1024*1024*1024) l FROM v$logfile a, v$log b
 WHERE a.group#=b.group#),
(SELECT SUM(bytes)/(1024*1024*1024) t FROM v$tempfile
WHERE status='ONLINE'

 
How to check Disk Group Details?

select group_number, name, total_mb, free_mb, state, type from v$asm_diskgroup;


How to Check ASM Disk Details?

SELECT group_number, disk_number, mount_status, header_status, state, path FROM v$asm_disk
GROUP_NUMBER        DISK_NUMBER          MOUNT_S        HEADER_STATU      STATE               PATH
0                               0                              CLOSED            CANDIDATE           NORMAL     C:\ASMDISKS\_FILE_DISK1
0                              1                              CLOSED            CANDIDATE           NORMAL      C:\ASMDISKS\_FILE_DISK2
0                              2                              CLOSED            CANDIDATE           NORMAL       C:\ASMDISKS\_FILE_DISK3
0                             3                               CLOSED            CANDIDATE           NORMAL        C:\ASMDISKS\_FILE_DISK4


Note:

The value of zero in the GROUP_NUMBER column for all four disks. This indicates that a disk is available but hasn't yet been assigned to a disk group.


Dynamice Performance Views

V$ASM_DISKGROUP
This view provides information about a disk group. In a database instance, this view contains one row for every ASM disk group mounted by the ASM instance.

V$ASM_CLIENT
This view identifies all the client databases using various disk groups. In a Database instance, the view contains one row for the ASM instance if the database has any open ASM files.

V$ASM_DISK
This view contains one row for every disk discovered by the ASM instance. In a database instance, the view will only contain rows for disks in use by that database instance.

V$ASM_FILE
This view contains one row for every ASM file in every disk group mounted by the ASM instance.

V$ASM_TEMPLATE
This view contains one row for every template present in every disk group mounted by the ASM instance.



See Also                                                                                               See Also 
Rename Disk / Delete Disk in ASM                                                        Moving Control Files in ASM

Wednesday 23 March 2016

Change ASM Diskgroup from normal redundancy to external redundancy



Step 1 :
SQL> shut immediate;

Step 2:
SQL> startup mount

Step 3:
Open RMAN  and  do a Backup of Whole Database

SQL> !rman target /

RMAN> backup device type disk format '/u01/asm1/database_format%u' database;

Starting backup at 22-MAR-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=25 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/myasm/datafile/system.302.907085491
input datafile file number=00002 name=+DATA/myasm/datafile/sysaux.303.907085493
input datafile file number=00003 name=+DATA/myasm/datafile/undotbs1.304.907085495
input datafile file number=00005 name=+DATA/myasm/datafile/users.320.907107373
input datafile file number=00006 name=+DATA/myasm/datafile/demo.319.907106321
input datafile file number=00004 name=+DATA/myasm/datafile/users.305.907085495
channel ORA_DISK_1: starting piece 1 at 22-MAR-16
channel ORA_DISK_1: finished piece 1 at 22-MAR-16
piece handle=/u01/asm1/database_format09r148in tag=TAG20160322T122141 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:37
Finished backup at 22-MAR-16

Starting Control File and SPFILE Autobackup at 22-MAR-16
piece handle=+DATA/myasm/autobackup/2016_03_22/s_907157976.272.907158211 comment=NONE
Finished Control File and SPFILE Autobackup at 22-MAR-16

RMAN> backup device type disk format '/u01/asm1/arch_format%u' archivelog all;

Starting backup at 22-MAR-16
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=2 RECID=1 STAMP=907086880
input archived log thread=1 sequence=3 RECID=2 STAMP=907105575
input archived log thread=1 sequence=4 RECID=3 STAMP=907110892
input archived log thread=1 sequence=5 RECID=4 STAMP=907115995
input archived log thread=1 sequence=6 RECID=5 STAMP=907116001
input archived log thread=1 sequence=7 RECID=6 STAMP=907116020
input archived log thread=1 sequence=8 RECID=7 STAMP=907116024
input archived log thread=1 sequence=9 RECID=8 STAMP=907116037
input archived log thread=1 sequence=10 RECID=9 STAMP=907116045
input archived log thread=1 sequence=11 RECID=10 STAMP=907116050
input archived log thread=1 sequence=12 RECID=11 STAMP=907116066
input archived log thread=1 sequence=13 RECID=12 STAMP=907116177
input archived log thread=1 sequence=14 RECID=13 STAMP=907116218
input archived log thread=1 sequence=15 RECID=14 STAMP=907116267
input archived log thread=1 sequence=16 RECID=15 STAMP=907116290
input archived log thread=1 sequence=17 RECID=16 STAMP=907116297
input archived log thread=1 sequence=18 RECID=17 STAMP=907153331
input archived log thread=1 sequence=19 RECID=18 STAMP=907154322
input archived log thread=1 sequence=20 RECID=19 STAMP=907154422
input archived log thread=1 sequence=21 RECID=20 STAMP=907155366
input archived log thread=1 sequence=22 RECID=21 STAMP=907155677
channel ORA_DISK_1: starting piece 1 at 22-MAR-16
channel ORA_DISK_1: finished piece 1 at 22-MAR-16
piece handle=/u01/asm1/arch_format0br148ns tag=TAG20160322T122427 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 22-MAR-16

Starting Control File and SPFILE Autobackup at 22-MAR-16
piece handle=+DATA/myasm/autobackup/2016_03_22/s_907157976.289.907158289 comment=NONE
Finished Control File and SPFILE Autobackup at 22-MAR-16


Step 4 :
Create pfile for Database and backup controlfile

SQL> create pfile='/u01/asm1/initnew.ora' from spfile;
File created.

SQL> alter database backup controlfile to '/u01/asm1/control01.ctl';
Database altered.

SQL> shut immediate;


Step 6
Run ASMCA, Create new diskgroup and drop disk group existing Diskgroup

And create new diskgroup with External Redundnacy
$ASMCA

[oracle@oracleasm1 Desktop]$ . oraenv
ORACLE_SID = [myasm] ? myasm
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 is /u01/app/oracle
[oracle@oracleasm1 Desktop]$ rlwrap sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Tue Mar 22 12:49:17 2016
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
Connected to an idle instance.

SQL> startup nomount pfile='/u01/asm1/initnew.ora';
ORACLE instance started.

Total System Global Area  313860096 bytes
Fixed Size                                1336232 bytes
Variable Size                        197135448 bytes
Database Buffers               109051904 bytes
Redo Buffers                         6336512 bytes

SQL> create spfile ='+DATA' from pfile='/u01/asm1/initnew.ora' ;
File created.

SQL> !rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Tue Mar 22 12:50:34 2016
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: MYASM (not mounted)

RMAN> restore controlfile from '/u01/asm1/control01.ctl';

Starting restore at 22-MAR-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=25 device type=DISK

channel ORA_DISK_1: copied control file copy
output file name=+DATA/myasm/controlfile/current.257.907160017
output file name=+DATA/myasm/controlfile/current.258.907160019
Finished restore at 22-MAR-16

RMAN> alter database mount;

database mounted
released channel: ORA_DISK_1

RMAN> restore database;

Starting restore at 22-MAR-16
Starting implicit crosscheck backup at 22-MAR-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=25 device type=DISK
Crosschecked 7 objects
Finished implicit crosscheck backup at 22-MAR-16

Starting implicit crosscheck copy at 22-MAR-16
using channel ORA_DISK_1
Crosschecked 2 objects
Finished implicit crosscheck copy at 22-MAR-16

searching for all files in the recovery area
cataloging files...
no files cataloged

using channel ORA_DISK_1

datafile 4 not processed because file is offline
datafile 5 not processed because file is offline
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to +DATA/myasm/datafile/system.302.907085491
channel ORA_DISK_1: restoring datafile 00002 to +DATA/myasm/datafile/sysaux.303.907085493
channel ORA_DISK_1: restoring datafile 00003 to +DATA/myasm/datafile/undotbs1.304.907085495
channel ORA_DISK_1: restoring datafile 00006 to +DATA/myasm/datafile/demo.319.907106321
channel ORA_DISK_1: reading from backup piece /u01/asm1/database_format09r148in
channel ORA_DISK_1: piece handle=/u01/asm1/database_format09r148in tag=TAG20160322T122141
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:03:16
Finished restore at 22-MAR-16

RMAN> recover database ;

Starting recover at 22-MAR-16
using channel ORA_DISK_1
datafile 4 not processed because file is offline
datafile 5 not processed because file is offline

starting media recovery

archived log for thread 1 with sequence 23 is already on disk as file +NEWDATA/myasm/onlinelog/group_3.258.907115921
archived log file name=+NEWDATA/myasm/onlinelog/group_3.258.907115921 thread=1 sequence=23
media recovery complete, elapsed time: 00:00:01
Finished recover at 22-MAR-16



RMAN> alter database open resetlogs;

Tuesday 22 March 2016

ORA-01565: error in identifying file /dbs/spfile@.ora


ORA-01565: error in identifying file /dbs/spfile@.ora

When we’re going to create pfile from spfile while spfile running on ASM instance, We can face the below errors,

SQL> create pfile=’/u01/inittestdb.ora’ from spfile;
create pfile=’/u01/inittestdb.ora’ from spfile
*
ERROR at line 1:
ORA-01565: error in identifying file ‘?/dbs/spfile@.ora’
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3

Solution :
We need to give ASM path of SPFILE.

SQL> create pfile=’/u01/inittestdb.ora’ from spfile=’+DATA/testdb/spfiletestdb.ora’;

File created.

How to View Disk Group Clients using V$ASM_CLIENT view ?



Use the Below Query :

SQL > SELECT dg.name AS diskgroup, SUBSTR(c.instance_name,1,12) AS instance, SUBSTR(c.db_name,1,12) AS dbname, SUBSTR(c.SOFTWARE_VERSION,1,12) AS software, SUBSTR(c.COMPATIBLE_VERSION,1,12) AS compatible FROM V$ASM_DISKGROUP dg, V$ASM_CLIENT c WHERE dg.group_number = c.group_number ;

Multiplex of redolog files in ASM

If you have two diskgroup, you want to multiplex redo in different diskgroup, you just add redo log desitnation diskgroup.

Step 1 :
Check the Current Disk of REDOLOGS. (In my case , its  ‘+DATA’)

So , Now I will move it to another DiskGroup (i,e, NEWDATA)


SQL> select l.group# , l.bytes , l.status , lf.member from v$logfile lf , v$log l where lf.group# = l.group#;

    GROUP#         BYTES STATUS
---------- ---------- ----------------
MEMBER
--------------------------------------------------------------------------------
                 3   52428800 INACTIVE
+DATA/myasm/onlinelog/group_3.312.907086019

                 3   52428800 INACTIVE
+DATA/myasm/onlinelog/group_3.313.907086039

                 2   52428800 CURRENT
+DATA/myasm/onlinelog/group_2.310.907085987


    GROUP#         BYTES STATUS
---------- ---------- ----------------
MEMBER
--------------------------------------------------------------------------------
                 2   52428800 CURRENT
+DATA/myasm/onlinelog/group_2.311.907086001

                 1   52428800 INACTIVE
+DATA/myasm/onlinelog/group_1.308.907085955

                 1   52428800 INACTIVE
+DATA/myasm/onlinelog/group_1.309.907085973

6 rows selected.



Step 2:
Edit the 2 Parameter as bellow  , create pfile &  Bounce the Database

SQL> alter system set db_create_online_log_dest_1='+NEWDATA' scope=spfile;
System altered.

SQL> alter system set db_create_online_log_dest_2='+NEWDATA' scope=spfile;
System altered.

SQL> create pfile='/u01/asm1/initmyasm.ora' from spfile;
File created.

SQL> shut immediate
Database closed.


SQL> show parameter db_create_online_log_dest;

NAME                                                        TYPE               VALUE
------------------------------------ ----------- ------------------------------
db_create_online_log_dest_1          string               +NEWDATA
db_create_online_log_dest_2          string               +NEWDATA
db_create_online_log_dest_3          string
db_create_online_log_dest_4          string
db_create_online_log_dest_5          string

Step 3 :
Drop and Re-Create Redolog as Follows

SQL> alter database drop logfile group 3;
Database altered.

SQL> alter database add logfile group 3 size 50m;
Database altered.


SQL> alter database drop logfile group 2;
alter database drop logfile group 2
*
ERROR at line 1:
ORA-01624: log 2 needed for crash recovery of instance myasm (thread 1)
ORA-00312: online log 2 thread 1: '+DATA/myasm/onlinelog/group_2.310.907085987'
ORA-00312: online log 2 thread 1: '+DATA/myasm/onlinelog/group_2.311.907086001'


SQL> alter system switch logfile;
System altered.

SQL> alter database drop logfile group 2;
Database altered.

SQL> alter database add logfile group 2 size 50m;
Database altered.


SQL> alter database drop logfile group 1;
Database altered.

SQL> alter database add logfile group 1 size 50m;
Database altered.


Step 4 :
Check the view again, see. .  Disk  is now changed (+NEWDATA)

SQL> select l.group# , l.bytes , l.status , lf.member from v$logfile lf , v$log l where lf.group# = l.group#;

    GROUP#         BYTES STATUS
---------- ---------- ----------------
MEMBER
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                 3   52428800 INACTIVE
+NEWDATA/myasm/onlinelog/group_3.258.907115921

                 3   52428800 INACTIVE
+NEWDATA/myasm/onlinelog/group_3.259.907115933

                 2   52428800 UNUSED
+NEWDATA/myasm/onlinelog/group_2.262.907116331


    GROUP#         BYTES STATUS
---------- ---------- ----------------
MEMBER
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                 2   52428800 UNUSED
+NEWDATA/myasm/onlinelog/group_2.263.907116339

                 1   52428800 CURRENT
+NEWDATA/myasm/onlinelog/group_1.260.907116199

                 1   52428800 CURRENT
+NEWDATA/myasm/onlinelog/group_1.261.907116207


6 rows selected.


SQL>

Can I Store Datapump dumpfiles in ASM diskgroup?




Step 1:
 Go To ASM Instance and Create New Directory.


I have 2 DISKS (i.e, DATA & NEWDATA)

ASMCMD [+] > ls
DATA/
NEWDATA/

SQL> alter diskgroup data add directory '+DATA/Dataset';
Diskgroup altered.

ASMCMD [+] > cd DATA
ASMCMD [+DATA] > ls
ASM/
ASMDB/
Dataset/                                           <---- // Created using above command
MYASM/
ORCL/
ORCL1/




Step 2:
 Go to DB Instance

SQL> create or replace directory datapump_asm as '+DATA/Dataset/';
Directory created.

SQL> grant read , write on directory datapump_asm to system;
Grant succeeded.

SQL> create or replace directory logfile as '/u01/';
Directory created.

SQL> grant read , write on directory logfile to system;
Grant succeeded.

NOTE:   ‘Nikhil’ is user  &  NIK_EMP is a Table


Step 3: Doing Export using datapump

SQL> ! expdp system/sys directory=datapump_asm dumpfile=testASM.dmp schemas=nikhil.nik_emp logfile=logfile:abc.log;

Export: Release 11.2.0.1.0 - Production on Tue Mar 22 00:17:27 2016

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01":  system/******** directory=datapump_asm dumpfile=testASM.dmp schemas=nikhil.nik_emp logfile=logfile:abc.log
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 0 KB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:
  +DATA/dataset/testasm.dmp
Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at 00:19:58


SQL>

Step 4: Go to ASM Instance and Check the file created in ASM

SQL> select file_number,creation_date,bytes from v$asm_file where type='DUMPSET';

FILE_NUMBER CREATION_         BYTES
----------- --------- ----------
                322 22-MAR-16                 159744



Cloning of Database using RMAN in ASM In another Diskgroup


Cloning of Database includes below mentioned steps :-


1. Take a fresh backup of your OLD database of which you want to make a clone.

2. Create a pfile for OLD database.
SQL> create pfile=''/u01/asm1/initasmnew.ora' from spfile;

Modify the parameters in green colour of this pfile according to the New Database server.
*.compatible='11.2.0.0.0'
*.control_files='+NEWDATA/asmnew/controlfile/current.281.907165777'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_domain=''
*.db_name='asm2'
*.db_unique_name=’asmnew
*.db_recovery_file_dest='/u01/asm1'
*.db_recovery_file_dest_size=9437184000
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=asm2XDB)'
*.open_cursors=300
*.pga_aggregate_target=104857600
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=314572800
*.undo_tablespace='UNDOTBS1'



SQL> !rman target /

RMAN> backup device type disk format '/ u01/asm1/ASM2/database_format%u' database;

RMAN> backup device type disk format '/ u01/asm1/ASM2/arch_format%u' archivelog all;



ANOTHER TERMINAL

[oracle@oracleasm1 Desktop]$ export ORACLE_SID=asmnew
[oracle@oracleasm1 Desktop]$ rlwrap sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Tue Mar 22 15:09:03 2016

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to an idle instance.


3. Use the above pfile to startup in nomount mode the NEW database. 

SQL> startup nomount pfile='/u01/asm1/initasmnew.ora' ;


4. Restore control files of OLD database to new host database.
RMAN> restore controlfile from '/u01/asm1/ASM2/autobackup/2016_03_22/o1_mf_s_907167734_ch24901d_.bkp';


5. Mount your New Database.

RMAN> alter database mount;

database mounted
released channel: ORA_DISK_1

6. Catalog all Backup pieces of OLD database server to new database server

RMAN> catalog backuppiece '/u01/asm1/ASM2/backupset/2016_03_22/o1_mf_nnndf_TAG20160322T150047_ch2467rc_.bkp';


Recovery Manager: Release 11.2.0.1.0 - Production on Tue Mar 22 15:19:55 2016
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved. 
connected to target database: ASM2 (DBID=3723596112, not open)

7. Run the restore command to restore the datafiles.
TO run restore command you need the details of the datafiles of OLD database.

Login into the OLD database and get below mentioned details:-

SQL> Select file_id,file_name from dba_data_files

RMAN> run {
2> set newname for datafile 1 to '+NEWDATA' ;
3> set newname for datafile 2 to '+NEWDATA' ;
4> set newname for datafile 3 to '+NEWDATA' ;
5> set newname for datafile 4 to '+NEWDATA' ;
6> restore database ;
7> switch datafile all;
8> }

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 22-MAR-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=23 device type=DISK

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to +NEWDATA
channel ORA_DISK_1: restoring datafile 00002 to +NEWDATA
channel ORA_DISK_1: restoring datafile 00003 to +NEWDATA
channel ORA_DISK_1: restoring datafile 00004 to +NEWDATA
channel ORA_DISK_1: reading from backup piece /u01/asm1/ASM2/backupset/2016_03_22/o1_mf_nnndf_TAG20160322T150047_ch2467rc_.bkp
channel ORA_DISK_1: piece handle=/u01/asm1/ASM2/backupset/2016_03_22/o1_mf_nnndf_TAG20160322T150047_ch2467rc_.bkp tag=TAG20160322T150047
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:02:56
Finished restore at 22-MAR-16

datafile 1 switched to datafile copy
input datafile copy RECID=5 STAMP=907169129 file name=+NEWDATA/asmnew/datafile/system.264.907168953
datafile 2 switched to datafile copy
input datafile copy RECID=6 STAMP=907169129 file name=+NEWDATA/asmnew/datafile/sysaux.265.907168953
datafile 3 switched to datafile copy
input datafile copy RECID=7 STAMP=907169129 file name=+NEWDATA/asmnew/datafile/undotbs1.266.907168955
datafile 4 switched to datafile copy
input datafile copy RECID=8 STAMP=907169129 file name=+NEWDATA/asmnew/datafile/users.267.907168955

8. Recover the Database
RMAN> recover database ;

Starting recover at 22-MAR-16
using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 5 is already on disk as file /u01/asm1/ASM2/archivelog/2016_03_22/o1_mf_1_5_ch248wr9_.arc
archived log for thread 1 with sequence 6 is already on disk as file +DATA/asm2/onlinelog/group_3.284.907165799
archived log file name=/u01/asm1/ASM2/archivelog/2016_03_22/o1_mf_1_5_ch248wr9_.arc thread=1 sequence=5
archived log file name=+DATA/asm2/onlinelog/group_3.284.907165799 thread=1 sequence=6
media recovery complete, elapsed time: 00:00:10
Finished recover at 22-MAR-16

RMAN> exit


Recovery Manager complete.

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
+NEWDATA/asmnew/datafile/system.264.907168953
+NEWDATA/asmnew/datafile/sysaux.265.907168953
+NEWDATA/asmnew/datafile/undotbs1.266.907168955
+NEWDATA/asmnew/datafile/users.267.907168955

9. Rename the ONLINE redo logs file
Rename all logfiles :-

SQL> alter database rename file '+DATA/asm2/onlinelog/group_1.282.907165781' to '+NEWDATA/asmnew/redo01.log';

SQL> alter database rename file '+DATA/asm2/onlinelog/group_2.283.907165791' to
  2  '+NEWDATA/asmnew/redo02.log';

SQL> alter database rename file '+DATA/asm2/onlinelog/group_3.284.907165799' to
  2  '+NEWDATA/asmnew/redo03.log';

SQL> alter database rename file '/u01/asm1/ASM2/onlinelog/o1_mf_3_ch22dpy1_.log' to '+NEWDATA/asmnew/redo04.log';
Database altered.
SQL> alter database rename file '/u01/asm1/ASM2/onlinelog/o1_mf_2_ch22ddxp_.log' to '+NEWDATA/asmnew/redo05.log';
Database altered.

SQL> alter database rename file '/u01/asm1/ASM2/onlinelog/o1_mf_1_ch22d59l_.log' to '+NEWDATA/asmnew/redo06.log' ;
Database altered.


SQL> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------
+NEWDATA/asmnew/redo03.log
+NEWDATA/asmnew/redo04.log
+NEWDATA/asmnew/redo02.log
+NEWDATA/asmnew/redo05.log
+NEWDATA/asmnew/redo01.log
+NEWDATA/asmnew/redo06.log

6 rows selected.


SQL> alter database open resetlogs;

Database altered.

SQL> select name from v$database;

NAME
---------
ASM2

 10. Create a New Tablespace : 

SQL> select name from v$tempfile;

NAME
--------------------------------------------------------------------------------
+DATA/asm2/tempfile/temp.285.907165833

SQL> create temporary tablespace temp1 tempfile '+NEWDATA';

Tablespace created.

SQL> alter database default temporary tablespace temp1;

Database altered.

SQL>