Solved

SQL Server Login error

Posted on 2008-10-15
7
404 Views
Last Modified: 2008-10-15
Hello,

I have a PC running Vista Home Premium.

I have an ASP application that is trying to access a local SQL Server 2000 database.

The database is registered to use Windows authentication (don't know if that authentication exists in Vista Home Premium).

In the file DSN, used by the ASP application, it is registered in ODBC "With Windows NT authentication using the network login ID".

I get an error when my ASP application tries to access the database:

"Login failed for user "NT AUTHORITY/IUSR"

Any advice?

Thanks in advance,

Steve
0
Comment
Question by:skbohler
  • 4
  • 3
7 Comments
 
LVL 2

Expert Comment

by:tree33
ID: 22723611
You probably only have to grant access to the database for IUSR_%MACHINENAME%.
When this doesn't help, can you please give us more details on the connection string you're using.
0
 

Author Comment

by:skbohler
ID: 22723675
How do I grant access to the SQL Server database to that account?

The connection string is just: "FILEDSN="c:\users\{dir}\application.dsn"
0
 
LVL 2

Expert Comment

by:tree33
ID: 22723797
Use SQL Enterprise Manager to add the user IUSR_%MACHINENAME% to the SQL Server in the security node.
Then go to the database's Logins node and add the login to the DB and set the needed permissions for that login.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:skbohler
ID: 22723875
OK, I tried to add the login.

For Windows Authentication, In the Domain drop-down, I chose the computer name. That auto-filled the login name, but when I tried to OK it, it tells me that:

{MachineName}\IUSR_{MachineName} not found. Check the name again.

What am I doing wrong?

Thanks!

Steve
0
 

Author Comment

by:skbohler
ID: 22724030
I added the login:

NT AUTHORITY\IUSR and it took that.

Now, the error I get:

"Cannot open database requested in login '{database}'. Login fails.

??
0
 
LVL 2

Accepted Solution

by:
tree33 earned 500 total points
ID: 22724089
Did you also add a role to that login for the database? Depending on the access that user needs you can try with datareader and/or datawriter.

Only adding the login the the SQL Server is not enough, you also have to assign this login to a database.
0
 

Author Comment

by:skbohler
ID: 22724116
OK, I see I didn't add it to the database. Fixed. Thanks!!!!
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now