8 Replies Latest reply: Apr 1, 2013 10:21 AM by Girish Sharma RSS

    trruncate alert log file

    943839
      Hello,
      I have an Oracle 10g installed on Windows 2008 r2. I want to check the alert file for investigating something. But the alert log file itself is about 1.2MB, it's very hard to open with neither Wordpad nor Notepad. if i don't care the historical information, may I just open the alert log file and manually delete everything inside and save it, and do this weekly? Or you have any other good suggestion?
      the file located at:
      e:\oracle\database\product\10.2.0\admin\orcl\bdump\alert_orcl.log
        • 1. Re: trruncate alert log file
          mseberg
          Hello;

          Try using this : ( my bad, this is for Oracle 11. But you should really upgrade! )

          http://docs.oracle.com/cd/E14072_01/server.112/e10701/adrci.htm

          1.2MB is tiny.

          For Oracle 10 try using a text editor like Editpad or Textpad. I would just rename the alert log every few months.

          Here

          http://www.textpad.com/download/

          Best Regards

          mseberg

          Edited by: mseberg on Apr 1, 2013 9:25 AM
          • 2. Re: trruncate alert log file
            995200
            hi,

            For this, since you are on windows, have some more advanced Text Editor which can support some big files.

            Other than that, if you dont want your alert log to be that big, or if you want to some specific entries in the file, just move the old file or rename it before you start your activity that you want to monitor. Database server will create a new file for you and that will be truncated logically for you.

            Thanks,
            Navneet
            • 3. Re: trruncate alert log file
              943839
              this db comes with a 3rd party app, i don't have an option.
              1.2mb is very difficult to open on Wordpad and Notepad.
              is ADRCI available on 10g?
              sorry if my question is too simply. i am very new on Oracle world.
              • 4. Re: trruncate alert log file
                943839
                thank you, NavneetU:
                "move the old file or rename it" is what i thought about. i can do the similar thing in MS SQL Server. btw, do i have to stop the database when rename the alert log file?
                • 5. Re: trruncate alert log file
                  KR10822864
                  I have an Oracle 10g installed on Windows 2008 r2. I want to check the alert file for investigating something. But the alert log file itself is about 1.2MB, it's very hard to open with neither Wordpad nor Notepad. if i don't care the historical information, may I just open the alert log file and manually delete everything inside and save it, and do this weekly? Or you have any other good suggestion?
                  the file located at:
                  e:\oracle\database\product\10.2.0\admin\orcl\bdump\alert_orcl.log
                  1.2MB is small size.while compare to production environment.

                  take a backup(if needed) of alert.log file then recreate it.
                  • 6. Re: trruncate alert log file
                    Girish Sharma
                    You need to do anything :
                    Just issue these two commands at command prompt and you done :

                    c:\>ren e:\oracle\database\product\10.2.0\admin\orcl\bdump\alert_orcl.log old_alert_orcl.log

                    c:\>copy nul e:\oracle\database\product\10.2.0\admin\orcl\bdump\alert_orcl.log > nul

                    Regards
                    Girish Sharma
                    • 7. Re: trruncate alert log file
                      EdStevens
                      Girish Sharma wrote:
                      You need to do anything :
                      Just issue these two commands at command prompt and you done :

                      c:\>ren e:\oracle\database\product\10.2.0\admin\orcl\bdump\alert_orcl.log old_alert_orcl.log

                      c:\>copy nul e:\oracle\database\product\10.2.0\admin\orcl\bdump\alert_orcl.log > nul

                      Regards
                      Girish Sharma
                      Don't even need the second command. Just rename the file. Period. The next time Oracle needs to write to the alert log, it will create a new one.
                      • 8. Re: trruncate alert log file
                        Girish Sharma
                        Don't even need the second command. Just rename the file. Period. The next time Oracle needs to write to the alert log, it will create a new one.
                        Thank you Ed for pointing it.

                        Regards
                        Girish Sharma