<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>SQLServerInfo</title>
	<atom:link href="http://sqlserverinfo.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://sqlserverinfo.wordpress.com</link>
	<description>Database Bare Metal</description>
	<lastBuildDate>Fri, 24 Oct 2008 14:53:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='sqlserverinfo.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>SQLServerInfo</title>
		<link>http://sqlserverinfo.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://sqlserverinfo.wordpress.com/osd.xml" title="SQLServerInfo" />
	<atom:link rel='hub' href='http://sqlserverinfo.wordpress.com/?pushpress=hub'/>
		<item>
		<title>SQL Server Best Practices</title>
		<link>http://sqlserverinfo.wordpress.com/2008/10/24/sql-server-best-practices/</link>
		<comments>http://sqlserverinfo.wordpress.com/2008/10/24/sql-server-best-practices/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 14:20:48 +0000</pubDate>
		<dc:creator>sqlserverinfo</dc:creator>
				<category><![CDATA[Best Practise]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[MS SQL Server 2005]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL 2005 SQLSERVER2005]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://sqlserverinfo.wordpress.com/?p=4</guid>
		<description><![CDATA[SQL Server service accounts recommendations: Use a specific user account or domain account rather than a shared account for SQL Server services. Use a separate account for each service. Do not give any special privileges to the SQL Server service account; they will be assigned by group membership. Manage privileges through the SQL Server supplied group account rather [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqlserverinfo.wordpress.com&amp;blog=3778008&amp;post=4&amp;subd=sqlserverinfo&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2><em>SQL Server service accounts recommendations:</em></h2>
<ol>
<li><span>Use a specific user account or domain account rather than a shared account for SQL Server services.</span></li>
<li><span>Use a separate account for each service.</span></li>
<li><span>Do not give any special privileges to the SQL Server service account; they will be assigned by group membership.</span></li>
<li><span>Manage privileges through the SQL Server supplied group account rather than through individual service user accounts.</span></li>
<li><span>Always use SQL Server Configuration Manager to change service accounts.</span></li>
<li><span>Change the service account password at regular intervals.</span></li>
<li><span>Use Credentials to execute job steps that require specific privileges rather than adjusting the privilege to the SQL Server Agent service account.</span></li>
<li><span>If an agent user needs to execute a job that requires different Windows credentials, assign them a proxy account that has just enough permission to get the task done.</span></li>
</ol>
<h2><strong><span><em>Best practices for authentication mode:</em></span></strong></h2>
<ol>
<li><span>Always use Windows Authentication mode if possible.</span></li>
<li><span>Use Mixed Mode Authentication only for legacy applications and non-Windows users.</span></li>
<li><span>Use the standard login DDL statements instead of the compatibility system procedures.</span></li>
<li><span>Change the <strong>sa</strong> account password to a known value if you might ever need to use it. Always use a strong password for the <strong>sa</strong> account and change the <strong>sa</strong> account password periodically.</span></li>
<li><span>Do not manage SQL Server by using the <strong>sa</strong> login account; assign <strong>sysadmin</strong> privilege to a knows user or group.</span></li>
<li><span>Rename the <strong>sa</strong> account to a different account name to prevent attacks on the <strong>sa</strong> account by name.</span></li>
</ol>
<h2><em>Best practices for network connectivity</em></h2>
<ol>
<li><span>Limit the network protocols supported.</span></li>
<li><span>Do not enable network protocols unless they are needed.</span></li>
<li><span>Do not expose a server that is running SQL Server to the public Internet.</span></li>
<li><span>Configure named instances of SQL Server to use specific port assignments for TCP/IP rather than dynamic ports.</span></li>
<li><span>If you must support SQL logins, install an SSL certificate from a trusted certificate authority rather than using SQL Server 2005 self-signed certificates.</span></li>
<li><span>Use &#8220;allow only encrypted connections&#8221; only if needed for end-to-end encryption of sensitive sessions.</span></li>
<li><span>Grant CONNECT permission only on endpoints to logins that need to use them. Explicitly deny CONNECT permission to endpoints that are not needed by users or groups.</span></li>
</ol>
<h2><strong><em><span>Best practices for system stored procedures</span></em></strong></h2>
<ol>
<li><span>Disable <strong>xp_cmdshell</strong> unless it is absolutely needed.</span></li>
<li><span>Disable COM components once all COM components have been converted to SQLCLR.</span></li>
<li><span>Disable both mail procedures (Database Mail and SQL Mail) unless you need to send mail from SQL Server. Prefer Database Mail as soon as you can convert to it.</span></li>
<li><span>Use SQL Server Surface Area Configuration to enforce a standard policy for extended procedure usage.</span></li>
<li><span>Document each exception to the standard policy.</span></li>
<li><span>Do not remove the system stored procedures by dropping them.</span></li>
<li><span>Do not DENY all users/administrators access to the extended procedures.</span></li>
</ol>
<h2><em>Best practices for password policy</em></h2>
<ol>
<li><span>Mandate a strong password policy, including expiration and a complexity policy for your organization.</span></li>
<li><span>If you must use SQL logins, ensure that SQL Server 2005 runs on the Windows Server 2003 operating system and use password policies.</span></li>
<li><span>Outfit your applications with a mechanism to change SQL login passwords.</span></li>
<li><span>Set MUST_CHANGE for new logins.</span></li>
</ol>
<h2><strong><em><span>Best practices for administrator privileges</span></em></strong></h2>
<p class="BulletedList1"> </p>
<ol>
<li><span>Use administrator privileges only when needed.</span></li>
<li><span>Minimize the number of administrators.</span></li>
<li><span>Provision admin principals explicitly.</span></li>
<li><span>Have multiple distinct administrators if more than one is needed.</span></li>
<li><span>Avoid dependency on the built-in\administrators Windows group.</span></li>
</ol>
<p> </p>
<h2><em>Best practices for database ownership and trust</em></h2>
<p class="BulletedList1"> </p>
<ol>
<li><span>Have distinct owners for databases; not all databases should be owned by <strong>sa</strong>.</span></li>
<li><span>Minimize the number of owners for each database.</span></li>
<li><span>Confer trust selectively.</span></li>
<li><span>Leave the Cross-Database Ownership Chaining setting off unless multiple databases are deployed at a single unit.</span></li>
<li><span>Migrate usage to selective trust instead of using the TRUSTWORTHY property.</span></li>
</ol>
<p> </p>
<h2><strong><em><span>Best practices for using schemas</span></em></strong></h2>
<p class="BulletedList1"> </p>
<ol>
<li><span>Group like objects together into the same schema.</span></li>
<li><span>Manage database object security by using ownership and permissions at the schema level.</span></li>
<li><span>Have distinct owners for schemas.</span></li>
<li><span>Not all schemas should be owned by <strong>dbo</strong>.</span></li>
<li><span>Minimize the number of owners for each schema.</span></li>
</ol>
<p> </p>
<h2><strong><em><span>Best practices for database object authorization</span></em></strong></h2>
<p class="BulletedList1"> </p>
<ol>
<li><span>Encapsulate access within modules.</span></li>
<li><span>Manage permissions via database roles or Windows groups.</span></li>
<li><span>Use permission granularity to implement the principle of least privilege.</span></li>
<li><span>Do not enable <strong>guest</strong> access.</span></li>
<li><span>Use users without logins instead of application roles</span></li>
</ol>
<p> </p>
<h2><strong><em><span>Best practices for catalog security</span></em></strong></h2>
<p class="BulletedList1"> </p>
<ol>
<li><span>The catalog views are secure by default. No additional action is required to secure them.</span></li>
<li><span>Grant VIEW DEFINITION selectively at the object, schema, database, or server level to grant permission to view system metadata without conferring additional permissions.</span></li>
<li><span>Review legacy applications that may depend on access to system metadata when migrating the applications to SQL Server 2005.</span></li>
</ol>
<p> </p>
<h2><em>Best practices for remote data source execution</em></h2>
<p class="BulletedList1"> </p>
<ol>
<li><span>Phase out any remote server definitions.</span></li>
<li><span>Replace remote servers with linked servers.</span></li>
<li><span>Leave ad hoc queries through linked servers disabled unless they are absolutely needed.</span></li>
<li><span>Use constrained delegation if pass-through authentication to a linked server is necessary.</span></li>
</ol>
<p> </p>
<h2><strong><em><span>Best practices for execution context</span></em></strong></h2>
<p class="BulletedList1"> </p>
<ol>
<li><span><span>1.<span>        </span></span></span><span>Set execution context on modules explicitly rather than letting it default.</span></li>
<li><span><span>2.<span>        </span></span></span><span>Use EXECUTE AS instead of SETUSER.</span></li>
<li><span><span>3.<span>        </span></span></span><span>Use WITH NO REVERT/COOKIE instead of Application Roles.</span></li>
<li><span><span>4.<span>       </span></span></span><span>Consider using code signing of procedural code if a single granular additional privilege is required for the procedure.</span></li>
</ol>
<p> </p>
<h2><strong><em><span>Best practices for data encryption</span></em></strong></h2>
<p class="BulletedList1"> </p>
<ol>
<li><span>Encrypt high-value and sensitive data.</span></li>
<li><span>Use symmetric keys to encrypt data, and asymmetric keys or certificates to protect the symmetric keys.</span></li>
<li><span>Password-protect keys and remove master key encryption for the most secure configuration.</span></li>
<li><span>Always back up the service master key, database master keys, and certificates by using the key-specific DDL statements.</span></li>
<li><span>Always back up your database to back up your symmetric and asymmetric keys.</span></li>
</ol>
<p> </p>
<h2><strong><em><span>Best practices for auditing</span></em></strong></h2>
<p class="BulletedList1"> </p>
<ol>
<li><span>Auditing is scenario-specific. Balance the need for auditing with the overhead of generating addition data.</span></li>
<li><span>Audit successful logins in addition to unsuccessful logins if you store highly sensitive data.</span></li>
<li><span>Audit DDL and specific server events by using trace events or event notifications.</span></li>
<li><span>DML must be audited by using trace events.</span></li>
<li><span>Use WMI to be alerted of emergency events.</span></li>
<li><span>Enable C2 auditing or Common Criteria compliance only if required.</span></li>
</ol>
<p> </p>
<h2><strong><em><span>Best practice analysis utilities recommendations</span></em></strong></h2>
<p class="BulletedList1"> </p>
<ol>
<li><span>Run BPA against SQL Server 2005.</span></li>
<li><span>Regularly run MBSA 2.0 to ensure latest SQL Server 2005 patch level</span></li>
<li><span>Regularly run MBSA 2.0 for SQL Server 2000 instances</span></li>
</ol>
<p> </p>
<h2><strong><em>SQL Server service accounts recommendations:</em></strong></h2>
<p> </p>
<ol>
<li>Use a specific user account or domain account rather than a shared account for SQL Server services.</li>
<li>Use a separate account for each service.</li>
<li>Do not give any special privileges to the SQL Server service account; they will be assigned by group membership.</li>
<li>Manage privileges through the SQL Server supplied group account rather than through individual service user accounts.</li>
<li>Always use SQL Server Configuration Manager to change service accounts.</li>
<li>Change the service account password at regular intervals.</li>
<li>Use Credentials to execute job steps that require specific privileges rather than adjusting the privilege to the SQL Server Agent service account.</li>
<li>If an agent user needs to execute a job that requires different Windows credentials, assign them a proxy account that has just enough permission to get the task done.</li>
</ol>
<p> </p>
<h2><strong><em>Best practices for authentication mode:</em></strong></h2>
<p> </p>
<ol>
<li>Always use Windows Authentication mode if possible.</li>
<li>Use Mixed Mode Authentication only for legacy applications and non-Windows users.</li>
<li>Use the standard login DDL statements instead of the compatibility system procedures.</li>
<li>Change the <strong>sa</strong> account password to a known value if you might ever need to use it. Always use a strong password for the <strong>sa</strong> account and change the <strong>sa</strong> account password periodically.</li>
<li>Do not manage SQL Server by using the <strong>sa</strong> login account; assign <strong>sysadmin</strong> privilege to a knows user or group.</li>
<li>Rename the <strong>sa</strong> account to a different account name to prevent attacks on the <strong>sa</strong> account by name.</li>
</ol>
<p> </p>
<h2><strong><em>Best practices for network connectivity</em></strong></h2>
<p> </p>
<ol>
<li>Limit the network protocols supported.</li>
<li>Do not enable network protocols unless they are needed.</li>
<li>Do not expose a server that is running SQL Server to the public Internet.</li>
<li>Configure named instances of SQL Server to use specific port assignments for TCP/IP rather than dynamic ports.</li>
<li>If you must support SQL logins, install an SSL certificate from a trusted certificate authority rather than using SQL Server 2005 self-signed certificates.</li>
<li>Use &#8220;allow only encrypted connections&#8221; only if needed for end-to-end encryption of sensitive sessions.</li>
<li>Grant CONNECT permission only on endpoints to logins that need to use them. Explicitly deny CONNECT permission to endpoints that are not needed by users or groups.</li>
</ol>
<p> </p>
<h2><strong><em>Best practices for system stored procedures</em></strong></h2>
<p> </p>
<ol>
<li>Disable <strong>xp_cmdshell</strong> unless it is absolutely needed.</li>
<li>Disable COM components once all COM components have been converted to SQLCLR.</li>
<li>Disable both mail procedures (Database Mail and SQL Mail) unless you need to send mail from SQL Server. Prefer Database Mail as soon as you can convert to it.</li>
<li>Use SQL Server Surface Area Configuration to enforce a standard policy for extended procedure usage.</li>
<li>Document each exception to the standard policy.</li>
<li>Do not remove the system stored procedures by dropping them.</li>
<li>Do not DENY all users/administrators access to the extended procedures.</li>
</ol>
<p> </p>
<h2><em>Best practices for password policy</em></h2>
<p> </p>
<ol>
<li>Mandate a strong password policy, including expiration and a complexity policy for your organization.</li>
<li>If you must use SQL logins, ensure that SQL Server 2005 runs on the Windows Server 2003 operating system and use password policies.</li>
<li>Outfit your applications with a mechanism to change SQL login passwords.</li>
<li>Set MUST_CHANGE for new logins.</li>
</ol>
<p> </p>
<h2><strong><em>Best practices for administrator privileges</em></strong></h2>
<p> </p>
<ol>
<li>Use administrator privileges only when needed.</li>
<li>Minimize the number of administrators.</li>
<li>Provision admin principals explicitly.</li>
<li>Have multiple distinct administrators if more than one is needed.</li>
<li>Avoid dependency on the built-in\administrators Windows group.</li>
</ol>
<p> </p>
<h2><em>Best practices for database ownership and trust</em></h2>
<p> </p>
<ol>
<li>Have distinct owners for databases; not all databases should be owned by <strong>sa</strong>.</li>
<li>Minimize the number of owners for each database.</li>
<li>Confer trust selectively.</li>
<li>Leave the Cross-Database Ownership Chaining setting off unless multiple databases are deployed at a single unit.</li>
<li>Migrate usage to selective trust instead of using the TRUSTWORTHY property.</li>
</ol>
<p> </p>
<h2><em>Best practices for using schemas</em></h2>
<p> </p>
<ol>
<li>Group like objects together into the same schema.</li>
<li>Manage database object security by using ownership and permissions at the schema level.</li>
<li>Have distinct owners for schemas.</li>
<li>Not all schemas should be owned by <strong>dbo</strong>.</li>
<li>Minimize the number of owners for each schema.</li>
</ol>
<p> </p>
<h2><strong><em>Best practices for database object authorization</em></strong></h2>
<p> </p>
<ol>
<li>Encapsulate access within modules.</li>
<li>Manage permissions via database roles or Windows groups.</li>
<li>Use permission granularity to implement the principle of least privilege.</li>
<li>Do not enable <strong>guest</strong> access.</li>
<li>Use users without logins instead of application roles</li>
</ol>
<p> </p>
<h2><strong><em>Best practices for catalog security</em></strong></h2>
<p> </p>
<ol>
<li>The catalog views are secure by default. No additional action is required to secure them.</li>
<li>Grant VIEW DEFINITION selectively at the object, schema, database, or server level to grant permission to view system metadata without conferring additional permissions.</li>
<li>Review legacy applications that may depend on access to system metadata when migrating the applications to SQL Server 2005.</li>
</ol>
<p> </p>
<h2><strong><em>Best practices for remote data source execution</em></strong></h2>
<p> </p>
<ol>
<li>Phase out any remote server definitions.</li>
<li>Replace remote servers with linked servers.</li>
<li>Leave ad hoc queries through linked servers disabled unless they are absolutely needed.</li>
<li>Use constrained delegation if pass-through authentication to a linked server is necessary.</li>
</ol>
<p> </p>
<h2><strong><em>Best practices for execution context</em></strong></h2>
<p> </p>
<ol>
<li>Set execution context on modules explicitly rather than letting it default.</li>
<li>Use EXECUTE AS instead of SETUSER.</li>
<li>Use WITH NO REVERT/COOKIE instead of Application Roles.</li>
<li>Consider using code signing of procedural code if a single granular additional privilege is required for the procedure.</li>
</ol>
<p> </p>
<h2><em>Best practices for data encryption</em></h2>
<p> </p>
<ol>
<li>Encrypt high-value and sensitive data.</li>
<li>Use symmetric keys to encrypt data, and asymmetric keys or certificates to protect the symmetric keys.</li>
<li>Password-protect keys and remove master key encryption for the most secure configuration.</li>
<li>Always back up the service master key, database master keys, and certificates by using the key-specific DDL statements.</li>
<li>Always back up your database to back up your symmetric and asymmetric keys.</li>
</ol>
<p> </p>
<h2><em>Best practices for auditing</em></h2>
<p> </p>
<ol>
<li>Auditing is scenario-specific. Balance the need for auditing with the overhead of generating addition data.</li>
<li>Audit successful logins in addition to unsuccessful logins if you store highly sensitive data.</li>
<li>Audit DDL and specific server events by using trace events or event notifications.</li>
<li>DML must be audited by using trace events.</li>
<li>Use WMI to be alerted of emergency events.</li>
<li>Enable C2 auditing or Common Criteria compliance only if required.</li>
</ol>
<p> </p>
<h2><em>Best practice analysis utilities recommendations</em></h2>
<p> </p>
<ol>
<li>Run BPA against SQL Server 2005.</li>
<li>Regularly run MBSA 2.0 to ensure latest SQL Server 2005 patch level</li>
<li>Regularly run MBSA 2.0 for SQL Server 2000 instances</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlserverinfo.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlserverinfo.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlserverinfo.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlserverinfo.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlserverinfo.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlserverinfo.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlserverinfo.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlserverinfo.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlserverinfo.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlserverinfo.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlserverinfo.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlserverinfo.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlserverinfo.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlserverinfo.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqlserverinfo.wordpress.com&amp;blog=3778008&amp;post=4&amp;subd=sqlserverinfo&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqlserverinfo.wordpress.com/2008/10/24/sql-server-best-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3b257efa73d2776dd27a2e65c66294c5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">MSDHANJAL</media:title>
		</media:content>
	</item>
	</channel>
</rss>
