spen_lang
asked on
MS SQL - Running Executable From Stored Procedure
Hi,
I need to write a SSRS report but before the report runs data must be collected from an import file using an executable.
I have read up a little on this and have found out that it is possible to run an executable from inside a stored procedure using xp_CmdShell
By default xp_CmdShell is disabled so I have to run this script to enable it:
Is OK to then disable each option after the EXE has ran or will this cause problems as I am installing and uninstalling constantly:
Is there a better way to do this?
Thanks, Greg
I need to write a SSRS report but before the report runs data must be collected from an import file using an executable.
I have read up a little on this and have found out that it is possible to run an executable from inside a stored procedure using xp_CmdShell
By default xp_CmdShell is disabled so I have to run this script to enable it:
EXEC sp_configure 'show advanced options', 1
GO
RECONFIGURE
EXEC sp_configure 'xp_cmdshell', 1;
Go
RECONFIGURE;
Go
Is OK to then disable each option after the EXE has ran or will this cause problems as I am installing and uninstalling constantly:
EXEC sp_configure 'show advanced options', 0
GO
RECONFIGURE
EXEC sp_configure 'xp_cmdshell', 0;
Go
RECONFIGURE;
Go
Is there a better way to do this?
Thanks, Greg
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.