Steps To Migrate Non-Cdb Databases To Acfs On Oracle Database APPLIANCE 12.1.2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

An Oracle White Paper December 2014

STEPS TO MIGRATE NON-CDB DATABASES


TO ACFS ON ORACLE DATABASE
APPLIANCE 12.1.2

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

Disclaimer
The following is intended to outline our general product direction. It is intended for information purposes
only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code,
or functionality, and should not be relied upon in making purchasing decisions. The development, release,
and timing of any features or functionality described for Oracles products remains at the sole discretion
of Oracle.

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

Introduction ..................................................................................... 2
2. Pre-requisites .............................................................................. 2
2.1 Step 1: Create the ACFS File System ................................... 2
2.2 Step 2: Create Empty Snapshot............................................ 3
2.3. Step 3: Pre-create the directories..................................... 3
3. Migration Scenarios ................................................................. 4
3.1. Migrate an existing ASM based Database to ACFS ........ 4
3.2. Migrate a database from another host to ACFS on ODA13
3.3. Post Migration Verification ................................................. 22
Appendix A: Commands to determine disk space usage in ASM and ACFS
........................................................................................................ 23

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

Introduction
One of the fundamental architectural changes introduced in ODA 12.1.2.0.0 is the option to store databases in Oracle
Cloud File System (ACFS), which is created on top of ASM. Prior version 12.1.2.0.0, the data files are stored on ASM.
ODA 12.1.2.0.0 supports database versions 11.2.0.2.x , 11.2.0.3.x, 11.2.0.4.x and 12.1.0.2.0. For databases versions equal or
higher than 11.2.0.4.0, the default storage option will be ACFS while any older version of the database created using oakcli,
will be created on ASM storage. All existing databases on an upgraded ODA will remain ASM databases.
One of the biggest advantages provided by ACFS based non-CDB databases is the capability of creating snapshot
databases. This feature helps in faster, space efficient database cloning for development and testing purposes. The oakcli
interface provides support for creating snapshot databases for non-CDB environments (CDB databases have the feature
PDB Snapshot Cloning for this purpose). As the snapshot database feature is only supported on ACFS based environment,
an ODA administrator might consider to migrate existing ASM databases to ACFS based storage. There might be other
scenarios like setting up a new test environment from an existing production environment or setting up data guard on
ACFS based storage. Mind that snapshot database feature is only for 11.2.0.4.x and 12.1.0.2 databases, you may migrate
databases of older versions to ACFS but you will not be able to utilize the snapshot feature.
In order to provide the snapshot capabilities, certain pre-requisites need to be met and this article explains how a new
database can be setup on ACFS based storage on ODA, that can provide snapshot database capability.

2. Pre-requisites
In order to support the snapshot database capability for a non-CDB database, certain pre-requisites have to be met. The
section below lists the mandatory requirements to migrate any database to ODA ACFS storage.
If the existing ODA is migrated from an earlier version or if the initial database was not created (or a CDB database was
created) during the deployment, then the ACFS File system will not be present. In the current version, there is no oakcli
command to provision the ACFS file system for storing the data files. The File system is provisioned automatically when
the first non-CDB database is created using the oakcli create database command.
Note: from version 12.1.2.2.0 on, oakcli will support the creation of the ACFS file systems
On ODA three separate ACFS file systems are created on top of each of the ASM Disk Groups. Table 1 shows the
mapping between ASM Disk group and the ACFS Volumes for regular non-CDB databases.

Table 1
ASM Disk
Group
+DATA
+RECO
+REDO

ACFS File System

Contents

/u02/app/oracle/oradata/datastore
Data Files, Tempfiles
/u01/app/oracle/fast_recovery_area/datastore Archive logs, Backups
/u01/app/oracle/oradata/datastore
Control Files, Online
Redo Logs

MOS note 1951012.1 contains a tool to create scripts with the commands to perform the migration.
This is intended to avoid copy and paste the commands from this white paper into the console.
2.1 Step 1: Create the ACFS File System

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

In case the three ACFS file systems (mentioned in Table1) are not present, they have to be created in a first step. In the
current version (12.1.2.1.0), there is no mechanism to create these file system separately, future versions (planned for
12.1.2.2.0) will support the creation via oakcli. As the file systems are automatically created when the first ACFS based
database is created, we will create the file systems by creating a dummy database, using the oakcli interface.

1.

oakcli create database -db orcl -version 12.1.0.2.0

Note : In the case of upgraded environments, the database clone file for version 12.1.0.2.0 may not be present.
The MOS patch# 19520042 contains the database clone files. Download the database clone file and unpack it to
the first node prior to creating the database.
During the ACFS creation, 50% of the usable free space from the +DATA disk group will be assigned to ACFS. The size
of the RECO disk group will be based on an internal calculation based on the database backup location selected during
the initial ODA Deployment. There is no oakcli support for resizing these ACFS File Systems yet, this will be included in a
future release. In cases where the file system runs out of space, more space can be added using acfsutil size command.
Having said that, it is strongly recommended to be very conservative when adding additional space to ACFS. This is
especially important if you plan to create a CDB in the future. Once the file system for non-CDB is created and/or
extended, it is not possible to release space for CDB use.
even if non-cdb filesystem has lot of free space
Example:
/sbin/acfsutil size +10G /u01/app/oracle/oradata/datastore
The command above will add 10G to the ACFS file system /u01/app/oracle/oradata/datastore.

2.2 Step 2: Create Empty Snapshot


In order to support the snapshot feature, all the data files need to be created in an empty ACFS File System:
/u02/app/oracle/oradata/datastore. This is achieved by creating an empty snapshot with the same name as the db
unique name of the database being migrated.
Note: Please mind that the top file system has to remain always empty and it is not allowed to put any files into
it. If this violated, performance will be impacted.

2.

/sbin/acfsutil snap create -w <db_name > /u02/app/oracle/oradata/datastore

Example:
acfsutil snap create -w odadb /u02/app/oracle/oradata/datastore
The above command will create a writeable File system /u02/app/oracle/oradata/datastore/.ACFS/snaps/odadb .
Note : The snapshot name is case sensitive. Use the same case as the db_name of the database.

