N
NKTower
Synopsis: I'm trying to launch an SP that makes use of BULK INSERT and
getting permissions errors.
I have a stored proc - dbo.p_Import_Sales_Transactions which takes as its
single argument the path to where the data resides, having been created by
another application. (There are 4 tab-delimited files there, ready to load.)
The data has been placed on a drive local to the server. The stored proc
truncates a set of intermediate tables, then does a set of four BULK INSERT
statements. When run from SQL Server Management Studio, it runs fine.
My need is to launch the proc from an Access application running on a set of
client mahcines, with a pass-through query containing:
EXEC dbo.p_Import_Sales_Transactions 'D:\stage\'
where D:\stage\ is the path to the share from the server's viewpoint.
The Access application is linked to the database via an ODBC connection,
with SQL Server account authentication. I've no control over this.
When I try to execute the stored proc from Access, I get
You do not have permission to use the bulk load statement (#3834)
I've Google'd MS and various other places but the few things that I found
were incomprehensible to me. I'm a developer, not a DBA, and the client has
no resident SQL Server DBA - Oracle yes, MS no.
I have tried creating a SQL Server account 'bulk_inserter' and have found
a 'bulkadmin' role that I have associated with that user. 'bulk_inserter'
has dbo as default schema. I then added WITH EXECUTE AS 'bulk_inserter' to
the preamble of the stored proc, which it accepts when I execute the ALTER
but it doesn't like at run-time.
So I'm down to either of two errors:
'bulk_inserter' oesn't have permission in current security context.
or
You do not have permission to use the bulk load statement (#3834)
I feel that I'm close, but not quite there.
Surely someone else is doing this - in testing via Management Studio
interface, BULK INSERT does in 4 minutes what DoCmd.TransferText takes 40+
minutes to do.
getting permissions errors.
I have a stored proc - dbo.p_Import_Sales_Transactions which takes as its
single argument the path to where the data resides, having been created by
another application. (There are 4 tab-delimited files there, ready to load.)
The data has been placed on a drive local to the server. The stored proc
truncates a set of intermediate tables, then does a set of four BULK INSERT
statements. When run from SQL Server Management Studio, it runs fine.
My need is to launch the proc from an Access application running on a set of
client mahcines, with a pass-through query containing:
EXEC dbo.p_Import_Sales_Transactions 'D:\stage\'
where D:\stage\ is the path to the share from the server's viewpoint.
The Access application is linked to the database via an ODBC connection,
with SQL Server account authentication. I've no control over this.
When I try to execute the stored proc from Access, I get
You do not have permission to use the bulk load statement (#3834)
I've Google'd MS and various other places but the few things that I found
were incomprehensible to me. I'm a developer, not a DBA, and the client has
no resident SQL Server DBA - Oracle yes, MS no.
I have tried creating a SQL Server account 'bulk_inserter' and have found
a 'bulkadmin' role that I have associated with that user. 'bulk_inserter'
has dbo as default schema. I then added WITH EXECUTE AS 'bulk_inserter' to
the preamble of the stored proc, which it accepts when I execute the ALTER
but it doesn't like at run-time.
So I'm down to either of two errors:
'bulk_inserter' oesn't have permission in current security context.
or
You do not have permission to use the bulk load statement (#3834)
I feel that I'm close, but not quite there.
Surely someone else is doing this - in testing via Management Studio
interface, BULK INSERT does in 4 minutes what DoCmd.TransferText takes 40+
minutes to do.