Wednesday 4 March 2015

SQL Server :: A database user is showing up as disabled (a down reddish arrow).

Strange problem : One of my friend came across a strange problem. He had a set of Users (not Logins) in the newly created database that, in SSMS, have the red down arrow in their icon. They act as if they are disabled.



I knew that starting from SQL server 2005 , one way to disable a user in a database is to run a REVOKE CONNECT FROM permission for that user . If that is the case , you can run a GRANT CONNECT TO and fix this problem hence I did same thing and issue was resolved.

Point to jotting down this here cause I had discussion on this with many DBA friends and most of them said that we need to delete the user and re-create it.

Even recreating a user can be a solution but I wish to highlight that it is not the only solution.

We can run below code and resolve the issue:-

USE <YourDatabase>
Go
GRANT CONNECT TO User1


Hope it will help.

Warm Regards,
Chhavinath Mishra 
Sr. Specialist Database Administrator

Monday 2 March 2015

Import-Module : The specified module 'activedirectory' was not loaded because no valid module file was found in any module directory


The Active Directory module is part of the Remote Server Administration Tools (RSAT), which you have to download first.


After the installation is complete, open the Control Panel, start typing “features,” and then click Turn Windows features on or off. Scroll down to Remote Server Administration Tools and enable Active Directory Module for Windows PowerShell in Remote Server Administration Tools > Role Administration Tools > AD DS and AD LDS Tools.