Re: SQL Server Login Failed from ASP

From: John Bell (jrm_bell@hotmail.com)
Date: 12/30/02


From: "John Bell" <jrm_bell@hotmail.com>
Date: Mon, 30 Dec 2002 19:52:20 -0000


Hi

Did you check the DSN worked through control panel or administartive tools?

How did you move the database? If you used backup/restore or
detached/attached then you may need to fix the users using
sp_change_users_login.

John

"vara" <vara@maineguide.com> wrote in message
news:b4ee9629.0212301126.1fd0b04b@posting.google.com...
> We recently moved SQL Server 2000 to another machine keeping IIS-5.0
> on old machine. Both are on W2K. I am using ODBC system DSNs to point
> new database. When I tried to test one of my ASP page I got this
> problem.
>
> Microsoft OLE DB Provider for ODBC Drivers error '80004005'
>
> [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database
> requested in login 'DataBaseX'. Login fails.
>
> /ASPPage.asp, line 11
>
> My code looks like:
>
> set cn = server.CreateObject("ADODB.Connection")
> cn.ConnectionString="DSN=dsnX"
> cn.Open
>
> When I saw on the SQL server only dbo user is assigned to 'DataBaseX'
> database.
> If I write this same code in a VB component then it works fine. I
> don't understand why this is not working from a ASP page
>
> I have tried to assign IUSR_Machine to SQL server database, but no
> luck. But when I give NT Authority\Anonymous Login then it works from
> both VB and ASP. My manager don't wants to give NT Authority\Anonymous
> Login access to databases for security reasons. (this is not safe?)



Relevant Pages

  • Re: System Administrator Implied Permissions
    ... > sa login, it assigns it the System Administrator fixed ... > Now, given this, why does SQL Server ... in each database is always a member of the public and db_owner roles. ... Other sysadmin role members have the exact same ...
    (microsoft.public.sqlserver.security)
  • Re: No db access after publishing web site
    ... GRANT UPDATE TO ... If I detach and attach this database on a different PC (according that PC ... Cannot open database "pago" requested by the login. ... Are you detaching/attaching the SQL Server Express database correctly ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: cannot login to the db after...
    ... Jasper Smith (SQL Server MVP) ... I have created a new database, "db_1", using the "sa" ... I then created a new login, "sqluser1" and gave ...
    (microsoft.public.sqlserver.security)
  • Re: Cant view merge agent properties (trying again)
    ... In the List of Actions for the Snapshot Agent History I see this repeated: ... every single database listed. ... So, just now, I went to computername\Administrator Login ID (because it's ... On the computer running SQL Server, ...
    (microsoft.public.sqlserver.replication)
  • server authentication & ASP authentication
    ... >I am designing quite a big database, about 50 tables, ... and send login and password entered by the user ... either in ASP ... I still need to store passwords ...
    (microsoft.public.sqlserver.security)