2.3.

Step 3: Pre-create the directories

Pre-create all the directories required for data files, Fast recovery area and the online log files. All these directories need to
be owned by oracle:oinstall

3.

mkdir /u01/app/oracle/oradata/datastore/<db_name>
mkdir /u01/app/oracle/fast_recovery_area/datastore/<db_name>

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

mkdir /u02/app/oracle/oradata/datastore/.ACFS/snaps/<db_name>/<db_unique_name>
chown oracle:oinstall /u01/app/oracle/oradata/datastore/<db_name>
chown oracle:oinstall /u01/app/oracle/fast_recovery_area/datastore/<db_name>
chown oracle:oinstall /u02/app/oracle/oradata/datastore/.ACFS/snaps/<db_name>/<
db_unique_name >
chmod 770 /u02/app/oracle/oradata/datastore/.ACFS/snaps/<db_name>/<
db_unique_name >
Example:
mkdir /u01/app/oracle/oradata/datastore/odadb
mkdir /u01/app/oracle/fast_recovery_area/datastore/odadb
mkdir /u02/app/oracle/oradata/datastore/.ACFS/snaps/odadb/odadb
chown oracle:oinstall /u01/app/oracle/oradata/datastore/odadb
chown oracle:oinstall /u01/app/oracle/fast_recovery_area/datastore/odadb
chown oracle:oinstall /u02/app/oracle/oradata/datastore/.ACFS/snaps/odadb/odadb

3.

Migration Scenarios

The sections below list different migration scenarios. The earlier section (Section 2) is common for all the migration.

3.1.

Migrate an existing ASM based Database to ACFS

The section below lists the steps to migrate an existing ASM based database on ODA to ACFS. All the pre-requisite steps
listed in Section 2 should be met and completed prior to attempting the migration. The steps can be used for single
instance, RAC One node and RAC databases.
3.1.1.

Update the spfile and modify the OMF Destinations

One of the main requirements to support snapshot database is that the database should use Oracle Managed Files for all
database related files like data files, control files, online redo logs etc. This requires the parameter
DB_CREATE_FILE_DEST, DB_RECOVERY_FILE_DEST, and DB_CREATE_ONLINE_LOG_DEST_1 to be set
to the corresponding ACFS based file systems created in Section 2.3
Set your environment (e.g. . oraenv) and modify the following initialization parameter in the existing database to point it
to the ACFS destination directories.

4.

Alter system set db_create_file_dest='/u02/app/oracle/oradata/datastore/.ACFS/snaps/<db_name>


scope=both sid=*;
Alter system set db_recovery_file_dest='/u01/app/oracle/fast_recovery_area/datastore/<db_name>
scope=both sid=*;
Alter system set db_create_online_log_dest_1='/u01/app/oracle/oradata/datastore/<db_name>
scope=both sid=*;

Example:
In order to migrate a database with db_unique_name, set the OMF related parameters as shown below

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

SQL> Alter system set db_create_file_dest='/u02/app/oracle/oradata/datastore/.ACFS/snaps/odadb' scope = both


sid=*;
SQL> alter system set db_recovery_file_dest='/u01/app/oracle/fast_recovery_area/datastore/odadb' scope = both
sid=*;
SQL> alter system set db_create_online_log_dest_1='/u01/app/oracle/oradata/datastore/odadb' scope = both sid=*;
3.1.2.

Migration of the Data files

Oracle Recovery Manager (RMAN) can be used to migrate the database from existing ASM based storage to ACFS based
Storage. Specify the destination same as db_create_file_dest set in the previous step.
Before you start to migrate the entire database to ACFS based storage, ensure that there is enough free space available in
the destination.
Example:
$ /sbin/acfsutil info fs /u02/app/oracle/oradata/datastore |grep free
total free: 1713390866432 ( 1.55 TB )
free:

1713390866432 ( 1.55 TB )

5.

Shutdown the database


Mount the database
RMAN > BACKUP AS COPY DATABASE TO DESTINATION
'/u02/app/oracle/oradata/datastore/.ACFS/snaps/<db_name>;
SWITCH DATABASE TO COPY;

Example:

[oracle@oda01 ~]$ srvctl stop database -d odadb -o immediate


[oracle@oda01 ~]$ rman target /
Recovery Manager: Release 12.1.0.2.0 - Production on Thu Aug 28 20:22:20 2014
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database (not started)
RMAN> startup mount
Oracle instance started
database mounted
Total System Global Area 2147483648 bytes
Fixed Size
Variable Size
Database Buffers
Redo Buffers

2926472 bytes
620759160 bytes
1493172224 bytes
30625792 bytes

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

RMAN> BACKUP AS COPY DATABASE TO DESTINATION


'/u02/app/oracle/oradata/datastore/.ACFS/snaps/odadb';
Starting backup at 28-AUG-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=23 instance=odadb1 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=+DATA/ODADB/DATAFILE/system.286.856810695
output file
name=/u02/app/oracle/oradata/datastore/.ACFS/snaps/odadb/ODADB/datafile/o1_mf_system_9zzw
l64x_.dbf tag=TAG20140828T202349 RECID=1 STAMP=856815836
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=+DATA/ODADB/DATAFILE/sysaux.287.856810701
output file
name=/u02/app/oracle/oradata/datastore/.ACFS/snaps/odadb/ODADB/datafile/o1_mf_sysaux_9zzwl
f7b_.dbf tag=TAG20140828T202349 RECID=2 STAMP=856815842
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=+DATA/ODADB/DATAFILE/undotbs1.288.856810705
output file
name=/u02/app/oracle/oradata/datastore/.ACFS/snaps/odadb/ODADB/datafile/o1_mf_undotbs1_9z
zwlnbw_.dbf tag=TAG20140828T202349 RECID=3 STAMP=856815847
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=+DATA/ODADB/DATAFILE/undotbs2.290.856810719
output file
name=/u02/app/oracle/oradata/datastore/.ACFS/snaps/odadb/ODADB/datafile/o1_mf_undotbs2_9z
zwlqgd_.dbf tag=TAG20140828T202349 RECID=4 STAMP=856815849
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile copy
copying current control file
output file
name=/u02/app/oracle/oradata/datastore/.ACFS/snaps/odadb/ODADB/controlfile/o1_mf_TAG2014
0828T202349_9zzwlvl1_.ctl tag=TAG20140828T202349 RECID=5 STAMP=856815851
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=+DATA/ODADB/DATAFILE/users.291.856810719
output file
name=/u02/app/oracle/oradata/datastore/.ACFS/snaps/odadb/ODADB/datafile/o1_mf_users_9zzwl
wos_.dbf tag=TAG20140828T202349 RECID=6 STAMP=856815852
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 28-AUG-14
channel ORA_DISK_1: finished piece 1 at 28-AUG-14

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

