• this is usually because the user was once assigned to have a default database that has been renamed or deleted. it's possible that the database exists, but permissions prevent the user from accessing it(not a user int he db anymore)

    changing the user to have a default database of master is probably the best solution.

    there's a legacy stored proc, but also the updated ALTER command to do the same thing: you can do it to a windows or sql user.

    EXEC sp_defaultdb @loginame='ClarkKent', @defdb='master'

    ALTER LOGIN [MyDomain\Lowell] WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english]

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!