The Error: This error wasted my morning. Although I have solved this issue before, it took a while to google and fix it again. So, this post is for my own edification and reference if for no other reason! --Proc [MyProcedureName] started AT:2020-10-13 09:49:43.4632735Msg 916, Level 14, State 1, Procedure MySchemaName.MyProcedureName, Line 31 [Batch Start … Continue reading SQL Server: Fix – The server principal “elevated_user_login” is not able to access the database “my_database” under the current security context
Category: Permissions
SQL Server: Time To Switch Schema Of All Objects Away From “dbo”
What are Schemas for? All of you are familiar with the default and built-in schema "dbo". When you create an object without a schema, "dbo" becomes the schema for the object. Generally, it is NOT considered a good practice from a manageability or security perspective to have everything owned by "dbo". The alternative is to … Continue reading SQL Server: Time To Switch Schema Of All Objects Away From “dbo”
PowerShell: Lookup Active Directory Accounts Flexibly/Exhaustively For A List Of First/Middle/Last Names
Before we begin, if you are running Windows 7 or above and if you do not have the PowerShell Active Directory module installed, please do so first by downloading and installing “Remote Server Administration Tools”. I personally cannot live without this module. Please be sure to check out my related blog post which uses the function described … Continue reading PowerShell: Lookup Active Directory Accounts Flexibly/Exhaustively For A List Of First/Middle/Last Names
SQL Server – Drop An User In All Databases & Drop The Login Too!
I am a strong proponent and a believer of using AD groups (not even AD users) to manage your SQL Server permissions end to end. Restated, you would not have any individual AD users as logins in your SQL Server instance, all instance logins with be AD groups. If you are dealing with plain SQL … Continue reading SQL Server – Drop An User In All Databases & Drop The Login Too!