Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Error: Access is denied while writing output using sqlcmd in xp_cmdshell Expand / Collapse
Author
Message
Posted Friday, October 22, 2010 12:48 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Saturday, July 23, 2011 12:40 AM
Points: 68, Visits: 88
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).

Post #1008979
Posted Friday, October 22, 2010 3:57 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 11:58 AM
Points: 823, Visits: 3,314
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
Post #1009056
Posted Friday, October 22, 2010 8:11 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 11:31 AM
Points: 1,618, Visits: 20,833
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
Post #1009222
Posted Thursday, February 09, 2012 8:03 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, April 03, 2012 12:45 PM
Points: 2, Visits: 29
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 #1249729
Posted Saturday, February 11, 2012 3:17 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, May 17, 2012 4:25 AM
Points: 12, Visits: 13
Post your statement please.
Post #1250686
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse