May 13, 2015 at 2:12 pm
Comments posted to this topic are about the item Store a file & Retrive it in Sql Server
Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature
May 29, 2015 at 2:58 am
Sir
I am trying to use your script but i found.....
this error......
Msg 102, Level 15, State 1, Line 12
Incorrect syntax near 'show advanced options'.
Msg 15123, Level 16, State 1, Procedure sp_configure, Line 51
The configuration option 'Ole Automation Procedures' does not exist, or it may be an advanced option.
Msg 102, Level 15, State 1, Line 41
Incorrect syntax near 'sp_configure'.
Configuration option 'show advanced options' changed from 0 to 0. Run the RECONFIGURE statement to install.
May 29, 2015 at 5:15 am
--Configure advance options
sp_configure 'show advanced options', 1;
go
reconfigure;
go
sp_configure 'Ole Automation Procedures', 1;
go
reconfigure;
go
execute above code first. Then use this script, modify the script according to need like path. remove above code and below code
sp_configure 'Ole Automation Procedures', 0;
go
reconfigure;
go
sp_configure 'show advanced options', 0;
go
reconfigure;
go
Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature
May 29, 2015 at 9:29 am
Does the file's source have to be on the server where SQL Server is installed? or, can this retrieve a file from a remote location, like a user's local computer accessed through an IIS web session?
May 29, 2015 at 9:45 am
It could be any where, but both place should be accessible by sql server account. It will work on a network path too or a remote location.
Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature
June 2, 2015 at 7:43 am
Thanks for the script. I need to look at it closer before trying it.
October 21, 2016 at 1:36 am
sp_configure 'Ole Automation Procedures', 0;
go
reconfigure;
go
sp_configure 'show advanced options', 0;
go
reconfigure;
go
This kind of feature disabling is dangerous, if you have other functionality on the server that relies on that,
those will stop working.
I would add code to check the configuration status first and at the end
restore status whatever it was.
October 21, 2016 at 1:32 pm
Great code but difficult to implement with security concerns.
If available to you: Polybase (SQL 2016) or FileTable(SQL 2012)
I have not yet the pleasure of using Polybase, but have implemented a FileTable production system currently with 20,000 folders and 100,000 files.
FileTable: IMO, far more functionality with more or less the same effort. Think of FileTable as integrating Windows Explorer within SQL. Security is integrated. SQL sees file events as triggers.
Some resources
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply