Hello,
I am trying to load a simple tab-delimited data file to SQL Server. I
created a format file to go with it, since the data file differs from
the destination table in number of columns.
When I execute the query, I get an error saying that only sysadmin or
bulkadmin roles are allowed to use the BULK INSERT statement. So, I
proceeded with the Enterprise Manager to grant myself those roles.
However, I could not find sysadmin or bulkadmin roles using the
Enterprise Manager. From what I read from my books, I thought these
were fixed server roles and that they would be there.
So I have a few questions:
1) How do I create a user account/role that can issue BULK INSERT
commands?
2) Why is BULK INSERT considered a dangerous operation that it
requires special privileges? What are its implications? I have a
couple of books that say that a user should be aware of its
implications before using it, but they don't actually describe what
those implications might be.
3) It seems that I can load the data file using BCP utility, without
such privileges. If so, what is the difference?
Thanks! 2 16473
> So, I proceeded with the Enterprise Manager to grant myself those roles. However, I could not find sysadmin or bulkadmin roles using the Enterprise Manager. From what I read from my books, I thought these were fixed server roles and that they would be there.
So I have a few questions: 1) How do I create a user account/role that can issue BULK INSERT commands?
The roles are there but you need to be a sysadmin role member or a member of
that fixed server role in order to add members. Ask your DBA to do this.
2) Why is BULK INSERT considered a dangerous operation that it requires special privileges? What are its implications? I have a couple of books that say that a user should be aware of its implications before using it, but they don't actually describe what those implications might be.
The main security implication is that BULK INSERT accesses external data
under the security context of the SQL Server service account rather than the
invoking user's account.
3) It seems that I can load the data file using BCP utility, without such privileges. If so, what is the difference?
Client-based bulk insert techniques like SQLOLEDB IRowsetFastLoad and ODBC
BCP access data under the security context of the invoking user.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"php newbie" <ne**********@yahoo.com> wrote in message
news:12**************************@posting.google.c om... Hello,
I am trying to load a simple tab-delimited data file to SQL Server. I created a format file to go with it, since the data file differs from the destination table in number of columns.
When I execute the query, I get an error saying that only sysadmin or bulkadmin roles are allowed to use the BULK INSERT statement. So, I proceeded with the Enterprise Manager to grant myself those roles. However, I could not find sysadmin or bulkadmin roles using the Enterprise Manager. From what I read from my books, I thought these were fixed server roles and that they would be there.
So I have a few questions: 1) How do I create a user account/role that can issue BULK INSERT commands?
2) Why is BULK INSERT considered a dangerous operation that it requires special privileges? What are its implications? I have a couple of books that say that a user should be aware of its implications before using it, but they don't actually describe what those implications might be.
3) It seems that I can load the data file using BCP utility, without such privileges. If so, what is the difference?
Thanks!
"Dan Guzman" <da*******@nospam-earthlink.net> wrote in message news:<bR*****************@newsread2.news.pas.earth link.net>... So, I proceeded with the Enterprise Manager to grant myself those roles. However, I could not find sysadmin or bulkadmin roles using the Enterprise Manager. From what I read from my books, I thought these were fixed server roles and that they would be there.
So I have a few questions: 1) How do I create a user account/role that can issue BULK INSERT commands? The roles are there but you need to be a sysadmin role member or a member of that fixed server role in order to add members. Ask your DBA to do this.
Hello Dan,
This was for personal use, so that makes me the DBA. I believe I
disabled the "sa" account when I first installed SQL Server (based on
some suggestions due to security risks). Perhaps that has something
to do with it. I will look into it.
Client-based bulk insert techniques like SQLOLEDB IRowsetFastLoad and ODBC BCP access data under the security context of the invoking user.
Thanks! This clarifies the risk implications of BULK INSERT vs. bcp
that was not in the books. It looks like Bcp is the sure way to go
for most users.
-- Hope this helps.
Dan Guzman SQL Server MVP This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Drew |
last post by:
I am trying to use Bulk Insert for a user that is not sysadmin.
I have already set up the user as a member of "bulkadmin".
When I run the following script:
DECLARE @SQL VARCHAR(1000)
CREATE...
|
by: php newbie |
last post by:
Hello,
I have been trying to load a delimited data file to SQL Server. I
have tried both of the options that are available: each time, I get
different errors. This is on an eval version of SQL...
|
by: me |
last post by:
I'm also having problems getting the bulk insert to work. I don't know
anything about it except what I've gleened from BOL but I'm not seeming to
get anywhere...Hopefully there is some little (or...
|
by: iqbal |
last post by:
Hi all,
We have an application through which we are bulk inserting rows into a
view. The definition of the view is such that it selects columns from
a table on a remote server. I have added the...
|
by: pk |
last post by:
Sorry for the piece-by-piece nature of this post, I moved it from a
dormant group to this one and it was 3 separate posts in the other
group. Anyway...
I'm trying to bulk insert a text file of...
|
by: Philip Boonzaaier |
last post by:
I want to be able to generate SQL statements that will go through a list of
data, effectively row by row, enquire on the database if this exists in the
selected table- If it exists, then the colums...
|
by: moonriver |
last post by:
Right now I develop an application to retrieve over 30,000 records from a binary file and then load them into a SQL Server DB. So far I load those records one by one, but the performance is very...
|
by: avicentic |
last post by:
I want to add bulkadmin permission to my applicatio role. Is it a
posible.
My windows account havo only public permission on database.
I'm using application role
EXEC sp_approlepassword...
|
by: teo |
last post by:
Hallo,
I'm performing a mass insertion
from a text file to a db table
with AdoNet commands, like this:
myCommand.CommandText = "BULK INSERT ..."
from a Win form
no problem
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |