This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- SQL Server: Integrated Security with Least Privilege Access | |
-- Author: Joost (Yuana Consulting & Development Services) | |
-- Purpose: Secure access for Windows-authenticated users while preventing destructive actions like DROP TABLE | |
-- Note: Let your network admin create a group like DOMAIN\YourAppUsers. Add only the users who need access to the app. | |
-- STEP 1: Create a login for the Windows group | |
CREATE LOGIN [DOMAIN\YourAppUsers] FROM WINDOWS; | |
-- STEP 2: Map the login to a database user | |
USE YourDB; |