Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
steelkilt
Constraint Violating Yak Guru
255 Posts |
Posted - 2005-01-12 : 13:58:00
|
| Hi,I'm experiencing a very weird problem with SQL Server 7.0. When I load EM Security/Logins and look at the default database column for my users and groups, I see that the database names have been "swapped" i.e. those who should have DATABASE1 have DATABASE2 listed and vice versa.When I actually drill down to the permissions tab to see which default database they have permissions to, the correct one is there --the "swapped" problem only appears in the main listing of the LOGINS window.I discovered this while troubleshooting an error I think may be associated: one of my users was recently forced to change her password. Once she did this, she could no longer query the SQL database via MS Excel, which uses a DSN that I set up on her PC. She gets Access Denied SQL Server: 4062 error. When I removed her existing DSN and tried to set up a new one, I get same error and no default database choice exists, only [Default].She can still access the database via my web application, which uses a DSN that is set up on the server side and hardcoded into the web pages, no problems there, she can read/write etc. to the db via the web.The only major thing I've done recently is to dispose of giant transaction logs via the DETACH and ATTACH (without log) technique.Any help is appreciated. I've never seen this one before and don't know whether it's going to affect various other users for whom I've set up pc-based DSNs.thanks. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-01-12 : 14:58:11
|
| "The only major thing I've done recently is to dispose of giant transaction logs via the DETACH and ATTACH (without log) technique."That is probably the culprit. After restoring or attaching databases, you often times will need to change the default databases of the users as the dbid for the database has changed. So let's say before the detach it was 4 and you also have a 5 out there. Now when you reattach it, I think it'll go to 6. It's something that you need to be aware of when doing restores. Run sp_defaultdb to correct.Tara |
 |
|
|
steelkilt
Constraint Violating Yak Guru
255 Posts |
Posted - 2005-01-12 : 16:33:18
|
| thx tara I'll remember that SP...scary that this happened, will need to figure out a better way to eliminate the trans logs.cheers |
 |
|
|
|
|
|
|
|