I have a stored procedure that calls xp_Cmdshell to extract a PDF file from a blob to disk.
In the stored procedure it does something like this.
...
...
..
[/code]
It works well but I'm a bit concerned about allowing xp_cmdshell.
Is there another way I could do this within an SQL Stored Procedure without using xp_cmdshell?
Dazed and confused.
Remember.. 'Depression is just anger without enthusiasum'.
In the stored procedure it does something like this.
Code:
...
...
...
DECLARE @bcpCommand varchar(1000) -- Command
SET @bcpCommand = 'bcp "SELECT Invoice_PDF_Image FROM [MyDB].dbo.[Invoices] WHERE invoice = ''I18450'' " queryout "C:\Invoices\I18450.pdf" -T -n -S UKPC-02'
EXEC master..xp_cmdshell @bcpCommand;
...
..
[/code]
It works well but I'm a bit concerned about allowing xp_cmdshell.
Is there another way I could do this within an SQL Stored Procedure without using xp_cmdshell?
Dazed and confused.
Remember.. 'Depression is just anger without enthusiasum'.