PowerShell script to Automate monitor SQL Server error log

  • Hello Friends,

    I hope everyone doing well JJ

    Anyone can please provide me the PowerShell script  to Automate Monitoring SQL Server Error Logs with Email Alerts which is requires in HTML format  and Input as servers.txt file 

    I will appreciate your help with thissituation,Please help …

     Thanks in advance!!

    Best Regards,

    DBA

    SQL server DBA

  • Anyone can suggest me on this.

    Thanks in advance!!

    Best regards,
    Kumar

    SQL server DBA

  • A lot of times you just need to write your own. And that's usually the only way you learn to maintain and support the code.
    You can write your own script putting together the pieces in these articles and then you will know a lot more about Powershell:
    Get-content and for each
    Powershell read error log
    Convert to html
    Send email

    Sue

  • Sue_H - Tuesday, February 14, 2017 11:16 AM

    A lot of times you just need to write your own. And that's usually the only way you learn to maintain and support the code.
    You can write your own script putting together the pieces in these articles and then you will know a lot more about Powershell:
    Get-content and for each
    Powershell read error log
    Convert to html
    Send email

    Sue

    Thank you Sue for your quick response.
    I have tried all possible methods but no luck that's reason i have posted here if i can get help from Senior  Expert\DBA about this.
    If possible can you please help me on this.

    Thanks in advance!!

    Best Regards,
    DBA

    SQL server DBA

  • Database admin(DBA) - Tuesday, February 14, 2017 3:03 PM

    Sue_H - Tuesday, February 14, 2017 11:16 AM

    A lot of times you just need to write your own. And that's usually the only way you learn to maintain and support the code.
    You can write your own script putting together the pieces in these articles and then you will know a lot more about Powershell:
    Get-content and for each
    Powershell read error log
    Convert to html
    Send email

    Sue

    Thank you Sue for your quick response.
    I have tried all possible methods but no luck that's reason i have posted here if i can get help from Senior  Expert\DBA about this.
    If possible can you please help me on this.

    Thanks in advance!!

    Best Regards,
    DBA

    Please post what you have written so far, methods you have tried and what the errors are.

    Sue

  • Sue_H - Tuesday, February 14, 2017 3:08 PM

    Database admin(DBA) - Tuesday, February 14, 2017 3:03 PM

    Sue_H - Tuesday, February 14, 2017 11:16 AM

    A lot of times you just need to write your own. And that's usually the only way you learn to maintain and support the code.
    You can write your own script putting together the pieces in these articles and then you will know a lot more about Powershell:
    Get-content and for each
    Powershell read error log
    Convert to html
    Send email

    Sue

    Thank you Sue for your quick response.
    I have tried all possible methods but no luck that's reason i have posted here if i can get help from Senior  Expert\DBA about this.
    If possible can you please help me on this.

    Thanks in advance!!

    Best Regards,
    DBA

    Please post what you have written so far, methods you have tried and what the errors are.

    Sue

    Thank you Sue for the update,I have send message to you with my script.please check and update me if any modifications is required ,that is failing with different error messages.Please help 🙂

    Thanks in advance!!

    Best Regards,

    SQL server DBA

  • Database admin(DBA) - Tuesday, February 14, 2017 3:46 PM

    Thank you Sue for the update,I have send message to you with my script.please check and update me if any modifications is required ,that is failing with different error messages.Please help 🙂

    Thanks in advance!!

    Best Regards,

    No, that's not how forums work. Please post it in the forum and provide the errors you are getting. The more accurate and detailed information you can provide just helps others to figure out answers to questions. Your original post looks like it's a task assignment and no one can guess at the requirements. You may want to think about starting at making sure you understand what exactly you need to have the script do. I suspect that is part of the problem.

    Sue

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply