How To Re-Associate An Orphaned SQL User With A SQL Login
I ran across an issue the other day when making a mirror of the Production environment. The problem was that after doing a database backup on one SQL Server and then restoring that backup to another SQL Server there were SQL Users that were in the database but not on the SQL Server instance.
Luckily, I found a post on Sean Decker – SQL Fundamentals, that explains exactly how to fix it with a simple SQL statement:
EXEC sp_change_users_login 'UPDATE_ONE', 'sqlusername', 'sqlloginname'
Author
Stewart Schatz
More Stories
JDE CNC + JDE Developer ≠ 1
Recently, while scrolling on this platform, where we all strive to present our best professional selves, I came across a job posting titled JD Edwards E1 CNC/Developer. To be honest, it kind of scared me.
How to Use the CMDKEY Command to Manage Stored Credentials on Windows
The cmdkey command is a Windows utility that lets you create, delete, and manage stored credentials for network authentication. This is particularly useful…
How to Print a Directory Structure Using PowerShell: Step-by-Step Guide
If you need to print out the directory structure and list the files within, this PowerShell script will help you...
Windows God Mode… What!?!
Windows God Mode is a hidden feature in the Windows operating system that allows users to access all of the system’s control panel options and settings in a single place.
How To Test A SQL Server Connection
There is an easy way to test your SQL Server connection when running Windows without any special software. I found...
4 Lines To Export Outlook Rules To Excel/CSV Using PowerShell
I used to use a ton of Outlook Rules to organize the thousands of emails that I receive each day....
Average Rating