|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
developer), but it won't work for my users. I have set up a SQL Server Agent Proxy user and that does not work. Does each individual user have to have rights on the machine to read/execute the .net console application? CREATE PROCEDURE [dbo].[ssp_DownloadProcessing] ( @ItemNumber varchar(255) , @StartDate DateTime ) AS Declare @CmdLine Varchar(500) select @CmdLine = 'C:\ConDL\bin\Debug\dl.exe UpdateItem' + @ItemNumber PRINT 'Running: ' + @CmdLine EXEC master..xp_cmdshell @CmdLine, NO_OUTPUT return 0 GO Thanks! (oldboyfri***@gmail.com) writes:
> I have the following stored procedure, and it works for me (the What exactly does "does not work" mean? What error message do you get?> developer), but it won't work for my users. I have set up a SQL Server > Agent Proxy user and that does not work. Does each individual user > have to have rights on the machine to read/execute the .net console > application? If you remove NO_OUTPUT, does that tell you any interesting? -- Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp All it does is return the command line [Microsoft][ODBC SQL Server
Driver][SQL Server]Running: 'C:\ConDL\bin\Debug\dl.exe UpdateItem Widget1' Isn't it supposed to use the proxy account? Or does it do that if
xp_cmdshell is executed from a stored procedure? OK. I think I got this. Even though you have a proxy account set up,
that is not enough. You must also grant a user access to the master database and also give them rights execute the xp_cmdshell extended stored procedure. The BOL does not explain that even though you have a proxy account set up, that it does not work if you use the EXEC xp_cmdshell ... from within a stored procedure. |
|||||||||||||||||||||||