Iv'e been try to get an automated web page created using the web assistant on my MainArticles database whenever I change data in a table one of the tables
I created a trigger on the table which runs the following code
CREATE TRIGGER tr_tblMain_createMainArticlesIncludeFile ON [dbo].[tblMain]
FOR INSERT, UPDATE, DELETE
AS
EXECUTE sp_makewebtask @outputfile = 'H:\\Inetpub\@query = 'SELECT TOP 1 txtImageName, intImageWidth, intImageHeight, txtAltTag, txtTitle, dbo.TidyUpSpaces(dbo.InsertEmaillinks(dbo.InsertHyperlinks(dbo.fnGetFirst2Paragraphs(txtMainText)))), ID FROM tblMain ORDER BY dteDatePosted DESC, ID DESC
SELECT TOP 4 ID, txtTitle FROM tblMain WHERE ID NOT IN (SELECT TOP 1 ID FROM tblMain ORDER BY dteDatePosted DESC, ID DESC) ORDER BY dteDatePosted DESC, ID DESC', @templatefile = 'H:\\Inetpub\ @dbname = 'MainArticlesdb', @rowcnt = 3
GO
But whenever it runs I get the following error:
EXECUTE permission denied on object 'sp_makewebtask', database 'master', owner 'dbo'.
Microsoft OLE DB Provider for ODBC Drivers error '80040e09'
[Microsoft][ODBC SQL Server Driver][SQL Server]EXECUTE permission denied on object 'sp_makewebtask', database 'master', owner 'dbo'.
I'm not sure how I should set permission on this table to allow execution. I could simply put
GRANT EXECUTE ON sp_makewebtask TO public
but feel this would be a security issue giving too much access. what I really need to do is give the database in which the trigger is permission to run sp_makewebtask. Can anyone advise. The database owner of the database that runs the trigger is dbo.
Thanks
Andy
I created a trigger on the table which runs the following code
CREATE TRIGGER tr_tblMain_createMainArticlesIncludeFile ON [dbo].[tblMain]
FOR INSERT, UPDATE, DELETE
AS
EXECUTE sp_makewebtask @outputfile = 'H:\\Inetpub\@query = 'SELECT TOP 1 txtImageName, intImageWidth, intImageHeight, txtAltTag, txtTitle, dbo.TidyUpSpaces(dbo.InsertEmaillinks(dbo.InsertHyperlinks(dbo.fnGetFirst2Paragraphs(txtMainText)))), ID FROM tblMain ORDER BY dteDatePosted DESC, ID DESC
SELECT TOP 4 ID, txtTitle FROM tblMain WHERE ID NOT IN (SELECT TOP 1 ID FROM tblMain ORDER BY dteDatePosted DESC, ID DESC) ORDER BY dteDatePosted DESC, ID DESC', @templatefile = 'H:\\Inetpub\ @dbname = 'MainArticlesdb', @rowcnt = 3
GO
But whenever it runs I get the following error:
EXECUTE permission denied on object 'sp_makewebtask', database 'master', owner 'dbo'.
Microsoft OLE DB Provider for ODBC Drivers error '80040e09'
[Microsoft][ODBC SQL Server Driver][SQL Server]EXECUTE permission denied on object 'sp_makewebtask', database 'master', owner 'dbo'.
I'm not sure how I should set permission on this table to allow execution. I could simply put
GRANT EXECUTE ON sp_makewebtask TO public
but feel this would be a security issue giving too much access. what I really need to do is give the database in which the trigger is permission to run sp_makewebtask. Can anyone advise. The database owner of the database that runs the trigger is dbo.
Thanks
Andy