7 Replies Latest reply: May 16, 2014 5:21 AM by user13364377 RSS

    login message

    user13364377

      Hi All,

       

      I want to do a set up like, when we login as sqlplus / as sysdba to startup a database, it should show up a message like 'Open the database in read only mode' to alert whoever logs in to the database to do startup.

       

      How can we set it up?

       

      DB version is 11.2.0.2

      OS:AIX 6.1

        • 1. Re: login message
          Top.Gun

          In the following global profile file:

          $ORACLE_HOME/sqlplus/admin/glogin.sql

           

          You can insert a command like:

          PROMPT Open the database in read only mode

           

          So now every time someone logs in the message will appear.

          • 2. Re: login message
            sb92075

            Oracle already does similar by reporting as below

             

            [oracle@localhost trace]$ sqlplus / as sysdba

             

             

             

            SQL*Plus: Release 11.2.0.2.0 Production on Sun Apr 27 06:57:23 2014

             

             

            Copyright (c) 1982, 2010, Oracle.  All rights reserved.

             

             

             

            Connected to an idle instance.

            • 3. Re: login message
              EdStevens

              user13364377 wrote:

               

              Hi All,

               

              I want to do a set up like, when we login as sqlplus / as sysdba to startup a database, it should show up a message like 'Open the database in read only mode' to alert whoever logs in to the database to do startup.

               

              How can we set it up?

               

              DB version is 11.2.0.2

              OS:AIX 6.1

              "whoever" shouldn't be allowed to start a database anyway.  The only people who should be allowed to start a database shouldn't need a special prompt to tell them how to open it.

              • 4. Re: login message
                user13364377

                Hi Top.Gun,

                 

                Thank you very much for the solution. It works.

                 

                I have one more query related to this. If there are multiple databases using the same Oracle home and only on one database we need to display this message. How can we do that?

                 


                • 5. Re: login message
                  user13364377


                  Hi EdStevens,

                   

                  Your below comments does not make sense to me.  If there are thousands of databases and only a very few databases  in read only mode, then we need to do something similar to this to alert the dba's as there will be multiple dba's working across shifts and lot of maintenance activities takes place on a regualr basis. Do you have a better idea?

                   

                  "whoever" shouldn't be allowed to start a database anyway.  The only people who should be allowed to start a database shouldn't need a special prompt to tell them how to open it.

                  • 6. Re: login message
                    sb92075

                    user13364377 wrote:

                     


                    Hi EdStevens,

                     

                    Your below comments does not make sense to me.  If there are thousands of databases and only a very few databases  in read only mode, then we need to do something similar to this to alert the dba's as there will be multiple dba's working across shifts and lot of maintenance activities takes place on a regualr basis. Do you have a better idea?

                     

                    "whoever" shouldn't be allowed to start a database anyway.  The only people who should be allowed to start a database shouldn't need a special prompt to tell them how to open it.

                     

                    why do you not set all  tablespaces to READ ONLY?

                    • 7. Re: login message
                      user13364377


                      Hi EdStevens,

                       

                      This is a far better solution. Thank you very much for the solution.