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 |
lmorelli
Starting Member
3 Posts |
Posted - 2011-08-10 : 18:04:04
|
I am launching a utility via stored proc/xp_cmdshell that performs printing functions. It appears that the security context the job runs in does not have access to any printers. Has anyone worked through this issue? I tried adding the SQL AGENT service to a printer with no luck. Would the context be the same for SQL management studio calling xp_cmdshell in a script window as well as being called from stored procedures in code? Thanks - Lou |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
lmorelli
Starting Member
3 Posts |
Posted - 2011-08-10 : 18:49:11
|
Why not? What solution do you recommend? |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
lmorelli
Starting Member
3 Posts |
Posted - 2011-08-11 : 00:36:44
|
The app I call returns instantly, so I'm not concerned about hangs. |
 |
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2011-08-11 : 03:05:58
|
Starting external applications using xp_cmdshell is generally not recommended, but could be justified in some scenarios. You'll have to be aware of the risks though...one being as Tara says; an application hang of some sort. But if this xp_cmdshell is triggered from sql server agent it would be the agent service account that would need printer permissions, otherwise it would be the sql server engine service account.- LumbagoMy blog-> http://thefirstsql.com/2011/07/08/how-to-find-gaps-in-identity-columns-at-the-speed-of-light/ |
 |
|
|
|
|