Tuesday, June 21, 2011

Direct connect to Oracle with ARCGIS


ARCGIS and Oracle Direct connection.
A very small problem I faced and thought of sharing how I fixed it maybe it will help someone he faces it, Last week my boss send me to one of our client, They were having problems in Database connectivity, first I look at the structure they were using, our Client have 4TB  High Resolution Raster Images on Oracle10g installed on Windows Server 2003 with ARCSDE, the database was crashed so I asked the DBA for the last backup in case we do the clean installation, I installed the windows then oracle and then SDE but when I restore the data SDE was not working I try everything but it was not working at any cost, after few hours of hard work the DBA admit that the ARCSDE was crashed long time ago and he took the last back up with ARCSDE not running on the server. Now I have to find a way to recover ARCSDE and get the database on track again, I already tried installing ARCSDE but it didn’t work out and if I drop the SDE tablespace and user all the Schema will be lost I have to find a way to give the clients access to the server without losing any data, so I thought why not give them direct connection to the database instead of using ARCSDE infect users uses ARCCATALOG for loading the raster files so all I did (instead of playing around with the voluble data) is just installed oracle Client in all the nudes with easy naming and conform that the connectivity is absolutely working I just made changes in the ARCCATALOG Add spatial database connection so here is what I done.
SERVER = write the name of the Server (or IP address)
Service = ARCSDE:ORACLE10g
DATABASE = Database Name
USER = User Name
PASSWORD = Password
Note:
If you have more than one database sometime you cannot get connect with the one you want so it is better to shutdown the one of them get connected with the other then do the same for the first one.
Thanks for Reading….

Tuesday, June 7, 2011

ARCSDE on LINUX UNBREAKABLE


Installing ArcSDE 9.3 64-bit on Red Hat Enterprise Linux 5
* Install Red Hat Enterprise Linux 5.0 with the following package groups:

* from Development group
+ Development Tools package group
+ Legacy Software Development package group
* from Base System group
+ Legacy Software Support package group with compat-openldap from Optional Packages
+ X Window System package group

* Ensure 32-bit i386 versions of these softwares are installed:

o compat-libf2c-34
o compat-libstdc++-33
o compat-libstdc++-296
o libXp
o mesa-libGL
o mesa-libGLU
o openldap
o openssl

[root@srvsde cdrom]#  rpm -qa  --queryformat %-{name}-%{version}-%{release}-%{arch}"\n" | grep ^compat | grep i386$ | sort
compat-libf2c-34-3.4.6-4-i386
compat-libstdc++-296-2.96-138-i386
compat-libstdc++-33-3.2.3-61-i386
compat-openldap-2.3.43_2.2.29-3.el5-i386
[root@srvsde cdrom]#  rpm -qa  --queryformat %-{name}-%{version}-%{release}-%{arch}"\n" | grep ^mesa | grep i386$ | sort
mesa-libGL-6.5.1-7.7.el5-i386
mesa-libGLU-6.5.1-7.7.el5-i386
[root@srvsde cdrom]#  rpm -qa  --queryformat %-{name}-%{version}-%{release}-%{arch}"\n" | grep ^libXp | grep i386$ | sort
libXp-1.0.0-8.1.el5-i386
[root@srvsde cdrom]#  rpm -qa  --queryformat %-{name}-%{version}-%{release}-%{arch}"\n" | grep ^open | grep 86$ | sort
openldap-2.3.43-3.el5-i386
openssl-0.9.8e-7.el5-i686


   * Mount the installation cdrom into /mnt/cdrom

[root@srvsde sde]# mount 172.31.32.120:/media/ESRI /mnt/cdrom/
[root@srvsde sde]# ls /mnt/cdrom/
Autorun.inf  ESRI.bmp  ESRI.exe  ESRI.ini  GDBDirectConnect  GDBDirectConnect_unix  hp  hpia  ibm  linux  Media  PDFs  quickstart.pdf  quickstart_unix.pdf  Readme.txt  sdk  solaris  windows  Xtras

   * Create the sde user
[root@srvsde ~]# useradd sde
[root@srvsde ~]# passwd sde
[root@srvsde ~]# useradd -G oinstall sde
 
   * Switch to sde user

[root@srvsde cdrom]# su - sde
[sde@srvsde ~]$ ls ESRI-linux/
db2  documentation_server  install_db2.htm  install_oracle.htm  install_postgresql.htm  oracle10g  oracle11g  oracle9i  pg
[sde@srvsde ESRI-linux]$ ls ESRI-linux/oracle10g/
01.toc  02.tar  b5.nls  en.nls  install  ja.nls  jp.nls  ko.nls  th.nls  tw.nls  zh.nls

   * Start the installation :
[sde@srvsde oracle10g]$ ./install -load
ESRI is willing to license the software to you only if you accept and agree to the enclosed license agreement.
If you have read and agree with the terms in the enclosed license agreement type 'yes' to continue the installation process, if not press  or type 'no' to exit installation process. [no] yes


Press  to take the default, '?' for help, '^' to return to
the previous question, or 'q' to quit.

Enter CD-ROM mount point: [/cdrom] /mnt/cdrom

Select which product to load by entering the product number.

   1 - /mnt/cdrom/hp/db2_64
   2 - /mnt/cdrom/hp/informix
   3 - /mnt/cdrom/hp/oracle10g_64
   4 - /mnt/cdrom/hp/oracle9i_64
   5 - /mnt/cdrom/hpia/oracle10g_64
   6 - /mnt/cdrom/ibm/db2_64
   7 - /mnt/cdrom/ibm/informix
   8 - /mnt/cdrom/ibm/oracle10g_64
   9 - /mnt/cdrom/ibm/oracle11g_64
  10 - /mnt/cdrom/ibm/oracle9i_64
  11 - /mnt/cdrom/linux/db2
  12 - /mnt/cdrom/linux/oracle10g
  13 - /mnt/cdrom/linux/oracle11g
  14 - /mnt/cdrom/linux/oracle9i
  15 - /mnt/cdrom/linux/pg/arcsde
  16 - /mnt/cdrom/solaris/db2_64
  17 - /mnt/cdrom/solaris/informix
  18 - /mnt/cdrom/solaris/oracle10g_64
  19 - /mnt/cdrom/solaris/oracle11g_64
  20 - /mnt/cdrom/solaris/oracle9i_64

Enter product number to load: [1] 12

Enter pathname to install directory: [/home/sde/ESRI-linux/oracle10g]
The pathname to the install directory must not contain any upper-case letters

Enter pathname to install directory: [/home/sde/ESRI-linux/oracle10g] /home/sde/sdeexe9.3

Directory does not exist: /home/sde/sdeexe9.3
Would you like to create it? [yes]

ArcSDE version 9.3 for Oracle10g - May 14, 2008
-------------------------------------------------

ArcSDE Product
Package numbers to load: [all]


Package selection complete
--------------------------

You have chosen the following packages to be loaded

ArcSDE Product
 ArcSDE Server                                        

Is this correct? [yes]

Total size of chosen packages in megabytes: 169.7
Available space in megabytes: 4460.0

List file names while loading? [no] yes

Loading package(s), Please wait...

Help/
Help/accom_users.htm
Help/accounts.png
Help/add_new_svc.htm
Help/add_server.png
Help/add_soc.htm
Help/add_soc_1.png
Help/add_usrs_agsadmin.htm
Help/add_usrs_agsusers.htm
Help/agol_coordsys_extent.png

------------SNIP--------------

sdeexe93/lib/libpe.so
sdeexe93/lib/libsg.so
sdeexe93/lib/libsde.so
sdeexe93/lib/libsdeora10gsrvr93.so
sdeexe93/lib/libgsrvrora10g93.so
sdeexe93/lib/libsdesetup.so
sdeexe93/lib/liblocssa.so
sdeexe93/lib/libst_shapelib.so

Finished loading package(s)

Exiting...



   * Uncomment
      esri_sde      5151/tcp     # ArcSDE service on pinetree
in $SDEHOME/etc/services.sde


   * Copy the createsdeoracle.sql script to oracle home.
[root@srvsde ~]# cp /home/sde/sdeexe9.3/sdeexe93/tools/oracle/createsdeoracle.sql /home/ora10g/

   * Switch to Oracle user
[root@srvsde ~]# su - ora10g

   * Modify the createsdeoracle.sql file to replace the LOCATION variable in the line
datafile '/LOCATION/sde.dbf' size 400M
to
datafile '/u03/oradata/SRVSDE/sde.dbf' size 400M

   * Execute the script

[ora10g@srvsde ~]$ sqlplus "/ as sysdba" @createsdeoracle.sql

SQL*Plus: Release 10.2.0.4.0 - Production on Thu Jul 2 09:47:13 2009

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

* CREATESDEORACLE.SQL script         *
*            *
* Purpose:           *
*            *
* To create the SDE tablespace, the SDE Oracle user    *
* and grant privileges to the SDE user       *
*            *
* NOTES: 1. Before running this script        *
*     Replace the word LOCATION with the pathname for  *
*     the sde.dbf datafile to be created.       *
*            *
*  2. If upgrading remove rem from the grants in the   *
*     upgrade section         *
*            *
*  3. Please use the sys user to run this script.      *
*     You will also need to the system password      *
*            *
*    Example:           *
* % sqlplus "sys as sydba" @createsdeoracle.sql      *
*            *
*            *
**************************************************************
* Granting of permissions by the SYS user in Oracle, on two packages
* to the public role.

Grant succeeded.


Grant succeeded.

* * * * * * * * * * * * * * *
* ArcSDE NEW INSTALLATION   *
* * * * * * * * * * * * * * *
* Connect as system/ to create the sde
* tablespace and user.
Enter password:
Connected.
* Create the sde tablespace.
* Before you run this script update LOCATION for the desired datafile pathname.

Tablespace created.

* Create the sde user
* The password for the sde user is set to "XXX". You may
* change this if you wish.

User created.

* Granting the required privileges to the sde user.

Grant succeeded.


Grant succeeded.


Grant succeeded.


Grant succeeded.


Grant succeeded.


Grant succeeded.


Grant succeeded.


Grant succeeded.


Grant succeeded.


Grant succeeded.


Grant succeeded.


Grant succeeded.


Grant succeeded.

* SELECT ANY TABLE is required for compressing the database
* This privilege needs to be granted whenever a compress is run.

Grant succeeded.

* ADMINISTER DATABASE TRIGGER can be revoked after install

Grant succeeded.

* * * * * * * * * * *
* ArcSDE UPGRADE    *
* * * * * * * * * * *
* If upgrading please remove rem from each grant.
* Granting the required privileges to the sde user.
* After upgrading you may revoke the following privileges
* Please remove rem from each grant.
* Revoking the upgrade privileges to the sde user.
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[ora10g@srvsde ~]$ sqlplus "/ as sysdba"

SQL*Plus: Release 10.2.0.4.0 - Production on Thu Jul 2 09:48:20 2009

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>
SQL>
SQL>
SQL>
SQL> GRANT EXECUTE ON dbms_pipe TO public;

GRANT EXECUTE ON dbms_lock TO public;
Grant succeeded.

SQL> SQL>

Grant succeeded.

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


    * Configure the .bash_profile in /home/sde


[root@srvsde lib]# cat /home/sde/.bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
 . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin
SDEHOME=/home/sde/sdeexe9.3/sdeexe93/
export SDEHOME
ORACLE_HOME=/oracle/product/10.2.0
export ORACLE_HOME
TNS_ADMIN=$ORACLE_HOME/network/admin
export TNS_ADMIN
ORACLE_SID=QNMPSDE
export ORACLE_SID
PATH=$PATH:$SDEHOME/bin:$ORACLE_HOME/bin
export PATH
LD_LIBRARY_PATH=$SDEHOME/lib:/usr/lib:/lib:$ORACLE_HOME/lib:$ORACLE_HOME/lib32
export LD_LIBRARY_PATH
unset USERNAME

export PATH


    * Execute the sdesetup script
[sde@srvsde bin]$ ./sdesetup  -o install -d ORACLE10G -H /home/sde/sdeexe9.3/sdeexe93/ -u sde -p XXX -D qnmpsde -i esri_sde -l /home/sde/ECP666666666_v93.ecp

