Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Xp_cmdshell
Message
From
21/10/2003 10:24:14
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Import/Export
Title:
Xp_cmdshell
Miscellaneous
Thread ID:
00840658
Message ID:
00840658
Views:
40
Afternoon all,

I have a small vb6 app which connects to sql 7 and imports and exports text files using bcp commands. My problem is this, non sa users are unable to run the bcp commands. I've been looking through the sql help and found the following info...

"When xp_cmdshell is invoked by a user who is a member of the sysadmin
fixed server role, xp_cmdshell will be executed under the security
context in which the SQL Server service is running. When the user is
not a member of the sysadmin group, xp_cmdshell will impersonate the
SQL Server Agent proxy account, which is specified using
xp_sqlagent_proxy_account. If the proxy account is not available,
xp_cmdshell will fail. This is true only for Microsoft® Windows NT®
4. and Windows 2000. On Windows 9.x, there is no impersonation and
xp_cmdshell is always executed under the security context of the
Windows 9.x user who started SQL Server.

Note In earlier versions, a user who was granted execute permissions
for xp_cmdshell ran the command in the context of the MSSQLServer
service's user account. SQL Server could be configured (through a
configuration option) so that users who did not have sa access to SQL
Server could run xp_cmdshell in the context of the SQLExecutiveCmdExec
Windows NT account. In SQL Server 7.0, the account is called
SQLAgentCmdExec. Users who are not members of the sysadmin fixed
server role now run commands in the context of this account without
specifying a configuration change."

My question is this, how do I setup/use this 'SQLAgentCmdExec' account which I'm hoping will allow the users to import/export the text files via the app.

Thanks in advance for any help

James
Next
Reply
Map
View

Click here to load this message in the networking platform