Monthly Archives: September 2007

Rows affected and Trigger Firing

SQL Server fires triggers whenever it executes a DML statemenet regardless there are records inserted/deleted/updated by the statement. E.g.:CREATE TABLE dbo.TestTrg (c1 int not null,c2 int not null PRIMARY KEY CLUSTERED(c1))GOCREATE TRIGGER dbo.TR_TestTrg_Delete ON dbo.TestTrg FOR DELETEASPRINT ‘Trigger fired’SELECT COUNT(*) … Continue reading

Posted in SQL server | Leave a comment

SQL Serevr windows console command Proxy account

For xp_cmdshell or a job runs windows console command, if the user or the job owner is a memeber of sysadmin, SQL server uses SQL service windows account to run it. If it’s not a member of sysadmin, a proxy … Continue reading

Posted in SQL server | Leave a comment