Quantcast
Channel: Wsus Package Publisher
Viewing all articles
Browse latest Browse all 3825

New Post: Trigger for SQL Database din´t work

$
0
0
Hello together,

at first sorry when my english is not so good. I´m from Germany and don´t use is very often. But hopefully it is understandable.

At the company we have Server Windows Server 2008 R2, WSUS 3.2 and a SQL Server 2008 R2.

The normal installation of WSUS PP wasn´t a problem and all is function correctly.

But we have two issues since we use WSUS PP. One is a strong problem and the other is just for comfort.

The strong Problem is a Clientside problem with the WSUS. We get on numeros machines the Error Code 8024000F. The only Solution is to new install the Windows 7 (x64) and all Programms... it is a really bad Solution but the only working.
After trying much of the not working Solutions given by Microsoft and other Websites. Someone had a solution for that? This problem is since the first use of WSUS PP.

The comfort Problem is to integrate the Trigger in the SQL Database. I´m connecting to the Database with the Windows Authentication, using the Domain Administrator. The Server name is:
\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query
At the moment i have to start the SSMS and to start a new Querry with this:
SET QUOTED_IDENTIFIER ON
GO
USE SUSDB;
UPDATE [SUSDB].[dbo].[tbUpdate] SET [IsLocallyPublished] = 0 WHERE [IsLocallyPublished] <> 0
I was reading that a Trigger can be put in the SUSDB but this isn´t function correctly. This is the Code:
USE [SUSDB]
GO
/****** Object:  Trigger [dbo].[SwitchLocallyPublished]    Script Date: 07.04.2013 15:37:05 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE TRIGGER [dbo].[SwitchLocallyPublished] ON [dbo].[tbUpdate]
AFTER INSERT
NOT FOR REPLICATION
AS

begin
UPDATE [SUSDB].[dbo].[tbUpdate] SET [IsLocallyPublished] = 0 WHERE [IsLocallyPublished] <> 0
End
If i Debug the Code it say that all is correct, but If i tell he has to 'Execute' it he gives following Message:
Msg 33003, Level 16, State 1, Procedure SwitchLocallyPublished, Line 8
DDL statement is not allowed.
I hope my english wasn´t to bad. If it was please feel free to ask questions.

Viewing all articles
Browse latest Browse all 3825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>