SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


No Outlook for Alerts!


No Outlook for Alerts!

Author
Message
rscarlson
rscarlson
SSC-Enthusiastic
SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)

Group: General Forum Members
Points: 104 Visits: 6
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/rcarlson/nooutlookforalerts.asp



Dale Corey
Dale Corey
Right there with Babe
Right there with Babe (739 reputation)Right there with Babe (739 reputation)Right there with Babe (739 reputation)Right there with Babe (739 reputation)Right there with Babe (739 reputation)Right there with Babe (739 reputation)Right there with Babe (739 reputation)Right there with Babe (739 reputation)

Group: General Forum Members
Points: 739 Visits: 4

Roy,

Pretty slick! By the way, you know that MAPI is a goner in 2005?




All the best,

Dale

Author: An Introduction to SQL Server 2005 Management Studio
noeld
noeld
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10078 Visits: 2048

One more thing: Isn't it possible to filter also on the DATE in the query?

btw: Very nice script!




* Noel
Grazyna Trzesicka
Grazyna Trzesicka
SSC-Enthusiastic
SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)

Group: General Forum Members
Points: 112 Visits: 1
Sorry, but I cannot find Win32_NTLogEvent anywhere. What is it - an mssql table, a file?
philcart
philcart
SSCarpal Tunnel
SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)

Group: General Forum Members
Points: 4358 Visits: 1436

Good article. Just proves there is more than one way to skin a cat

"I cannot find Win32_NTLogEvent anywhere"
This is a WMI class. There is a whole bunch of them in Windows http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/wmi_reference.asp

"...you know that MAPI is a goner in 2005"
Well it's not actually gone, it's still there but you have the option of using a new thing called DatabaseMail which is SMTP based. Realistically, I don't know that many DBA's given the option would use SQL Mail and rely on MAPI and Exchange.



Hope this helps
Phill Carter
--------------------
Colt 45 - the original point and click interface

Australian SQL Server User Groups - My profile
Phills Philosophies
Murrumbeena Cricket Club
rscarlson
rscarlson
SSC-Enthusiastic
SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)

Group: General Forum Members
Points: 104 Visits: 6

If you go to command prompt and type in wbemtest and enter.

Hit connect.

Change the location from:

root\default to root\cimv2 and hit login

Hit enumerate classes, use recursive radio button, hit ok

You will no have a list of all the classes and their properties. You can scroll down to Win_NTLogEvent to see the properties in the middle window.

Or you can cut and paste this script as ClassInfo.vbs

Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20

On Error Resume Next

arrComputers = Array(".")

For Each strComputer In arrComputers
WScript.Echo
WScript.Echo "=========================================="
WScript.Echo "Computer: " & strComputer
WScript.Echo "=========================================="

strClass = "Win32_NTEventLog"
Get objWMIService = _
GetObject("winmgmts:{impersonationLevel=impersonate}root\cimv2")

Set colClasses = objWMIService.ExecQuery("SELECT * FROM " & strClass, "WQL", _
wbemFlagReturnImmediately + wbemFlagForwardOnly)

i = 0
For Each objClass In colClasses
i = i + 1
If i = 1 Then
WScript.Echo "* Properties *"
For Each objProperty In objClass.Properties_
WScript.Echo objProperty.Name
Next

WScript.Echo vbNewLine & "* Methods *"
For Each objMethod In objClass.Methods_
WScript.Echo objMethod.Name
Next
End If
Next

Next

Hope this helps





rscarlson
rscarlson
SSC-Enthusiastic
SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)

Group: General Forum Members
Points: 104 Visits: 6

Sorry the line strClass = "Win32_NTEventLog"

Should read:

strClass = "Win32_NTLogEvent"





Ryan-209402
Ryan-209402
SSC Veteran
SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)

Group: General Forum Members
Points: 299 Visits: 101
There are several lines in Alert.vbs that reference Microsoft's site. If my SQL server does not have HTTP access do the web what are my options here? Thanks.

objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'name of notesserverhost ?
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"mailserver"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
rscarlson
rscarlson
SSC-Enthusiastic
SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)

Group: General Forum Members
Points: 104 Visits: 6

No http - no go.

You could redirect the output to open an instance of word, excel, etc., then use this accross the lan but there are some issues with this especially with XP, SP2. I will consider this for a future article.





Bart Snyder
Bart Snyder
SSC Rookie
SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)

Group: General Forum Members
Points: 27 Visits: 7

I get this error when I try and run the script. Any thoughts.

[Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search