| Author |
Topic |
|
Eagle_f90
Constraint Violating Yak Guru
424 Posts |
Posted - 2003-10-24 : 19:10:34
|
| I am using an ASP script to log into a database called "eagledbzrpg" the UID, pass, and name of table all match whe I have on the server but I keep getting this:Cannot open database requested in login 'eagledbzrpg'. Login fails.Any ideas?Incase it helps I did a fresh install of SQL 2k server and then restored the DB from a backup.--For those with wings, fly to your dreamsDearms are what are found at the end of reality, and your reality if what is found at the end of your dreams. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-10-24 : 19:16:00
|
| Did you unorphan the accounts using sp_change_users_login?Tara |
 |
|
|
Eagle_f90
Constraint Violating Yak Guru
424 Posts |
Posted - 2003-10-24 : 19:23:30
|
| Not sure what you mean, I recreated the login. I am not that familiare with SQL. I am just learning how to run it. Do I still need to "unorphan" the login?--For those with wings, fly to your dreamsDearms are what are found at the end of reality, and your reality if what is found at the end of your dreams. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-10-24 : 19:28:10
|
| After you restore a database, you have to unorphan the accounts. This is done with sp_change_users_login.Are you able to log in with the account using Query Analyzer? If so, can you retrieve data from the same database that you are using in your ASP?Tara |
 |
|
|
smbates
Starting Member
3 Posts |
Posted - 2003-10-24 : 20:16:18
|
| I don't think you have given the new user access to the database. Once you have created a user you must grant them access to a database or databases - from what you have described it sounds like you haven't done this. If you are using Enterprise Manager to create your users you will want to go back to the user and pull up the properties for them. You will see a tab called databas access - this is where you will grant access. Once access is granted they should get in. |
 |
|
|
Eagle_f90
Constraint Violating Yak Guru
424 Posts |
Posted - 2003-10-25 : 00:10:54
|
quote: Originally posted by tduggan After you restore a database, you have to unorphan the accounts. This is done with sp_change_users_login.Are you able to log in with the account using Query Analyzer? If so, can you retrieve data from the same database that you are using in your ASP?Tara
I have tryed loging in with the rpguser account in the Query Analyzer and am unable to. Acessto the default database is denide. I am going to look up this sp_change_users_login and see what I can do with that.quote: Originally posted by smbates I don't think you have given the new user access to the database. Once you have created a user you must grant them access to a database or databases - from what you have described it sounds like you haven't done this. If you are using Enterprise Manager to create your users you will want to go back to the user and pull up the properties for them. You will see a tab called databas access - this is where you will grant access. Once access is granted they should get in.
I know about granting acess but I can't change anything for the user, everytime I try it tells me the user is already egists and does not save the info, I can only cancel out of the screen.--For those with wings, fly to your dreamsDearms are what are found at the end of reality, and your reality if what is found at the end of your dreams. |
 |
|
|
Eagle_f90
Constraint Violating Yak Guru
424 Posts |
Posted - 2003-10-25 : 00:18:48
|
| Could someone explain how to use the sp_change_users_login command? I looked it up in the books online and I don't understand it. I can't get it to work.--For those with wings, fly to your dreamsDearms are what are found at the end of reality, and your reality if what is found at the end of your dreams. |
 |
|
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
Posted - 2003-10-27 : 14:19:13
|
| This link in the script library should help with your orphans: [url]http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=12615[/url]--------------------------------------------------------Visit the SQLTeam Weblogs at [url]http://weblogs.sqlteam.com[/url] |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-10-28 : 01:59:46
|
| Also have a look at sp_default_db system stored procedure in BOL. That stored procedure can be used to set the default database of a login. I suspect that this is your problem. You should run sp_changes_users_login stored procedure first.Tara |
 |
|
|
|