SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Find all the inactive Windows Logins


Find all the inactive Windows Logins

Author
Message
John Mitchell-245523
John Mitchell-245523
SSC Guru
SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)

Group: General Forum Members
Points: 79947 Visits: 17919
Suresh B. (1/31/2014)
Subrata Bauri (1/31/2014)
Actually I want to list out all the inactive users(windows) which are not able to login into the OS & henceforth they are not able to connect the SQL Server but they are still alive in the SQL Server as records.


This is possible. Run this:
sp_validatelogins

Good shout - I wasn't aware of that stored procedure. I don't know how it handles logins that have been disabled in AD, though.

As far as I know, AD doesn't run on a SQL Server database. Here's a link on how to create a linked server to your AD server.

John
Subrata Bauri
Subrata Bauri
SSChasing Mays
SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)

Group: General Forum Members
Points: 643 Visits: 180
Suresh B. (1/31/2014)
Subrata Bauri (1/31/2014)
Actually I want to list out all the inactive users(windows) which are not able to login into the OS & henceforth they are not able to connect the SQL Server but they are still alive in the SQL Server as records.


This is possible. Run this:
sp_validatelogins


Thanks for your reply.

I have a user whose Login account is disabled in OS Level & the user is still valid user in SQL Server Level but the sp_validatelogins procedure is unable to find this user.
Suresh B.
Suresh B.
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12072 Visits: 5330
Both of you are right.
sp_validatelogins doesn't list the logins that have been DISABLED in AD.
It only lists the loigns that are DELETED in AD.
Subrata Bauri
Subrata Bauri
SSChasing Mays
SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)

Group: General Forum Members
Points: 643 Visits: 180
One more thing which I want to ask again:-

If the users(Windows Logins) are located in a single machine where the SQL Server exits then what should be the procedure.

Kindly reply.
John Mitchell-245523
John Mitchell-245523
SSC Guru
SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)

Group: General Forum Members
Points: 79947 Visits: 17919
So local Windows account instead of domain accounts? Exactly the same principle, except that the linked server process won't work. You'll have to search to find out whether it's possible to link to the local users and groups directory.

John
Subrata Bauri
Subrata Bauri
SSChasing Mays
SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)

Group: General Forum Members
Points: 643 Visits: 180
John Mitchell-245523 (2/7/2014)
So local Windows account instead of domain accounts? Exactly the same principle, except that the linked server process won't work. You'll have to search to find out whether it's possible to link to the local users and groups directory.

John


it's Local Windows accounts which I want work on.
John Mitchell-245523
John Mitchell-245523
SSC Guru
SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)SSC Guru (79K reputation)

Group: General Forum Members
Points: 79947 Visits: 17919
Good.

Exactly the same principle, except that the linked server process won't work. You'll have to search to find out whether it's possible to link to the local users and groups directory.

John
Subrata Bauri
Subrata Bauri
SSChasing Mays
SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)SSChasing Mays (643 reputation)

Group: General Forum Members
Points: 643 Visits: 180
Ok.

Thank you for valuable time & coordination.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search