10 Replies Latest reply: Jul 24, 2007 12:30 PM by ABD - DBA RSS

    Using ORADIM to create instance on Oracle 10g R2, windows platform

    555329
      Please I used the below command to create database instance to startup at the same time as of the OS is starting up.

      ORADIM -new -sid ORCL -SRVC OracleServiceORCL -STARTMODE auto -SRVCSTART system -PFILE C:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\INITORCL.ORA

      But When I shutdown the all system at OS level, and restart it, the OracleServiceORCL shows up as Started Automatic in the services tool, but when trying to connect ot the database, the following message appears Connected to an Idle instance So I have to startup manually the database.

      It's any thing wrong with my ORADIM command?

      Thanks for your cooperation
        • 1. Re: Using ORADIM to create instance on Oracle 10g R2, windows platform
          ABD - DBA
          Does the alert log show anything, before you start it up manually?

          Why are you using pfile? Oracle recommends everyone start using spfile.
          • 2. Re: Using ORADIM to create instance on Oracle 10g R2, windows platform
            555329
            I'm doing physical dataguard configuration.

            The primary database is running perfectly

            the secondary database is created from the primary database, and In order to custom the init parameter of the secondary database, I need to create a pfile from the spfile and them customize the secondary's database pfile.

            That's why I use the pfile just when I created the secondary instance , after that I create the spfile from the pfile.

            Every thing works smoothly but I'm wondering why the instance doesn't startup when the OS is started?, It's because this instance is a standby database?
            Thanks
            • 3. Re: Using ORADIM to create instance on Oracle 10g R2, windows platform
              ABD - DBA
              Standby databases must be started manually, however you maybe to script the process. I'm currently implementing a standby database, so I'll have to check that out myself. You probably have an error in your alert log about can't start up database from standby control file, or something to that affect.

              Oracle recommends you use spfile with data guard. I'm using 10g Grid R3 and used it to create the standby database. Don't have to customize anything, it does it all for me. The one thing you do have to do, is the switchover management. TAF is not designed for switchover, its designed for fail over. I created a second listener for 10G Grid and the Database broker to communicate between the primary and standby. If I need to switch over, I just click a button in 10g Grid, then shutdown down the listener used by the application.

              FYI, 10G Grid R2 has issues with data guard.
              • 4. Re: Using ORADIM to create instance on Oracle 10g R2, windows platform
                555329
                I just used the pfile at the first time I created the instance, and after that if I found that every thins is OK, I created the spfile from the pfile.

                The issue is only when I shutdown and startup the whole system, the secondary database doesn't startup, and I have to do that manually, this is my issue.
                I don't have 100% control of the secondary server that is why I don't need to give the system admin how to start the database manually.

                I also know that eventhough there is a gap if the secondary database is automatically the FAL server can resolve automatically the gap.

                also wondering about GRID CONTROL? should I need extra license

                Thanks
                • 5. Re: Using ORADIM to create instance on Oracle 10g R2, windows platform
                  ABD - DBA
                  10g Grid Control is included with the EE license.

                  This is your basic script:

                  STARTUP NOMOUNT;
                  ALTER DATABASE MOUNT STANDBY DATABASE;
                  ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
                  exit
                  • 6. Re: Using ORADIM to create instance on Oracle 10g R2, windows platform
                    555329
                    Thanks,
                    Maybe I didn't explain exactly what I was expecting with the standby database, these steps are what I did, to resolve the issue

                    ENABLE THE STANDBY DATABASE TO STARTUP FROM SPFILE


                    Step 1: create a newly spfile from the current pfile

                    SQL> CREATE SPFILE='C:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\SPFILEORCL.ORA' FROM PFILE='C:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\INITORCL.ORA';


                    Step 2: Rename the INITORCL.ORA TO SAVE_DATE_INITORCL.ORA

                    Example: the C:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\INITORCL.ORA became
                    C:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\SAVE_24072007_INITORCL.ORA

                    Step 3: delete the former sid created

                    C:\ORADIM -delete -sid orcl
                    Instance deleted.

                    Step 3: Change the Oracle service to start when the OS start

                    C:\ ORADIM -new -sid ORCL -SRVC OracleServiceORCL -STARTMODE auto -SRVCSTART system -SPFILE
                    Instance created.

                    Now When I shutdown the whole system and start it up, the standby database startup. the only thing is that the standby database startup a read-only mode, defautl with oracle 10g this is fine for me, because the MRP is stopped but the log shipping is not stopped.
                    So eventhough the system admin shutdown the database server at OS level without letting me know, tha standby should continue receiving archived log files.
                    I'll just need to monitore the lop apply process and start it to apply archived log files received

                    Thanks
                    • 7. Re: Using ORADIM to create instance on Oracle 10g R2, windows platform
                      555329
                      Anyway thank you for license info with Grid Control, for the time bieng I'm doing all steps manually and when all things will work smoothly I shall go further with Grid control.

                      Thanks
                      • 8. Re: Using ORADIM to create instance on Oracle 10g R2, windows platform
                        ABD - DBA
                        But once the database is started in read-only mode, don't you have to shut it down to put it back in recovery mode to start the log apply process? I'm not sure why you want to do that.

                        If you script it, you won't have to worry about it, say if you are on vacation......unless you are worried about job security.
                        • 9. Re: Using ORADIM to create instance on Oracle 10g R2, windows platform
                          555329
                          This is the old fashion but also work with 10g
                          STARTUP NOMOUNT;
                          ALTER DATABASE MOUNT STANDBY DATABASE;
                          ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

                          Default mode with oracle 10g when starting up the dataguard

                          STARTUP; ---> read only mode by dafault
                          ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION; --> recovery managed mode, means the secondary database is recovered from the archived log files

                          ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION; -->managed Real Time Apply means the secondary database is recovery from the redo data fron the standby redo log files as soon as they are filled up by the RFS.


                          That's why sometimes using tools hide some details, like Grid Control, this is the reason why I prefer first to catchup all step manually and them go further with the grid control.
                          Any way Job secure is not my concern only be sure to strongly explain to my boss why choosing this direction than other.

                          Thanks
                          • 10. Re: Using ORADIM to create instance on Oracle 10g R2, windows platform
                            ABD - DBA
                            I'm running 9.2.0.6 database. Can't upgrade until application vendor upgrades.