Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Monitoring Disk Space and Sending Alerts with TSQL


Monitoring Disk Space and Sending Alerts with TSQL

Author
Message
Stephen Anderson-260031
Stephen Anderson-260031
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 Visits: 81
I have a number of servers that I need to monitor, both SQL Server 2000 and 2005. I use similar code with an SSIS package to collect this information from all my servers to one database on one server. SQL Server magazine had some articles (http://www.sqlmag.com/Articles/ArticleID/95385/95385.html and http://www.sqlmag.com/Articles/ArticleID/95745/95745.html) that had information on how to set this up. Of course, you need a subscription to the magazine to read the articles.
webrunner
webrunner
Hall of Fame
Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)

Group: General Forum Members
Points: 3035 Visits: 3755

I saw the same problem. You can also click the "Print This!" button at the top of the article, and the print format has the word wrap on.

HTH,
webrunner



-------------------
"I love spending twice as long and working twice as hard to get half as much done!" – Nobody ever.
Ref.: http://www.adminarsenal.com/admin-arsenal-blog/powershell-how-to-write-your-first-powershell-script

"Operator! Give me the number for 911!" - Homer Simpson

"A SQL query walks into a bar and sees two tables. He walks up to them and says 'Can I join you?'"
Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html
j.a.c
j.a.c
Say Hey Kid
Say Hey Kid (669 reputation)Say Hey Kid (669 reputation)Say Hey Kid (669 reputation)Say Hey Kid (669 reputation)Say Hey Kid (669 reputation)Say Hey Kid (669 reputation)Say Hey Kid (669 reputation)Say Hey Kid (669 reputation)

Group: General Forum Members
Points: 669 Visits: 4458

Hi Bob,

If you are using Windows 2003 you can use WMI to get the mountpoint information that you need. Check out the Win32_Volume Class:

http://msdn2.microsoft.com/en-us/library/aa394515.aspx

Also you can query any 2003 box remotely using this class.

Andy


Yelena Varshal
Yelena Varshal
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3480 Visits: 593

Andy,

with WMI you have to be an admin on the server to use it.




Regards,
Yelena Varshal

Erin.
Erin.
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1161 Visits: 558

This is a very useful script. I have been looking for something like this. However, can you tell me how to use database mail rather than xp_sendmail since "this feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.. To send mail from SQL Server, use Database Mail." (SQL Server 2005 Books Online)

Thanks!


jullietl
jullietl
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 130
Bob,

We have a similar requirement to monitor mount points I would like to look at how you have used chkdisk and parsed the results. My email id is jullietl@yahoo.com.



thanks
gbgykkcci00000-r
gbgykkcci00000-r
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 Visits: 4
I am new to SQL2005. I received the following error when execute the SP



(3 row(s) affected)

Msg 15281, Level 16, State 1, Procedure xp_sendmail, Line 1

SQL Server blocked access to procedure 'sys.xp_sendmail' of component 'SQL Mail XPs' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'SQL Mail XPs' by using sp_configure. For more information about enabling 'SQL Mail XPs', see "Surface Area Configuration" in SQL Server Books Online.

Msg 15281, Level 16, State 1, Procedure xp_sendmail, Line 1

SQL Server blocked access to procedure 'sys.xp_sendmail' of component 'SQL Mail XPs' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'SQL Mail XPs' by using sp_configure. For more information about enabling 'SQL Mail XPs', see "Surface Area Configuration" in SQL Server Books Online.



I check on the Help inside the SQL2005 and it warn us not to use the SQL_Mail but use the Database Mail instead and I have successfully configurated the SMTP database Mail. However, how can I change the SP to use the Database Mail instead of the SQL sendMail



Thanks
gbgykkcci00000-r
gbgykkcci00000-r
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 Visits: 4
I am new to SQL2005. I received the following error when execute the SP



(3 row(s) affected)

-- Msg 15281, Level 16, State 1, Procedure xp_sendmail, Line 1

-- SQL Server blocked access to procedure 'sys.xp_sendmail' of component 'SQL Mail XPs' because this --- component is turned off as part of the security configuration for this server. A system administrator --- can enable the use of 'SQL Mail XPs' by using sp_configure. For more information about --- --

-- enabling 'SQL -- Mail XPs', see "Surface Area Configuration" in SQL Server Books Online.

-- Msg 15281, Level 16, State 1, Procedure xp_sendmail, Line 1

-- SQL Server blocked access to procedure 'sys.xp_sendmail' of component 'SQL Mail XPs' because this -

-- component is turned off as part of the security configuration for this server. A system administrator -

-- can enable the use of 'SQL Mail XPs' by using sp_configure. For more information about --

-- ng 'SQL -- l XPs', see "Surface Area Configuration" in SQL Server Books Online.



I check on the Help inside the SQL2005 and it warn us not to use the SQL_Mail but use the Database Mail instead and I have successfully configurated the SMTP database Mail. However, how can I change the SP to use the Database Mail instead of the SQL sendMail



Thanks
gbgykkcci00000-r
gbgykkcci00000-r
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 Visits: 4
I am new to SQL2005. I received the following error when execute the SP



(3 row(s) affected)

-- Msg 15281, Level 16, State 1, Procedure xp_sendmail, Line 1

-- SQL Server blocked access to procedure 'sys.xp_sendmail' of component 'SQL Mail XPs' because this --- component is turned off as part of the security configuration for this server. A system administrator --- can enable the use of 'SQL Mail XPs' by using sp_configure. For more information about --- --

-- enabling 'SQL -- Mail XPs', see "Surface Area Configuration" in SQL Server Books Online.

-- Msg 15281, Level 16, State 1, Procedure xp_sendmail, Line 1

-- SQL Server blocked access to procedure 'sys.xp_sendmail' of component 'SQL Mail XPs' because this -

-- component is turned off as part of the security configuration for this server. A system administrator -

-- can enable the use of 'SQL Mail XPs' by using sp_configure. For more information about --

-- ng 'SQL -- l XPs', see "Surface Area Configuration" in SQL Server Books Online
.



I check on the Help inside the SQL2005 and it warn us not to use the SQL_Mail but use the Database Mail instead and I have successfully configurated the SMTP database Mail. However, how can I change the SP to use the Database Mail instead of the SQL sendMail



Thanks
gbgykkcci00000-r
gbgykkcci00000-r
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 Visits: 4
I am new to SQL2005. I received the following error when execute the SP



(3 row(s) affected)

-- Msg 15281, Level 16, State 1, Procedure xp_sendmail, Line 1

-- SQL Server blocked access to procedure 'sys.xp_sendmail' of component 'SQL Mail XPs' because this --- component is turned off as part of the security configuration for this server. A system administrator --- can enable the use of 'SQL Mail XPs' by using sp_configure. For more information about --- --

-- enabling 'SQL -- Mail XPs', see "Surface Area Configuration" in SQL Server Books Online.

-- Msg 15281, Level 16, State 1, Procedure xp_sendmail, Line 1

-- SQL Server blocked access to procedure 'sys.xp_sendmail' of component 'SQL Mail XPs' because this -

-- component is turned off as part of the security configuration for this server. A system administrator -

-- can enable the use of 'SQL Mail XPs' by using sp_configure. For more information about --

-- ng 'SQL -- l XPs', see "Surface Area Configuration" in SQL Server Books Online
.




I check on the Help inside the SQL2005 and it warn us not to use the SQL_Mail but use the Database Mail instead and I have successfully configurated the SMTP database Mail. However, how can I change the SP to use the Database Mail instead of the SQL sendMail



Thanks
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