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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 User's default database became Null

Author  Topic 

jimmpy
Starting Member

15 Posts

Posted - 2005-10-31 : 16:14:29
3 to 4 users got a message that the system cannot log them in because users cannot log in to their default database. When I checked the security their default databases were blank or NULL. Has anybody come across similar problems...not sure how it happened? Once I set to their default databases then they were able to login successfully.

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2005-10-31 : 16:16:55
their original default database has been dropped from the system. This is a pretty common problem that occurs with SQL Server.



-ec
Go to Top of Page

jimmpy
Starting Member

15 Posts

Posted - 2005-10-31 : 16:23:42
does it get dropped cuz someone made changes at the Server dba or application developer level or just one of those microsoft things which happes without any reasons?
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2005-10-31 : 16:55:21
Is this a server that gets databases restored to it?

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

jimmpy
Starting Member

15 Posts

Posted - 2005-10-31 : 17:02:39
What do you mean?

quote:
Originally posted by derrickleggett

Is this a server that gets databases restored to it?

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.

Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2005-10-31 : 17:06:58
ok, this is usually how this works.

1. you create a database called 'foo'
2. you create a database called 'bar'
3. you create a use called foobar_owner
4. you grant dbo privs on foobar_owner to both databases
5. you make 'foo' the default database for foobar_owner
6. you drop database 'foo'

You are now in the situation you described.



-ec
Go to Top of Page

jimmpy
Starting Member

15 Posts

Posted - 2005-10-31 : 17:21:21
Actually neither I created any database nor dropped any. All the databases, users have been created on that particular server. No changes were made on this sql server which hosts about 20+ different databases. Suddenly developers started complaining that they are unable to login to their default db.
quote:
Originally posted by eyechart

ok, this is usually how this works.

1. you create a database called 'foo'
2. you create a database called 'bar'
3. you create a use called foobar_owner
4. you grant dbo privs on foobar_owner to both databases
5. you make 'foo' the default database for foobar_owner
6. you drop database 'foo'

You are now in the situation you described.



-ec

Go to Top of Page

jimmpy
Starting Member

15 Posts

Posted - 2005-10-31 : 17:26:39
BDW: someone developer left and he owned a few ojbects...view, table..etc...we reassign to someone else's id...
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2005-10-31 : 17:54:00
Someone screwed up. That's what happened. SQL Server doesn't just lose people's default databases on production servers where the databases themselves aren't having the database ID number changed.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

jimmpy
Starting Member

15 Posts

Posted - 2005-11-01 : 15:44:41
yep...thanks
Go to Top of Page
   

- Advertisement -