T-SQL to Disable/Enable Job in SQL Server 2005
From the msdb..sysjobs, the required job_id for enable or disable to be taken.
select * from msdb..sysjobs
T-SQL to dis-enable specific job in sql server
EXEC msdb..sp_update_job @job_id = '770F175B-C8A0-4157-BACD-0AF129DF570C', @enabled = 0
T-SQL to enable specific job in sql server
EXEC msdb..sp_update_job @job_id = '770F175B-C8A0-4157-BACD-0AF129DF570C', @enabled = 1
Friday, July 16, 2010
Monday, July 12, 2010
Triggers View
SELECT * FROM sys.server_triggers
select * from sys.triggers
disable trigger trg_create_table_with_pk on database
enable trigger trg_create_table_with_pk on database
disable trigger connection_limit_trigger on all server
enable trigger connection_limit_trigger on all server
DISABLE TRIGGER HumanResources.dEmployee ON HumanResources.Employee;
ENABLE TRIGGER HumanResources.dEmployee ON HumanResources.Employee;
select * from sys.triggers
disable trigger trg_create_table_with_pk on database
enable trigger trg_create_table_with_pk on database
disable trigger connection_limit_trigger on all server
enable trigger connection_limit_trigger on all server
DISABLE TRIGGER HumanResources.dEmployee ON HumanResources.Employee;
ENABLE TRIGGER HumanResources.dEmployee ON HumanResources.Employee;
Subscribe to:
Posts (Atom)