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.
| Author |
Topic |
|
bjackewicz@wishcom.net
Starting Member
2 Posts |
Posted - 2008-04-18 : 17:57:56
|
| I recently enabled OLE Automation on a SQLSERVER 2005 database in order to be able to create files directly from the DB. When I attempt to use the sp_OAMethod to open or create a file, it fails with an error code of 0x800A0046. The sp_OACreate 'Scripting.FileSystemObject' call does not return an error and returns a valid object handle. I'm guessing the error has something to do with Windows permissions but I'm not sure what I need to do to correct it? |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-04-18 : 18:01:30
|
If you don't understand the error message, how do you know where to start fixing it? E 12°55'05.25"N 56°04'39.16" |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-04-18 : 18:03:39
|
The first step is to know under which user context the query is run.Then check if that user has permissions to the directory referenced in the sp_OAMethod. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
bjackewicz@wishcom.net
Starting Member
2 Posts |
Posted - 2008-04-21 : 16:10:31
|
| Further investigation indicates that the DB service account is being used to supply the credentials for the file operations. I can get the file operations to succeed on locally attached drives by adding the DB service account to the directory security. This will not work for any networked drives or network shares. There must be a permission I'm missing somewhere? |
 |
|
|
|
|
|