Re: Cant find User Default database So, I can't Register my server

From: Hari (hari_prasad_k_at_hotmail.com)
Date: 03/21/04


Date: Mon, 22 Mar 2004 04:36:21 +0530

Hi,

This problem can come due to 2 reasons

1. You have assigned the login a default database and the login do not have
a user assocoated in the default database.

    a. Login to Query Analyzer
    b. use <dafault databasename>
    c. sp_adduser <user name>
    d. Assign the required role

2. Database which is given default to the login is dropped or not available.

    a. Change the login to point to a different database, Execute the below
from command prompt
    b. OSQL -USa -Ppassword -d master -Q"sp_defaultdb 'Login_name', 'New
database which is default'"

Thanks
Hari
MCDBA

"Richard Muschamp" <***@custommicro.com> wrote in message
news:23D9DDF2-EE56-4B8B-8B03-264F006F0B35@microsoft.com...
> Occasionally, I disconnect a database. When I try to reconnect it, I get
the message that SQL "can't find the User default database". Typically, I
reinstall the SQL Server software. There must be a better way. Is there an
OSQL command I can use? How can I recorver from this condition without
riinstalling SQL Server?
>
> Thanks, richard


Loading