RE: Login failed for user 'foo' but the SQL executed correctly

From: Bill Cheng [MSFT] (billchng_at_online.microsoft.com)
Date: 09/11/03


Date: Thu, 11 Sep 2003 10:47:57 GMT


Hi Benjamin,

Could you post the detailed error message when executing the stored
procedure in ASP.NET? We can use Profiler to capture the SQL Server trace
and see under which user the stored procedure is executed. If you login as
that user in Query Analyzer and executes that stored procedure, will the
problem occur?

Is the error thrown by the stored procedure or the SQL Server 2000? If the
error is thrown by the stored procedure, could you post the code of the
stored procedure?

Bill Cheng
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
| From: benj@theinsiders.com (Benjamin Joldersma)
| Newsgroups: microsoft.public.sqlserver.security
| Subject: Login failed for user 'foo' but the SQL executed correctly
| Date: 10 Sep 2003 14:53:14 -0700
| Organization: http://groups.google.com/
| Lines: 14
| Message-ID: <8fd02140.0309101353.c0380ca@posting.google.com>
| NNTP-Posting-Host: 65.101.136.67
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1063230794 31303 127.0.0.1 (10 Sep 2003
21:53:14 GMT)
| X-Complaints-To: groups-abuse@google.com
| NNTP-Posting-Date: 10 Sep 2003 21:53:14 GMT
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
e.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-
xit-09!supernews.com!postnews1.google.com!not-for-mail
| Xref: cpmsftngxa06.phx.gbl microsoft.public.sqlserver.security:15730
| X-Tomcat-NG: microsoft.public.sqlserver.security
|
| Hello all,
|
| I am having a strange issue, I am running an ASP.NET site, with
| MSSQL2k back end. All but one of my procedures execute fine, and with
| no errors. But one procedure in particular raises the Login failed
| for user 'foo' error. The funny thing is, the procedure inserts
| correctly.
|
| I explicitly addded permissions to access the table and the procedure
| to the user, even though the user is in the db_owner role. I am doing
| a SELECT @@IDENTITY at the very end, but that hasn't caused me
| problems in the past. any ideas anybody?
|
| --ben
|



Relevant Pages

  • Calling remote Stored Procedures
    ... I am experiencing some difficulties when it comes to executing a SQL ... Stored procedure on a remote SQL server. ... When I try to execute the Stored Procedure 'Ten Most Expensive ...
    (microsoft.public.sqlserver.server)
  • Re: Limitations of Scheduled jobs
    ... > Actually we can schedule the jobs with accuracy less than ... where executing the stored procedure ... >>on what the stored procedure does exactly. ... >>SQL Server MVP ...
    (microsoft.public.sqlserver.programming)
  • Re: Poor performance when executing stored procedure
    ... If SQL Server ... has to re-compile the SP, it takes shorter time to compile a smaller stored ... Poor performance when executing stored procedure ...
    (microsoft.public.sqlserver.programming)
  • Stored procedure does not complete until result set is retrieved from ODBC
    ... I have a SQL Server Stored procedure that I am executing via ODBC. ... -- Start Code without cursor ...
    (microsoft.public.sqlserver.odbc)
  • Re: error executing sprocedure
    ... Wayne Snyder, MCDBA, SQL Server MVP ... I've created one stored procedure that has one input ... executing this procedure sql reports one error. ... input paramenter to the stored procedure but if the number ...
    (microsoft.public.sqlserver.server)