January 31, 2014 at 9:33 am
It's easy, but a reference that shows beginners how we take some data, perhaps performance or other data in a query and export it as an HTML report that can be viewed/ mailed/etc.
April 5, 2014 at 7:02 pm
Steve Jones - SSC Editor (1/31/2014)
It's easy, but a reference that shows beginners how we take some data, perhaps performance or other data in a query and export it as an HTML report that can be viewed/ mailed/etc.
I missed this post. Got any takers yet, Steve?
--Jeff Moden
Change is inevitable... Change for the better is not.
April 6, 2014 at 8:15 am
There is a really comprehensive cmdlet and tutorial that I use: http://gallery.technet.microsoft.com/scriptcenter/PowerShell-HTML-Notificatio-e1c5759d
Seeing as I don't think that can be beat, I'd like to offer an alternative of SQL -> PowerShell -> Excel with sheets and formulas. I could put that together if you were interested.
April 6, 2014 at 8:42 am
Cody K (4/6/2014)
There is a really comprehensive cmdlet and tutorial that I use: http://gallery.technet.microsoft.com/scriptcenter/PowerShell-HTML-Notificatio-e1c5759dSeeing as I don't think that can be beat, I'd like to offer an alternative of SQL -> PowerShell -> Excel with sheets and formulas. I could put that together if you were interested.
Nice link. Just curious... how would you schedule such a thing to be emailed to a group of users at 8:AM every morning?
t would also be awesome if you could show how you would do the same thing with the results of a query.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 7, 2014 at 9:02 am
No takers, and it would be nice to see this article.
No offense, but your script isn't an article with explanation. It's not written as a short guide to lead people through the process.
April 10, 2014 at 8:21 am
I've written several PoSH scripts that access a SQL Server database and send alert emails, HTML formatted, using the Send-MailMessage cmdlet. The script can also sends a basic email to a pager/cell as an SMS message using the Net.Mail.SmtpClient object.
I could put something together if interested.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Alan Smith
April 10, 2014 at 8:33 am
That's awesome but my question still remains. What are you good folks using to schedule the runs?
--Jeff Moden
Change is inevitable... Change for the better is not.
April 10, 2014 at 8:40 am
Jeff,
It depends on what the job is doing. If the job requires to access server metadata, like service states, then I usually use a Scheduled Task and it generally works well enough and does not affect SQL Server CPU.
If the job is more SQL Server oriented, then I have used a SQL Server Agent job and an operator with server credentials since Powershell 2.0 is not really supported natively in SQL Server 2008.
Mostly it depends on the security setup on the server which way is the most practical.
~~~~~~~~~~~~~~~~~~~~~
Alan Smith
April 10, 2014 at 9:17 am
Thanks, Alan.
Correct me if I'm wrong... on the SQL Agent side of the house that you mentioned, if the PoSH code connects to the SQL server, wouldn't that would mean that you're actually consuming 2 connections? 1 by the agent job and 1 by the Posh code?
--Jeff Moden
Change is inevitable... Change for the better is not.
April 10, 2014 at 1:08 pm
So just to clarify, who is the taker? 😀
Shawn Melton
Twitter: @wsmelton
Blog: wsmelton.github.com
Github: wsmelton
April 10, 2014 at 4:04 pm
It this hasn't been claimed yet, I'd like to take it. I'm working quite a bit with Powershell and formatted output right now, this would fit nicely...
April 11, 2014 at 8:48 am
Tracy, take it.
April 12, 2014 at 9:12 am
Steve Jones - SSC Editor (4/11/2014)
Tracy, take it.
Alrighty then, consider it taken...
April 15, 2014 at 8:24 pm
Thanks, Tracy
Viewing 14 posts - 1 through 13 (of 13 total)
You must be logged in to reply to this topic. Login to reply