John,
To recap what I think you are saying:
1 - The server is set to SQL and Windows authentication, not SQL only.
2 - You have restarted the server since the authentication model was set.
3 - You are working with a restored database.
4 - You have dropped and recreated the ID login and the database several
times.
5 - You can only login using Windows authentication, despite the server
setting.
6 - However, despite point 5, you say this database is the only one for
which ID and PWD does not work.
Certainly, by now you are frustrated and none of us have been a big help so
far. So, using the list above a couple of actions to try:
A. Considering points 3 and 4:
If you did not do already, you FIRST need to drop the database _user_ named
"ID" BEFORE creating the SQL Server _login_ named "ID". Make the new "ID"
a database user and grant it the appropriate roles and rights.
This is because the restored database _user_ can have a SID that does not
match the SQL Server _login_ SID that you create with the same name.
(Unless you set the SID in the CREATE LOGIN statement.)
SQL Server Management Studio can make it look like the login and user are
linked, even though they actually are not because the SIDs are different..
(Probably something on the fix list for SSMS.)
B. Considering points 1, 2, and 5, if action A does not help:
Set a password for 'sa' that you can remember, change the server to SQL only
authentication mode, and reboot. See how connecting to SQL Server works for
you, SQL accounts, Windows logins, etc. Login as 'sa' then set the mode
back to SQL and Windows authentication, the reboot again. Now see what
happens when you try to login.
C. Considering point 6:
This only makes sense to me if this can be solved by Action A. But perhaps
I misunderstand what you were saying.
RLF
>I tried that and still nothing, and No I can only login using windows auth
>and I have the option SQL and Windows auth checked but an actual ID and PWD
[quoted text clipped - 7 lines]
>>
>> Can you log in with any SQL Server login?
John - 28 Mar 2007 13:53 GMT
I got it to work this time. I had to delete te
> John,
>
[quoted text clipped - 51 lines]
>>>
>>> Can you log in with any SQL Server login?
John - 28 Mar 2007 13:55 GMT
I got it to work.
I had to delete the database, stop the SQL services, recreate the database,
restore the database from the backup file, recreate the user, stop and start
the service again, and I had to reboot my box. Then I was able to access the
database via Server management studio with the ID and PWD I created for it.
Oh, I'm using SQL 05 also
> John,
>
[quoted text clipped - 51 lines]
>>>
>>> Can you log in with any SQL Server login?
> I tried that and still nothing, and No I can only login using windows
> auth and I have the option SQL and Windows auth checked but an actual ID
> and PWD doesn't work for this one database
First, which version of SQL Server are you using? You mentioned that you
was logging in from Query Analyzer, that would indicate that you are on
SQL 2000?
Your answer is a bit contradictive. You talk about "this one database",
as if the problem was only with one database one the server. With the
error message you posted, which database you are trying to connect to
would not matter.
So I like you to clarify again: are you able to log in with SQL
authentication with any user (for instance sa) to any database? Yes, we
are asking the same things all over again, but without access to your
system, you will have to be exact, so we don't get in doubts of what you
are doing. From what you have said this far, I'm suspecting that you
are looking at one server in Enterprise Manager, and trying to connect
from another?
By the way, what is the connection string in your application?

Signature
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx