Create Windows Service for Oracle RAC

Jul 29, 2014 / By Michael Dinh

Tags: , ,

It’s my first time on RAC system for Windows and I’m happy to learn something new to share.

I created a new service for database (restoredb) only to find out the ORACLE_HOME for the service is “c:\\oracle\\product\\10.2.0\\asm_1″

Any ideas as to what was wrong?

C:\\dba_pythian>set oracle_home=C:\\oracle\\product\\10.2.0\\db_1

C:\\dba_pythian>echo %ORACLE_HOME%
C:\\oracle\\product\\10.2.0\\db_1

C:\\dba_pythian>oradim -NEW -SID restoredb -STARTMODE manual
Instance created.

C:\\dba_pythian>env
 1 STOPPED agent11g1Agent                                    c:\\oracle\\app\\11.1.0\\agent11g
 2 STOPPED agent11g1AgentSNMPPeerEncapsulator                c:\\oracle\\app\\11.1.0\\agent11g\\bin\\encsvc.exe
 3 STOPPED agent11g1AgentSNMPPeerMasterAgent                 c:\\oracle\\app\\11.1.0\\agent11g\\bin\\agntsvc.exe
 4 RUNNING +ASM1                                             c:\\oracle\\product\\10.2.0\\asm_1
 5 RUNNING ClusterVolumeService                              C:\\oracle\\product\\10.2.0\\crs
 6 RUNNING CRS                                               C:\\oracle\\product\\10.2.0\\crs
 7 RUNNING CSS                                               C:\\oracle\\product\\10.2.0\\crs
 8 RUNNING EVM                                               C:\\oracle\\product\\10.2.0\\crs
 9 STOPPED JobSchedulerDWH1                                  c:\\oracle\\product\\10.2.0\\db_1
10 STOPPED JobSchedulerRMP1                                  c:\\oracle\\product\\10.2.0\\db_1
11 RUNNING OraASM10g_home1TNSListenerLISTENER_PRD-DB-10G-01  C:\\oracle\\product\\10.2.0\\asm_1
12 STOPPED OraDb10g_home1TNSListener                         c:\\oracle\\product\\10.2.0\\db_1
13 STOPPED ProcessManager                                    "C:\\oracle\\product\\10.2.0\\crs"
14 RUNNING DWH1                                              c:\\oracle\\product\\10.2.0\\db_1
15 RUNNING RMP1                                              c:\\oracle\\product\\10.2.0\\db_1
16 RUNNING agent12c1Agent                                    C:\\agent12c\\core\\12.1.0.4.0
17 RUNNING restoredb                                         c:\\oracle\\product\\10.2.0\\asm_1
18 STOPPED JobSchedulerrestoredb                             c:\\oracle\\product\\10.2.0\\asm_1

Check the PATH variable to find HOME for ASM is listed before DB.

C:\\dba_pythian>set
Path=C:\\oracle\\product\\10.2.0\\asm_1\\bin;C:\\oracle\\product\\10.2.0\\db_1\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS

Create database service specifying the fullpath to oradim from the DB HOME

C:\\dba_pythian>oradim -DELETE -SID restoredb
Instance deleted.

C:\dba_pythian>env
 1 STOPPED agent11g1Agent                                    c:\\oracle\\app\11.1.0\\agent11g
 2 STOPPED agent11g1AgentSNMPPeerEncapsulator                c:\\oracle\\app\11.1.0\\agent11g\\bin\\encsvc.exe
 3 STOPPED agent11g1AgentSNMPPeerMasterAgent                 c:\\oracle\\app\11.1.0\\agent11g\\bin\\agntsvc.exe
 4 RUNNING +ASM1                                             c:\\oracle\\product\\10.2.0\\asm_1
 5 RUNNING ClusterVolumeService                              C:\\oracle\\product\\10.2.0\\crs
 6 RUNNING CRS                                               C:\\oracle\\product\\10.2.0\\crs
 7 RUNNING CSS                                               C:\\oracle\\product\\10.2.0\\crs
 8 RUNNING EVM                                               C:\\oracle\\product\\10.2.0\\crs
 9 STOPPED JobSchedulerDWH1                                  c:\\oracle\\product\\10.2.0\\db_1
