If you are working as a DBA for a financial organisation where sensitive financial data is stored in your databases then security is usually your immediate concern. Securing SQL Server is not a easy task and you must follow a series of best practices in order to accomplish this task. In this blog post I’m listing these SQL Server 2008 security best practices that must be followed in order to secure your SQL Server installation.
Following best practices assume the SQL Server will be installed in a production environment requiring some security:
USE [master]
ALTER LOGIN sa DISABLE;
GO
ALTER LOGIN sa WITH NAME = [ReadOnlyUser]; USE [master]
GO
IF EXISTS (SELECT * FROM [sys].[server_principals]
WHERE [name] = N’BUILTIN\Administrators’)
DROP LOGIN [BUILTIN\Administrators]
GOSELECT [name], [password] FROM [master]..[syslogins]
WHERE [password] IS NULLSELECT * FROM [name]
FROM [master]..[sysobjects] o
JOIN [master]..[sysprotects] p
WHERE p.[uid] = 0 and p.[xtype] IN ('X','P')
AND o.[id] = p.[id]