Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Security for OLE in UDF

Author  Topic 

Billpl
Yak Posting Veteran

71 Posts

Posted - 2010-10-04 : 16:35:45
Hi All,

I'm trying to copy files with OLE inside a function

Execute @hr = sp_OACreate 'Scripting.FileSystemObject', @ole_FileSystem OUT
...blah,blah

Using the sa account it works fine from the Management Console but when called by my SilverLight application (using simple SQLCommand) with sa as the connection account, I get "access denied"

....got to be some security feature I'm missing.

Thanks
Bill

Billpl
Yak Posting Veteran

71 Posts

Posted - 2010-10-04 : 19:33:16
Fixed my own problem

I thought it was a SQL configuration issue, but it turned out to be just an oversight

SQL Server Service Account was set to a special account that didn't have local Administrator rights therefor not allowing it to create objects and/or copy files

While I did have rights so everything worked fine when using SQL Management Studio.

Go to Top of Page
   

- Advertisement -