10 STOPPED JobSchedulerRMP1                                  c:\\oracle\\product\\10.2.0\\db_1
11 RUNNING OraASM10g_home1TNSListenerLISTENER_PRD-DB-10G-01  C:\\oracle\\product\\10.2.0\\asm_1
12 STOPPED OraDb10g_home1TNSListener                         c:\\oracle\\product\\10.2.0\\db_1
13 STOPPED ProcessManager                                    "C:\\oracle\\product\\10.2.0\\crs"
14 RUNNING DWH1                                              c:\\oracle\\product\\10.2.0\\db_1
15 RUNNING RMP1                                              c:\\oracle\\product\\10.2.0\\db_1
16 RUNNING agent12c1Agent                                    C:\\agent12c\\core\\12.1.0.4.0

C:\\dba_pythian>dir C:\\oracle\\product\\10.2.0\\db_1\\BIN\\orad*
 Volume in drive C has no label.
 Volume Serial Number is D4FE-B3A8

 Directory of C:\\oracle\\product\\10.2.0\\db_1\\BIN

07/08/2010  10:01 AM           121,344 oradbcfg10.dll
07/20/2010  05:20 PM             5,120 oradim.exe
07/20/2010  05:20 PM             3,072 oradmop10.dll
               3 File(s)        129,536 bytes
               0 Dir(s)  41,849,450,496 bytes free

C:\\dba_pythian>C:\\oracle\\product\\10.2.0\\db_1\\BIN\\oradim.exe -NEW -SID restoredb -STARTMODE manual
Instance created.

C:\\dba_pythian>env
 1 STOPPED agent11g1Agent                                    c:\\oracle\\app\\11.1.0\\agent11g
 2 STOPPED agent11g1AgentSNMPPeerEncapsulator                c:\\oracle\\app\\11.1.0\\agent11g\\bin\\encsvc.exe
 3 STOPPED agent11g1AgentSNMPPeerMasterAgent                 c:\\oracle\\app\\11.1.0\\agent11g\\bin\\agntsvc.exe
 4 RUNNING +ASM1                                             c:\\oracle\\product\\10.2.0\\asm_1
 5 RUNNING ClusterVolumeService                              C:\\oracle\\product\\10.2.0\\crs
 6 RUNNING CRS                                               C:\\oracle\\product\\10.2.0\\crs
 7 RUNNING CSS                                               C:\\oracle\\product\\10.2.0\\crs
 8 RUNNING EVM                                               C:\\oracle\\product\\10.2.0\\crs
 9 STOPPED JobSchedulerDWH1                                  c:\\oracle\\product\\10.2.0\\db_1
10 STOPPED JobSchedulerRMP1                                  c:\\oracle\\product\\10.2.0\\db_1
11 RUNNING OraASM10g_home1TNSListenerLISTENER_PRD-DB-10G-01  C:\\oracle\\product\\10.2.0\\asm_1
12 STOPPED OraDb10g_home1TNSListener                         c:\\oracle\\product\\10.2.0\\db_1
13 STOPPED ProcessManager                                    "C:\\oracle\\product\\10.2.0\\crs"
14 RUNNING DWH1                                              c:\\oracle\\product\\10.2.0\\db_1
15 RUNNING RMP1                                              c:\\oracle\\product\\10.2.0\\db_1
16 RUNNING agent12c1Agent                                    C:\\agent12c\\core\\12.1.0.4.0
17 RUNNING restoredb                                         c:\\oracle\\product\\10.2.0\\db_1
18 STOPPED JobSchedulerrestoredb                             c:\\oracle\\product\\10.2.0\\db_1

C:\\dba_pythian>

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>