Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. unable to run xp_cmdshell from inside a stored procedure

unable to run xp_cmdshell from inside a stored procedure

Scheduled Pinned Locked Moved ASP.NET
databasesysadminsql-serverhelp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MissionSuccess
    wrote on last edited by
    #1

    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.

    K 1 Reply Last reply
    0
    • M MissionSuccess

      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.

      K Offline
      K Offline
      kubben
      wrote on last edited by
      #2

      Have you tried google? Here is a link: http://msdn2.microsoft.com/en-us/library/Aa260689(SQL.80).aspx[^] Ben

      M 1 Reply Last reply
      0
      • K kubben

        Have you tried google? Here is a link: http://msdn2.microsoft.com/en-us/library/Aa260689(SQL.80).aspx[^] Ben

        M Offline
        M Offline
        MissionSuccess
        wrote on last edited by
        #3

        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

        K 1 Reply Last reply
        0
        • M MissionSuccess

          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

          K Offline
          K Offline
          kubben
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups