locked
Password last changed date & time for database user? RRS feed

  • Question

  • We are using database user (SQL Server authentication) in NAV 5 SP1 with "Enforce password policy" and "Enforce password expiration". We want to find password last changed date & time for a database user so that we can send password expiration notification. We can do this for AD user but don't know how can I do this for database user?

    Thanks,
    Manish
    Monday, November 21, 2011 3:42 PM

Answers

  • Deleted
    • Marked as answer by Manish Sinha, Tuesday, November 22, 2011 4:58 PM
    Monday, November 21, 2011 4:10 PM
  • Don't use syslogins, it is oldstyle, and will go away. Use sys.server_principals (documented in Books Online) instead. Exact for exactly which properties will change the date, this is not documented so easiest would be for you to just try a number of changes and look at the date.
    Tibor Karaszi, SQL Server MVP | web | blog
    • Marked as answer by Manish Sinha, Tuesday, November 22, 2011 4:58 PM
    Monday, November 21, 2011 6:10 PM

All replies

  • It is possible to keep track of this, though, through DDL trigger on the ALTER LOGIN command (which writes whetever info is needed to some other table).


    Tibor Karaszi, SQL Server MVP | web | blog
    Monday, November 21, 2011 5:21 PM
  • I need more details on "sys.syslogins". "Any property of that login" means the filed value change or some more relational data.

    Can you tell me the list of property that will change modified date column.


    Monday, November 21, 2011 5:41 PM
  • Don't use syslogins, it is oldstyle, and will go away. Use sys.server_principals (documented in Books Online) instead. Exact for exactly which properties will change the date, this is not documented so easiest would be for you to just try a number of changes and look at the date.
    Tibor Karaszi, SQL Server MVP | web | blog
    • Marked as answer by Manish Sinha, Tuesday, November 22, 2011 4:58 PM
    Monday, November 21, 2011 6:10 PM
  • Thanks Tibor & Shaw,

    Now I am able to call a sql statement from NAV and get the modify_date.

    Thanks,

    Manish

    Tuesday, November 22, 2011 5:01 PM