piece
handle=/u02/app/oracle/oradata/datastore/.ACFS/snaps/odadb/ODADB/backupset/2014_08_28/o1_
mf_nnsnf_TAG20140828T202349_9zzwlxs1_.bkp tag=TAG20140828T202349 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 28-AUG-14
RMAN> SWITCH DATABASE TO COPY;
datafile 1 switched to datafile copy
"/u02/app/oracle/oradata/datastore/.ACFS/snaps/odadb/ODADB/datafile/o1_mf_system_9zzwl64x_.
dbf"
datafile 2 switched to datafile copy
"/u02/app/oracle/oradata/datastore/.ACFS/snaps/odadb/ODADB/datafile/o1_mf_sysaux_9zzwlf7b_.
dbf"
datafile 3 switched to datafile copy
"/u02/app/oracle/oradata/datastore/.ACFS/snaps/odadb/ODADB/datafile/o1_mf_undotbs1_9zzwlnb
w_.dbf"
datafile 4 switched to datafile copy
"/u02/app/oracle/oradata/datastore/.ACFS/snaps/odadb/ODADB/datafile/o1_mf_undotbs2_9zzwlqg
d_.dbf"
datafile 5 switched to datafile copy
"/u02/app/oracle/oradata/datastore/.ACFS/snaps/odadb/ODADB/datafile/o1_mf_users_9zzwlwos_.d
bf"
3.1.3.

Migration of the Control File

The ACFS based database in ODA requires the control files also to be in OMF format. Restore the control file from the
existing ASM based storage to ACFS using RMAN. The steps to restore the control file are listed below.

5.

Identify the existing control file name


Reset the control file parameter in the spfile
Startup no mount
Restore the control file
Update the control files parameter in spfile

Example:

SQL> select name from v$controlfile;


NAME
-------------------------------------------------------------------------------+REDO/ODADB/CONTROLFILE/current.263.856810687
SQL> alter system reset control_files;
System altered.
SQL> Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
[oracle@oda01 ~]$ rman target /
Recovery Manager: Release 12.1.0.2.0 - Production on Thu Aug 28 21:09:02 2014
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: ODADB (DBID=1324985158, not open)
RMAN> shutdown immediate
using target database control file instead of recovery catalog
database dismounted
Oracle instance shut down
RMAN> startup nomount
connected to target database (not started)
Oracle instance started
Total System Global Area 2147483648 bytes
Fixed Size
Variable Size
Database Buffers
Redo Buffers

2926472 bytes
620759160 bytes
1493172224 bytes
30625792 bytes

RMAN> RESTORE CONTROLFILE FROM


'+REDO/ODADB/CONTROLFILE/current.263.856810687';
Starting restore at 28-AUG-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 instance=odadb1 device type=DISK
channel ORA_DISK_1: copied control file copy
output file
name=/u01/app/oracle/oradata/datastore/odadb/ODADB/controlfile/o1_mf_9zzz98h6_.ctl
Finished restore at 28-AUG-14
RMAN>
Recovery Manager complete.
[oracle@oda01 ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Thu Aug 28 21:14:37 2014
Copyright (c) 1982, 2014, Oracle. All rights reserved.

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
SQL> alter system set
control_files='/u01/app/oracle/oradata/datastore/odadb/ODADB/controlfile/o1_mf_9zzz98h6_.ctl'
scope=spfile sid='*';
System altered..
3.1.4.

Migrate Online Redo Logs and Standby Redo Logs

To migrate the online redo logs and Standby Redo Logs (SRLs), add a new set of redo log groups and drop the existing
redo log groups. The sample script below, can be used to migrate the logs files from ASM to ACFS. Before executing the
script, ensure that the parameter db_create_online_log_dest_1 is set to
/u01/app/oracle/oradata/datastore/<db_unique_name>.

declare
cursor rlc is
select group# grp, thread# thr, bytes/1024 bytes_k, 'NO' srl
from v$log
union
select group# grp, thread# thr, bytes/1024 bytes_k, 'YES' srl
from v$standby_log
order by 1;
stmt varchar2(2048);
swtstmt varchar2(1024) := 'alter system switch logfile';
archstmt varchar2(1024) := 'alter system archive log current';
ckpstmt varchar2(1024) := 'alter system checkpoint global';
begin
for rlcRec in rlc loop
if (rlcRec.srl = 'YES') then
stmt := 'alter database add standby logfile thread ' ||
rlcRec.thr || ' size ' ||
rlcRec.bytes_k || 'K';
execute immediate stmt;
stmt := 'alter database drop standby logfile group ' || rlcRec.grp;
execute immediate stmt;
else
stmt := 'alter database add logfile thread ' || rlcRec.thr || ' size ' || rlcRec.bytes_k || 'K';
dbms_output.put_line(stmt);
execute immediate stmt;
begin
stmt := 'alter database drop logfile group ' || rlcRec.grp;
dbms_output.put_line(stmt);
execute immediate stmt;
exception
when others then

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

execute immediate swtstmt;


execute immediate archstmt;
execute immediate ckpstmt;
execute immediate stmt;
end;
end if;
end loop;
end;

Example:

SQL> declare
2 cursor rlc is
select group# grp, thread# thr, bytes/1024 bytes_k, 'NO' srl
3 4
from v$log
5
union
6
select group# grp, thread# thr, bytes/1024 bytes_k, 'YES' srl
7
from v$standby_log
8
order by 1;
9 stmt varchar2(2048);
10 swtstmt varchar2(1024) := 'alter system switch logfile';
11 archstmt varchar2(1024) := 'alter system archive log current';
12 ckpstmt varchar2(1024) := 'alter system checkpoint global';
13 begin
14 for rlcRec in rlc loop
15
if (rlcRec.srl = 'YES') then
16
stmt := 'alter database add standby logfile thread ' ||
17
rlcRec.thr || ' size ' ||
18
rlcRec.bytes_k || 'K';
19
execute immediate stmt;
stmt := 'alter database drop standby logfile group ' || rlcRec.grp;
20 21
execute immediate stmt;
22
else
23
stmt := 'alter database add logfile thread ' || rlcRec.thr || ' size ' || rlcRec.bytes_k || 'K';
dbms_output.put_line(stmt);
24 25
execute immediate stmt;
26
begin
27
stmt := 'alter database drop logfile group ' || rlcRec.grp;
28
dbms_output.put_line(stmt);
29
execute immediate stmt;
30
exception
31
when others then
32
execute immediate swtstmt;
33
execute immediate archstmt;
34
execute immediate ckpstmt;
35
execute immediate stmt;
36
end;
37
end if;
end loop;

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

38 39 end;
40 /

select member from v$logfile;


PL/SQL procedure successfully completed.
SQL> SQL> SQL> SQL>
MEMBER
-------------------------------------------------------------------------------/u01/app/oracle/oradata/datastore/odadb/ODADB/onlinelog/o1_mf_1_b0013nt5_.log
/u01/app/oracle/oradata/datastore/odadb/ODADB/onlinelog/o1_mf_2_b0013qot_.log
/u01/app/oracle/oradata/datastore/odadb/ODADB/onlinelog/o1_mf_3_b0013tfb_.log
/u01/app/oracle/oradata/datastore/odadb/ODADB/onlinelog/o1_mf_4_b00143r5_.log
/u01/app/oracle/oradata/datastore/odadb/ODADB/onlinelog/o1_mf_5_b00146ds_.log
/u01/app/oracle/oradata/datastore/odadb/ODADB/onlinelog/o1_mf_7_b0013bqn_.log
6 rows selected.
Note : In the case of RACOne Node database , the above script may error out with the following errors.

ERROR at line 1:
ORA-01623: log 3 is current log for instance UNNAMED_INSTANCE_2 (thread 2) cannot drop
ORA-00312: online log 3 thread 2: '+REDO/RAC1/ONLINELOG/group_3.266.863017245'
In order to avoid such an error, clear the logfile prior to dropping it.
SQL> alter database clear logfile group 3;
Database altered.
SQL> SQL> alter database drop logfile group 3;
Database altered.

3.1.5 Migration of the temp files

The tempfiles need to be dropped and re-created to migrate it from ASM based to ACFS storage. The
dbms_metadata.get_ddl can be used to extract the SQL statement for creating the TEMP tablespace.
Example:

select DBMS_METADATA.GET_DDL ('TABLESPACE','TEMP') from dual;


DBMS_METADATA.GET_DDL('TABLESPACE','TEMP')
--------------------------------------------------------------------------------

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

CREATE TEMPORARY TABLESPACE "TEMP" TEMPFILE


SIZE 20971520
AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1048576
SQL> drop tablespace temp;
drop tablespace temp
*
ERROR at line 1:
ORA-12906: cannot drop default temporary tablespace

SQL> alter tablespace temp rename to tmp_bkp;


Tablespace altered.
SQL> CREATE TEMPORARY TABLESPACE "TEMP" TEMPFILE
SIZE 20971520
AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1048576 2 3

4 ;

Tablespace created.
SQL> alter database default temporary tablespace temp;
Database altered.
SQL> drop tablespace tmp_bkp;
Tablespace dropped.

3.1.6. Migrating the SPFILE & Password File

The asmcmd utility can be used for migrating the spfile and password file stored in the ASM diskgroups.
After migrating these files to ACFS, the database resource in the clusterware need to be updated to point
to the newly migrated files.
Run these commands as the root user,
su - grid -c "/u01/app/12.1.0.2/grid/bin/asmcmd cp '+DATA/odadb/PARAMETERFILE/spfile.293.863017253'
/u02/app/oracle/oradata/datastore/.ACFS/snaps/odadb/odadb/spfileodadb.ora"
chown oracle:oinstall /u02/app/oracle/oradata/datastore/.ACFS/snaps/odadb/odadb/spfileodadb.ora
su - grid -c "/u01/app/12.1.0.2/grid/bin/asmcmd cp '+DATA/odadb/PASSWORD/pwdodadb.286.863016483'
/u02/app/oracle/oradata/datastore/.ACFS/snaps/odadb/odadb/orapwodadb"

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

chown oracle:oinstall /u02/app/oracle/oradata/datastore/.ACFS/snaps/odadb/odadb/orapwodadb


/u01/app/oracle/product/12.1.0.2/dbhome_1/bin/srvctl modify database -d odadb -spfile
/u02/app/oracle/oradata/datastore/.ACFS/snaps/odadb/odadb/spfileodadb.ora -pwfile
/u02/app/oracle/oradata/datastore/.ACFS/snaps/odadb/odadb/orapwodadb -acfspath
"/u02/app/oracle/oradata/datastore/.ACFS/snaps,/u01/app/oracle/oradata/datastore,/u01/app/oracle/fast_recovery_
area/datastore" -nodiskgroup
Copy the password file from ASM to ACFS using asmcp command.

3.1.7 Cleanup the data files from the ASM location

Once all the data files are migrated to ACFS, RMAN command delete noprompt datafilecopy can be used to delete the
datafiles from ASM storage. The view v$datafile_copy or the RMAN command list datafilecopy all can be used to list
the files.
Note :
Ensure the migrated database is working as expected before you delete the files in ASM.
The script listed below can be used to generate the RMAN script to delete the data file copies residing in the +DATA disk
group. Execute the script from RMAN prompt to delete all the data file copies.
Example:

RMAN> select 'delete noprompt datafilecopy '||''''||name ||''''||';' from v$datafile_copy where name like
'+DATA%DATAFILE%';
'DELETENOPROMPTDATAFILECOPY'||''''||NAME||''''||';'
-------------------------------------------------------------------------------delete noprompt datafilecopy '+DATA/ODADB/DATAFILE/undotbs1.288.856810705';
delete noprompt datafilecopy '+DATA/ODADB/DATAFILE/undotbs2.290.856810719';
delete noprompt datafilecopy '+DATA/ODADB/DATAFILE/users.291.856810719';
3.2.

Migrate a database from another host to ACFS on ODA

The section below lists the steps to migrate a database to ACFS on ODA. All the pre-requisite steps listed in Section 2
should be completed prior to attempting the migration.
The example below assumes that RMAN full database backup (including spfile,controlfiles, database files and archive logs )
from another Linux machine running 12.1.0.2 is placed in the directory /cloudfs/dest. The steps listed below assume that
there is no change in the database name of the migrated database.
3.2.1.

Restore the SPFILE and CONTROLFILE From the backup

As mentioned in earlier section, it is expected that the OMF naming conventions are followed for all the database files
when placing them on ACFS file system on ODA. Create a temporary pfile with the OMF parameters set and start the
instance as listed below. Specify the db_name and sga_target parameters as well.

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

Step 1:

db_name = <db name>


sga_target=2048M
db_create_online_log_dest_1='/u01/app/oracle/oradata/datastore/<db name>'
db_create_file_dest='/u02/app/oracle/oradata/datastore/.ACFS/snaps/<db
name>'
db_recovery_file_dest='/u01/app/oracle/fast_recovery_area/datastore/<db
name>'
db_recovery_file_dest_size=10240m

Set the ORACLE_SID and ORACLE_HOME to the same values for the source database. If the Oracle home of the
corresponding version does not exist in ODA, download the dbclone file from MOS and create a new oracle home using
oakcli create dbhome version <>.
Example:

export ORACLE_SID=primdb
export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome_1
[oracle@odademo1 ~]$ rman target /
Recovery Manager: Release 12.1.0.2.0 - Production on Sun Sep 21 07:36:42 2014
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database (not started)
RMAN> startup nomount pfile='/tmp/initprimdb.ora'
Oracle instance started
Total System Global Area 2147483648 bytes
Fixed Size
3712904 bytes
Variable Size
603981944 bytes
Database Buffers
1526726656 bytes
Redo Buffers
13062144 bytes
RMAN> restore spfile to '/tmp/spfileprimdb.ora' from
'/cloudfs/dest/SPFILE_09pir924_1_1_dbid_533179677.rman';
Starting restore at 21-SEP-14
using channel ORA_DISK_1
channel ORA_DISK_1: restoring spfile from AUTOBACKUP
/cloudfs/dest/SPFILE_09pir924_1_1_dbid_533179677.rman
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 21-SEP-14
RMAN> restore controlfile from '/cloudfs/dest/ctl_20140918_dbid_533179677.rman';
Starting restore at 21-SEP-14
using channel ORA_DISK_1

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

channel ORA_DISK_1: restoring control file


channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file
name=/u01/app/oracle/oradata/datastore/primdb/PRIMDB/controlfile/o1_mf_b1xt0fwc_.ctl
Finished restore at 21-SEP-14
Create the pfile from the restored spfile as shown below.
Example:

SQL> create pfile='/u02/app/oracle/oradata/datastore/.ACFS/snaps/primdb/primdb/initprimdb' from


spfile='/tmp/spfileprimdb.ora';
File created.
Edit the pfile and add ODA specific entries and also update the OMF relates entries in the init.ora file. The table below
shows the list of entries that need to be added.
Example:

*._disable_interface_checking=TRUE
*._ENABLE_NUMA_SUPPORT=FALSE
*._FILE_SIZE_INCREASE_INCREMENT=2143289344
*._gc_policy_time=0
*._gc_undo_affinity=FALSE
*.use_large_pages='only'
*.db_block_checking='FULL'
*.db_block_checksum='FULL'
*.db_lost_write_protect='TYPICAL'
#### OMF Related Entries ######
db_create_online_log_dest_1='/u01/app/oracle/oradata/datastore/primdb'
db_create_file_dest='/u02/app/oracle/oradata/datastore/.ACFS/snaps/primdb'
db_recovery_file_dest='/u01/app/oracle/fast_recovery_area/datastore/primdb'
db_recovery_file_dest_size=10240m
#### OMF Related Entries ######
#### Control File (Restored by RMAN ) ####
*.control_files='/u01/app/oracle/oradata/datastore/primdb/PRIMDB/controlfile/o1_mf_b1xt0fwc_.ctl
#### Control File (Restored by RMAN ) ####
##### Audit File Destination ############
*.audit_file_dest='/u01/app/oracle/admin/primdb/adump'
##### Audit File Destination ############
#### remote_login_passwordfile should be set to exclusive for snapshot database to work #####
*. remote_login_passwordfile=EXCLUSIVE

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

#### Turn off cluster database for database restoration #####


cluster_database=false
compatible = 11.2.0.4.0 ### should be same as the source database
Note :
1. Create the audit file location if the directory is not already present.
2. If the source database is configured with Automatic Memory Management and set memory_target, replace the
memory_target entry with sga_target and pga_aggregate_target. In ODA, the databases are expected to use
Huge Pages and memory_target is currently not used.
3. For RAC /RAC One databases, set the parameter cluster_database=FALSE in the init.ora
3.2.2.

Restore the data files from backup

After restarting the database using the modified pfile, restore and recover the database using RMAN. The example below
shows a sample script.
Example:

RMAN> shutdown immediate


Oracle instance shut down
RMAN> startup mount
pfile='/u02/app/oracle/oradata/datastore/.ACFS/snaps/primdb/primdb/initprimdb'
Oracle instance started
database mounted
Total System Global Area 8589934592 bytes
Fixed Size
Variable Size
Database Buffers
Redo Buffers

2944952 bytes
1526726728 bytes
7029653504 bytes
30609408 bytes

RMAN> select name from v$controlfile;

NAME
-------------------------------------------------------------------------------/u01/app/oracle/oradata/datastore/primdb/PRIMDB/controlfile/o1_mf_b1xt0fwc_.ctl
RMAN> catalog start with '/cloudfs/dest';
searching for all files that match the pattern /cloudfs/dest
List of Files Unknown to the Database
=====================================

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

File Name: /cloudfs/dest/SPFILE_09pir924_1_1_dbid_533179677.rman


File Name: /cloudfs/dest/arc_08pir921_1_1.rman
File Name: /cloudfs/dest/bkp_01pir90t_1_1
File Name: /cloudfs/dest/bkp_02pir914_1_1
File Name: /cloudfs/dest/bkp_03pir91k_1_1
File Name: /cloudfs/dest/bkp_04pir91l_1_1
File Name: /cloudfs/dest/bkp_05pir91m_1_1
File Name: /cloudfs/dest/bkp_06pir91q_1_1
File Name: /cloudfs/dest/bkp_07pir91r_1_1
File Name: /cloudfs/dest/ctl_20140918_dbid_533179677.rman
Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /cloudfs/dest/SPFILE_09pir924_1_1_dbid_533179677.rman
File Name: /cloudfs/dest/arc_08pir921_1_1.rman
File Name: /cloudfs/dest/bkp_01pir90t_1_1
File Name: /cloudfs/dest/bkp_02pir914_1_1
File Name: /cloudfs/dest/bkp_03pir91k_1_1
File Name: /cloudfs/dest/bkp_04pir91l_1_1
File Name: /cloudfs/dest/bkp_05pir91m_1_1
File Name: /cloudfs/dest/bkp_06pir91q_1_1
File Name: /cloudfs/dest/bkp_07pir91r_1_1
File Name: /cloudfs/dest/ctl_20140918_dbid_533179677.rman
RMAN> run {
2> set until scn 357233;
3> restore database;
4> recover database;
5> }
executing command: SET until clause
Starting restore at 21-SEP-14
using channel ORA_DISK_1
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
/u02/app/oracle/oradata/datastore/.ACFS/snaps/primdb/PRIMDB/datafile/o1_mf_system_b1y4gpg6_
.dbf
channel ORA_DISK_1: reading from backup piece /cloudfs/dest/bkp_01pir90t_1_1
channel ORA_DISK_1: piece handle=/cloudfs/dest/bkp_01pir90t_1_1 tag=TAG20140918T200549
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

channel ORA_DISK_1: restoring datafile 00002 to


/u02/app/oracle/oradata/datastore/.ACFS/snaps/primdb/PRIMDB/datafile/o1_mf_sysaux_b1y4h5j6_.
dbf
channel ORA_DISK_1: reading from backup piece /cloudfs/dest/bkp_02pir914_1_1
channel ORA_DISK_1: piece handle=/cloudfs/dest/bkp_02pir914_1_1 tag=TAG20140918T200549
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
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 00003 to
/u02/app/oracle/oradata/datastore/.ACFS/snaps/primdb/PRIMDB/datafile/o1_mf_undotbs1_b1y4hdk
w_.dbf
channel ORA_DISK_1: reading from backup piece /cloudfs/dest/bkp_03pir91k_1_1
channel ORA_DISK_1: piece handle=/cloudfs/dest/bkp_03pir91k_1_1 tag=TAG20140918T200549
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
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 00004 to
/u02/app/oracle/oradata/datastore/.ACFS/snaps/primdb/PRIMDB/datafile/o1_mf_undotbs2_b1y4hf
m6_.dbf
channel ORA_DISK_1: reading from backup piece /cloudfs/dest/bkp_04pir91l_1_1
channel ORA_DISK_1: piece handle=/cloudfs/dest/bkp_04pir91l_1_1 tag=TAG20140918T200549
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
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 00005 to
/u02/app/oracle/oradata/datastore/.ACFS/snaps/primdb/PRIMDB/datafile/o1_mf_users_b1y4hgns_.d
bf
channel ORA_DISK_1: reading from backup piece /cloudfs/dest/bkp_06pir91q_1_1
channel ORA_DISK_1: piece handle=/cloudfs/dest/bkp_06pir91q_1_1 tag=TAG20140918T200549
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 21-SEP-14
Starting recover at 21-SEP-14
using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 2 is already on disk as file
/u01/app/oracle/fast_recovery_area/datastore/primdb/PRIMDB/archivelog/2014_09_21/o1_mf_1_2_
b1y4qv0g_.arc
archived log file
name=/u01/app/oracle/fast_recovery_area/datastore/primdb/PRIMDB/archivelog/2014_09_21/o1_mf
_1_2_b1y4qv0g_.arc thread=1 sequence=2
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=2 sequence=1

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

channel ORA_DISK_1: reading from backup piece /cloudfs/dest/arc_08pir921_1_1.rman


channel ORA_DISK_1: piece handle=/cloudfs/dest/arc_08pir921_1_1.rman tag=TAG20140918T200625
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file
name=/u01/app/oracle/fast_recovery_area/datastore/primdb/PRIMDB/archivelog/2014_09_21/o1_mf
_2_1_b1y4wpnx_.arc thread=2 sequence=1
channel default: deleting archived log(s)
archived log file
name=/u01/app/oracle/fast_recovery_area/datastore/primdb/PRIMDB/archivelog/2014_09_21/o1_mf
_2_1_b1y4wpnx_.arc RECID=5 STAMP=858855974
media recovery complete, elapsed time: 00:00:00
Finished recover at 21-SEP-14
NOTE: To find the SCN to use the RMAN restore/recover command you can query the archivelog SCNs in
RMAN with:
list backup of archivelog all;
3.2.3.

Migrating the Online Redo Log Files

After restoring the database, open the database with reset logs. This will automatically create the log files in
the location specified by the parameter db_create_online_log_dest_1.
Example:
RMAN> alter database open resetlogs;
Statement processed
RMAN> select member from v$logfile;
MEMBER
-------------------------------------------------------------------------------/u01/app/oracle/oradata/datastore/primdb/PRIMDB/onlinelog/o1_mf_1_b1ybk012_.log
/u01/app/oracle/oradata/datastore/primdb/PRIMDB/onlinelog/o1_mf_2_b1ybk40s_.log
/u01/app/oracle/oradata/datastore/primdb/PRIMDB/onlinelog/o1_mf_3_b1ybk82h_.log
/u01/app/oracle/oradata/datastore/primdb/PRIMDB/onlinelog/o1_mf_4_b1ybkd8j_.log
3.2.4

Migrating the Temp Files

Drop and recreate the tempfile for migrating them to the ACFS Filesystem. The steps are outlined in section 3.1.6.
3.2.5.

Re-create SPFILE and Password File

The default location for spfile and password file in ODA is /u02/app/oracle/oradata/datastore/.ACFS/snaps/<db
unique name>/<db unique name>.
Note: For RAC /RAC One databases, set the parameter cluster_database=TRUE in the init.ora before creating
the spfile.
Example:

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

SQL> create spfile='/u02/app/oracle/oradata/datastore/.ACFS/snaps/primdb/primdb/spfileprimdb.ora'


from pfile='/u02/app/oracle/oradata/datastore/.ACFS/snaps/primdb/primdb/initprimdb';
File created.
Create password File
[oracle@odademo1 primdb]$ orapwd
file=/u02/app/oracle/oradata/datastore/.ACFS/snaps/primdb/primdb/orapwprimdb password=welcome1
3.2.6.

Register the database with OCR

As a last step, In order to use snapshot database capability, the database need to be registered with OCR. Use srvctl add
database command to add the database information. In cases when a RAC database is migrated, add the corresponding
instances as well. See the example below.
Example:

[oracle@ odademo1]$ srvctl add database -db primdb -oraclehome


/u01/app/oracle/product/12.1.0.2/dbhome_1 -dbtype RAC -spfile
/u02/app/oracle/oradata/datastore/.ACFS/snaps/primdb/primdb/spfileprimdb.ora -pwfile
/u02/app/oracle/oradata/datastore/.ACFS/snaps/primdb/primdb/orapwprimdb -startoption OPEN stopoption IMMEDIATE -acfspath
"/u01/app/oracle/oradata/datastore,/u02/app/oracle/oradata/datastore,
/u01/app/oracle/fast_recovery_area/datastore"
srvctl add instance -db primdb -instance primdb1 -node odademo1
srvctl add instance -db primdb -instance primdb2 -node odademo2
[oracle@odademo1 primdb]$ srvctl config database -db primdb
Database unique name: primdb
Database name:
Oracle home: /u01/app/oracle/product/12.1.0.2/dbhome_1
Oracle user: oracle
Spfile: /u02/app/oracle/oradata/datastore/.ACFS/snaps/primdb/primdb/spfileprimdb.ora
Password file: /u02/app/oracle/oradata/datastore/.ACFS/snaps/primdb/primdb/orapwprimdb
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups:
Mount point paths:
/u01/app/oracle/oradata/datastore,/u02/app/oracle/oradata/datastore,/u01/app/oracle/fast_recovery_
area/datastore
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: dba
OSOPER group: racoper
Database instances: primdb1,primdb2

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

Configured nodes: odademo1, odademo2


Database is administrator managed
[oracle@odademo1 primdb]$
[oracle@odademo1 primdb]$
[oracle@odademo1 primdb]$ srvctl add instance -db primdb -instance primdb1 -node odademo1
[oracle@odademo1 primdb]$ srvctl add instance -db primdb -instance primdb2 -node odademo2
[oracle@odademo1 primdb]$ srvctl start database -db primdb
[oracle@odademo1 primdb]$ srvctl status database -db primdb
Instance primdb1 is running on node odademo1
Instance primdb2 is running on node odademo2
At this stage, the database is completely migrated to the ACFS.

Special Case :

RMAN also supports duplicating the database over the network from without restoring the backups on the
target ODA. This eliminates the need of staging the backup and can be performed on ODA as well. Oracle
Backup and Recovery Users Guide explains the steps in detail. If someone choose to perform the active
database duplication, the steps involved are
1. Create a password file for the database being cloned.
E.g :
orapwd file=orapw$ORACLE_SID password=welcome1 entries=30
2. Create a static listener in ODA for the auxiliary database.
This can be done by adding the following entry in the listener.ora under Grid Home.
SID_LIST_LISTENER =
(SID_LIST =
)
(SID_DESC =
(SID_NAME = ramdb1)
(ORACLE_HOME = u01/app/oracle/product/11.2.0.4/dbhome_1)
(GLOBAL_DBNAME = ramdb)
)
)
The listener needs to be reloaded or restarted for the change to take effect.

