Showing posts with label permission. Show all posts
Showing posts with label permission. Show all posts

Thursday, March 22, 2012

BULK INSERT STATEMENT PROBLEM... ^^

Hi all,

I want to run BULK INSERT command from ASP.NET.. But, I get Error "You dont have permission to use BULK INSERT Command...". And i try to find out the solution from Internet and a lot of people say that I have to create user under Sysadmin or BULKadmin role.

But I dont see Sysadmin and BULKadmin from my MSSQL Enterprise manager. What I see is only Admin and Sys... Any solution??

Thanks

Suigion

Hi,

use sp_addsrvrolemember to add

SysAdmin and BulkAdmin are types of fixed server roles. You can find them under Security, Server Roles node in EM.

Hope this helps you

Monday, March 19, 2012

bulk insert not working from asp.netpage

Hi,

I am tryin to run the store procedure which has bulk insert command.when i run the code,it says you don't have permission to use bulk insert command. This query/storeprocedure is running succesfully in the backend(sqlserver2000).

solution is only user in Bulkadmin role has permission for bulk insert .But i don't know how to create one and use it in asp.net.

Can anyone help me in this. ..Here is the code.

string conn_string1 =@."Data Source=SENTHIL\TEST;Initial Catalog=EMPLOYEE;Integrated Security=SSPI";

SqlConnection objconn1=

new SqlConnection(conn_string1);

objconn1.Open();

SqlCommand command1=

new SqlCommand("bulkinsert",objconn1);

command1.CommandType=CommandType.StoredProcedure;

command1.ExecuteNonQuery();

Response.Write("Stored procedure excecuted");

objconn1.Close();

thanks,

kar

In http://msdn2.microsoft.com/en-us/library/ms188365.aspx

Requires INSERT and ADMINISTER BULKOPERATIONS permissions. Additionally, ALTER TABLE permission isrequired if one or more of the following is true:

Constraints exist and the CHECK_CONSTRAINTS option is not specified.

Note: Disabling constraints is the default behavior. To check constraints explicitly, use the CHECK_CONSTRAINTS option.

Thursday, March 8, 2012

Bulk Insert Error

When I run a script, it gives me the following error
message: "You do not have permission to use the BULK
INSERT statement". We are using SQL Server 2000.
Does it related to Recovery Model used ?
ThanksYou need to be in sysadmin to run a bulk insert.
I think it should also work as bulkadmin but has problems.
"Peter" wrote:
> When I run a script, it gives me the following error
> message: "You do not have permission to use the BULK
> INSERT statement". We are using SQL Server 2000.
> Does it related to Recovery Model used ?
> Thanks
>|||Hi,
The user should have either "SYSADMIN" or "BULKADMIN" server fixed role
assigned.
How to assign the role:-
sp_addsrvrolemember <login_name>,'bulkadmin'
--
Thanks
Hari
MCDBA
"Peter" <anonymous@.discussions.microsoft.com> wrote in message
news:20ff201c459b1$c0ed7f10$a001280a@.phx.gbl...
> When I run a script, it gives me the following error
> message: "You do not have permission to use the BULK
> INSERT statement". We are using SQL Server 2000.
> Does it related to Recovery Model used ?
> Thanks
>|||Does it mean that we can still preform Bulk Insert even
though the recovery model is "Simple" ?
Thanks
>--Original Message--
>You need to be in sysadmin to run a bulk insert.
>I think it should also work as bulkadmin but has problems.
>"Peter" wrote:
>> When I run a script, it gives me the following error
>> message: "You do not have permission to use the BULK
>> INSERT statement". We are using SQL Server 2000.
>> Does it related to Recovery Model used ?
>> Thanks
>>
>.
>|||Hi,
BULK INSERT is possible in all recovery models.
Only thing is in BULK_LOGGED and SIMPLE recovery model the loading will not
be logged.
--
Thanks
Hari
MCDBA
"Peter" <anonymous@.discussions.microsoft.com> wrote in message
news:20ba701c459b4$a896b190$a101280a@.phx.gbl...
> Does it mean that we can still preform Bulk Insert even
> though the recovery model is "Simple" ?
> Thanks
> >--Original Message--
> >You need to be in sysadmin to run a bulk insert.
> >I think it should also work as bulkadmin but has problems.
> >
> >"Peter" wrote:
> >
> >> When I run a script, it gives me the following error
> >> message: "You do not have permission to use the BULK
> >> INSERT statement". We are using SQL Server 2000.
> >>
> >> Does it related to Recovery Model used ?
> >>
> >> Thanks
> >>
> >>
> >.
> >

Bulk Insert Error

When I run a script, it gives me the following error
message: "You do not have permission to use the BULK
INSERT statement". We are using SQL Server 2000.
Does it related to Recovery Model used ?
ThanksYou need to be in sysadmin to run a bulk insert.
I think it should also work as bulkadmin but has problems.
"Peter" wrote:

> When I run a script, it gives me the following error
> message: "You do not have permission to use the BULK
> INSERT statement". We are using SQL Server 2000.
> Does it related to Recovery Model used ?
> Thanks
>|||Hi,
The user should have either "SYSADMIN" or "BULKADMIN" server fixed role
assigned.
How to assign the role:-
sp_addsrvrolemember <login_name>,'bulkadmin'
Thanks
Hari
MCDBA
"Peter" <anonymous@.discussions.microsoft.com> wrote in message
news:20ff201c459b1$c0ed7f10$a001280a@.phx
.gbl...
> When I run a script, it gives me the following error
> message: "You do not have permission to use the BULK
> INSERT statement". We are using SQL Server 2000.
> Does it related to Recovery Model used ?
> Thanks
>|||Does it mean that we can still preform Bulk Insert even
though the recovery model is "Simple" ?
Thanks

>--Original Message--
>You need to be in sysadmin to run a bulk insert.
>I think it should also work as bulkadmin but has problems.
>"Peter" wrote:
>
>.
>|||Hi,
BULK INSERT is possible in all recovery models.
Only thing is in BULK_LOGGED and SIMPLE recovery model the loading will not
be logged.
Thanks
Hari
MCDBA
"Peter" <anonymous@.discussions.microsoft.com> wrote in message
news:20ba701c459b4$a896b190$a101280a@.phx
.gbl...[vbcol=seagreen]
> Does it mean that we can still preform Bulk Insert even
> though the recovery model is "Simple" ?
> Thanks
>

Bulk Insert Error

When I run a script, it gives me the following error
message: "You do not have permission to use the BULK
INSERT statement". We are using SQL Server 2000.
Does it related to Recovery Model used ?
Thanks
You need to be in sysadmin to run a bulk insert.
I think it should also work as bulkadmin but has problems.
"Peter" wrote:

> When I run a script, it gives me the following error
> message: "You do not have permission to use the BULK
> INSERT statement". We are using SQL Server 2000.
> Does it related to Recovery Model used ?
> Thanks
>
|||Hi,
The user should have either "SYSADMIN" or "BULKADMIN" server fixed role
assigned.
How to assign the role:-
sp_addsrvrolemember <login_name>,'bulkadmin'
Thanks
Hari
MCDBA
"Peter" <anonymous@.discussions.microsoft.com> wrote in message
news:20ff201c459b1$c0ed7f10$a001280a@.phx.gbl...
> When I run a script, it gives me the following error
> message: "You do not have permission to use the BULK
> INSERT statement". We are using SQL Server 2000.
> Does it related to Recovery Model used ?
> Thanks
>
|||Does it mean that we can still preform Bulk Insert even
though the recovery model is "Simple" ?
Thanks

>--Original Message--
>You need to be in sysadmin to run a bulk insert.
>I think it should also work as bulkadmin but has problems.
>"Peter" wrote:
>.
>
|||Hi,
BULK INSERT is possible in all recovery models.
Only thing is in BULK_LOGGED and SIMPLE recovery model the loading will not
be logged.
Thanks
Hari
MCDBA
"Peter" <anonymous@.discussions.microsoft.com> wrote in message
news:20ba701c459b4$a896b190$a101280a@.phx.gbl...[vbcol=seagreen]
> Does it mean that we can still preform Bulk Insert even
> though the recovery model is "Simple" ?
> Thanks