December 6, 2011 at 10:16 am
Hi,
I know I can run a batch file with SQL Server using xp_cmdshell, but does anyone else know of a more secure way? In fact, the commands I'm running require that the user be a Domain Admin, and given that xp_cmdshell runs under the same account as SQL Server (which is not a Domain Admin account), I was hoping there'd be another way.
Any ideas?
Mike Scalise, PMP
https://www.michaelscalise.com
December 6, 2011 at 10:44 am
I'd consider using CLR for this sort of thing, but you can run a batch file via SQL Agent as a scheduled job.
The probability of survival is inversely proportional to the angle of arrival.
December 6, 2011 at 11:13 am
Under which user context would the CLR function be run?
Mike Scalise, PMP
https://www.michaelscalise.com
December 6, 2011 at 2:06 pm
I prefer SQL Agent more Secure and best way. I am using SQL Agent to run batch File also.
December 6, 2011 at 9:33 pm
Do you have any users on your server, other than "SA", that absolutely require "SA" privs for anything else other than xp_CmdShell usage?
--Jeff Moden
Change is inevitable... Change for the better is not.
December 7, 2011 at 7:46 am
Jeff Moden (12/6/2011)
Do you have any users on your server, other than "SA", that absolutely require "SA" privs for anything else other than xp_CmdShell usage?
No, I do not.
-Mike
Mike Scalise, PMP
https://www.michaelscalise.com
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply