Page 1
----------------------------------------------------------------------------------------------------------------
ORACLE 10G ASM HOME SILENT INSTALLATION:
[oracle@coredba /]$ cd softwares/
[oracle@coredba softwares]$ ls
database10.2linux libXp-1.0.0-8.1.el5.i386.rpm Oracle11gRAC
copy the enterprise.rsp file to /orasoft
[oracle@coredba softwares]$ cp database10.2linux/response/enterprise.rsp /orasoft
[oracle@coredba softwares]$ cd /orasoft
[oracle@coredba orasoft]$ vi enterprise.rsp
Open the file & do the following changes
UNIX_GROUP_NAME="oinstall"
FROM_LOCATION="/orasoft/enterprise.rsp"
ORACLE_HOME="/orasoft/asm10ghome"
ORACLE_HOME_NAME="Myhome10g"
For search
/ options
n_configurationOption=3
:wq!(save & quit)
oracle@coredba softwares]$ cd database10.2linux/
[oracle@coredba database10.2linux]$ ./runInstaller -silent -responseFile
/orasoft/enterprise.rsp -ignoreSysPrereqs
Starting Oracle Universal Installer...
Checking installer requirements...
Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0,
asianux-1, asianux-2 or redhat-5
Passed
Page 2
All installer requirements met.
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-11-27_10-50-
43AM. Please wait ...[oracle@coredba database10.2linux]$ Oracle Universal Installer,
Version 10.2.0.1.0 Production
Copyright (C) 1999, 2005, Oracle. All rights reserved.
You can find a log of this install session at:
/home/oracle/oraInventory/logs/installActions2012-11-27_10-50-43AM.log
.................................................................................................... 100% Done.
Loading Product Information
................................................................................................................... 100% Done.
Analyzing dependencies
.........................................................................
Starting execution of Prerequisites...
Total No of checks: 11
Performing check for CertifiedVersions
Checking operating system requirements ...
Expected result: One of redhat-3,redhat-4,SuSE-9,asianux-1,asianux-2
Actual Result: redhat-Red Hat Enterprise Linux Server release 5.5 (Tikanga)
Check complete. The overall result of this check is: Failed <<<<
Check complete: Failed <<<<
Problem: Oracle Database 10g is not certified on the current operating system.
Recommendation: Make sure you are installing the software on the correct platform.
==================================================================
=====
Performing check for Packages
Checking operating system package requirements ...
Check complete. The overall result of this check is: Not executed <<<<
Check complete: Not executed <<<<
OUI-18001: The operating system 'Linux Version redhat-Red Hat Enterprise Linux Server
release 5.5 (Tikanga)' is not supported.
Recommendation: Install the required packages before continuing with the installation.
==================================================================
=====
Performing check for Kernel
Checking kernel parameters
Check complete. The overall result of this check is: Not executed <<<<
Page 3
Check complete: Not executed <<<<
OUI-18001: The operating system 'Linux Version redhat-Red Hat Enterprise Linux Server
release 5.5 (Tikanga)' is not supported.
Recommendation: Perform operating system specific instructions to update the kernel
parameters.
==================================================================
=====
Performing check for GLIBC
Checking Recommended glibc version
Check complete. The overall result of this check is: Not executed <<<<
Check complete: Not executed <<<<
OUI-18001: The operating system 'Linux Version redhat-Red Hat Enterprise Linux Server
release 5.5 (Tikanga)' is not supported.
Recommendation: You may actually have installed packages which have obsoleted these, in
which case you can successfully continue with the install. If you have not, it is recommended
that you do not continue. Refer to the readme to find out how to get the missing packages.
==================================================================
=====
Performing check for TotalMemory
Checking physical memory requirements ...
Expected result: 922MB
Actual Result: 2016MB
Check complete. The overall result of this check is: Passed
Check complete: Passed
==================================================================
=====
Performing check for SwapSpace
Checking available swap space requirements ...
Expected result: 3024MB
Actual Result: 8001MB
Check complete. The overall result of this check is: Passed
Check complete: Passed
==================================================================
=====
Performing check for DetectIfDHCPAssignedIP
Checking Network Configuration requirements ...
Check complete. The overall result of this check is: Passed
Page 4
Check complete: Passed
==================================================================
=====
Performing check for OracleBase
Validating ORACLE_BASE location (if set) ...
Check complete. The overall result of this check is: Passed
Check complete: Passed
==================================================================
=====
Performing check for OracleHomeSpace
Checking Oracle Home path for spaces...
Check complete. The overall result of this check is: Passed
Check complete: Passed
==================================================================
=====
Performing check for DetectAnyInvalidASMHome
Checking for proper system clean-up....
Check complete. The overall result of this check is: Passed
Check complete: Passed
==================================================================
=====
Performing check for CompatibilityChecks
Checking for Oracle Home incompatibilities ....
Actual Result: NEW_HOME
Check complete. The overall result of this check is: Passed
Check complete: Passed
==================================================================
=====
PrereqChecks complete
.......................................... 100% Done.
-----------------------------------------------------------------------------
Summary
Global Settings
Source: /softwares/database10.2linux/stage/products.xml
Oracle Home: /orasoft/10.2 (myhome)
Installation Type: Enterprise Edition
Product Languages
English
Space Requirements
Page 5
/ Required 1.26GB : Available 4.19GB
/tmp/ Required 108MB (only as temporary space) : Available 1.67GB
New Installations (107 products)
Oracle Database 10g 10.2.0.1.0
Enterprise Edition Options 10.2.0.1.0
Oracle Partitioning 10.2.0.1.0
Oracle Spatial 10.2.0.1.0
Oracle OLAP 10.2.0.1.0
Oracle Enterprise Manager Console DB 10.2.0.1.0
Oracle Net Services 10.2.0.1.0
Oracle Database 10g 10.2.0.1.0
Oracle Net Listener 10.2.0.1.0
HAS Files for DB 10.2.0.1.0
Oracle Internet Directory Client 10.2.0.1.0
Oracle Call Interface (OCI) 10.2.0.1.0
Oracle Programmer 10.2.0.1.0
Oracle interMedia 10.2.0.1.0
Enterprise Manager Agent Core 10.2.0.1.0
Oracle JVM 10.2.0.1.0
Database Configuration and Upgrade Assistants 10.2.0.1.0
Oracle interMedia Locator 10.2.0.1.0
Oracle XML Development Kit 10.2.0.1.0
Oracle Text 10.2.0.1.0
Oracle Database Utilities 10.2.0.1.0
Generic Connectivity Common Files 10.2.0.1.0
Oracle Advanced Security 10.2.0.1.0
Enterprise Manager Repository Core 10.2.0.1.0
PL/SQL 10.2.0.1.0
Oracle Net 10.2.0.1.0
Assistant Common Files 10.2.0.1.0
Enterprise Manager plugin Common Files 10.2.0.1.0 Beta
Buildtools Common Files 10.2.0.1.0
Installation Common Files 10.2.0.1.0
Oracle LDAP administration 10.2.0.1.0
Oracle Java Client 10.2.0.1.0
Precompiler Common Files 10.2.0.1.0
Oracle Recovery Manager 10.2.0.1.0
SQL*Plus 10.2.0.1.0
iSQL*Plus 10.2.0.1.0
Enterprise Manager plugin Common Files 10.2.0.1.0
HAS Common Files 10.2.0.1.0
Oracle Clusterware RDBMS Files 10.2.0.1.0
Oracle Wallet Manager 10.2.0.1.0
Enterprise Manager Minimal Integration 10.2.0.1.0
Oracle Database User Interface 2.2.13.0.0
Secure Socket Layer 10.2.0.1.0
Oracle ODBC Driver 10.2.0.1.0
Required Support Files 10.2.0.1.0
Database SQL Scripts 10.2.0.1.0
OLAP SQL Scripts 10.2.0.1.0
Page 6
PL/SQL Embedded Gateway 10.2.0.1.0
Oracle Globalization Support 10.2.0.1.0
Character Set Migration Utility 10.2.0.1.0
LDAP Required Support Files 10.2.0.1.0
Oracle Help for the Web 1.1.10.0.0
Oracle JDBC Thin Driver for JDK 1.4 10.2.0.1.0
Oracle JDBC Thin Driver for JDK 1.2 10.2.0.1.0
Oracle interMedia Client Option 10.2.0.1.0
Oracle Notification Service 10.1.0.3.0
Oracle Code Editor 1.2.1.0.0I
Perl Interpreter 5.8.3.0.2
JDBC Common Files 10.2.0.1.0
Oracle Locale Builder 10.2.0.1.0
Oracle Containers for Java 10.2.0.1.0
Database Workspace Manager 10.2.0.1.0
Oracle Core Required Support Files 10.2.0.1.0
Platform Required Support Files 10.2.0.1.0
Oracle interMedia Locator RDBMS Files 10.2.0.1.0
Oracle JDBC/OCI Instant Client 10.2.0.1.0
Oracle interMedia Annotator 10.2.0.1.0
SQLJ Runtime 10.2.0.1.0
Oracle interMedia Java Advanced Imaging 10.2.0.1.0
Oracle Database 10g interMedia Files 10.2.0.1.0
Oracle Data Mining RDBMS Files 10.2.0.1.0
Enterprise Manager Baseline 10.2.0.1.0
Oracle Help For Java 4.2.6.1.0
Oracle UIX 2.1.22.0.0
XML Parser for Java 10.2.0.1.0
Precompiler Required Support Files 10.2.0.1.0
XML Parser for Oracle JVM 10.2.0.1.0
Oracle Message Gateway Common Files 10.2.0.1.0
Oracle Starter Database 10.2.0.1.0
Sample Schema Data 10.2.0.1.0
Parser Generator Required Support Files 10.2.0.1.0
Agent Required Support Files 10.2.0.1.0
Oracle RAC Required Support Files-HAS 10.2.0.1.0
RDBMS Required Support Files 10.2.0.1.0
RDBMS Required Support Files for Instant Client 10.2.0.1.0
XDK Required Support Files 10.2.0.1.0
Oracle OLAP API 10.2.0.1.0
Oracle OLAP RDBMS Files 10.2.0.1.0
DBJAVA Required Support Files 10.2.0.1.0
SQL*Plus Required Support Files 10.2.0.1.0
Oracle JFC Extended Windowing Toolkit 4.2.33.0.0
Oracle Ice Browser 5.2.3.6.0
Oracle Display Fonts 9.0.2.0.0
Oracle Extended Windowing Toolkit 3.4.38.0.0
Enterprise Manager Common Files 10.2.0.1.0
Enterprise Manager Agent DB 10.2.0.1.0
Oracle Net Required Support Files 10.2.0.1.0
Page 7
Enterprise Manager Repository DB 10.2.0.1.0
SSL Required Support Files for InstantClient 10.2.0.1.0
regexp 2.1.9.0.0
Bali Share 1.1.18.0.0
Oracle Universal Installer 10.2.0.1.0
Oracle One-Off Patch Installer 10.2.0.1.0
Installer SDK Component 10.2.0.1.0
Java Runtime Environment 1.4.2.8.0
Sun JDK 1.4.2.0.8
Sun JDK extensions 10.1.2.0.0
-----------------------------------------------------------------------------
Installation in progress (Tue Nov 27 10:51:01 GMT+05:30 2012)
............................................................... 18% Done.
............................................................... 36% Done.
............................................................... 54% Done.
............................................................... 73% Done.
............ 76% Done.
Install successful
Linking in progress (Tue Nov 27 10:52:35 GMT+05:30 2012)
Link successful
Setup in progress (Tue Nov 27 10:53:16 GMT+05:30 2012)
.............. 100% Done.
Setup successful
End of install phases.(Tue Nov 27 10:53:21 GMT+05:30 2012)
WARNING:The following configuration scripts
/orasoft/10.2/root.sh
need to be executed as root for configuring the system. If you skip the execution of the
configuration tools, the configuration will not be complete and the product wont function
properly. In order to get the product to function properly, you will be required to execute the
scripts and the configuration tools after exiting the OUI.
The installation of Oracle Database 10g was successful.
Please check '/home/oracle/oraInventory/logs/silentInstall2012-11-27_10-50-43AM.log' for
more details.
Installation successful
--------------------------------------------------------------------------------------------------------------
Page 8
Creating Manual ASM instance:
-------------------------------------------
root@GG1 ~]# vi /etc/oratab
+ASM:/orasoft/asm10g:N----> add this entry in the oratab file
[oracle@GG1 ~]$ . oraenv
ORACLE_SID = [oracle] ? +ASM
[oracle@GG1 ~]$ mkdir -p /orasoft/+ASM/bdump
[oracle@GG1 ~]$ mkdir -p /orasoft/+ASM/cdump
[oracle@GG1 ~]$ mkdir -p /orasoft/+ASM/udump
[oracle@GG1 ~]$ vi /orasoft/asm10g/dbs/init
initdw.ora init.ora
[oracle@GG1 ~]$ vi init+ASM.ora
[oracle@GG1 dbs]$ ls
initdw.ora init.ora
create one parameter file for ASM in dbs folder
----------------------------------------------
[oracle@GG1 dbs]$ vi init+ASM.ora
instance_type=asm
background_dump_dest=/orasoft/+ASM/bdump
core_dump_dest=/orasoft/+ASM/cdump
user_dump_dest=/orasoft/+ASM/udump
large_pool_size=12M
:wq!
(OR) we can give asm_power_limit,asm_diskstring values in the above parameter file
SQL> show parameter asm;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
asm_diskgroups string DG1, DG2
asm_diskstring string
asm_power_limit integer 1
create one password file
-------------------------
[oracle@GG1 dbs]$ orapwd file=orapw+ASM password=oracle
[oracle@GG1 dbs]$ ls
init+ASM.ora initdw.ora init.ora orapw+ASM
[oracle@GG1 dbs]$ cd
[oracle@GG1 ~]$ . oraenv
ORACLE_SID = [+ASM] ? +ASM
[oracle@GG1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Feb 20 12:13:43 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
Page 9
SQL> create spfile from pfile;
File created.
SQL> startup nomount;
ASM instance started
Total System Global Area 83886080 bytes
Fixed Size 1217836 bytes
Variable Size 57502420 bytes
ASM Cache 25165824 bytes
SQL> startup;
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> shut immediate;
ORA-15100: invalid or missing diskgroup name
ASM instance shutdown
SQL> startup;
ASM instance started
Total System Global Area 83886080 bytes
Fixed Size 1217836 bytes
Variable Size 57502420 bytes
ASM Cache 25165824 bytes
ORA-15110: no diskgroups mounted
------------------------------
ASMLIB INTERFACE:
------------------------------- [root@GG1 ~]# uname -r
2.6.18-194.el5
Install the asmlibs rpms:
-------------------------
[root@GG1 softwares]# cd asmlibs/
[root@GG1 asmlibs]# ls
oracleasm-2.6.18-194.el5-2.0.5-1.el5.i686.rpm oracleasm-support-
2.1.7-1.el5.i386.rpm
oracleasmlib-2.0.4-1.el5.i386.rpm
[root@GG1 asmlibs]# rpm -ivh oracleasm-2.6.18-194.el5-2.0.5-
1.el5.i686.rpm
warning: oracleasm-2.6.18-194.el5-2.0.5-1.el5.i686.rpm: Header V3 DSA
signature: NOKEY, key ID 1e5e0159
error: Failed dependencies:
oracleasm-support >= 2.0.0 is needed by oracleasm-2.6.18-
194.el5-2.0.5-1.el5.i686
[root@GG1 asmlibs]# rpm -ivh oracleasm-support-2.1.7-1.el5.i386.rpm
warning: oracleasm-support-2.1.7-1.el5.i386.rpm: Header V3 DSA
signature: NOKEY, key ID 1e5e0159
Preparing...
########################################### [100%]
1:oracleasm-support
########################################### [100%]
[root@GG1 asmlibs]# rpm -ivh oracleasm-2.6.18-194.el5-2.0.5-
1.el5.i686.rpm
Page 10
warning: oracleasm-2.6.18-194.el5-2.0.5-1.el5.i686.rpm: Header V3 DSA
signature: NOKEY, key ID 1e5e0159
Preparing...
########################################### [100%]
1:oracleasm-2.6.18-
194.el########################################### [100%]
[root@GG1 asmlibs]# rpm -ivh oracleasmlib-2.0.4-1.el5.i386.rpm
warning: oracleasmlib-2.0.4-1.el5.i386.rpm: Header V3 DSA signature:
NOKEY, key ID 1e5e0159
Preparing...
########################################### [100%]
1:oracleasmlib
########################################### [100%]
[root@GG1 asmlibs]# cd
[root@GG1 ~]# /etc/init.d/oracleasm createdisk Disk1 /dev/sda13
Marking disk "Disk1" as an ASM disk: [FAILED]
[root@GG1 ~]# dd if=/dev/zero of=/dev/sda13
[root@GG1 ~]# /etc/init.d/oracleasm configure------->(configuring
ASMLIB driver)
user:oracle
group:dba
y
y
y
To delete disk manually @ OS prompt:
-------------------------------------------------
[] $ /etc/init.d/oracleasm deletedisk Disk1
|
Diskname
asm_diskstring---->tellus whether the disks are rawdevices or
partitions
/etc/init.d/oracleasm listdisks
/etc/init.d/oracleasm scandisks
SQL> select name,path from v$asm_disk;
NAME
------------------------------
PATH
----------------------------------------------------------------------
----------
ORCL:DSK2
ORCL:DSK1
Page 11
Manual database creation in ASM DISKGROUP using OMF:
--------------------------------------------------------------------------------
First create one diskgroup DG1 with the necessary space for database
[oracle@GG1 ~]$ . oraenv
ORACLE_SID = [+ASM] ? omf
ORACLE_HOME = [/home/oracle] ? /orasoft/10g
[oracle@GG1 ~]$ mkdir /orasoft/omf
[oracle@GG1 ~]$ mkdir /orasoft/omf/adump
[oracle@GG1 ~]$ mkdir /orasoft/omf/bdump
[oracle@GG1 ~]$ mkdir /orasoft/omf/cdump
[oracle@GG1 ~]$ mkdir /orasoft/omf/udump
[oracle@GG1 ~]$ cd /orasoft/10g/dbs/
[oracle@GG1 dbs]$ ls
dr1dgp.dat dr2dgpstd.dat hc_sam.dat init.ora lkFSB spfiledgp.ora
dr1dgpstd.dat hc_dgp.dat initdgp.ora lkDGP orapwdgp spfilefsb.ora
dr2dgp.dat hc_fsb.dat initdw.ora lkDGPSTD orapwfsb
[oracle@GG1 dbs]$ cp init.ora initomf.ora
[oracle@GG1 dbs]$ vi initomf.ora
make the following changes in the above file
db_name=omf
comment db_block_buffers and shared_pool_size
#db_block_buffers = 100 # SMALL
# db_block_buffers = 550 # MEDIUM
# db_block_buffers = 3200 # LARGE
#shared_pool_size = 3500000 # SMALL
# shared_pool_size = 5000000 # MEDIUM
# shared_pool_size = 9000000 # LARGE
sga_target=800m
pga_aggregate_target=100m
control_files = '+DG1','+DG1'
compatible = 10.2.0.1.0
db_create_file_dest='+DG1'
undo_tablespace=undo1
undo_management=auto
undo_retention=900
background_dump_dest=/orasoft/omf/bdump
core_dump_dest=/orasoft/omf/cdump
user_dump_dest=/orasoft/omf/udump
audit_file_dest=/orasoft/omf/adump
Now,
Page 12
[oracle@GG1 dbs]$ cd
[oracle@GG1 ~]$ . oraenv
ORACLE_SID = [omf] ? omf
ORACLE_HOME = [/home/oracle] ? /orasoft/10g
[oracle@GG1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Feb 23 10:52:40 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 838860800 bytes
Fixed Size 1222168 bytes
Variable Size 213912040 bytes
Database Buffers 620756992 bytes
Redo Buffers 2969600 bytes
SQL> create database omf
2 undo tablespace undo1
3 default temporary tablespace tmp1;
Database created.
SQL> @?/rdbms/admin/catalog.sql---> for running datadictionary
SQL> @?/rdbms/admin/catproc.sql
SQL> conn system/manager
SQL> @?/sqlplus/admin/pupbld.sql
Go to ASMCMD prompt and get the control files and replace in vi initomf.ora file and start
the database
[oracle@GG1 ~]$ . oraenv
ORACLE_SID = [omf] ? +ASM
[oracle@GG1 ~]$ asmcmd
ASMCMD> lsdg
State Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB
Usable_file_MB Offline_disks Name
MOUNTED EXTERN N N 512 4096 1048576 5726 3631 0
3631 0 DG1/
MOUNTED NORMAL N N 512 4096 1048576 11452 11350 0
5675 0 DG2/
ASMCMD> cd dg1
ASMCMD> ls
Page 13
FSB/
OMF/
ASMCMD> cd omf
ASMCMD> ls
CONTROLFILE/
DATAFILE/
ONLINELOG/
TEMPFILE/
ASMCMD> cd controlfile
ASMCMD> ls
Current.269.808138403
Current.270.808138403 ------> keep these control files in the parameter file initomf.ora
ASMCMD> exit
[oracle@GG1 ~]$ cd /orasoft/10g/dbs
[oracle@GG1 dbs]$ ls
dr1dgp.dat dr2dgpstd.dat hc_omf.dat initdw.ora lkDGP lkOMF spfiledgp.ora
dr1dgpstd.dat hc_dgp.dat hc_sam.dat initomf.ora lkDGPSTD orapwdgp spfilefsb.ora
dr2dgp.dat hc_fsb.dat initdgp.ora init.ora lkFSB orapwfsb
[oracle@GG1 dbs]$ vi initomf.ora
control_files = '+DG1Current.269.808138403','+DG1Current.270.808138403'
Now start up the OMF database
[oracle@GG1 ~]$ . oraenv
ORACLE_SID = [+ASM] ? omf
ORACLE_HOME = [/home/oracle] ? /orasoft/10g
[oracle@GG1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Feb 23 11:10:47 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select name from v$database;
NAME
---------
OMF
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
+DG1/omf/controlfile/current.269.808138403
Page 14
+DG1/omf/controlfile/current.270.808138403
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
+DG1/omf/datafile/system.273.808138407
+DG1/omf/datafile/undo1.274.808138417
+DG1/omf/datafile/sysaux.275.808138417
All the files will be starting from +DG1 ASM diskgroup
--------------------------------------------------------------------------------------------------------------
MIGRATING FILESYSTEM DATABASE TO ASM DISKGROUP USING RMAN:|
---------------------------------------------------------------------------------------------------------------
First create asm home and asm instance either manually or graphically
Add the disks to diskgroup in ASM
set the home to asm
[oracle@GG1 ~]$ . oraenv
ORACLE_SID = [oracle] ? +ASM
[oracle@GG1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Feb 22 10:37:10 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup;
ASM instance started
Total System Global Area 83886080 bytes
Fixed Size 1217836 bytes
Variable Size 57502420 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL> select path,header_status from v$asm_disk;
PATH
--------------------------------------------------------------------------------
HEADER_STATU
------------
/dev/raw/raw2
CANDIDATE
ORCL:DSK1
UNKNOWN
Page 15
ORCL:DSK2
UNKNOWN
PATH
--------------------------------------------------------------------------------
HEADER_STATU
------------
/dev/raw/raw1
MEMBER
SQL> select name,state from v$asm_diskgroup;
NAME STATE
------------------------------ -----------
DG1 MOUNTED
Set the home to filesytem database
[oracle@GG1 ~]$ . oraenv
ORACLE_SID = [fsb] ? fsb
[oracle@GG1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Feb 22 10:34:14 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
/orasoft/fsb/system01.dbf
/orasoft/fsb/undotbs01.dbf
/orasoft/fsb/sysaux01.dbf
/orasoft/fsb/users01.dbf
/orasoft/fsb/example01.dbf
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
/orasoft/fsb/control01.ctl
/orasoft/fsb/control02.ctl
Page 16
/orasoft/fsb/control03.ctl
SQL> alter system set
2 control_files='+DG1','+DG1'
3 scope=spfile;
System altered.
SQL> alter system set
2 db_create_file_dest='+DG1'
3 scope=spfile;
System altered.
SQL> alter system set
2 db_create_online_log_dest_1='+DG1'
3 scope=spfile;
System altered.
SQL> select * from v$block_change_tracking;
STATUS
----------
FILENAME
--------------------------------------------------------------------------------
BYTES
----------
DISABLED------------------> should be in DISABLED MODE
shutdown the filesystem database and startup in nomount state
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 603979776 bytes
Fixed Size 1220796 bytes
Variable Size 163581764 bytes
Database Buffers 432013312 bytes
Redo Buffers 7163904 bytes
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
Page 17
With the Partitioning, OLAP and Data Mining options
CONNECT TO RMAN:
-------------------------------
[oracle@GG1 ~]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Fri Feb 22 10:49:48 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: fsb (not mounted)
Now copy the filesystem database control file /orasoft/fsb/control01.ctl to ASM diskgroup
using RMAN
RMAN> restore controlfile from '/orasoft/fsb/control01.ctl';
Starting restore at 22-FEB-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: copied control file copy
output filename=+DG1/fsb/controlfile/backup.256.808051923
output filename=+DG1/fsb/controlfile/backup.257.808051923
Finished restore at 22-FEB-13
keep it in mount state
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
Now copy all the datafiles of filesystem database to ASM diskgroup using backup command
in RMAN as shown below
RMAN> backup as copy database format '+DG1';
Starting backup at 22-FEB-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: starting datafile copy
input datafile fno=00001 name=/orasoft/fsb/system01.dbf
output filename=+DG1/fsb/datafile/system.258.808052059 tag=TAG20130222T105418
recid=2 stamp=808052067
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
Page 18
input datafile fno=00003 name=/orasoft/fsb/sysaux01.dbf
output filename=+DG1/fsb/datafile/sysaux.259.808052075 tag=TAG20130222T105418
recid=3 stamp=808052077
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile copy
input datafile fno=00005 name=/orasoft/fsb/example01.dbf
output filename=+DG1/fsb/datafile/example.260.808052081 tag=TAG20130222T105418
recid=4 stamp=808052083
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile copy
input datafile fno=00002 name=/orasoft/fsb/undotbs01.dbf
output filename=+DG1/fsb/datafile/undotbs1.261.808052085 tag=TAG20130222T105418
recid=5 stamp=808052085
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile copy
input datafile fno=00004 name=/orasoft/fsb/users01.dbf
output filename=+DG1/fsb/datafile/users.262.808052085 tag=TAG20130222T105418
recid=6 stamp=808052085
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile copy
copying current control file
output filename=+DG1/fsb/controlfile/backup.263.808052087 tag=TAG20130222T105418
recid=7 stamp=808052087
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 22-FEB-13
channel ORA_DISK_1: finished piece 1 at 22-FEB-13
piece
handle=+DG1/fsb/backupset/2013_02_22/nnsnf0_tag20130222t105418_0.264.808052089
tag=TAG20130222T105418 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 22-FEB-13
RMAN cannot copy tempfiles and redologs so manually we have to do by deleting old ones
RMAN> switch database to copy;
datafile 1 switched to datafile copy "+DG1/fsb/datafile/system.258.808052059"
datafile 2 switched to datafile copy "+DG1/fsb/datafile/undotbs1.261.808052085"
datafile 3 switched to datafile copy "+DG1/fsb/datafile/sysaux.259.808052075"
datafile 4 switched to datafile copy "+DG1/fsb/datafile/users.262.808052085"
datafile 5 switched to datafile copy "+DG1/fsb/datafile/example.260.808052081"
Open in MOUNT state now
RMAN> alter database open;
Page 19
database opened
RMAN> exit
Recovery Manager complete.
[oracle@GG1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Feb 22 11:01:48 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
RMAN cannot copy tempfiles and redologs so manually we have to do by deleting old
ones
SQL> select name from v$tempfile;
NAME
--------------------------------------------------------------------------------
/orasoft/fsb/temp01.dbf
SQL> select status from v$tempfile;
STATUS
-------
ONLINE
SQL> alter tablespace temp add tempfile;
Tablespace altered.
SQL> alter tablespace temp drop tempfile '/orasoft/fsb/temp01.dbf';
Tablespace altered.
SQL> select group#,status from v$log;
Page 20
GROUP# STATUS
---------- ----------------
1 CURRENT
2 UNUSED
3 INACTIVE
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
/orasoft/fsb/redo03.log
/orasoft/fsb/redo02.log
/orasoft/fsb/redo01.log
so we can drop either unsed group 2 or inactive group 3 redologs
SQL> alter database drop logfile group 3;
Database altered.
SQL> ! rm /orasoft/fsb/redo03.log
SQL> alter database add logfile;
Database altered.
SQL> alter database drop logfile group 2;
Database altered.
SQL> ! rm /orasoft/fsb/redo02.log
SQL> alter database add logfile;
Database altered.
SQL> select group#,status from v$log;
GROUP# STATUS
---------- ----------------
1 CURRENT---->so first we have to switch and drop
2 UNUSED
3 UNUSED
Page 21
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
+DG1/fsb/onlinelog/group_3.265.808053795
+DG1/fsb/onlinelog/group_2.266.808054035
/orasoft/fsb/redo01.log
SQL> alter system switch logfile;
System altered.
SQL> alter system checkpoint;---> (by issuing this command it will immediately make the
redolog online file inactive)
System altered.
SQL> alter database drop logfile group 1;
Database altered.
SQL> ! rm /orasoft/fsb/redo01.log
SQL> alter database add logfile;
Database altered.
SQL> select group#,status from v$log;
GROUP# STATUS
---------- ----------------
1 UNUSED
2 CURRENT
3 UNUSED
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
+DG1/fsb/onlinelog/group_3.265.808053795
+DG1/fsb/onlinelog/group_2.266.808054035
+DG1/fsb/onlinelog/group_1.267.808054233
Now all the redologs are in ASM diskgroup
Page 22
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@GG1 ~]$ . oraenv
ORACLE_SID = [fsb] ? +ASM
[oracle@GG1 ~]$ asmcmd
ASMCMD> lsdg
State Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB
Usable_file_MB Offline_disks Name
MOUNTED EXTERN N N 512 4096 1048576 5726 4385 0
4385 0 DG1/
ASMCMD> lsct
DB_Name Status Software_Version Compatible_version Instance_Name
fsb CONNECTED 10.2.0.1.0 10.2.0.1.0 fsb
ASMCMD> exit
[oracle@GG1 ~]$ . oraenv
ORACLE_SID = [+ASM] ? +ASM
[oracle@GG1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Feb 22 11:37:34 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select group_number,name,header_status from v$asm_disk;
GROUP_NUMBER NAME HEADER_STATU
------------ ------------------------------ ------------
0 CANDIDATE
0 UNKNOWN
0 UNKNOWN
1 DG1_0000 MEMBER
SQL> select group_number,path,name,header_status from v$asm_disk;
GROUP_NUMBER
------------
PATH
--------------------------------------------------------------------------------
NAME HEADER_STATU
Page 23
------------------------------ ------------
0
/dev/raw/raw2
CANDIDATE
0
ORCL:DSK1
UNKNOWN
GROUP_NUMBER
------------
PATH
--------------------------------------------------------------------------------
NAME HEADER_STATU
------------------------------ ------------
0
ORCL:DSK2
UNKNOWN
1
/dev/raw/raw1
GROUP_NUMBER
------------
PATH
--------------------------------------------------------------------------------
NAME HEADER_STATU
------------------------------ ------------
DG1_0000 MEMBER
SQL> select group_number,path,header_status from v$asm_disk;
GROUP_NUMBER
------------
PATH
--------------------------------------------------------------------------------
HEADER_STATU
------------
0
/dev/raw/raw2
CANDIDATE
0
ORCL:DSK1
UNKNOWN
GROUP_NUMBER
------------
Page 24
PATH
--------------------------------------------------------------------------------
HEADER_STATU
------------
0
ORCL:DSK2
UNKNOWN
1
/dev/raw/raw1
GROUP_NUMBER
------------
PATH
--------------------------------------------------------------------------------
HEADER_STATU
------------
MEMBER
SQL> select * from v$asm_operation;
no rows selected
Now connect to the filesystem database environment and check the files
All the files will be starting in ASM DISKGROUP
[oracle@GG1 ~]$ . oraenv
ORACLE_SID = [+ASM] ? fsb
[oracle@GG1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Feb 22 11:44:19 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select name from v$database;
NAME
---------
FSB
Page 25
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
+DG1/fsb/controlfile/backup.256.808051923
+DG1/fsb/controlfile/backup.257.808051923
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
+DG1/fsb/datafile/system.258.808052059
+DG1/fsb/datafile/undotbs1.261.808052085
+DG1/fsb/datafile/sysaux.259.808052075
+DG1/fsb/datafile/users.262.808052085
+DG1/fsb/datafile/example.260.808052081
SQL> select group#,status from v$log;
GROUP# STATUS
---------- ----------------
1 UNUSED
2 CURRENT
3 UNUSED
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
+DG1/fsb/onlinelog/group_3.265.808053795
+DG1/fsb/onlinelog/group_2.266.808054035
+DG1/fsb/onlinelog/group_1.267.808054233
Page 26
Upgrading 10g ASM to 11g ASM:
----------------------------------------------
ASM software by default not comes with the oracle 11g software, ASM is the
part the 11g grid software so we need to install the 11g grid software to get
latest 11g ASM.&& ew features in 11g grid ASM:
Below is the procedure to install 11g grid software and configure ASM.
[root@system1 Oracle_softwares]# cp linux_11gR2_grid.zip /home/oracle/
[root@system1 Oracle_softwares]# chown oracle:dba
/home/oracle/linux_11gR2_grid.zip
[root@system1 Oracle_softwares]# su - oracle
[oracle@system1 ~]$ ls -l
total 958792
dr-xr-xr-x 6 oracle dba 4096 Dec 10 15:21 database10.2linux
-rwxr-xr-x 1 oracle dba 980831749 Dec 11 11:53 linux_11gR2_grid.zip
drwxrwx--- 3 oracle dba 4096 Dec 10 18:09 oracle
-rw-r--r-- 1 oracle dba 0 Dec 10 19:56 select
[oracle@system1 ~]$unzip linux_11gR2_grid.zip
(This will create "grid" folder under the pwd)
[oracle@system1 ~]$ ls -ld grid
drwxr-xr-x 8 oracle dba 4096 Aug 19 2009 grid
[oracle@system1 ~]$ cd grid/
[oracle@system1 grid]$ ls -l
total 44
drwxr-xr-x 9 oracle dba 4096 Aug 16 2009 doc
drwxr-xr-x 4 oracle dba 4096 Aug 14 2009 install
drwxrwxr-x 2 oracle dba 4096 Aug 14 2009 response
drwxrwxr-x 2 oracle dba 4096 Aug 14 2009 rpm
-rwxrwxr-x 1 oracle dba 3795 Jan 29 2009 runcluvfy.sh
-rwxr-xr-x 1 oracle dba 4353 Aug 14 2009 runInstaller
drwxrwxr-x 2 oracle dba 4096 Aug 14 2009 sshsetup
drwxr-xr-x 14 oracle dba 4096 Aug 14 2009 stage
-rw-r--r-- 1 oracle dba 4279 Aug 18 2009 welcome.html
Page 27
[oracle@system1 grid]$ ./runInstaller
(This will bring you the GUI screen where you can configure)
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 80 MB. Actual 21903 MB
Passed
Checking swap space: must be greater than 150 MB. Actual 3873 MB
Passed
Checking monitor: must be configured to display at least 256 colors. Actual
16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-12-
11_11-56-21AM. Please wait ...[oracle@system1 grid]$
(GUI screen will appear)
Select "Upgrade to grid infrastructure"
click-->Yes
click -->Language "English"
click -->Set password
click -->Yes
click -->Simply click Next
click -->yes
click -->Select base and home dir
click -->Yes-->Check pre-reqs and if require install all or select ignore all
click -->Finish
[root@system1 u04]# /u04/ora11g_ASM_home/rootupgrade.sh
(Once installation is completed then need to execute this script from root user)
[root@system1 u04]# su - oracle (Now switch to oracle user and set +ASM
environment)
[oracle@system1 ~]$ . oraenv
ORACLE_SID = [oracle] ? +ASM
The Oracle base for ORACLE_HOME=/u04/ora11g_ASM_home is
/u04/ora11g_ASM_base
[oracle@system1 ~]$ sqlplus / as sysasm
(Here below o/p we can see that updated ASM version "11.2.0.1.0", and most
importantly in 10g we will connect with the "sysdba" previlage but here in 11g
grid ASm we will connect with the "sysasm" previlage")
SQL*Plus: Release 11.2.0.1.0 Production on Tue Dec 11 12:12:05 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Page 28
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Automatic Storage Management option
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 -
Production
With the Automatic Storage Management option
[oracle@system1 ~]$ asmca
("asmca" tool is GUI based tool to manage ASM, here we can see DG1 disk
group listed which was created in 10 ASM, "asmca" GUI is new feature in 11g
grid ASM)
[oracle@system1 ~]$ asmcmd
(We can also manage "asmcmd" CLI based tool as in 10g ASM)
ASMCMD> exit
[oracle@system1 ~]$ sqlplus / as sysasm
(We can also connect with the "sysdba" previlage as in 10g asm)
SQL*Plus: Release 11.2.0.1.0 Production on Tue Dec 11 12:15:17 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Automatic Storage Management option
SQL> exit