3. Test the network connectivity.


Before starting the duplication, test the network connectivity. The Ezconnect can be used to test
the network connectivity.
rman target sys/<paswd>@//<Primary Host>:<Port>/<Service Name> auxiliary
sys/<Password>@//<ODA Host Name>:<Port>/<SID_NAME>
4. Create a init.ora file for the Auxiliary instance.
The init.ora file should contain the same parameters as in section 3.2.1. (Step 1) .

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

5. Duplicate the database using RMAN


Using RMAN, duplicate the database.
rman target sys/<paswd>@//<Primary Host>:<Port>/<Service Name> auxiliary
sys/<Password>@//<ODA Host Name>:<Port>/<SID_NAME>
DUPLICATE TARGET DATABASE
TO <DB_NAME>
FROM ACTIVE DATABASE
NOFILENAMECHECK;
Once the database is duplicated, follow the sections 3.2.5 and 3.2.6 to complete the database cloning on ODA.

3.3.

Post Migration Verification

The easiest way to ensure if the database is successfully migrated to ACFS on ODA is to create a snapshot database. If the
snapshot database can be successfully created, then it is safe to believe successful migration.
oakcli create snapdb command can be used for creating a snapshot database.
Example:

[root@odademo1 ~]# oakcli create snapshotdb -db snpdb -from primdb