ESRI ArcSDE Server Setup Utility Thu Jul  2 10:43:51 2009
----------------------------------------------------------------
Install or update ArcSDE, GDB schema objects:
  Are you sure? (Y/N): y
Creating ArcSde schema.....
Successfully created ArcSde schema.

Installing locators.....
Successfully installed locators.

Creating geodatabase schema.....
Successfully created GDB schema.


Registering authorization key.....
Successfully registered authorization key.

Successfully installed ArcSDE components.
Refer SDEHOME\etc\sde_setup.log for more details.


    * Start the sde service
[sde@srvsde bin]$ sdemon -o start
Please enter ArcSDE DBA password:


-------------------------------------------------------
ArcSDE 9.3  for Oracle10g Build 508 Thu Apr 17 12:23:18  2008
-------------------------------------------------------


ST_Geometry Schema Owner: (SDE) Type Release: 1007

Instance initialized for ((sde)) . . .


Connected to instance . . .

DBMS Connection established...

RDBMS:     "Oracle"
Instance Name:    "esri_sde"

IOMGR Process ID (PID):           13547


ArcSDE Instance esri_sde started Thu Jul  2 11:05:33 2009..

Thanks for Reading..

ORACLE AND LINUX UNBREAKABLE


in partioning select remove linux partitions on selected drive and create default layout

select costumise now

desktop environments
gnome desktop environment

aplications
unselect all options except graphical internet

develpors
select all except kde development and ruby + from x softment development select optional packages and check on llbxp and openmotif

servers
unselect all

base system
select lagacy software support + optionsl psckges check compat-db from system tool check sysstat

installing oracle

open terminal

gedit /etc/sysctl.conf file

past this karnals at the end of the file and replace existing shmmax and shmall

kernel.shmall = 2097152
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
use this cmd to make the kernel parameters changes effective immediately

to check /sbin/sysctl -p

gedit /etc/security/limits.conf

past this parameters at the end of the file

oracle           soft    nproc   2047
oracle           hard    nproc   16384
oracle           soft    nofile  1024
oracle           hard    nofile  65536

gedit /etc/pam.d/login

past this parameters in the end of the file

session   required    /lib/security/pam_limits.so
session   required   pam_limits.so

gedit /etc/profile

past this parameters abouve pathmunge

if [ $USER = "oracle" ]; then

        if [ $SHELL = "/bin/ksh" ]; then

              ulimit -p 16384

              ulimit -n 65536

        else

              ulimit -u 16384 -n 65536

        fi

fi

change the release file etc/redhat-release

redhat-4

add user and groups

groupadd oinstall
groupadd dba
useradd -m -g oinstall -G dba -d /home/oracle -s /bin/bash -c "Oracle Software Owner" oracle
passwd oracle

create directory for oracle software

cd /
mkdir u01
cd u01/
mkdir oracle
cd oracle/
mkdir product
cd product/
mkdir 10.2.0
cd 10.2.0
mkdir db_1
cd db_1/
pwd

log in with oracle user

unzip the database from terminal change into the root user and write this
cd /
chown -R oracle:oinstall /u01/
exit

go to the folder that contain database and start installing the software

./runInstaller

select install sofware only
follow instruction at the end of the installation you will be ask to run two cmd as a root user

cd /home/oracle/oraInventory/
./orainstRoot.sh

cd /$oracle_home/
./root.sh

exit and close every thing and reboot the system

login as oracle user insert the fowllowing karnels in

gedit /home/oracle/.bashrc

ORACLE_HOME=/u01/oracle/product/10.2.0/db_1;export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$PATH; export PATH

and write dbca then fowllow the interface to create database

chack oracle path

echo $ORACLE_HOME
echo $ORACLE_SID


optional

for sql

gedit /home/oracle/.bash_profile


export ORACLE_HOME=
export LD_LIBARARY_PATH=$LD_LIBARARY_PATH:$ORACLE_HOME/lib
export PATH=ORACLE_HOME/bin:$PATH
alias database = 'export ORACLE_SID=test;sqlplus "/as sysdba"'..

Thank you for Reading and have fun with Linux....

DATA GUARD ON ORACLE10g


To implements this method you have to have two machines connected to each other you can use VMware  machine or two separate systems (if you can arrange that) after installing oracle software create database using same structure (Recommended oracle managed file system) configured TNS listener on both machines. Make sure both machines are connected to each other by doing the following, connect sys/oracle @(instance name) as sysdba it will ans as connected if not check the connection again.
Now that we have connected both machines shutdown the standby database and mount the primary database set the prim database in archive log by doing the following ALTER DATABASE ARCHIVELOG; and enable force logging by doing the following ALTER DATABASE FORCE LOGGING now it’s time to set the parameters for primary database:
Setting up prim database perameters
Alter system set DB_NAME=primary (already aveleble)
Alter system set DB_UNIQUE_NAME=primary scope=spfile
Alter system set LOG_ARCHIVE_CONFIG='DG_CONFIG=(primary,standby)'
Alter system set LOG_ARCHIVE_DEST_1='LOCATION= D:\path VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=PRIMARY'

Alter system set LOG_ARCHIVE_DEST_2='SERVICE=stndVALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)DB_UNIQUE_NAME=stnd'
Alter system set LOG_ARCHIVE_DEST_STATE_1=ENABLE
Alter system set LOG_ARCHIVE_DEST_STATE_2=ENABLE

Alter system set REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE scope=spfile not necessary

Alter system set LOG_ARCHIVE_MAX_PROCESSES=30 no necessary

Alter system set FAL_SERVER=standby

Alter system set FAL_CLIENT=primary

Alter system set STANDBY_FILE_MANAGEMENT=AUTO

Alter system set SERVICE_NAMES=prim scope=spfile

Alter system set INSTANCE_NAME=prim scope=spfile;

Alter database set DG_broker=true (if you want to enable the database guard broker)

now shutdown the database and copy all datafiles+onlin logfiles batter if copied everything from primary to standby but be sure to past it in its respected place.

Mount the primary database again and create a stand by controlfile

Alter database create standby controlfile as ‘path\name.ctl’;

Configuring standby machine
The first thing you have to do after pasting all the datafile and online logs on standby database is to restore the standby controlfile
rman> startup nomount;
rman> restore standby controlfile from ‘path\name.ctl’

Now startup database in mount using sqlplus and change parameters of standby database.

Alter system set DB_NAME=primary

Alter system set DB_UNIQUE_NAME=standby scope=spfile

Alter system set SERVICE_NAMES=standby

Alter system set LOG_ARCHIVE_CONFIG='DG_CONFIG=(primary,standby)'

Alter system set DB_FILE_NAME_CONVERT=’O:\oracle\product\10.2.0\oradata\primary’,’ O:\oracle\product\10.2.0\oradata\standby’ scope=spfile

Alter system set LOG_FILE_NAME_CONVERT=’O:\oracle\product\10.2.0\oradata\primary’,’ O:\oracle\product\10.2.0\oradata\standby’scope=spfile

Alter system set LOG_ARCHIVE_DEST_1='LOCATION=any-path VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=standby'

Alter system set LOG_ARCHIVE_DEST_2='SERVICE=primary VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)DB_UNIQUE_NAME=primary'

Alter system set LOG_ARCHIVE_DEST_STATE_1=ENABLE

Alter system set LOG_ARCHIVE_DEST_STATE_2=ENABLE

REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE  (not necessary)

Alter system set LOG_ARCHIVE_MAX_PROCESSES=30 (not necessary)

Alter system set STANDBY_FILE_MANAGEMENT=AUTO

Alter system set INSTANCE_NAME=standby

Alter system set FAL_SERVER=primary

Alter system set FAL_CLIENT=standby

Alter system set Lock_name_space=standby scope=spfile


Now startup standby database in nomount stage startup nomount; and issue the following cmd alter database mount standby database;

You can add standby redologs for DG_broker by doing the following
Alter database add standby logfile ’path\name.log’ size ??m;


Now that all configurations is done we have to make sure that archiveing is applied on standby by by primary
From primary issue this cmd

Alter system set Log_archive_dest_state_2=ENABLE scope=both;

Check the list of archivelogs when ever you switch a log check logs on both instance you will see both changing if not then check you alert logfile

Archive Log List;

 And also check if there any error in archiveing destination

Select Status, Error from v$Archive_dest where dest_id=2;

Now on standby issue this cmd

Alter Database Recover Managed Standby Database Disconnect;

And check that the standby database is receiving logs properly

Select name,applied,archived from v$archived_log;
 Status of archiveing can also be checked on both machines by issuing the following cmd

SELECT DEST_ID "ID",
STATUS "DB_status",
DESTINATION "Archive_dest",
ERROR "Error"
FROM V$ARCHIVE_DEST;

SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME
FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;

SELECT SEQUENCE#, APPLIED FROM V$ARCHIVED_LOG
ORDER BY SEQUENCE#;..
Thank you for Reading..

ORACLE AUTOMATIC STORAGE MANAGEMENT


Automatic Storage Management (ASM) needs RAW disks to store files. As we know raw disks cannot be opened so we cannot view the files we are storing. If you are implementing ASM in your organization you are probably going to use a complete Hard Drive but for this tutorial I am going to create RAW disk just to show you how things work,
Creating RAW disks :
From command prom go to the directory you want to create raw disks for example I will create a folder in E drive with the name asmdisks.
C:\documents and settings\administrator> E:
E:>mkdir asmdisks
E:>cd asmdisks
E:\asmdisks> asmtool –create E:\asmdisks\disk1 1000
E:\asmdisks> asmtool –create E:\asmdisks\disk2 1000
E:\asmdisks> asmtool –create E:\asmdisks\disk3 1000
E:\asmdisks> asmtool –create E:\asmdisks\disk3 1000
Now that we have for raw LUN with 1gb space each we have to create CSS and OCR  service
C:\documents and settings\administrator> oracle\product\10.2.0\db_1\BIN\localconfig add (if you have created CSS service before write RESET beside add)
You will see this in your command prom
Step 1: stopping local CSS stack
Step 2: deleting OCR repository
Step 3: creating new OCR repository
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'ap\arogyaa', privgrp ''..
Operation successful.
Step 4: creating new CSS service
successfully created local CSS service
successfully reset location of CSS setup

Now we have to create pfile for ASM open text file and copy these parameters in it
INSTANCE_TYPE=ASM
DB_UNIQUE_NAME=+ASM
LARGE_POOL_SIZE=8M (can be increased to 16M)
ASM_DISKSTRING='
E:\asmdisks\disk1',’E:\asmdisks\disk2’,’E:\asmdisks\disk2’,’E:\asmdisks\disk3’,’E:\asmdisks\disk4’
_ASM_ALLOW_ONLY_RAW_DISKS=FALSE
Save this txt file with any name asm.ora
Create service and password file
C:\documents and settings\administrator> orapwd file=C:\oracle\product\10.2.0\db_1\database\PWD+ASM.ora password=asm (if it cannot be created in the given directory create it any place else and copy it to the default location).
Create ASM service
C:\documents and settings\administrator>oradim –new –asmsid +asm –startmode auto
Create asm disk group
Log into sqlplus and check the available disks
select path, mount_status from v$asm_disk;
 it will return this
PATH MOUNT_S
--------------------------------
C:\ASMDISKS\DISK1 CLOSED
C:\ASMDISKS\DISK2 CLOSED
C:\ASMDISKS\DISK3 CLOSED
C:\ASMDISKS\DISK4 CLOSED
SQL> create diskgroup data external redundancy disk
 'E:\ASMDISKS\DISK1','E:\ASMDISKS\DISK2';
Diskgroup created.

SQL> create diskgroup recovery external redundancy disk
 'E:\ASMDISKS\DISK3','E:\ASMDISKS\DISK4';
Diskgroup created.
Change PFILE to SPFILE and use the DBCA to create the database in DBCA you will see that the diskgroups are not mounted but there is an option to mount them use that option on both disksgroups and use data group for data and recovery for recovery …That’s it now you have Oracle with ASM system..Enjoy Thanks for Reading..