unable to run xp_cmdshell from inside a stored procedure
-
i want to run a DTS package from inside a procedure like this ALTER PROCEDURE [dbo].[usp_ImportData] AS begin DECLARE @DTSRUNCommand as varchar(255) SET @DTSRUNCommand = 'DTSRUN /N ' + 'DumpPRMasterToRadhika /E /S ' + '@@MyServer' EXEC master..xp_cmdshell @DTSRUNCommand end its giving me the error sql server does not exist or access is denied please tell me which access rights i require to run it.. i am the system admin on sql-server.
-
i want to run a DTS package from inside a procedure like this ALTER PROCEDURE [dbo].[usp_ImportData] AS begin DECLARE @DTSRUNCommand as varchar(255) SET @DTSRUNCommand = 'DTSRUN /N ' + 'DumpPRMasterToRadhika /E /S ' + '@@MyServer' EXEC master..xp_cmdshell @DTSRUNCommand end its giving me the error sql server does not exist or access is denied please tell me which access rights i require to run it.. i am the system admin on sql-server.
-
Have you tried google? Here is a link: http://msdn2.microsoft.com/en-us/library/Aa260689(SQL.80).aspx[^] Ben
sir i am running it under the administrator account. i logged in to sql-server analyzer through windows authentication. That means i m running it under administrator account. Administartor are already under the sysadmin role. Still the same error.... Please i am little bit confused. help me out
-
sir i am running it under the administrator account. i logged in to sql-server analyzer through windows authentication. That means i m running it under administrator account. Administartor are already under the sysadmin role. Still the same error.... Please i am little bit confused. help me out
Pretty sure you need to enable xp_cmdShell. Something like this: USE master GO EXEC sp_configure 'show advanced options', 1 GO RECONFIGURE WITH OVERRIDE GO EXEC sp_configure 'xp_cmdshell', 1 GO RECONFIGURE WITH OVERRIDE GO EXEC sp_configure 'show advanced options', 0 GO Check out this link about half way down the article: http://sqlserver2000.databases.aspfaq.com/how-do-i-prevent-linked-server-errors.html[^] Ben