Category: Security (Encryption & Permissions)
-
DBA Scripts: Get Orphaned Users
The Login Exists, the Database Still Says No An account that worked last week stops working against one database. The password is right, the login is there in Object Explorer, the user is still in the database with its roles intact, and the connection is still refused. The client returns Msg 4060 and the SQL…
Written by
-
DBA Scripts: Get Backup Encryption Status
TDE (Transparent Data Encryption) and backup encryption are two different things that get confused constantly. TDE encrypts the data and log files at rest, and a backup of a TDE database is encrypted too, with the same database encryption key (MS Docs). What TDE does not do is record that backup in msdb as an…
Written by
-
DBA Scripts: Get Sysadmin Members
Identify SQL Server Logins With Sysadmin Access The sysadmin fixed server role provides unrestricted access to a SQL Server instance. Members of this role can perform any operation on the server, including creating databases, changing security settings, accessing all data, and modifying server configuration. Because of this level of privilege, knowing exactly who has sysadmin…
Written by
-
DBA Scripts: Get Migration Login Audit and Post-Migration Validation
You are about to move logins to a new server, or you just did and something cannot log in. These scripts cover both ends: Get-MigrationLoginAudit tells you what each login needs on the target, and Get-PostMigrationValidation gives you 13 counts and settings to run on both servers and diff, so you know whether the move…
Written by
-
DBA Scripts: Get Version Upgrade Readiness
Before You Upgrade: What’s Actually Going to Break Migration Risk Assessment covers per-database risk findings when moving to different hardware or infrastructure. This post covers a narrower, earlier question: on THIS server, staying on the same infrastructure, what needs attention before a version upgrade? Three scripts, three angles on the same question: Version Upgrade Readiness:…
Written by
-
DBA Scripts: Get Login and Job Inventory
Two Plain Inventories Every Migration Plan Needs Permissions and Role Membership and SQL Agent and Jobs cover the deep dive. These two are the plain inventory underneath both: Get-LoginInventory: the logins a migration has to recreate, by type and status. No permission detail. Get-JobInventory: every SQL Agent job with its owner. No schedule or run…
Written by
-
DBA Scripts: Get Audit Specifications, DDL Triggers, and Proxy Credentials
Three Kinds of Infrastructure Most Servers Never Had in the First Place A schema change or a new login fails on an inherited server and nothing in your own code explains it, an auditor asks what this instance records, or a SQL Agent job step reaches places its owner cannot. These three scripts list what…
Written by
-
DBA Scripts: Get Certificates, Keys, and TDE Status
Check Certificate Expiry and TDE State A certificate is about to expire, a TDE restore has failed with Msg 33111, or someone needs to know which databases are encrypted. These scripts give you every certificate with its days left, the certificate behind each TDE database, and how far each database’s encryption has got. For the…
Written by
-
DBA Scripts: Get Login Security Audit
An audit is coming, or someone has just asked which SQL logins are unsafe, and you need the answer before the meeting. These read-only scripts give it back in the order I would check it myself: which logins have a guessable password or no policy behind them, who has been failing to log in and…
Written by
-
DBA Scripts: Get Permissions and Role Membership
Who Can Actually Do What, at Every Level Sysadmin Members answers the single highest-stakes question: who has unrestricted access. These 4 scripts answer everything underneath that: explicit object and schema grants inside a database, explicit server-level grants and denies on logins, database role memberships across every online database, and membership in every fixed and user-defined…
Written by
- Tune a Slow Query With Copilot in SSMS
- xp_readerrorlog: Read the SQL Server Error Log with T-SQL
- Cannot Drop Database Because It Is Currently in Use (Error 3702)
- Could Not Drop Login Because the User Is Currently Logged In (Error 15434)
- Set a Maximum Database File Size in SQL Server (MAXSIZE)
- SQL Server Activity Monitor in SSMS (and the Performance Dashboard)
- Backups & Recovery (18)
- DBA Scripts (154)
- High Availability (HA) (13)
- Installation & Configuration (60)
- Maintenance (25)
- Migration & Upgrades (14)
- Monitoring (10)
- Performance Tuning (38)
- Security (Encryption & Permissions) (25)
- Storage & Capacity (18)
- T-SQL Fundamentals (17)
- Troubleshooting (108)
- Wait Types (236)