Oracle log files and backup

(imported topic written by hanspjacobsen)

I’m still fairly new at this and am trying to create a task or fixlet that looks for some text at the end of a file which should be “databases successfully processed. No errors”. The first issue is that I’m not certain how to accomplish this.

The second issue is that the files names to search change every day “rmanback.01.01.2007.log” and “exportfull.Fri.log”. Oracel and tsm use the day and date when the backup has been run.

Would appreciate any help.

Thanks

Hans

(imported comment written by BenKus)

Hi Hans,

It seems like you have resolved part of your issue in this post: http://forum.bigfix.com/viewtopic.php?id=1192 ? Or is this a different issue?

Are all these files in the same folder? Can you give us an example of all the files you would expect to find in the folder?

Ben

(imported comment written by hanspjacobsen)

Hi Ben it is the same issue as I’ve posted earlier but I’ve got some more information for the people in charge of Oracle. What I’m uncertain about is how to resolve the issue about the log file name changing every day. The two log files are located in to separate directory that have the same file path but can be located on different disks depending on if the server is set up with more a c: disk. Talking to the Oracle people they can’t say if there is a registry key that we can use to find the file location.

Thanks for you help.

(imported comment written by jessewk)

Hi Hans,

In my experience with Oracle, there is usually a XML file pointed to by a registry key that gives you all the install locations. See this post for more details: http://forum.bigfix.com/viewtopic.php?id=1130

Once you have the path it should be easy to check for files with todays date. You’ll need to massage your relevance to get the date into a format that matches the file name. See this post and the posts linked at the end of it: http://forum.bigfix.com/viewtopic.php?id=1171

For example, here is some relevance to generate your first file name:

(
   "rmanbak." & 
   (
 (
   if
     (
       length of it = 1
     )
   then
     "0" & it 
   else
     it
 )
 of 
 (
   day_of_month of it as string
 )
 & "." & 
 (
   if
     (
       length of it = 1
     )
   then
     "0" & it 
   else
     it
 )
 of 
 (
   month of it as integer as string
 )
 & "." & year of it as string
   )
   of current date & ".log"
 )

(imported comment written by hanspjacobsen)

Thanks for the reply now I have a lot to work with.

Hans Petter