Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Bulk Insert without administrator privileges

Status
Not open for further replies.

dafdba

Technical User
Dec 6, 2002
10
NL
We have an application running on SQL Server 2000 where all users occasionally have to run a stored procedure which does a bulk insert from a text-file. According to Microsoft article Q302621( you need a lot of privileges to do this, which we don’t want to give to the application users. One of the options is to create tables owned by the user which has to do the bulk insert and give that user the bulkadmin role. This isn’t a problem when you only have 1 user who needs to do the bulk insert, but all application users must have this possibility. Another option is to use bcp, but then you need the extended stored procedure xp_cmdshell to start bcp from a stored procedure, and we don’t want to give users permissions on xp_cmdshell.

Does anybody know how to solve this without giving users to much privileges (bulkadmin is no problem but sysadmin, db_ddladmin, or db_owner are too much) ??? Is there a possibility to insert data from a text-file with using bulk insert ???

Thanks,
Harold
 
Sounds like you need to defne an Application Role.

See Books Online for that topic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top