Login Properties

  • Comments posted to this topic are about the item Login Properties

  • Hmm... there's nothing on the referenced link that shows that behaviour of LOGINPROPERTY. Perhaps a better explanation?

    Well, thanks for the question anyway, Steve. 🙂

    Best regards,

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

  • The reference cited simply states that it is defined as DATETIME data type, but does not give its default value. Do you have another reference, for without a defalut value .. it could be ... well it could be.. then again ... it could be

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • 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!)

  • Aagghh - I've gone back to being 'Say Hey Kid'.

    How did that happen?

  • I just assumed it was NULL. Have never bothered to look in there before (at that stage) and generally our servers have had to be set to mixed mode from the beginning due to some constraints we have in our environment. Not sure what I will gain from knowing this...but thanks! :p

  • I was about to select Null as the answer but then thought that would be too easy. Then I thought there must be some special circumstance if you change the security mode. The only other logical option was the 1900-01-01 so I guessed that one and was right.

  • Books On Line simply states that it is a DATETIME value, and default for DATETIME is NULL, so I choose NULL.

    DECLARE @MyVar DATETIME

    SELECT @MyVar

    I would be interested to know why '1900-01-01' was chosen as a default value.

    Thanks & Regards,
    Nakul Vachhrajani.
    http://nakulvachhrajani.com

    Follow me on
    Twitter: @sqltwins

  • Nice question - almost a dead giveaway

    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

  • Nakul Vachhrajani (7/21/2011)


    Books On Line simply states that it is a DATETIME value, and default for DATETIME is NULL, so I choose NULL.

    DECLARE @MyVar DATETIME

    SELECT @MyVar

    I would be interested to know why '1900-01-01' was chosen as a default value.

    The likely cause is the loginproperty function is doing an isnull check.

    declare @somedate datetime = null

    Select isnull(@somedate,0)

    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

  • Nice question. I learned something today.

    http://brittcluff.blogspot.com/

  • 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 tried it on a backup server (2008). Didn't want to cycle the server, so I chose a user that was set up, but for which I knew they had not logged into the system. When I run:

    SELECT loginproperty('someuser', 'badpasswordcount')

    SELECT loginproperty('someuser', 'badpasswordtime')

    (where 'someuser' is the login name of an actual user)

    I get NULL for both.

    [font="Verdana"]Please don't go. The drones need you. They look up to you.[/font]
    Connect to me on LinkedIn

  • I tried it on 2008 and 2008R2 and got a NULL on both.

    MG

    "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies."
    Tony Hoare

    "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.

  • I get NULL when running it on SQL 2008 R2.

Viewing 15 posts - 1 through 15 (of 52 total)

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