Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Permissions on sp_makewebtask error

Status
Not open for further replies.

AndyH1

Programmer
Joined
Jan 11, 2004
Messages
350
Location
GB
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
 
Sorry but I thought additional information may be useful. I have a local development version of this code running on my laptop which uses win 2003 server with MS SQL 2000 (SP3) and there is no problem it runs fine. On the main server (which is windows 2000 server with MS SQL 2000 (SP3) I get this error. I checked my local version and sp_makewebtask does not have execute permission for public or guest so it doesn't look as if this is the problem.
Thanks
Andy
 
More information. My sql server is set to use sql authentication is server properties, the remote server is set to windows authentication. Granting public execute permission on sp_makewebtask gives the following (different error)
[Microsoft][ODBC SQL Server Driver][SQL Server]Only members of the sysadmin role can execute this stored procedure

Any suggestions on how I can work round this

Thanks
Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top