Tuesday, March 6, 2012

Access the filesystem with SQL server 2005

Hi,
We've got this strange situation. I want to perform a bulk insert in
SQLserver 2005 from a file on the file system. This works OK when I use a
SQLuser. When I do the same logged in with windows account (with
administrator privileges) I get an error. I thought that when I use a
windows account, this account is used to access the file system. When you
use a SQL account then the user of the sqlserver service is used to access
the filesystem. Am I wrong or how does this work ?
TIAYes, the windows account will need access to the file on the file system as
well as be a user with enough privledges on the database to perform the
insert. Are you using BCP or are you using SSIS to do the transfer?
--
Rob Walters
Program Manager - SQL Server
"Mark Brouwers" wrote:

> Hi,
> We've got this strange situation. I want to perform a bulk insert in
> SQLserver 2005 from a file on the file system. This works OK when I use a
> SQLuser. When I do the same logged in with windows account (with
> administrator privileges) I get an error. I thought that when I use a
> windows account, this account is used to access the file system. When you
> use a SQL account then the user of the sqlserver service is used to access
> the filesystem. Am I wrong or how does this work ?
> TIA
>
>|||Thanks for the reply,
I just use a query window within the management studio. I run the sql
statement as a SQLuser and it works. I change the connection properties to
my windows account (with administrator privileges) and is stops working.
Mark
"Rob Walters [MSFT]" <RobWaltersMSFT@.discussions.microsoft.com> wrote in
message news:4BBBCCE0-EFBD-4FD4-B046-B9C5371DA9E8@.microsoft.com...[vbcol=seagreen]
> Yes, the windows account will need access to the file on the file system
> as
> well as be a user with enough privledges on the database to perform the
> insert. Are you using BCP or are you using SSIS to do the transfer?
> --
> Rob Walters
> Program Manager - SQL Server
>
> "Mark Brouwers" wrote:
>

No comments:

Post a Comment