hi,
so i have a new box and I'm trying to get my websites and SQL Server 2005 Standard Edition working on it, but the pages give me the following error when I try to load them:
"Cannot Open Database "XXXX" requested by login. The login failed. Login failed for user 'xxx'"
Everything seems exactly the same settings and user-wise from my old box to my new one, but nevertheless everything I've tried gives me the same error.
I've tried creating new users in SQL Server and giving them appropriate permissions to my database. I've even tried just using the built in 'sa' account. Nothing seems to change the error, except when I give it the incorrect password then it just says 'login failed'
This leads me to believe that i'm successfully logging into the SQL Server, but it doesn't want to give me access to the database I'm requesting access too. But "apparently" the account i'm using should have access to the database. If nothing else the 'sa' account should, but that didn't work either.
I'm stumped. Any ideas?
Check the database settings for user you are trying to login with and make sure they have permission and deny data reader is not checked.|||yep, the user currently has SELECT, UPDATE, INSERT, DELETE, and CONNECT permission selected.|||Look in the database properties under users and make sure the user has permissions there|||yep, the user is even marked as the dbowner.|||
here is my connection string just in case it's something funny there, but this connection string works on my old box with apparently the exact same settings
<
addname="ConnectionString"connectionString="Server=ServerName;Database=MyDatabase;User ID=MyID;Password=MyPassword;Trusted_Connection=False"providerName="System.Data.SqlClient" />|||ha!
the problem was that when I restored my database (from the old box to the new box), SQL Server replaced a certain character in the name with a different character. Namely replaced "\" with "_".
So it wasn't finding the database... I didn't need those five hours of my life anyways ;-)
No comments:
Post a Comment