Page 1 of 1 1
Topic Options
#75551 - 2003-06-25 11:44 AM Logevents
Btaylor_uk Offline
Lurker

Registered: 2003-06-25
Posts: 3
Loc: Blackpool, UK
Hi,

I currently working on a script to automate a backup procedure for a couple of ACE servers we use.

As part of the script I need to log the backups in the application event viewer. But I have a problem with the event id's.

The current scipt we have tried is this -

If Exist ("$BACKUPPATH")=0
MD "$BACKUPPATH"
If @Error
LogEvent (1,1 'Error Creating ACE Backup Directory - @SERROR', '', ACEBackup)
EndIf
EndIf
If Exist ("$BACKUPPATH\ACEBKUP@Month@YEAR")=0
MD "$BACKUPPATH\ACEBKUP@Month@YEAR"
If @Error
LogEvent (1,1 'Error Creating ACE Backup Directory - @SERROR', '', ACEBackup)
EndIf
EndIf

Shell '$rdbms32\bin\sdbkup.bat noprompt online $ACEInstall\sdserv $BACKUPPATH\ACEBKUP@Month@YEAR\@MDAYNO@MONTHNO@YEAR'

If @ERROR
LogEvent (1,1, "ACE Server Backup - @SERROR ","", ACEBackup)
Exit
Else
LogEvent (0 ,1, "ACE Server Backup of @WKSTA Has been completed Sucessfully", "", ACEBackup )
EndIf

The main problem we have, is the events are logged like this

Event Type: None
Event Source: ACEBackup
Event Category: None
Event ID: 1
Date: 24/06/2003
Time: 10:11:10
User: N/A
Computer: DAP00009
Description:
The description for Event ID ( 1 ) in Source ( ACEBackup ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event: Backup of DAP00009 Event Logs has been completed Sucessfully.

Has anyone got any suggestions to what I can do ?

Top
#75552 - 2003-06-26 12:14 AM Re: Logevents
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
quote:
Has anyone got any suggestions to what I can do ?
Yeah, don't worry about it [Smile]

The problem is that the event service is expecting there to be a binary or dll registered on the server which has the relevant message embedded in it as a template.

It will get the message template and instantiate (is that a word?) the parameters passed to it.

Where the event service cannot locate the message in the executable/dll the default is to display the message that you see and append the parameters.

If you really want to lose the default text you will need to create a DLL or EXE with the message in it, or use a message from an existing file. The first is overly complex, the second will create confusion.

Unless there is a relevant message template in the KiXtart executable, I'd just leave it as it is.

Top
#75553 - 2003-06-25 02:59 PM Re: Logevents
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See also Event Logging with Custom Message DLL
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1363 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.03 seconds in which 0.015 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org