Tagged Questions
2
votes
2answers
84 views
Is there a way that I can export a list of all table triggers on a server?
I have two SQL Server instances that I manage. One is a SQL Server 2000 instance, and the other is 2005.
Some where, on these servers, I recall setting up a couple table triggers that were executed ...
2
votes
2answers
303 views
Securely Send Database Mail via an Insert Trigger
I have spent about 30 hours so far trying to get sp_send_dbmail to work. I finally got SOMETHING to work, but I have serious doubts as to its security. I would like know a method which is better yet ...
3
votes
1answer
116 views
Restrict record to be update or deleted according to dates inside row for SQL Server 2005
I have transaction replication between two SQL Servers. For testing purposes I deleted a lot of records at the subscriber that still existed at the publisher.
I now know that if someone updates, ...
1
vote
1answer
222 views
Performance of SQL Server Triggers
I'm coming from an Oracle/PostgreSQL background and have a hard time coping with the limits of SQL Server's trigger implementation.
I want to update two different datetime columns if the value of a ...
3
votes
1answer
142 views
Error when UPDATE all rows
When I update a single row, it works fine. But when I update all rows with:
UPDATE cad_bilhetes
SET ligacao_acobrar = 'False'
I get the following error:
Msg 512, Level 16, State 1, Procedure ...
2
votes
1answer
85 views
Is it possable to do a ALL SERVER DML Trigger?
My department works on converting a client's database when a client switches from another company to us. We have a RDP session they can connect to and see our software with their data. Once they ...
5
votes
1answer
160 views
Triggers and the Transaction
We recently made a change to create constraints based on logic previously used in stored procedures, and part of that included the use of INSTEAD OF triggers to centralize logic.
The logic is ...
1
vote
1answer
463 views
SQL Server sp_send_dbmail Query Error
EXEC msdb.dbo.sp_send_dbmail
@recipients= 'test@test.com',
@copy_recipients = 'test@test.com',
@query = 'SELECT * FROM INSERTED',
@attach_query_result_as_file = 1,
@subject = 'Auto-Generated Deleted ...
2
votes
1answer
356 views
SQL Server Logon Trigger causing problems with the Distributed Transaction Coordinator
I've created the following simple logon trigger on my SQL Server 2005:
CREATE TRIGGER LOGON_RESTRICTION ON ALL SERVER
FOR LOGON
AS
BEGIN
PRINT 'Hello World'
END
GO
Which seems to be working fine ...
9
votes
3answers
1k views
How to change the firing order of Triggers?
Realy I rarely use triggers. So I met a problem at first time. I have a lot of tables with triggers (2 or more for every table). I would like to know and change the order of firing triggers for every ...