Kawm qhov Txoj Kev Yoojyim Kom Tsim Nyog los Tsim Tsa Alert Siv SQL Server Agent

SQL neeg ceeb toom Alerts muab Round-the-moos yuam kev ceeb toom

SQL neeg saib xyuas Agent pub qhib ceeb toom ntawm cov neeg khiav dej num cov thawj coj thaum muaj tej yam txawv tshwm sim. Txoj kev ceeb toom no muaj peev xwm ua tau 24 xuab moos xyuas qhov kev ua lag luam tsis muaj neeg ua hauj lwm rau 24 xuab moos ua haujlwm.

Kev Tseev Kom Yuav Tsum Tau Txais Kev Ceeb Toom

Yuav kom txhais tau qhov kev ceeb toom, koj xav tau tej yam lus qhia xws li:

Step-by-Step SQL Server Alert Teeb

Cov lus qhia no siv rau SQL Server 2005 thiab tshiab.

  1. Qhib SQL neeg rau zaub mov Management Studio thiab txuas mus rau database server uas koj xav tsim ib qho kev ceeb toom.
  2. Nthuav lub SQL Server Agent folder los txhaj ib zaug rau ntawm " + " icon mus rau sab laug ntawm daim nplaub tshev.
  3. Txoj cai-nias rau ntawm Alerts folder thiab xaiv New Alert los ntawm cov ntawv qhia pop-up.
  4. Ntaus ib lub npe rau koj lub ceeb toom hauv lub thawv ntawv lub npe.
  5. Xaiv hom kev qhia los ntawm daim ntawv qhia zaub mov nco. Koj xaiv yog SQL neeg rau zaub mov kev mob xws li CPU load thiab dawb disk chaw, SQL neeg rau zaub mov txheej xwm xws li ua kom raug, yuam kev syntax thiab teeb meem kho vajtse, thiab cov txheej xwm ntawm qhov rais Management Instrumentation (WMI).
  6. Muab cov lus qhia kev ceeb toom uas thov los ntawm SQL neeg rau zaub mov xws li cov ntawv nyeem muaj nyob rau hauv daim ntawv ceeb toom thiab tsis tau rau kev ua haujlwm kev ceeb toom.
  7. Nias lub pob ntawv teb rau hauv lub Ceeb Toom Tshiab Qhov Xaiv Qhov Xaiv cov nplooj pane.
  8. Yog tias koj xav ua kom muaj lub SQL Server Agent txoj hauj lwm thaum lub ceeb toom tshwm sim, nias lub Tshawb Fawb txoj hauj lwm thiab xaiv ib txoj hauj lwm los ntawm cov ntawv ceeb toom rau hauv drop-down.
  9. Yog tias koj xav qhia rau cov neeg teb chaws cov neeg teb xov tooj thaum lub ceeb toom tshwm sim, nyem Tshawb Cov Qhia Cov Neeg Tshawb Fawb thiab tom qab xaiv cov tswv thiab cov ntawv ceeb toom ntawm daim phiaj.
  1. Nyem OK los tsim cov lus ceeb toom.

Ntxiv Alerts Siv Transact-SQL

Pib nrog SQL Server 2008, koj tuaj yeem siv cov alerts siv Transact-SQL. Siv no cov syntax los ntawm Microsoft:

sp_add_alert [@name =] [, [@message_id =] message_id] [, [@severity =] severity] [, [@enabled =] enabled] [, [@delay_between_responses =] delay_between_responses] [, [@notification_message = [@include_event_description_in =] include_event_description_in] [, [@database_name =] 'database'] [, [@event_description_keyword =] 'event_description_keyword_pattern'] [, {[@job_id =] job_id | [@job_name =] 'job_name'}] [, [@raise_snmp_trap =] raise_snmp_trap] [, [@performanceability_condition =] 'performance_condition'] [, [@category_name =] 'category'] [, [@wmi_namespace =] 'wmi_namespace '] [, [@wmi_query =]' wmi_query ']