Login Properties

  • Same to you.

    Edit, where the darn taxic nuclear waste icon???

  • george sibbald (7/21/2011)


    The question does specifically say SQL208 and for sa.

    For any SQL authenticated account I get 1900-01-01, for windows accounts I get NULL

    That has to be the reason. The sa account is never a windows authenticated one.

  • Ninja's_RGR'us (7/21/2011)


    paul s-306273 (7/21/2011)


    I'm surprised that the answer isn't null.

    Can somebody prove or disprove that.

    (I don't have the facility to do this myself - sorry!)

    I'll add to this. I know I'm "late" but I'm still on 2k5 and that gave me NULL.

    I tried the same thing on 2k8 and it gave me 1900-01-01.

    Can anyone else confirm this or was my test wrong?

    I'm on 2k8 R2 and it gives me NULL



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]

  • Thanks for question. Guess we would get the right answer soon 🙂

    M&M

  • Tx, I'd still like a 2k5 confirmation... am I the only one with a retarded server??? Can't possibly be the case :w00t:

  • I tried it on several of our servers, both 2005 and 2008, and received '1900-01-01 00:00:00.000'. All of these were enterprise edition. I also tried it on one express edition and received NULL. So maybe the edition matters more than the version.

    Greg

  • JestersGrind (7/21/2011)


    I tried it on several of our servers, both 2005 and 2008, and received '1900-01-01 00:00:00.000'. All of these were enterprise edition. I also tried it on one express edition and received NULL. So maybe the edition matters more than the version.

    Greg

    Nope, I tried it on Enterprise and Developer (basically the same thing) and I get NULL.

    Nobody uses SA on our system, but we do run in mixed mode. Of course we're using 2k8 R2.



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]

  • Disregard my last post. I just realized that the SQL Server Express server is not in mixed mode, which probably accounts for the NULL.

    Greg

  • Thomas Abraham (7/21/2011)


    Ninja's_RGR'us (7/21/2011)


    Steve specifically says that the server is a new install in windows mode which would make me assume that SA has never,ever logged in.

    He also said the server was used for four months before the security mode was changed. Then he says, in the explaination:

    "The default for this property is 1900-01-01 on a server if there has never been a failed login due to an incorrect password."

    So, that's why I checked using a user name that was set up, but where the user login had not been used.

    As for an ISNULL() check setting it to 1900-01-01, why doesn't the call return that value when you enter a bogus user name?

    I'm not saying that NULL is the correct answer. But, given that the referene cited is silent on the default value, and the results we've seen so far, I don't see how 1900-01-01 is the answer here?

    I would say there are also some checks in the function to ensure the username is valid and in Mixed Auth. In any case, it would be better if the function performed more consistent across the use cases presented so far.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Tx, I'd still like a 2k5 confirmation... am I the only one with a retarded server??? Can't possibly be the case

    I get NULL on both 2005 and 2008, but the caveat is that both these servers started out in Mixed Mode, so not a thorough test.

    J

  • I didn't check other versions, but I did check on 2008. It functions as noted.

    It isn't a big deal, but if you are writing checks or alerts for bad logins, then you ought to be aware of this.

  • Steve Jones - SSC Editor (7/21/2011)


    I didn't check other versions, but I did check on 2008. It functions as noted.

    It isn't a big deal, but if you are writing checks or alerts for bad logins, then you ought to be aware of this.

    Ya it's a nice to know... but I won't lose any sleep over this one :-D.

  • Interesting question, but I don't like the reference given in the explanation since it is absolutely mute on the question.

    It seems weird that people are getting NULL in 2005 and in 2008 R2, but not in 2008. Does this mean the change to non-NULL in 2008 was a temporary aberration?

    Tom

  • Nice question! Was a day late in answering though ...

  • J DBA (7/21/2011)


    Tx, I'd still like a 2k5 confirmation... am I the only one with a retarded server??? Can't possibly be the case

    I get NULL on both 2005 and 2008, but the caveat is that both these servers started out in Mixed Mode, so not a thorough test.

    J

    I get 'NULL' whatever login name I am putting in the query, and I know that there has been bad password.

    I installed SQL in mixed mode, so it always been in mixed mode...

    Could it be a configuration thing, like a CHECK_POLICY or CHECK_EXPIRATION?

    I have SQL 2008 (but on XP professional for learning - not on a server machine - Would that make a difference?)

    I get the error "MUST_CHANGE option is not supported by this version" if I try to create a new user and do not unckeck the "user must change password at next login" checkbox (always tought that it was because I was not on a server...)

    I test other command and I got NULL for all

    SELECT

    loginproperty('tilew', 'BadPasswordCount ') as BadPasswordCount ,

    loginproperty('tilew', 'BadPasswordTime') as BadPasswordTime ,

    loginproperty('laudet', 'HistoryLength') as HistoryLength,

    loginproperty('tilew', 'LockoutTime') as LockoutTime,

Viewing 15 posts - 31 through 45 (of 52 total)

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