Monday, March 26, 2012

Executing batch script from MSSQL

If I have an application running on MSSQL is it possible that if an action occurs on the application side that a stored procedure can execute a batch script?xp_cmdshell. requires certains permissions. it is likely whatever programming language you are using, also has a command for command line and it would probably be better to do it from the application instead of the database.|||OK, so probably since the application uses asp I could call a script from this side, right?|||OK, so probably since the application uses asp I could call a script from this side, right?

ASP has it's own little peculiar security issue. The package has to be executed from the security context of the IUSR_XXXX NT account that executes the pages on the web server. If this is'nt done right you can create a security problem.

Do a search on this forum using ASP and DTS as terms.|||I suggest avoiding xp_CmdShell - outta process can mean inna trouble.

What you want to do is a bit quirky, and there may be a better solution if you were to provide more details (for example, why are you seeking a synchronous solution? and what exactly is that batch script doing?).

Outta band is outta sight!

No comments:

Post a Comment