11 Replies Latest reply on Jul 7, 2019 7:04 AM by Arun_Sankar

    startup config oradb with srvctl possible with no cluster no rac?

    user7857381

      Hi,

       

      an ora dba said to me last time that the way to edit the /etc/oratab after a new installation of a database is deprecaded

      and I should use:

       

      srvctl add database -db xxxxx-oraclehome $ORACLE_HOME spfile $ORACLE_HOME/dbs/spfile$ORACLE_SID.ora

       

      but If I googled for srvctl: I got only RAC and Cluster topics

      exeption is this:

      https://bijoos.com/oraclenotes/2013/67/

       

      I am using a normal 12cR2 SE without rac or cluster

       

      If type:

       

      [oracle@OraLinux7p4 /]$ srvctl

      ****Unable to retrieve Oracle Clusterware home.

      Start Oracle Clusterware stack and try again.

       

      How can I fix this error?

       

      Thanks in advance

        • 1. Re: startup config oradb with srvctl possible with no cluster no rac?
          Dude!

          an ora dba said to me last time that the way to edit the /etc/oratab after a new installation of a database is deprecaded

          How did you create the database? Anyway, AFAIK this is nonsense. When you use DBCA, it creates the /etc/oratab entry and utilities, such as oraenv rely on it.

           

          srvctl add database -db xxxxx-oraclehome $ORACLE_HOME spfile $ORACLE_HOME/dbs/spfile$ORACLE_SID.ora

           

          That's what you can use if you setup GI or Oracle ASM with Oracle Restart after installing the database, or when you don't use DBCA, which automatically registers the database.

           

          [oracle@OraLinux7p4 /]$ srvctl

          ****Unable to retrieve Oracle Clusterware home.

          Start Oracle Clusterware stack and try again.

           

          From the output I assume you're running Oracle Linux 7. Please always specify the OS.

           

          Create an appropriate entry in /etc/oratab. Then run the following to set up the shell environment:

           

          $ source oraenv <<< ORCL

           

          Where ORCL is the SID of your database (case sensitive).

           

          Then try again.

          • 2. Re: startup config oradb with srvctl possible with no cluster no rac?
            user7857381

            Hi Dude!

             

            db creation with dbca gui

            oralinux 7

             

            oratab was created by dbca

             

            OraSid01:/u01/app/oracle/product/12.2.0.1/db_1:N

             

            however I did it in the old manner how ever I did all the time

             

            with init.d runlevels and oradb to automate startup and shutdown with server boot:

             

            https://docs.oracle.com/en/database/oracle/oracle-database/12.2/unxar/stopping-and-starting-oracle-software.html#GUID-EF…

            • 3. Re: startup config oradb with srvctl possible with no cluster no rac?
              Dude!

              You don't know whether to use Oracle Restart or init scripts in OL 7, or what is your problem?

              • 4. Re: startup config oradb with srvctl possible with no cluster no rac?
                user7857381

                Hi, I use this kind of start scripts since 2007 but only once per year because my main field is ms sql server. It is all well documented and there  are no problems.

                But it costs 5 min time to assembling this scipts and I thougth there was a new methode to do this with one line ;-) in 5 seconds.

                 

                I will ask the ora db admin next time. May be I have missunderstand him, but he told me, that I should don't "touch" the oratab with vi. Instead of I have to do this with srvctl.

                And I thought OMG. I am a DAU that I didn't know this fact.

                 

                But the dba works only with RAC or DataGuard installations.

                • 5. Re: startup config oradb with srvctl possible with no cluster no rac?
                  EdStevens

                  user7857381 wrote:

                   

                  Hi, I use this kind of start scripts since 2007 but only once per year because my main field is ms sql server. It is all well documented and there are no problems.

                  But it costs 5 min time to assembling this scipts and I thougth there was a new methode to do this with one line ;-) in 5 seconds.

                   

                  I will ask the ora db admin next time. May be I have missunderstand him, but he told me, that I should don't "touch" the oratab with vi. Instead of I have to do this with srvctl.

                  And I thought OMG. I am a DAU that I didn't know this fact.

                   

                  But the dba works only with RAC or DataGuard installations.

                  DataGuard has nothing to do with any of this.

                  IF (and I emphasize "IF") your installation has ASM (see note) then the 'restart' feature is built in and uses a mechanism different from the 'init.d' method..  Note: You can have ASM without RAC, but you can't (to my knowledge) have RAC without ASM.  This is called 'oracle restart', and unlike the init.d method it does not depend on the contents of oratab.

                   

                  While utilties like DBCA will make your job a bit easier by modifying oratab for you, there are certainly situtations where the DBA might need to modify it manually.  Perhaps your DBA simply doesn't trust you to do it properly.  Or perhaps he doesn't know his job as well as he should.

                   

                  Your attempt to save five minutes "once per year" seems like a waste of time.  You spend more time than that every day going to the bathroom and getting coffee.  How much time have you already spent on this thread, spent trying to solve this non-problem?  How many "years" worth of "five minutes per year" effort have you spent on this?

                  • 7. Re: startup config oradb with srvctl possible with no cluster no rac?
                    Arun_Sankar

                    Hi,

                    srvctl will be working only If you configured Oracle Restart. It is coming under Grid installation.

                    If your database is standalone and in file system (not ASM) srvctl will not be working.

                     

                    Thank You

                    Arun Sankar

                    • 8. Re: startup config oradb with srvctl possible with no cluster no rac?
                      Dude!

                      If your database is standalone and in file system (not ASM) srvctl will not be working.

                      Did you try?

                      • 9. Re: startup config oradb with srvctl possible with no cluster no rac?
                        Arun_Sankar

                        Hi Dude,

                         

                        I am getting below message for the standalone with file system only database.

                         

                        $ srvctl

                        ****Unable to retrieve Oracle Clusterware home.

                        Start Oracle Clusterware stack and try again.

                         

                        Please correct me if I am wrong

                         

                        Thank You

                        Arun Sankar

                        • 10. Re: startup config oradb with srvctl possible with no cluster no rac?
                          Dude!

                          Oracle Restart for standalone databases runs OHASD like Clusterware and uses SRVCTL and CRSCTL as well.

                           

                          The message you're seeing means the Oracle High Availability Services haven't been started.

                          If it is correctly installed, you can try "crsctl has start" from the GI home.

                           

                          [grid@localhost ~]$ crsctl start has

                          CRS-4640: Oracle High Availability Services is already active

                           

                          And sorry your info is incorrect. You can certainly use Oracle Restart for non ASM databases.

                          When installing GI, it installs ASM, but you do not have to use ASM to use Oracle Restart or Clusterware.

                           

                          [oracle@localhost ~]$ source oraenv <<< ORCL

                          [oracle@localhost ~]$ srvctl status database -d ORCL

                          Database is running.

                           

                          [oracle@localhost ~]$ rman target /

                          RMAN> report schema;

                           

                          List of Permanent Datafiles

                          ===========================

                          File Size(MB) Tablespace           RB segs Datafile Name

                          ---- -------- -------------------- ------- ------------------------

                          1    890      SYSTEM           YES     /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_gl331nkt_.dbf

                          3    510      SYSAUX            NO      /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_gl333cs6_.dbf

                          4    330      UNDOTBS1      YES     /u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_gl3344z0_.dbf

                          7    5          USERS              NO      /u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_gl334640_.dbf