Readers asked how to mark a filegroup as ReadOnly. Here is a T-SQL script that creates a test database, adds a filegroup and marks it ReadOnly.
SQL SERVER – SCRIPT – SQL Listening on Dynamic Port?
How do you know if SQL Server is listening on a fixed or dynamic port? Here is a script that reads the TcpDynamicPorts registry value for your instance.
Add a User Across Databases: A Tested Script With Cleanup
To add a user across databases you need one login and, in every chosen database, a user and a role. This post gives a tested script that does it, checks it and removes it again on SQL Server 2025. It also answers the model database question and shows the server-level shortcut.
SQL SERVER – Security Conversations and Notes with a DBA
At a Pluralsight booth, a DBA from the banking world asked me many SQL Server security questions. Here are my notes from those security conversations.
SQL SERVER – One Trick of Handling Dynamic SQL to Avoid SQL Injection Attack?
SQL Injection is not a SQL Server problem, it comes from coding habits. Here is one trick of handling dynamic SQL to avoid SQL injection attack on a search page.
SQL SERVER – Invoking a Stored Procedure from Azure Mobile Services – Notes from the Field #066
Can you call a SQL stored procedure from Azure Mobile Services? In Notes from the Field #066, Kevin Hazzard shows how, with a bit of humor along the way.
SQL SERVER – The DBA goes to MARS – Maintenance, Architecture, Research and Support – Notes from the Field #063
Stuart Ainsworth tells a captivating story on why the DBA goes to MARS: Maintenance, Architecture, Research and Support, the proactive side of the job.







