Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
rcr69er
Constraint Violating Yak Guru
327 Posts |
Posted - 2008-05-01 : 09:16:08
|
| HiDoes anyone know the correct syntax to run a xp_cmdshell command using different sql server credentials?Thanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-05-01 : 13:03:53
|
| Didnt get your question. Are you trying to run xp_cmdshell using a non sysadmin roled member account? Are you trying to execute it by impersonating another account? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-05-01 : 13:04:30
|
| Did you setup a proxy account?Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Database maintenance routines:http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-05-01 : 13:20:03
|
| You need to setup a proxy account if you dont have one as Tara suggested.use xp_sqlagent_proxy_account extended sp for thathttp://msdn.microsoft.com/en-us/library/aa260700(SQL.80).aspx |
 |
|
|
rcr69er
Constraint Violating Yak Guru
327 Posts |
Posted - 2008-05-02 : 04:35:02
|
| HiYes I have setup a proxy account, but how would I use this account to run the package in xp_cmdshell. I am trying to run a dtexec package.Thanks |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-05-02 : 05:22:54
|
| As per books online you dont need to do anything. xp_cmdshell will automatically try to run under proxy account if the owner is not a member of sysadmin role.You need to use sp_xp_cmdshell_proxy_account to associate a proxy account to cmdshell. |
 |
|
|
|
|
|