soupowertuning / script_sqlserver_alerts Goto Github PK
View Code? Open in Web Editor NEWThis is a big project to share scripts to monitor SQL Server if you don't have a tool to do that
This is a big project to share scripts to monitor SQL Server if you don't have a tool to do that
Allow specify a number of minutes to consider the alert in "CPU Utilization" alert.
Currently, just a minimum percent is possible.
Include the Id_Alert (from Aler table) to uniquely identify all alert and clear pairs...
For alerts that that runs frequently, implement a logic to allow user runs some alerts procedures continuously.
The main benefits are:
Performance
Avoids SQL Agent ends and open new SQL connection. WIth this, same connection is preserved and code will run maximum possible in same session
Make sure that are resource available in critical cases
Because code not ends, the connection resources are keep and in extreme cases, like thread starvation, the alert code can still collect and send data.
Ajustes na procedure "stpAlert_Database_Errors" e "stpXEvent_DB_Error" e no script "3.3 - XEvent Error - Job and Alert.sql" para inclusão do nome do programa que está gerando os erros. Isso facilita a encontrar as aplicações que estão gerando os erros.
stpXEvent_DB_Error
- Linha 22 - Adiciona ao select o extended event de nome da aplicação (client_app_name)
- Linhas 32 e 33 - Adiciona ao insert na tabela Log_DB_Error o retorno do extended events para a coluna client_app_name
- Linha 52 - Adiciona ao event session o client_app_name
stpAlert_Database_Errors
- Linha 56 - Adiciona a coluna [Program_Name] VARCHAR(MAX) na tabela temporária #TOP50_DB_Error que armazena os dados enviados por e-mail
- Linha 72 e 82 - Adiciona a coluna client_app_name(Gerada pelo extended event) no select (e group by) que recupera os dados dos erros
- Linhas 91, 92, 100 e 101 - Adiciona a coluna Program_Name no insert dos erros na tabela temporária #TOP50_DB_Error
- Lina 112 - Adiciona a coluna ApplicationName na tabela ##Email_HTML que envia o e-mail de alerta de erros
3.3 - XEvent Error - Job and Alert.sql
- Linha 217 - Adiciona a coluna client_app_name na primeira criação do extended event
Connection failed:
SQLState: '01000'
SQL Server Error: 772
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen
(SECDoClientHandsshake()).
Connection failed:
SQLState:'08001'
SQL Server Error:18
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SSL Security error
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.