Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

proxy login account can't execute xp_cmdshell

Posted on 2011-09-16
5
Medium Priority
?
294 Views
Last Modified: 2012-05-12
Thsi really weird to me and I really dunno how to fix it.

1: Login has been granted for Database role "CanUseXP_cmdshell" and it has access in master db.
2: when I test the login it says access is denied.
3: hwen I try to access the path using windows with using this login it works to display me the directory.
4: XP_cmdshell has been set to 1 in sp_configure
5: Few logins which have same privileged have no issues to execute the xp_cmdshell
I also have my test server where the same users exist and connected to the same path and it works fine from test server

what am I missing  which caused the login cannot use to execute xp_cmdshell ?
0
Comment
Question by:motioneye
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 3

Accepted Solution

by:
clinker83 earned 2000 total points
ID: 36550101
What version of Windows Server and SQL are you using?

I've recently seen problems with cmdshell in Server 2008 with SQL 2005 where we had agent jobs which had steps with cmdshell not working properly. The solution was to map drives, providing user credentials, where script needed access to files.

If your cmdshell is trying to access files you may need to script the mapping of a drive:
E.G.
net use Z: \\servername\sharename password /user:username
0
 

Author Comment

by:motioneye
ID: 36550213
Hi,
We are using sql2008 std edition. Let me try with the suggestion then come back to u guys
0
 

Author Comment

by:motioneye
ID: 36550595
Thanks it work,
But I curious ...


when I ran under my context, it display me the folder, but I do not have access to the folder below

exec master..xp_cmdshell 'dir \\servername22\sharedfolder$\pckg\*.*'
select SUSER_SNAME()
select @@servername
revert

Then I try from the other sql instance query with same command above, it says "access is denied " You have any explanation for this ?
0
 
LVL 3

Expert Comment

by:clinker83
ID: 36553376
No perhaps someone else might have some ideas. We were mapping the drive as a workaround solution. We assumed than it was a bug in Server2k8 missed by Microsoft.
0
 
LVL 3

Expert Comment

by:clinker83
ID: 36553377
No perhaps someone else might have some ideas. We were mapping the drive as a workaround solution. We assumed than it was a bug in Server2k8 missed by Microsoft.
0

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question