Click here to Skip to main content
16,017,745 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I working on website. it have page 'UpdateRegisterNo.aspx'. in this page i need to update student registration number using excel file. in excel file contains admision nuber registration number. but it can't work in server. i got an error


The error is
User does not have permission to perform this action.
You do not have permission to run the RECONFIGURE statement.
The configuration option 'Ad Hoc Distributed Queries' does not exist, or it may be an advanced option.
You do not have permission to run the RECONFIGURE statement.

please help me
Posted
Updated 12-Sep-11 2:06am
v3
Comments
Prerak Patel 12-Sep-11 6:13am    
Added code block for error.
Prerak Patel 12-Sep-11 6:16am    
Share some relevant code.

1 solution

sqlserver user which is used in asp.net programming is not having the permission to execute the RECONFIGURE statement.

create a new user, login with the new user and use it in asp.net.

use the following snippet to create new user

SQL
use master;
go
drop login TestUser;
go
create login TestUser with password = '';

USE <yourdatabase>;
drop user TestUser;
create user TestUser for login TestUser with default_schema = dbo;
go
setuser 'TestUser'
go

exec sp_configure 'allow updates', 1
RECONFIGURE
go
setuser
</yourdatabase>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900