Error: Access is denied while writing output using sqlcmd in xp_cmdshell

  • Hi,

    How can we solve the issue of Error: Access is denied while writing output using sqlcmd in xp_cmdshell.

    Exact ERROR: Sqlcmd: Error: Error occurred while opening or operating on file D: (Reason: Access is denied).

  • you need permission to run xp_cmdshell, if id not belongs to sysadmin then provide grant permission on that id and add that user in master as well

    ----------
    Ashish

  • ranganathan.arumugham (10/22/2010)


    Hi,

    How can we solve the issue of Error: Access is denied while writing output using sqlcmd in xp_cmdshell.

    Exact ERROR: Sqlcmd: Error: Error occurred while opening or operating on file D: (Reason: Access is denied).

    Check if the SQL Server service account has permissions on the file D:\*****

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • Actually i also getting same error, i added sqlservice acct to that folder,i dnt know what i have to do?any0ne please post your suggestion.

  • Post your statement please.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply