PC Review


Reply
Thread Tools Rate Thread

WMI query with categorystring

 
 
Dirk
Guest
Posts: n/a
 
      23rd Jun 2004
When doing a query towards a Win2K box the below SQL statement:

select * from win32_ntlogevent where logfile='Security' and
sourcename='Security' and categorystring='Account Logon' and eventcode='680'
and recordnumber> 10

I get no matching records

If I do
select * from win32_ntlogevent where logfile='Security' and
sourcename='Security' and category=9 and eventcode='680' and recordnumber>
10
I do get matching records

From my understanding category=9 is the same as categorystring='Account
Logon'


Any ideas when a query using the "categorystring" isn't returning matching
records while doing it with category it is.
And IF I can only use category in the query instead of categorystring, is
there somewere a full list of category(string)s? That way I can at least
show my uses a list of what they can select.


dirk;







 
Reply With Quote
 
 
 
 
Jason Lee \(MSFT\)
Guest
Posts: n/a
 
      28th Jun 2004
If you run the second query (with category=9) in wbemtest, and then open one
of the returned entries, is the category string what you expect? ('Account
Logon')

-Jason

"Dirk" <dirk@nospam_to_remove_ofcourse.woodstone.nu> wrote in message
news:(E-Mail Removed)...
> When doing a query towards a Win2K box the below SQL statement:
>
> select * from win32_ntlogevent where logfile='Security' and
> sourcename='Security' and categorystring='Account Logon' and
> eventcode='680'
> and recordnumber> 10
>
> I get no matching records
>
> If I do
> select * from win32_ntlogevent where logfile='Security' and
> sourcename='Security' and category=9 and eventcode='680' and recordnumber>
> 10
> I do get matching records
>
> From my understanding category=9 is the same as categorystring='Account
> Logon'
>
>
> Any ideas when a query using the "categorystring" isn't returning matching
> records while doing it with category it is.
> And IF I can only use category in the query instead of categorystring, is
> there somewere a full list of category(string)s? That way I can at least
> show my uses a list of what they can select.
>
>
> dirk;
>
>
>
>
>
>
>



 
Reply With Quote
 
Dirk
Guest
Posts: n/a
 
      28th Jun 2004
I tried it from within VB and that was the string I got back.

That's also what you see using the eventviewer.

dirk.

"Jason Lee (MSFT)" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> If you run the second query (with category=9) in wbemtest, and then open

one
> of the returned entries, is the category string what you expect?

('Account
> Logon')
>
> -Jason
>
> "Dirk" <dirk@nospam_to_remove_ofcourse.woodstone.nu> wrote in message
> news:(E-Mail Removed)...
> > When doing a query towards a Win2K box the below SQL statement:
> >
> > select * from win32_ntlogevent where logfile='Security' and
> > sourcename='Security' and categorystring='Account Logon' and
> > eventcode='680'
> > and recordnumber> 10
> >
> > I get no matching records
> >
> > If I do
> > select * from win32_ntlogevent where logfile='Security' and
> > sourcename='Security' and category=9 and eventcode='680' and

recordnumber>
> > 10
> > I do get matching records
> >
> > From my understanding category=9 is the same as categorystring='Account
> > Logon'
> >
> >
> > Any ideas when a query using the "categorystring" isn't returning

matching
> > records while doing it with category it is.
> > And IF I can only use category in the query instead of categorystring,

is
> > there somewere a full list of category(string)s? That way I can at

least
> > show my uses a list of what they can select.
> >
> >
> > dirk;
> >
> >
> >
> >
> >
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Access metadata repository generation query, matrix generationquery, table-generation query, array-generation query. Roy Roebuck Microsoft Access Database Table Design 1 20th Dec 2008 08:23 PM
Set sub (embedded?) query parameters using VBA, call sub query in primary query with parameters completed Kelii Microsoft Access 4 5th Feb 2007 04:01 AM
verfiy a query like Query Analyzer's parse query function =?Utf-8?B?a2V2aW4=?= Microsoft C# .NET 1 24th Dec 2005 02:33 AM
Categorystring Dirk Windows XP WMI 1 8th Jul 2004 05:54 AM
'Sanity Check' - combine macro, delete query and make table query Mike Webb Microsoft Access Queries 2 17th Feb 2004 03:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:50 PM.