Author |
Message |
LeeD
Joined: 17 May 2007 Posts: 311 Country: New Zealand |
|
Event Server Database change |
|
Hi, I'm trying to get event server to watch for database change but the account I want to use to connect via odbc has a blank password and the password field is mandatory in the event wizard. How can I get around that?
Cheers
|
|
Tue Nov 27, 2007 4:44 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7949
|
|
|
|
What kind of database are you connecting to?
|
|
Tue Nov 27, 2007 5:02 pm |
|
 |
LeeD
Joined: 17 May 2007 Posts: 311 Country: New Zealand |
|
|
|
sql via odbc.
|
|
Tue Nov 27, 2007 5:02 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7949
|
|
|
|
Good. In the ODBC profile settings for this connection choose Windows authentication option. In that case, the user/password values sent by the event server will be ignored so you can enter anything there, for example, 5 stars for the user name and same for the password.
|
|
Tue Nov 27, 2007 5:09 pm |
|
 |
LeeD
Joined: 17 May 2007 Posts: 311 Country: New Zealand |
|
|
|
Ok, I;ve tried that and could not see any action. I've also done the following in turn with no luck at any point;
Changed the Event server service to log on as an account with access to the database, as the odbc connection used windows auth.
Put the username and password of that account into the event definition
Changed the action on the event to write event log rather than GUI popup.
The only thing I see that is relevant is an event log warning
"Event 'b2k signed off' has entered degrade mode."
This is the event in question. What does degrade mode mean? It's not in the doco.
Also on this type of event when does the event get it's control value ie the initial value for the query return to compare subsequent queries to, and how does it store that value? Is that value persistent beyond an event server service restart?
|
|
Tue Nov 27, 2007 6:35 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7949
|
|
|
|
That means that the assigned event monitor has tried unsuccessfully checking event conditions and finally gave up on the event because of the event definition or setup preventing it from running normally.
Now back to Windows Authentication. Please ensure that the account running the service is enabled in the SQL Server (you actually have an enabled login for that account). If it is not, no matter how hard it tries, it would not be able to logon to the database.
|
|
Tue Nov 27, 2007 7:09 pm |
|
 |
LeeD
Joined: 17 May 2007 Posts: 311 Country: New Zealand |
|
|
|
Ok, I've just logged into the server with the account in question, opened management studio and run the query using windows authentication. I've tested the odbc connection with the odbc test utility from
http://www.datadirect.com/support/downloads/tools/index.ssp
and that is fine too.
I'm assuming that these steps confirm that I am getting a connection.
The query that I am running returns a single column and row with either 1 or 0 in it, and I want to act when it is 0.
use *dbase* select *column* from *table* (nolock) where *other column* = 'XXXXXXX'
|
|
Tue Nov 27, 2007 7:28 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7949
|
|
|
|
You are actually trying to run 2 SQL statements, not 1. You are trying to run "use" and "select" I don't know if that is a problem. According to docs you need to specify a single SQL query, not a single line containing multiple queries.
I am not familiar with DataDirect driver for SQL Server. But I know that if you use the standard SQL Server driver that is installed on every computer by default with Windows, you can specify in the connection properties which database to use with the profile and you can also use the Test Connect button right in the profile properties to test for successful connection. Therefore if you specify the database there, you don't need to add it to the query.
If you decide to stick with the DataDirect, you also don't need to prefix the query with the "use database", you can simple modify the query as
select *column* from *database*.dbo.*table* (nolock) where *other column* = 'XXXXXXX'
And lastly, to avoid problems with the table data, change the query again to account for potential situation when no row with the required condition is available in the table
select isNull(max(*column*), 0) from *database*.dbo.*table* (nolock) where *other column* = 'XXXXXXX'
|
|
Tue Nov 27, 2007 11:29 pm |
|
 |
LeeD
Joined: 17 May 2007 Posts: 311 Country: New Zealand |
|
|
|
Thanks, taking the use off seems to have worked.
However; the event log entry that this wrote comes out like this;
The description for Event ID ( 0 ) in Source ( 24x7 Event Server ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: source signed off
The last three words are the text I put into event server.
Anything I can do about this?
|
|
Wed Nov 28, 2007 5:15 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7949
|
|
|
|
Sorry, I didn't get it. The event is setup to write to event log when it is fired. You get in the log what you placed into the event action. So, what is wrong with that?
|
|
Wed Nov 28, 2007 5:20 pm |
|
 |
LeeD
Joined: 17 May 2007 Posts: 311 Country: New Zealand |
|
|
|
I'm just a bit surpised to see all this stuff
"the description for Event ID ( 0 ) in Source ( 24x7 Event Server ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: "
|
|
Wed Nov 28, 2007 5:21 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7949
|
|
|
|
This is a standard Windows inserted prefix for every event that doesn't have a compiled message resource DLL. This prefix appears only for custom user-defined messages recorded in the event log. Please ignore this prefix and pay attention to the last part only. Note that similar prefixes appear in many other events generated by other applications.
Last edited by SysOp on Wed Nov 28, 2007 7:47 pm; edited 1 time in total |
|
Wed Nov 28, 2007 7:45 pm |
|
 |
LeeD
Joined: 17 May 2007 Posts: 311 Country: New Zealand |
|
|
|
Ok Thats fine then.
|
|
Wed Nov 28, 2007 7:45 pm |
|
 |
|