Query Analyzer Oddity

  • Setting: Win 2K, SQL 7 Server, Query Analyzer, "Results in Grid" mode. When I type sp_helplogins in QA I get the following results:

    "Server Msg 515, Level 16, State 2. Procedure sp_helplogins, Line 276

    Cannot insert the value NULL into column 'DefDBName', table 'tempdb.dbo.#tb2_PlainLogins____

    The statement has been terminated."

    (O rows(s) affected)

    (20 row(s) affected)

    But when I run the same command using "Results in Text" mode I get the same error except that between the (0 row(s)..) and (20 row(s).. ) appears the user names I wanted in the first place!

    I've rebooted the machine and applied the latest SQL 7 service pack. Any ideas?

    TIA,

    Bill

  • Hey Bill,

    I don't have 7.0 installed, works fine on 2000. My guess is that you've got some logins that don't have a default database assigned. Try running this query to see:

    select name, dbid as defaultdb from master..sysxlogins where dbid is null

    If you do find some, take a look at sp_defaultdb to fix them. If not,...we'll look some more.

    Andy

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply