microsoft word - asm_lab
TRANSCRIPT
-
8/4/2019 Microsoft Word - ASM_LAB
1/8
Author:Esteban Bernal
ASM Configuration on Windows LAB
1) Download the ASM on Windows presentation, LAB document and Remote DesktopConnection application from Oracle Files Online:==================================================================
http://files.oraclecorp.com/app/FileBrowsePage$PP=$|files$|page$|FileBrowse$CS=45?event=ChangeDir&AFBP=664176647&FBP=MySharedFolders/ASM%20WIN%20%2b%20LAB
ASM_LAB.docASM_WIN10gR2.pptRemoteDesktopConnection.exe==================================================================
2) Run the Remote Desktop Connection executable to install.==================================================================
=)> [RemoteDesktopConnection.exe]==================================================================
3) Run Remote Desktop Connection from icon or Start Menu.
4) Provide the Computer Name: ceintcb-a17.us.oracle.com
5) Logon on the Windows 2003 box:
Login: oraclePassword: oracle01
6) Identify the available free disk(s) through the Windows Disk Management GUI.===================================================================)> Start==)> Computer Management===)> Disk Management
a) Disk 0 is currently being used by the OS.b) Disk 1 is an un-partitioned disk (10GB) and it is available.==================================================================
7) Execute the DISKPART command through the OS command prompt:==================================================================C:\> DISKPART
Microsoft DiskPart version 5.2.3790.1830Copyright (C) 1999-2001 Microsoft Corporation.On computer: CEINTCB-A17==================================================================
-
8/4/2019 Microsoft Word - ASM_LAB
2/8
Author:Esteban Bernal
8) List the available disks:==================================================================DISKPART> list disk
Disk ### Status Size Free Dyn Gpt-------- ---------- ------- ------- --- ---
Disk 0 Online 20 GB 8033 KBDisk 1 Online 10 GB 10 GB
==================================================================
9) In this case Disk 1 is available & un-partitioned.
10) Select that available disk:==================================================================DISKPART> select disk 1
Disk 1 is now the selected disk.==================================================================
11) Since Disk 1 is empty, please create 2 Primary raw partitions of 2.93 GB each (forthe database files) & 2 Primary Raw partitions of 2 GB each (for the Flash RecoveryArea) as follow:==================================================================DISKPART> create partition primary size = 3000
DiskPart succeeded in creating the specified partition.
DISKPART> create partition primary size = 3000
DISKPART> create partition primary size = 2114
DiskPart succeeded in creating the specified partition.
DISKPART> create partition primary size = 2110
DiskPart succeeded in creating the specified partition.==================================================================
12) List those 4 raw partitions through the ASMtool command line executable:==================================================================C:\ >asmtool -listNTFS \Device\Harddisk0\Partition1 20465M
\Device\Harddisk1\Partition1 3004M\Device\Harddisk1\Partition2 3004M\Device\Harddisk1\Partition3 2117M\Device\Harddisk1\Partition4 2110M
==================================================================
13) Stamp those 4 RAW devices through the ASMtoolg graphical application.==================================================================
-
8/4/2019 Microsoft Word - ASM_LAB
3/8
Author:Esteban Bernal
13.1) C:\ >asmtoolg13.2) In the ASMtool Operation window, select [Add or change label]:13.3) Press [Next] button.13.4) In the Select Disks window, please select the first Candidate Device (Partition13004 MB).
13.5) Label it as DATA113.6) Press [Next] button.13.7) In the Stamp Disks window, just press [Next] button.13.8) And finally press [Finish] button to accept disk stamping.13.9) Repeat the same steps (from 13.1 to 13.8) to stamp the additional 3 partitions:
=)> Partition2 3004M as DATA2=)> Partition3 2117M as DATA3=)> Partition4 2110M as DATA4==================================================================
14) List and make sure the partitions were correctly stamped through the asmtool
command-line application:==================================================================
C:\>asmtool -listNTFS \Device\Harddisk0\Partition1 20465MORCLDISKDATA10 \Device\Harddisk1\Partition1 3004M Oracle
====)> Configuration and Migration Tools=====)> Database Configuration Assistance==================================================================
17) Setup the ASM Instance/Service through the DBCA as follow:==================================================================
17.1) In the Operations window, select [Configure Automatic Storage Management]:
-
8/4/2019 Microsoft Word - ASM_LAB
4/8
Author:Esteban Bernal
17.2) Press [Next] button.17.3) In the Create ASM Instance window, provide the SYS password and leave thedefault ASM parameters.17.4) Press [Next] button and [OK] to accept the ASM Instance creation.17.5) In the ASM Disk Groups window, press [Create New] button.17.6) In the Create Disk Group window:
=)> Provide the Disk Group Name: DG1:=)> Select Redundancy: Normal=)> Select the first 2 Candidate Disks (3004 MB each) for the DG1 diskgroup atSelect Member Disks.=)> And press [OK] to accept the diskgroup creation.==================================================================
18) Now, a second diskgroup needs to be created as follow:==================================================================
18.1) In the ASM Disk Groups window, press [Create New] button.
18.2) In the Create Disk Group window:
=)> Provide the Disk Group Name: DG2_FRA:=)> Select Redundancy: Normal=)> Select the last 2 Candidate Disks (2 GB each) for the DG2_FRA diskgroup atSelect Member Disks.=)> And press [OK] to accept the diskgroup creation.
Note: DG1 diskgroup is created to allocate the regular database files and DG2_FRA willbe used for the Flash Recovery Area.==================================================================
19) In the Create Disk Group window, please press [Finish].
20) Now, DBCA will prompt: Do you want to perform another operation?;==================================================================Press [Yes] since we need to create the Database.==================================================================
21) In the Operations (step 1) window, select [Create Database] and press [Next]button.
22) In the Database Templates (step 2) window, select [Custom Database] and press[Next] button.
23) In the Database Identification (step 3) window, provide the database nameV102ASM and press [Next] button.
24) In the Management Options (step 4) window, in order to expedite the databasecreation, please deselect [Configure the Database with Enterprise Manager] and press[Next] button.
-
8/4/2019 Microsoft Word - ASM_LAB
5/8
Author:Esteban Bernal
25) In the Database Credential (step 5) window, provide the SYS password and press[Next] button.
26) In the Storage Options (step 6) window, select [ASM] and press [Next] button.
27) In the ASM Disk Groups (step 7) window, select the DG1 diskgroup and press
[Next] button.
28) In the Database File Locations (step 8) window, select [Use Oracle-ManagedFiles], +DG1 should appear in the Database Area section and press [Next] button.
29) In the Recovery Configuration (step 9) window, select [Specify Flash RecoveryArea], change the diskgroup to+DG2_FRA in the Flash Recovery Area Section,select Enable Archiving option and press [Next] button.
30) In the Database Content (step 10) window, in order to expedite the databasecreation, please deselect all the database options (including Standard DatabaseComponents) and press [Next] button.
31) In the Initialization Parameters (step 11) window, choose the default databasevalues and press [Next] button.
32) In the Database Storage (step 12) window, review the tablespaces, datafiles andredologs, and press [Next] button.
33) In the Database Storage (step 13) window, press [Finish] to accept the databasecreation.
34) Connect to the +ASM Instance through SQL*Plus and check the availablediskgroup(s) and their disks:
==================================================================C:\>set ORACLE_SID=+ASM
C:\>sqlplus "/as sysdba"
SQL> set linesize 150column path format a50
select GROUP_NUMBER,NAME, TOTAL_MB, FREE_MB, state,MODE_STATUS,REDUNDANCY, PATHfrom v$asm_disk;
column NAME format a30
select GROUP_NUMBER, NAME, TOTAL_MB, FREE_MB , state, TYPEfrom v$asm_diskgroup;==================================================================
35) Connect through ASMCMD command and list the current diskgroups, directoriesand files.
-
8/4/2019 Microsoft Word - ASM_LAB
6/8
Author:Esteban Bernal
==================================================================C:\>set ORACLE_SID=+ASMC:\>asmcmdASMCMD> lsDG1/DG2_FRA/
ASMCMD> cd DG1ASMCMD> lsV102ASM/ASMCMD> cd V102ASMASMCMD> lsCONTROLFILE/DATAFILE/ONLINELOG/TEMPFILE/ASMCMD> cd datafileASMCMD> lsSYSAUX.262.609004521
SYSTEM.260.609004307UNDOTBS1.261.609004443USERS.264.609004593==================================================================
Hint: Use HELP command for a complete commands list.
36) Connect to the V102ASM database and list the datafiles, controlfiles & redologfiles:==================================================================C:\>set ORACLE_SID=V102ASM
C:\>sqlplus "/as sysdba"
SQL> select name from v$datafile;
NAME--------------------------------------------------------------------------------
+DG1/v102asm/datafile/system.260.609004307+DG1/v102asm/datafile/undotbs1.261.609004443+DG1/v102asm/datafile/sysaux.262.609004521+DG1/v102asm/datafile/users.264.609004593
SQL> select member from v$logfile;
MEMBER--------------------------------------------------------------------------------
+DG1/v102asm/onlinelog/group_1.257.609004221+DG2_FRA/v102asm/onlinelog/group_1.257.609004239+DG1/v102asm/onlinelog/group_2.258.609004245
-
8/4/2019 Microsoft Word - ASM_LAB
7/8
Author:Esteban Bernal
+DG2_FRA/v102asm/onlinelog/group_2.258.609004265+DG1/v102asm/onlinelog/group_3.259.609004275+DG2_FRA/v102asm/onlinelog/group_3.259.609004295
6 rows selected.
SQL> show parameter control_files
NAME TYPE VALUE------------------------------------ ----------- ------------------------------control_files string +DG1/v102asm/controlfile/current.256.609004219,+DG2_FRA/v102asm/controlfile/current.256.609004219
SQL>==================================================================
37) Since, another DBA engineer will execute this LAB, you will need to remove theV102ASM database through the DBCA.
38) Then remove the +ASM instance service as follow:==================================================================C:\>set ORACLE_SID=+ASM
C:\>oradim -delete -ASMSID +ASM==================================================================
39) And finally, the partitions must be removed as follow:==================================================================C:\>diskpart
DISKPART> select disk 1
DISKPART> list partition
Partition ### Type Size Offset------------- ---------------- ------- -------Partition 1 Primary 3004 MB 32 KBPartition 2 Primary 3004 MB 3004 MBPartition 3 Primary 2118 MB 6009 MBPartition 4 Primary 2110 MB 8127 MB
DISKPART> select partition
Example:
DISKPART> select partition 1
DISKPART> delete partition
-
8/4/2019 Microsoft Word - ASM_LAB
8/8
Author:Esteban Bernal
DISKPART> list partition
DISKPART> select partition
DISKPART> delete partition.
.
.DISKPART> list partition
DISKPART> select partition N
DISKPART> delete partition
Note: Also, you can delete the referenced partitions through the Disk ManagementGUI (C:\> diskmgmt.msc).==================================================================
40) Disk partitions should not remain in the Disk 1:==================================================================DISKPART> select disk 1
Disk 1 is now the selected disk.
DISKPART> list partition
There are no partitions on this disk to show.
DISKPART>==================================================================
41) Questions or Problems about this LAB, please contact me at:
AIM: ebernalusOIM: [email protected]
Thank you,