INFO: 2014-09-21 14:12:19: Look at the logfile
'/opt/oracle/oak/log/odademo1/tools/12.1.2.0.0/createdb_snpdb_73581.log' for more details
Please enter the 'root' password :
Please re-enter the 'root' password:
Please enter the 'oracle' password :
Please re-enter the 'oracle' password:
Please enter the 'SYS' password for the database primdb:
Please re-enter the 'SYS' password:
Please select one of the following for Database Deployment [1 .. 2]:
1 => RACONE
2 => RAC
2
Selected value is: RAC
Please select one of the following for Database Class [1 .. 6]:
1 => Very Very Small
2 => Very Small
3 => Small
4 => Medium
5 => Large
6 => Extra Large
2
Selected value is: Very Small
..........done

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

...
SUCCESS: All nodes in /opt/oracle/oak/temp_clunodes.txt are pingable and alive.
..........done
...
SUCCESS: All nodes in /opt/oracle/oak/temp_clunodes.txt are pingable and alive.
INFO: 2014-09-21 14:14:01: Creating the snap database 'snpdb' from the source database 'primdb'
INFO: 2014-09-21 14:14:07: Do not perform any Structural change to database 'primdb' till snap database
'snpdb' is created
INFO: 2014-09-21 14:14:18: Taking snap of the Database 'primdb'
INFO: 2014-09-21 14:14:19: Successfully took the snap of database: primdb
INFO: 2014-09-21 14:14:53: Creating controlfile for database: snpdb
INFO: 2014-09-21 14:15:03: Successfully created the controlfile for the database : snpdb
INFO: 2014-09-21 14:15:03: Adding logfiles for thread 2 for the database : snpdb
INFO: 2014-09-21 14:15:19: Successfully added the logfiles for thread 2
INFO: 2014-09-21 14:15:24: Recovering the database: snpdb, snapshot time : '2014-09-21:14:14:19' , until
time : '2014-09-21:14:14:33'
INFO: 2014-09-21 14:15:25: Succesfully recovered the database
INFO: 2014-09-21 14:15:25: Opening the database with resetlogs
INFO: 2014-09-21 14:15:45: Successfully opened the database after recovery
INFO: 2014-09-21 14:15:49: Setting the temporary tablespace for database : snpdb
INFO: 2014-09-21 14:15:51: Successfully set the temporary tablespace for the database : snpdb
INFO: 2014-09-21 14:16:55: Successfully changed the Database ID
INFO: 2014-09-21 14:18:28: Adding the Database resource to the clusterware
INFO: 2014-09-21 14:19:42: Successfully started the database
INFO: 2014-09-21 14:19:42: Updating the TNS entries for the database snpdb
INFO: 2014-09-21 14:19:55: Disabling the external references in the database 'snpdb' inherited from
'primdb'
INFO: 2014-09-21 14:19:56: Successfully disabled the external references
INFO: 2014-09-21 14:20:09: Run the sql script
'/u01/app/oracle/product/12.1.0.2/dbhome_1/enable_external_refs_snpdb_qw5F.sql' on the database
'snpdb' to enable these external references
Also need to restart the database after running this sql script
SUCCESS: 2014-09-21 14:21:13: Successfully created the database 'snpdb' from 'primdb'

Appendix A: Commands to determine disk space usage in ASM and ACFS


ACFS:
The commands below give you the most used examples, the full documentation can be found at:
https://docs.oracle.com/database/121/OSTMG/asmfs_util011.htm#OSTMG95233
To query the an ACFS filesystem use acfsutil info fs. Below an example to display usage
of/u02/app/oracle/oradata/datastore:
Example:
$ /sbin/acfsutil info fs /u02/app/oracle/oradata/datastore
/u02/app/oracle/oradata/datastore
ACFS Version: 12.1.0.2.0

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

on-disk version:
44.0
flags:
MountPoint,Available
mount time: Thu Nov 20 02:50:27 2014
allocation unit:
4096
volumes:
1
total size: 2443836391424 ( 2.22 TB )
total free: 2425684987904 ( 2.20 TB )
file entry table allocation: 49152
primary volume: /dev/asm/datastore-141
label:
state:
Available
major, minor:
251, 72193
size:
2443836391424 ( 2.22 TB )
free:
2425684987904 ( 2.20 TB )
ADVM diskgroup
DATA
ADVM resize increment: 67108864
ADVM redundancy:
mirror
ADVM stripe columns: 8
ADVM stripe width: 1048576
number of snapshots: 5
snapshot space usage: 13147004928 ( 12.24 GB )
replication status: DISABLED
If you are interested in just a specific information like for example freespace you can use the o flag:
Example:
$/sbin/acfsutil info fs -o freespace /u02/app/oracle/oradata/datastore
2425684987904
ASM:
The command below give you an example, the full documentation can be found at:
https://docs.oracle.com/database/121/OSTMG/asm_util.htm#OSTMG016
To display information about your ASM disk groups you can use the asmcmd lsdg command, below an
example for the DATA disk group:
Example:
$ asmcmd lsdg DATA
State Type Rebal Sector Block
AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB
Offline_disks Voting_files Name
MOUNTED NORMAL N
512 4096 4194304 9830400 3707324
491520
1607902
0
Y DATA/
If you are uncertain about the displayed information like for example the difference between Free_MB and
Usable_file_MB please review the documentation link provided above.

STEPS TO MIGRATE NON-CDB DATABASE TO ACFS ON ODA 12.1.2.0.0

White Paper Title

Copyright 2014, Oracle and/or its affiliates. All rights reserved.

December 2014
Author: Ramachandran Pandarapattathil,

This document is provided for information purposes only, and the contents hereof are subject to change without notice. This

Hagen Herbst

document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in

Contributing Authors: RAC Pack, ODA Product

law, including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any

Team

liability with respect to this document, and no contractual obligations are formed either directly or indirectly by this document. This

Oracle Corporation
World Headquarters
500 Oracle Parkway
Redwood Shores, CA 94065
U.S.A.

document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without our
prior written permission.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and

Worldwide Inquiries:

are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are

Phone: +1.650.506.7000

trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group. 0114

Fax: +1.650.506.7200

oracle.com

You might also like