테이블에 트리거를 만들었으므로 이제이를 삭제하거나 변경할 수 없습니다. 테이블에 액세스 할 수도 없습니다. 어떻게해야합니까?트리거를 삭제할 수 없습니다.
트리거 스크립트 :
create trigger [Products].[InsertLessThen5InStock]
on [Products].[Products]
after update
as
BEGIN
DECLARE @ck int
select UnitsInStock from Products.Products where UnitsInStock<5
set @[email protected]@ROWCOUNT
print @ck
if @ck >0
BEGIN
DECLARE @mails varchar (200)
exec dbo.Manager_email @mails output
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'DefaultMailSender',
@recipients = @mails ,
@body = 'Products that will expire in less then 5 days',
@subject = 'Products that will expire in less then 5 days',
@body_format = 'HTML',
@query = 'EXECUTE MadCat.dbo.SaveTableAsHTML
@DBFetch =''select UnitsInStock from Products.Products where UnitsInStock<5'''
END
END
GO
왜 그것을 변경하거나 삭제할 수 없습니까? – PowerUser
시도하고 삭제하거나 변경하기 위해 실행중인 스크립트는 무엇입니까? 어떤 오류가 있습니까? '나는 테이블에 접근조차 할 수 없다 '는 말은 무엇을 의미합니까? 당신은 당신의 문제가 무엇인지, 그리고 당신이 시도한 바에 대해 더 많이 * 구체적이어야합니다. – LittleBobbyTables
나는 그것을 삭제하려고 gui 및 드롭 트리거를 던졌습니다 ... – DnL