<?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/"
	>

<channel>
	<title>SQL Assess Archives - The SERO Group</title>
	<atom:link href="https://theserogroup.com/category/sql-assess/feed/" rel="self" type="application/rss+xml" />
	<link>https://theserogroup.com/category/sql-assess/</link>
	<description>SQL Servers Healthy, Secure, And Reliable</description>
	<lastBuildDate>Fri, 13 Oct 2023 21:25:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>

<image>
	<url>https://theserogroup.com/wp-content/uploads/2024/07/cropped-Canister-only-1-32x32.png</url>
	<title>SQL Assess Archives - The SERO Group</title>
	<link>https://theserogroup.com/category/sql-assess/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">121220030</site>	<item>
		<title>Am I affected by MrbMiner malware?</title>
		<link>https://theserogroup.com/sql-server/am-i-affected-by-mrbminer-malware/</link>
					<comments>https://theserogroup.com/sql-server/am-i-affected-by-mrbminer-malware/#comments</comments>
		
		<dc:creator><![CDATA[Luke Campbell]]></dc:creator>
		<pubDate>Wed, 16 Sep 2020 14:19:17 +0000</pubDate>
				<category><![CDATA[Consulting]]></category>
		<category><![CDATA[SQL Assess]]></category>
		<category><![CDATA[SQL Audit]]></category>
		<category><![CDATA[SQL Security]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[audit]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[Script Library]]></category>
		<category><![CDATA[SQL Script Library]]></category>
		<guid isPermaLink="false">http://theserogroup.com/?p=3176</guid>

					<description><![CDATA[<p>SQL Server hardware can be powerful. Lots of CPU cores and memory. Just what a crypto miner may need in their quest to generate cryptocurrency. In the case of the MrbMiner exploit, numerous SQL Servers have been exploited with brute-force attacks. These attacks are scanning for servers exposed directly to the internet and are using&#8230; <br /> <a class="read-more" href="https://theserogroup.com/sql-server/am-i-affected-by-mrbminer-malware/">Read more</a></p>
<p>The post <a href="https://theserogroup.com/sql-server/am-i-affected-by-mrbminer-malware/">Am I affected by MrbMiner malware?</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>SQL Server hardware can be powerful.  Lots of CPU cores and memory.  Just what a crypto miner may need in their quest to generate cryptocurrency.  In the case of the MrbMiner exploit, numerous SQL Servers have been exploited with brute-force attacks.  These attacks are scanning for servers exposed directly to the internet and are using weak passwords.  Once exploited, a new account, using the username &#8220;Default&#8221; is created.  An app is downloaded which begins mining Monero cryptocurrency.  More details on the exploit can be found <a rel="noreferrer noopener" href="https://zd.net/3hCOciU" target="_blank">here</a>.</p>



<h3 class="wp-block-heading" id="h-checking-for-the-default-username">Checking for the &#8220;Default&#8221; username</h3>



<p>You can check for the presence of this login by running the query below.  If found, a full network audit is recommended.  </p>



<pre class="wp-block-code"><code>--Verify the default account doesn't exist.  No results is a good thing.
SELECT 
	&#91;name],
	&#91;type_desc],
	is_disabled,
	create_date,
	modify_date
FROM sys.server_principals
WHERE &#91;name] = 'Default'</code></pre>



<p>What if you already had a login named &#8220;Default&#8221;?  Determine if the password was recently changed to &#8220;<em>@fg125kjnhn987</em>&#8221; and if there have been any recent login failures.  Review for any recently created logins as well.  Are all logins accounted for?  Were any created that you were not aware of?  If so, review each further to determine what permissions they have and identify what they&#8217;re being used for. </p>



<pre class="wp-block-code"><code>--Review recently created logins
SELECT 
	&#91;name],
	&#91;type_desc],
	is_disabled,
	create_date,
	modify_date
FROM sys.server_principals
ORDER BY create_date desc</code></pre>



<p>Review recently modified logins.</p>



<pre class="wp-block-code"><code>--Review recently modified logins
SELECT 
	&#91;name],
	&#91;type_desc],
	is_disabled,
	create_date,
	modify_date
FROM sys.server_principals
ORDER BY modify_date desc</code></pre>



<h3 class="wp-block-heading" id="h-avoid-making-your-sql-servers-easy-targets">Avoid making your SQL Servers easy targets</h3>



<p>By utilizing security best practices, most brute-force attacks can be stopped.  Or, at the very least, set off alarm bells and whistles to alert you of suspicious activity.  Below is a list of do&#8217;s and don&#8217;ts we typically recommend.  This is not an exhaustive list.</p>



<h4 class="wp-block-heading" id="h-don-t">Don&#8217;t</h4>



<ol class="wp-block-list">
<li>Don&#8217;t expose your SQL Servers to the internet (if at all possible).  Use a VPN to access externally.</li>



<li>Don&#8217;t use weak passwords (for any account).  </li>



<li>Don&#8217;t add your SQL Server service accounts to the local admin group.</li>



<li>Don&#8217;t grant your SQL Server service accounts more permissions than required.</li>



<li>Don&#8217;t grant logins more permissions than required.</li>



<li>Don&#8217;t install additional services which are not required.  SQL Server licenses include not only the database engine, but integration services, analysis services, and reporting services as well (at the time of this post).  It&#8217;s easy enough to go ahead and install these additional services but also increases the attack surface area.  Only install what is required.</li>



<li>Don&#8217;t enable additional options, within SQL Server, if unneeded.  For example, xp_cmdshell,  Ole Automation Procedures, and ad hoc distributed queries.</li>
</ol>



<h4 class="wp-block-heading" id="h-do">Do</h4>



<ol class="wp-block-list" id="block-970d4d59-f9f9-4999-a879-814cbfbf5cab">
<li>Patch often.  Review latest cumulative update, service pack releases, and hotfixes.  Start <a rel="noreferrer noopener" href="https://bit.ly/3krF3Mb" data-type="URL" data-id="https://bit.ly/3krF3Mb" target="_blank">here</a>.</li>



<li>Implement a policy in which an account will become locked out after X number of attempts.</li>



<li>Change passwords often.</li>



<li>Audit the creation of new logins (and review the audits often 😉).</li>



<li>Disable the SA account. This account is well known and has unfettered access.</li>



<li>If not required, don&#8217;t use SQL Server authentication.</li>



<li>Review failed login attempts.  Especially those occurring numerous times within a short span of time.  This could be an indication of a brute-force attempt.</li>



<li>Implement a process to audit using guidelines such as the US government Security Technical Implementation Guides (STIGs) or Center for Internet Security (more on these below).</li>



<li>Review the health and performance metrics of your SQL Servers regularly.</li>



<li>Proactively monitor your SQL Servers to look for unexpected deviations of resource consumption.  </li>
</ol>



<h3 class="wp-block-heading" id="h-audit-your-environment">Audit your environment</h3>



<p>These types of exploits can typically be avoided.  Implementing good security practices can be a painful process (not only from a technical perspective but also from the staff and end user perspective).  The following guides provide a large set of information and scripts to get you started with securing your environment.  </p>



<h4 class="wp-block-heading" id="h-cis-center-for-internet-security">CIS &#8211; Center for Internet Security</h4>



<p>CIS Benchmarks are consensus-developed secure configuration guidelines for hardening.  There are benchmarks for operating systems, server software, cloud providers, network devices etc.  Take a look <a rel="noreferrer noopener" href="https://www.cisecurity.org/cis-benchmarks/" data-type="URL" data-id="https://www.cisecurity.org/cis-benchmarks/" target="_blank">here</a> for a list of what they have to offer.  SQL Server specific benchmarks can be found at <a rel="noreferrer noopener" href="https://www.cisecurity.org/benchmark/microsoft_sql_server/" target="_blank">https://www.cisecurity.org/benchmark/microsoft_sql_server/</a>.  There are some aspects of the site which requires membership but includes additional tools.  Well worth the consideration.</p>



<h4 class="wp-block-heading" id="h-national-vulnerability-database">National Vulnerability Database</h4>



<p>The <a rel="noreferrer noopener" href="https://nvd.nist.gov/ncp/repository" data-type="URL" data-id="https://nvd.nist.gov/ncp/repository" target="_blank">NCP</a> is the U.S. government repository of publicly available security checklists which provide guidance on setting the security configuration of operating systems and applications.  The checklists (STIG) can be downloaded as a zip.  To view, download and install the STIG Viewer from <a rel="noreferrer noopener" href="https://public.cyber.mil/stigs/srg-stig-tools/" target="_blank">https://public.cyber.mil/stigs/srg-stig-tools/</a> and follow the instructions.</p>



<h3 class="wp-block-heading" id="h-how-we-can-help">How we can help</h3>



<p>Security is constantly evolving.  Setting up good policies around platform hardening, password complexity and rotation, and using accounts with the least privilege required is a daunting task for any organization.  Especially those without dedicated security or database administrators.  I&#8217;m hopeful a few of the resources above can get you started on the right path.  We&#8217;re here to help as well.  If you&#8217;d like assistance in assessing your SQL Servers, schedule a call with us <a href="https://theserogroup.com/#contact" target="_blank" rel="noreferrer noopener">here</a>. </p>



<p>Thanks for reading!</p>
<p>The post <a href="https://theserogroup.com/sql-server/am-i-affected-by-mrbminer-malware/">Am I affected by MrbMiner malware?</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theserogroup.com/sql-server/am-i-affected-by-mrbminer-malware/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3176</post-id>	</item>
		<item>
		<title>Vollgar: 6 Scripts to Help Review Your SQL Servers</title>
		<link>https://theserogroup.com/sql-server/vollgar-6-scripts-to-help-review-your-sql-servers/</link>
					<comments>https://theserogroup.com/sql-server/vollgar-6-scripts-to-help-review-your-sql-servers/#comments</comments>
		
		<dc:creator><![CDATA[Joe Webb]]></dc:creator>
		<pubDate>Tue, 07 Apr 2020 19:49:02 +0000</pubDate>
				<category><![CDATA[SQL Assess]]></category>
		<category><![CDATA[SQL Audit]]></category>
		<category><![CDATA[SQL Script Library]]></category>
		<category><![CDATA[SQL Security]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Script Library]]></category>
		<guid isPermaLink="false">http://theserogroup.com/?p=2747</guid>

					<description><![CDATA[<p>Last week, Guardicore released information about a newly discovered attack that uses SQL Servers to compromise servers and networks. Here&#8217;s a link; I&#8217;d really encourage you to read it. The attack known as Vollgar uses a simple brute force attack to gain access to SQL Servers exposed to the internet. It then uses the elevated&#8230; <br /> <a class="read-more" href="https://theserogroup.com/sql-server/vollgar-6-scripts-to-help-review-your-sql-servers/">Read more</a></p>
<p>The post <a href="https://theserogroup.com/sql-server/vollgar-6-scripts-to-help-review-your-sql-servers/">Vollgar: 6 Scripts to Help Review Your SQL Servers</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Last week, Guardicore released information about a newly discovered attack that uses SQL Servers to compromise servers and networks. Here&#8217;s a <a aria-label="link (opens in a new tab)" rel="noreferrer noopener" href="https://www.guardicore.com/2020/04/vollgar-ms-sql-servers-under-attack/" target="_blank">link</a>; I&#8217;d really encourage you to read it. The attack known as Vollgar uses a simple brute force attack to gain access to SQL Servers exposed to the internet. It then uses the elevated permissions of the compromised logins (sysadmin or serveradmin) to modify the capabilities of SQL Server and extended its access. </p>



<p><a rel="noreferrer noopener" aria-label="Guardicore has released a PowerShell script (opens in a new tab)" href="https://github.com/guardicore/labs_campaigns/tree/master/Vollgar" target="_blank">Guardicore has released a PowerShell script</a> that examines servers to determine if they’ve been infected.&nbsp;We’ve safely run the scripts on SQL Servers in our lab environment and for many of our clients. </p>



<p>If you routinely apply regular updates to your servers, practice the Principle of Least Privilege, regularly change critical passwords, have stringent password complexity requirements, and don&#8217;t expose your SQL Servers directly to the internet, the likelihood of a brute force attack succeeding is greatly reduced. </p>



<p>Here are six scripts that can help determine your level of potential exposure.</p>



<h3 class="wp-block-heading">Who Has sysadmin or serveradmin Privileges?</h3>



<p>The Vollgar attack is a brute force attack that attempts to guess the password for SQL Logins with elevated privileges. To be successful it needs logins that can execute <a rel="noreferrer noopener" aria-label="sp_configure (opens in a new tab)" href="https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-configure-transact-sql?view=sql-server-ver15" target="_blank">sp_configure</a> to change server-level settings. This are implicitly held by the sysadmin and serveradmin fixed server roles. </p>



<p>So, the first step in determining your exposure to Vollgar is to discover the members of the sysadmin and serveradmin roles. The following script will show you the members of each role. </p>



<pre class="wp-block-code"><code>USE master; 
GO

EXEC sp_helpsrvrolemember
	'sysadmin';

EXEC sp_helpsrvrolemember
	'serveradmin';</code></pre>



<p>In my sample database, the following is returned. </p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="941" height="518" src="http://theserogroup.com/wp-content/uploads/2020/04/server_role_members-1.png" alt="" class="wp-image-2771" srcset="https://theserogroup.com/wp-content/uploads/2020/04/server_role_members-1.png 941w, https://theserogroup.com/wp-content/uploads/2020/04/server_role_members-1-300x165.png 300w, https://theserogroup.com/wp-content/uploads/2020/04/server_role_members-1-768x423.png 768w" sizes="(max-width: 941px) 100vw, 941px" /></figure>



<p>Another approach to retrieving the same information in one consolidated result set is to use the following script. </p>



<pre class="wp-block-code"><code>--list of logins that are members of the sysadmin or serveradmin roles
SELECT SP1.&#91;name] AS 'Login',
	SP2.&#91;name] AS 'ServerRole'
FROM sys.server_principals AS SP1
	JOIN sys.server_role_members AS SRM 
		ON SP1.principal_id = SRM.member_principal_id
	JOIN sys.server_principals AS SP2 
		ON SRM.role_principal_id = SP2.principal_id
WHERE SP2.&#91;name] IN ('sysadmin', 'serveradmin')
ORDER BY SP2.&#91;name],
	 SP1.&#91;name];</code></pre>



<p>As expected, this script produces the same results. </p>



<figure class="wp-block-image size-large"><img decoding="async" width="594" height="325" src="http://theserogroup.com/wp-content/uploads/2020/04/server_role_members_v2-1.png" alt="" class="wp-image-2772" srcset="https://theserogroup.com/wp-content/uploads/2020/04/server_role_members_v2-1.png 594w, https://theserogroup.com/wp-content/uploads/2020/04/server_role_members_v2-1-300x164.png 300w" sizes="(max-width: 594px) 100vw, 594px" /></figure>



<p>Of course, it&#8217;s best practice to only grant the minimum rights required by each login, a practice known as least privilege. If these queries return more logins than absolutely necessary, it&#8217;s time to review your security practices. </p>



<h3 class="wp-block-heading">Who has Passwords that Do Not Expire and without Password Complexity Requirements?</h3>



<p>Having a complex password and changing it regularly is part of the basic blocking and tackling of security. Passwords like &#8220;Password123&#8221;, &#8220;Qwerty&#8221;, and &#8220;Puddles!&#8221; can be cracked in very short order using tools freely available on the web. And if these passwords never expire, users have no reason to change them regularly, making them even more of a liability.</p>



<p>For Windows Integrated Authentication, password complexity and expiration is handled at the network domain level. For SQL logins, these are enforced inside of SQL Server. </p>



<p>To find active SQL logins (e.g. not disabled) that do not require a basic level of complexity and are set to not expired, run the following script.</p>



<pre class="wp-block-code"><code>--Active SQL Logins where passwords do not expire
--and do not have complexity requirements 
SELECT name, 
	type_desc, 
	create_date, 
	modify_date, 
	default_database_name
FROM sys.sql_logins
WHERE is_expiration_checked = 0
	 AND is_disabled = 0 
	 AND is_policy_checked = 0 ; </code></pre>



<p>In my sample system, the script produces the following list. </p>



<figure class="wp-block-image size-large"><img decoding="async" width="956" height="330" src="http://theserogroup.com/wp-content/uploads/2020/04/password_dont_expire-1.png" alt="" class="wp-image-2773" srcset="https://theserogroup.com/wp-content/uploads/2020/04/password_dont_expire-1.png 956w, https://theserogroup.com/wp-content/uploads/2020/04/password_dont_expire-1-300x104.png 300w, https://theserogroup.com/wp-content/uploads/2020/04/password_dont_expire-1-768x265.png 768w" sizes="(max-width: 956px) 100vw, 956px" /></figure>



<p>Regularly changing passwords creates a moving target for potential attackers. If you have SQL logins that do not expire and do not have minimum complexity requirements, consider turning these features on for all your logins. </p>



<p>Putting some of the above queries together will give us a list of all active SQL logins that are members of the sysadmin or serveradmin fixed server roles along with whether their logins adhere to password complexity and expiration policies. </p>



<pre class="wp-block-code"><code>--list of SQL logins that are members of the sysadmin or serveradmin roles
SELECT SP1.&#91;name] AS 'Login',
	SP2.&#91;name] AS 'ServerRole',
	CASE l.is_disabled WHEN 1 THEN 'No' ELSE 'Yes' END AS Is_Enabled,
	CASE l.is_expiration_checked WHEN 1 THEN 'Yes' ELSE 'No' End AS Pwd_Expires,
	CASE l.is_policy_checked WHEN 1 THEN 'Yes' ELSE 'No' END AS Pwd_Complexity_Reqs
FROM sys.server_principals AS SP1
	JOIN sys.server_role_members AS SRM
	ON SP1.principal_id = SRM.member_principal_id
	JOIN sys.server_principals AS SP2
	ON SRM.role_principal_id = SP2.principal_id
	JOIN sys.sql_logins AS l
	ON l.principal_id = SRM.member_principal_id
WHERE SP2.&#91;name] IN ('sysadmin', 'serveradmin')
ORDER BY SP2.&#91;name],
	 SP1.&#91;name];</code></pre>



<p>The following results are returned on my test system.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="802" height="274" src="http://theserogroup.com/wp-content/uploads/2020/04/elevated_privileges.png" alt="" class="wp-image-2783" srcset="https://theserogroup.com/wp-content/uploads/2020/04/elevated_privileges.png 802w, https://theserogroup.com/wp-content/uploads/2020/04/elevated_privileges-300x102.png 300w, https://theserogroup.com/wp-content/uploads/2020/04/elevated_privileges-768x262.png 768w" sizes="auto, (max-width: 802px) 100vw, 802px" /></figure>



<h3 class="wp-block-heading">When was a SQL Login Password Changed?</h3>



<p>From the prior two queries, we can see that Alice and Donnie are both active members of the sysadmin fixed server role. Donnie&#8217;s password doesn&#8217;t expire and doesn&#8217;t have to meet any password complexity requirements. Of course, this is a big red flag for security. Alice&#8217;s login, on the other hand, is set to adhere to complexity and expiration requirements. That&#8217;s good. </p>



<p>But how long has it been since Alice actually changed her password? We can use the <a rel="noreferrer noopener" aria-label="LOGINPROPERTY() (opens in a new tab)" href="https://docs.microsoft.com/en-us/sql/t-sql/functions/loginproperty-transact-sql?view=sql-server-ver15" target="_blank">LOGINPROPERTY()</a> function to help us. Note: that for the function to return meaningful information, both  CHECK_POLICY and CHECK_EXPIRATION must be enabled for the login.</p>



<pre class="wp-block-code"><code>--when was a login's password last changed?
SELECT 'Alice' AS username,
	LOGINPROPERTY('Alice', 'PasswordLastSetTime') AS PasswordLastSetTime;</code></pre>



<p>In this case, we can see that Alice last set her password on March 26, 2020. </p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="435" height="110" src="http://theserogroup.com/wp-content/uploads/2020/04/password_last_changed-1.png" alt="" class="wp-image-2774" srcset="https://theserogroup.com/wp-content/uploads/2020/04/password_last_changed-1.png 435w, https://theserogroup.com/wp-content/uploads/2020/04/password_last_changed-1-300x76.png 300w" sizes="auto, (max-width: 435px) 100vw, 435px" /></figure>



<p>We can use other properties in the LOGINPROPERTY() function, such as BadPasswordCount and BadPasswordTime.  I wouldn&#8217;t rely too heavily on the results, though. The BadPasswordCount is reset to 0 as soon as Alice successfully logs in. And, just as importantly, it&#8217;s only relevant for those SQL Logins who have  CHECK_POLICY and CHECK_EXPIRATION enabled. </p>



<pre class="wp-block-code"><code>--bad password attempts
SELECT name, 
	LOGINPROPERTY(name, 'BadPasswordCount') AS BadPasswordCount,
	LOGINPROPERTY(name, 'BadPasswordTime') AS BadPasswordTime
FROM sys.sql_logins 
WHERE is_expiration_checked = 1
	AND is_disabled = 0 
	AND is_policy_checked = 1; </code></pre>



<p>The results from my test system are shown below. </p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="693" height="490" src="http://theserogroup.com/wp-content/uploads/2020/04/bad_attempts-1.png" alt="" class="wp-image-2768" srcset="https://theserogroup.com/wp-content/uploads/2020/04/bad_attempts-1.png 693w, https://theserogroup.com/wp-content/uploads/2020/04/bad_attempts-1-300x212.png 300w" sizes="auto, (max-width: 693px) 100vw, 693px" /></figure>



<h3 class="wp-block-heading">How to See Failed Login Attempts</h3>



<p>Assuming your SQL Server is configured to log failed login attempts, and of course it should be, you can query the error log files using the sp_readerrorlog procedure to see the failed attempts. </p>



<pre class="wp-block-code"><code>EXEC sp_readerrorlog 0, 1, 'Login failed' ;</code></pre>



<p>The following is returned on my test system.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="862" height="273" src="http://theserogroup.com/wp-content/uploads/2020/04/error_log_files-1.png" alt="" class="wp-image-2769" srcset="https://theserogroup.com/wp-content/uploads/2020/04/error_log_files-1.png 862w, https://theserogroup.com/wp-content/uploads/2020/04/error_log_files-1-300x95.png 300w, https://theserogroup.com/wp-content/uploads/2020/04/error_log_files-1-768x243.png 768w" sizes="auto, (max-width: 862px) 100vw, 862px" /></figure>



<p>Better yet, use a monitoring tool to proactively monitor failed login attempts and alert when a minimum threshold is exceeded. For our <a rel="noreferrer noopener" aria-label="DBA as a Service (opens in a new tab)" href="http://theserogroup.com/#how-we-help" target="_blank">DBA as a Service</a> clients, we provide <a rel="noreferrer noopener" aria-label="SentryOne (opens in a new tab)" href="https://www.sentryone.com/" target="_blank">SentryOne</a>&#8216;s <a rel="noreferrer noopener" aria-label="SQLSentry  (opens in a new tab)" href="https://www.sentryone.com/products/sentryone-platform/sql-sentry/sql-server-performance-monitoring" target="_blank">SQLSentry </a>monitoring tool to help with this and other events that should be monitored.</p>



<h3 class="wp-block-heading">Parting Thoughts</h3>



<p>Many years ago, I set up a test system for a writing project I was involved with. As part of the test, I set the sa password to something like &#8220;Cat123Dog!&#8221; The password met most requirements of the day &#8211; upper and lower case, at least one number and one letter, and a special symbol. &#8220;Not bad,&#8221; I thought to myself.</p>



<p>Then I downloaded <a rel="noreferrer noopener" aria-label="Ophcrack (opens in a new tab)" href="https://ophcrack.sourceforge.io/" target="_blank">Ophcrack</a>, a free Windows password cracker, and released it on my unsuspecting SQL Server. Expecting the utility to run for hours, if not days, I returned to work. </p>



<p>A few minutes later, I decided to check on it, wanting to make sure it wasn&#8217;t hung for some reason. I was stunned. Ophcrack had already found the password! That was at least 10 years ago. I&#8217;m sure the tools of the hacker trade have gotten much better since then. </p>



<p>Recently, I&#8217;ve read where most breaches are a result of social engineering &#8211; someone receives an e-Card from a secret admirer, finds a thumb drive in the parking lot, or clicks an email link. &#8220;The days of brute force attacks are over,&#8221; they say. </p>



<p>Vollgar has proven them wrong. Basic security measures are still best practice. You owe it to yourself to make sure you&#8217;re doing it well. Here are a few links that may help.</p>



<ul class="wp-block-list"><li><a rel="noreferrer noopener" aria-label="Introduction to SQL Server Security (opens in a new tab)" href="https://www.red-gate.com/simple-talk/sysadmin/data-protection-and-privacy/introduction-to-sql-server-security-part-1/" target="_blank">Introduction to SQL Server Security</a></li><li><a rel="noreferrer noopener" aria-label="Securing SQL Server (opens in a new tab)" href="https://docs.microsoft.com/en-us/sql/relational-databases/security/securing-sql-server?view=sql-server-ver15" target="_blank">Securing SQL Server</a></li><li><a href="https://www.mssqltips.com/sqlservertip/3159/sql-server-security-checklist/" target="_blank" rel="noreferrer noopener" aria-label="SQL Server Security Checklist (opens in a new tab)">SQL Server Security Checklist</a></li></ul>
<p>The post <a href="https://theserogroup.com/sql-server/vollgar-6-scripts-to-help-review-your-sql-servers/">Vollgar: 6 Scripts to Help Review Your SQL Servers</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theserogroup.com/sql-server/vollgar-6-scripts-to-help-review-your-sql-servers/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2747</post-id>	</item>
		<item>
		<title>Is My SQL Server Configured Properly?</title>
		<link>https://theserogroup.com/sql-server/is-my-sql-server-configured-properly/</link>
					<comments>https://theserogroup.com/sql-server/is-my-sql-server-configured-properly/#comments</comments>
		
		<dc:creator><![CDATA[Joe Webb]]></dc:creator>
		<pubDate>Tue, 06 Aug 2019 13:59:06 +0000</pubDate>
				<category><![CDATA[Data Security]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[Professional Development]]></category>
		<category><![CDATA[SQL Assess]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Consulting]]></category>
		<category><![CDATA[The Sero Group]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Database Development]]></category>
		<category><![CDATA[IT Manager]]></category>
		<category><![CDATA[Sero]]></category>
		<category><![CDATA[Sero Group]]></category>
		<category><![CDATA[SQL Consulting]]></category>
		<category><![CDATA[SQL Server Management]]></category>
		<guid isPermaLink="false">http://theserogroup.com/?p=2490</guid>

					<description><![CDATA[<p>Installing SQL Server is surprisingly easy. Download the media, double-click the setup file, answer a few configuration questions, and in less than 15 minutes you have a fully functional database server. And the server performs well. For a while. Then it slows down and maybe even a database corrupts. You recover by restoring the prior&#8230; <br /> <a class="read-more" href="https://theserogroup.com/sql-server/is-my-sql-server-configured-properly/">Read more</a></p>
<p>The post <a href="https://theserogroup.com/sql-server/is-my-sql-server-configured-properly/">Is My SQL Server Configured Properly?</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Installing SQL Server is surprisingly easy. Download the media, double-click the setup file, answer a few configuration questions, and in less than 15 minutes you have a fully functional database server. </p>



<p>And the server performs well. For a while. Then it slows down and maybe even a database corrupts. You recover by restoring the prior night&#8217;s backup. You lost some data but not too much. At least, you&#8217;re running again. So, you add some memory and a couple of processors to the virtual machine in hopes that it&#8217;ll help. But you begin to wonder if your data is safe, really safe. And if it goes down, can you recover?</p>



<p>Unfortunately, this is a story that happens all too often. </p>



<h2 class="wp-block-heading">SQL Configuration Matters</h2>



<p>Microsoft SQL Server is a robust, well-designed database engine that performs remarkably well even when neglected. But knowing that critical information is not being actively cared for often leads to angst, especially in those who are responsible for the business. </p>



<p>If you have a SQL Server, you also probably have people who depend on it and the information it contains. They need SQL Server to be performant and reliable. Throwing hardware at problems can overcome a multitude of issues but at a cost &#8211; a real cost in terms of additional licenses and an emotional cost in terms of uncertainty.</p>



<p>The thing is: the way SQL Server is configured after it is installed can have a dramatic effect on how it performs. We&#8217;ve found that most SQL Servers are not configured with industry best practices. In fact, we find that 95% of the SQL Servers we&#8217;ve assessed depart from best practices in many areas. And that puts them at risk for poor performance or even data loss. You can <a rel="noreferrer noopener" aria-label=" (opens in a new tab)" href="http://theserogroup.com/#common-issues" target="_blank">download a free pdf of the most common issues</a> we find. </p>



<p>So, we can you do? </p>



<h2 class="wp-block-heading">Assessing Your SQL Configuration</h2>



<p>A review of your SQL Server configuration settings is a great first step toward ensuring your SQL Server can perform well. Confirming that your SQL Servers are up to date and that the settings are consistent with industry-established best practices will give you confidence in knowing that your SQL Server has the foundation for solid execution.</p>



<p>There are several ways to do this.</p>



<h3 class="wp-block-heading">1. Do You Own Configuration Review</h3>



<p>Whether you have 5 or 500 SQL Servers, identify each instance in your SQL Server environment and prioritize the list based on key factors: impact on the business, frequency of issues, and complexity of setup. Review the list and begin assessing the configuration of the highest priority instances. Compare their settings to what they should be.</p>



<p>For example, what are their maximum and minimum memory settings? What values are configured for Maximum Degree of Parallelism and Cost Threshold for Parallelism? How many tempdb files are defined? Is the instance on the latest supported Cumulative Update? Do you have the appropriate maintenance plans defined? What about file growth settings? Etc.</p>



<p>Here are a few links that may help.</p>



<ul class="wp-block-list"><li><a rel="noreferrer noopener" aria-label="Operating System Best Practice Configurations for SQL Server (opens in a new tab)" href="https://blogs.msdn.microsoft.com/docast/2018/02/01/operating-system-best-practice-configurations-for-sql-server/" target="_blank">Operating System Best Practice Configurations for SQL Server</a></li><li><a rel="noreferrer noopener" aria-label="Performance guidelines for SQL Server in Azure Virtual Machines (opens in a new tab)" href="https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-windows-sql-performance" target="_blank">Performance guidelines for SQL Server in Azure Virtual Machines</a></li><li><a href="https://support.microsoft.com/en-us/help/4465518/recommended-updates-and-configurations-for-sql-server" target="_blank" rel="noreferrer noopener" aria-label="Recommended updates and configuration options for SQL Server 2017 and 2016 with high-performance workloads (opens in a new tab)">Recommended updates and configuration options for SQL Server 2017 and 2016 with high-performance workloads</a></li></ul>



<p>Doing this by hand can be quite time-consuming, especially when your SQL Server landscape is broad, so automating the approach would be helpful. You can create scripts to check each value of interest. A quick internet search will provide some scripts you can use as a starting point. <a rel="noreferrer noopener" aria-label="Brent Ozar has some free scripts (opens in a new tab)" href="https://www.brentozar.com/first-aid/" target="_blank">Brent Ozar has some free scripts</a>; so does <a rel="noreferrer noopener" aria-label="Glenn Berry (opens in a new tab)" href="https://www.sqlskills.com/blogs/glenn/category/dmv-queries/" target="_blank">Glenn Berry</a>. And there are others. Of course, be cautious with everything you get from the internet. </p>



<h3 class="wp-block-heading">2. Microsoft SQL Assessment API</h3>



<p>Microsoft has recently made assessing your SQL Server instances a bit easier with it&#8217;s free <a aria-label=" (opens in a new tab)" rel="noreferrer noopener" href="https://techcommunity.microsoft.com/t5/SQL-Server/Introducing-SQL-Assessment-API-Public-Preview/ba-p/778570" target="_blank">SQL Assessment API</a>.  The API employees SQL Server Management Objects (SMO) and PowerShell to compare your SQL Server with a ruleset published in the <a aria-label=" (opens in a new tab)" rel="noreferrer noopener" href="https://github.com/microsoft/sql-server-samples/tree/master/samples/manage/sql-assessment-api" target="_blank">samples repository</a>. You and even add your own SQL Server configuration parameters to the ruleset to customize the settings as appropriate for your environment.</p>



<p>This API is new enough that I haven&#8217;t had a chance to explore it as much as I&#8217;d like. However, it looks promising. If you have more than a few SQL Servers to examine, I&#8217;d encourage you to see if the API is a good alternative for you. </p>



<h3 class="wp-block-heading">3. Get Some Outside Help</h3>



<p>The first two options are great for organizations that have the time and the internal skill set to evaluate what is a good configuration for their environment and what should be changed. Not all companies have this luxury.</p>



<p>If you don&#8217;t have both the time and the knowledge, you can look outside your organization for an external expert to review your settings and provide an unbiased assessment of your SQL Server configurations. </p>



<p>For example, we frequently provide SQL Assessments for our clients. For a fixed price, we examine up to three of SQL Servers and deliver a 40 to 60-page document that describes our findings. It details and prioritizes each setting and provides links to additional information. During a one-hour follow-up call, we provide specific and actionable recommendations to bring these servers into alignment with industry-established best practices. </p>



<p>In the end, our clients are equipped to make the changes themselves, or we assist in the remediation as needed. In either case, they can rest assured that they&#8217;ve provided the best configuration possible for their database servers.</p>



<h2 class="wp-block-heading">Next Steps</h2>



<p>Don&#8217;t wait until the next &#8220;Oh No!&#8221; moment to think about your database servers. Get the peace of mind that comes from understanding exactly how your servers are configured. Begin assessing your SQL Server soon.</p>



<p>Not sure where to start? We&#8217;ll be glad to help. <a href="http://theserogroup.com/#contact">Let&#8217;s talk</a>.</p>
<p>The post <a href="https://theserogroup.com/sql-server/is-my-sql-server-configured-properly/">Is My SQL Server Configured Properly?</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theserogroup.com/sql-server/is-my-sql-server-configured-properly/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2490</post-id>	</item>
		<item>
		<title>4 Options Now That Your SQL Server 2008 Is Out of Support</title>
		<link>https://theserogroup.com/sql-server/4-options-now-that-your-sql-server-2008-is-out-of-support/</link>
					<comments>https://theserogroup.com/sql-server/4-options-now-that-your-sql-server-2008-is-out-of-support/#comments</comments>
		
		<dc:creator><![CDATA[Joe Webb]]></dc:creator>
		<pubDate>Tue, 09 Jul 2019 18:45:15 +0000</pubDate>
				<category><![CDATA[Data Security]]></category>
		<category><![CDATA[SQL Assess]]></category>
		<category><![CDATA[SQL Audit]]></category>
		<category><![CDATA[SQL Security]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Consulting]]></category>
		<category><![CDATA[The Sero Group]]></category>
		<category><![CDATA[SQL Upgrades]]></category>
		<guid isPermaLink="false">http://theserogroup.com/?p=2436</guid>

					<description><![CDATA[<p>As of July 9, 2019, SQL Server 2008 and SQL Server 2008 R2 have officially passed from Extended Support to No Longer Supported. What does that mean? It means that Microsoft will no longer release any updates for any version of SQL Server 2008. That includes security patches and data integrity fixes. If a hacker&#8230; <br /> <a class="read-more" href="https://theserogroup.com/sql-server/4-options-now-that-your-sql-server-2008-is-out-of-support/">Read more</a></p>
<p>The post <a href="https://theserogroup.com/sql-server/4-options-now-that-your-sql-server-2008-is-out-of-support/">4 Options Now That Your SQL Server 2008 Is Out of Support</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>As of July 9, 2019, SQL Server 2008 and SQL Server 2008 R2 have officially passed from Extended Support to No Longer Supported. </p>



<p>What does that mean? </p>



<p>It means that Microsoft will no longer release any updates for any version of SQL Server 2008. That includes security patches and data integrity fixes. If a hacker finds a zero-day vulnerability and publishes it to the web for all ne&#8217;er-do-wells to use, it won&#8217;t be fixed. If a new issue is discovered that could lead to data corruption or loss, no fix will be forthcoming. Discover a performance problem? Forget about it. It&#8217;s yours alone.</p>



<p>It&#8217;s not that Microsoft is heartless or doesn&#8217;t care. They do. But they understandably can&#8217;t support a version indefinitely. And we&#8217;ve known for a long time that this train would leave the station.</p>



<figure class="wp-block-video"><video height="720" style="aspect-ratio: 1280 / 720;" width="1280" autoplay controls loop src="http://theserogroup.com/wp-content/uploads/2019/07/Sql2008upgradetrain.mp4"></video></figure>



<p>Yet many companies are still using SQL Server 2008 and SQL Server 2008 R2 for a lot of different reasons. Too many other projects, fear of a complicated upgrade path, wanting to bundle it with a larger initiative, and simply not knowing where to start are commonly cited reasons for not upgrading. Yet. </p>



<h3 class="wp-block-heading">What are your options? </h3>



<p>Now, the day has come and SQL Server 2008 has officially been mothballed. So, what can you do?</p>



<h4 class="wp-block-heading">1. The &#8220;Do Nothing&#8221; Option</h4>



<p>If SQL Server 2008 has been working well for you and you don&#8217;t see a need to upgrade, it may be that you don&#8217;t <em>have </em>to do anything. You could simply continue working as you currently are for a while longer and then sunset the aging applications in due course.</p>



<p>But before you get too excited about this, remember what you&#8217;ll forfeit, both now and in the future. Microsoft will not release any hot patches, service patches, cumulative updates, or anything else for the database platform. That&#8217;s bad, but that&#8217;s not all.</p>



<p>You will also be limited on your operating system upgrades. (Keep in mind that Windows Server 2008 will not be supported after January 14, 2020.) </p>



<p>And if you do decide to upgrade, there will be a substantial amount of technical debt to pay down. The longer you wait, the further entrenched the dated software will become and the more difficult it will be to upgrade or remove.</p>



<p>Although this option may be right for some organizations or instances of SQL Server, it should not be considered for any system that is connected to the internet in any way, even through a VPN. It is risky enough without the possibility of accidentally introducing malicious code.</p>



<h4 class="wp-block-heading">2. The &#8220;One-for-One Upgrade&#8221; Option</h4>



<p>Sometimes the most straightforward approach is the best approach. If you only have a handful of SQL Servers, you may be able to spin up a new virtual server for each existing database server and migrate to the new servers. This one-for-one approach makes planning and even execution relatively easy. Relatively.</p>



<p>To do it right, however, will take a bit of thought. Before doing anything, you&#8217;ll want to run the <a href="https://docs.microsoft.com/en-us/sql/database-engine/install-windows/prepare-for-upgrade-by-running-data-migration-assistant?view=sql-server-2017" target="_blank" rel="noreferrer noopener" aria-label="Data Migration Assistant (opens in a new tab)">Data Migration Assistant</a> to check for any potential issues with the upgrade. The DMA will help identify discontinued or deprecated features that your older systems may be using. It&#8217;ll also help you discover any potential breaking or behavioral changes that you should be aware before you upgrade. </p>



<p>You&#8217;ll also want to make sure you right-size the new environment and configure the new SQL Servers appropriately. Then you can migrate the databases, logins, users, jobs, linked servers, etc. to the new servers. You&#8217;ll also want to consider the service accounts used and how they access network resources such as shares used for backups. </p>



<p>Check out our free <a href="https://theserogroup.com/sql-server-configuration-download/">5 Common Issues That May Be Putting Your SQL Server At Risk</a> PDF for some common configuration issues we find during our <a href="https://theserogroup.com/sql-configuration-assessment">SQL Assessments</a>. </p>



<p>Of course, this option doesn&#8217;t consider potential gains that may be realized through server consolidation.</p>



<h4 class="wp-block-heading">3. The &#8220;Consolidation Upgrade&#8221; Option</h4>



<p>For environments with say ten to forty SQL Servers, it&#8217;s worth considering a new SQL Server landscape. The existing SQL Server environment probably grew organically over time without a lot of planning or forethought. New applications were purchased and the easiest thing to do was to spin up a new SQL Server instance for it. Over time, the number of database servers sprawled and now you may have more licenses than you actually need.</p>



<p>The upgrade project is a perfect time to (re)evaluate your landscape. </p>



<p>For this option, you&#8217;ll want to: </p>



<ul class="wp-block-list"><li>Identify the scope and breadth of the project</li><li>Run the <a href="https://docs.microsoft.com/en-us/sql/database-engine/install-windows/prepare-for-upgrade-by-running-data-migration-assistant?view=sql-server-2017" target="_blank" rel="noreferrer noopener" aria-label="Data Migration Assistant (opens in a new tab)">Data Migration Assistant</a> to look for possible upgrade issues</li><li>Determine vendor and licensing requirements</li><li>Collect and analyze performance data for each server to determine potential consolidation candidates</li><li>Determine a preliminary consolidation design</li><li>Plan and execute the project</li></ul>



<p>Depending on the scope, you may also want to include a High Availability / Disaster Recovery component to the project.</p>



<h4 class="wp-block-heading">4. The &#8220;Combination&#8221; Upgrade</h4>



<p>For many environments, especially larger or more complex ones, a combination approach will likely be required, one that incorporates elements from each of the first three options. </p>



<p>Some applications and their associated SQL Servers will be identified as &#8220;on their way out&#8221; and the first &#8220;Do Nothing&#8221; approach will be adopted. Use them as-is until you can get rid of them.</p>



<p>Other servers will likely need to be upgraded using the &#8220;one-for-one&#8221; approach. This will likely apply for larger database servers where resources are a concern. It may also be the case for specific application servers whose vendors insist on sysadmin privileges to the SQL Server. You&#8217;ll likely want to separate those application databases to restrict what the vendor has access to.</p>



<p>The majority of the SQL Servers will hopefully be considered candidates for potential consolidation, thus saving some licensing costs and simplifying your environment.</p>



<h3 class="wp-block-heading">Which option is right for you?</h3>



<p>As with most technical questions, the answer is: it depends. There is no clear one-size-fits-all approach for an upgrade project. Consider your timeline and budget, the business requirements and the other projects you have on your plate. Then make the best decision you can. </p>



<p>Not sure where to start? Or don&#8217;t have the bandwidth to tackle the upgrade project? We can help. We&#8217;ve walked this path before and can help guide you as you take the journey. <a href="http://theserogroup.com/#contact">Give us a call and let&#8217;s talk</a>.</p>
<p>The post <a href="https://theserogroup.com/sql-server/4-options-now-that-your-sql-server-2008-is-out-of-support/">4 Options Now That Your SQL Server 2008 Is Out of Support</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theserogroup.com/sql-server/4-options-now-that-your-sql-server-2008-is-out-of-support/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		<enclosure url="http://theserogroup.com/wp-content/uploads/2019/07/Sql2008upgradetrain.mp4" length="33604392" type="video/mp4" />

		<post-id xmlns="com-wordpress:feed-additions:1">2436</post-id>	</item>
		<item>
		<title>How Many tempdb Data Files Should My SQL Server Have?</title>
		<link>https://theserogroup.com/sql-server/how-many-tempdb-data-files-should-my-sql-server-have/</link>
					<comments>https://theserogroup.com/sql-server/how-many-tempdb-data-files-should-my-sql-server-have/#comments</comments>
		
		<dc:creator><![CDATA[Joe Webb]]></dc:creator>
		<pubDate>Tue, 02 Jul 2019 13:30:58 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[SQL Assess]]></category>
		<category><![CDATA[SQL Script Library]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[Database Development]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[Script Library]]></category>
		<category><![CDATA[Sero]]></category>
		<category><![CDATA[Sero Group]]></category>
		<category><![CDATA[SQL Audit]]></category>
		<category><![CDATA[SQL Consultant]]></category>
		<category><![CDATA[SQL Server Consultant]]></category>
		<category><![CDATA[SQL Server Management]]></category>
		<category><![CDATA[TempDB]]></category>
		<category><![CDATA[The Sero Group]]></category>
		<guid isPermaLink="false">http://theserogroup.com/?p=2433</guid>

					<description><![CDATA[<p>We&#8217;re frequently asked how many tempdb files a SQL Server should have, especially from those who have downloaded our free&#160;5 Common SQL Server Configuration Issues PDF. That&#8217;s&#160;because there&#8217;s a lot of well-intended but incorrect information posted on the internet about tempdb.&#160; What Is tempdb? Let&#8217;s start with a very brief description of tempdb. When SQL&#8230; <br /> <a class="read-more" href="https://theserogroup.com/sql-server/how-many-tempdb-data-files-should-my-sql-server-have/">Read more</a></p>
<p>The post <a href="https://theserogroup.com/sql-server/how-many-tempdb-data-files-should-my-sql-server-have/">How Many tempdb Data Files Should My SQL Server Have?</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>We&#8217;re frequently asked how many tempdb files a SQL Server should have, especially from those who have downloaded our free&nbsp;<a rel="noreferrer noopener" href="http://theserogroup.com/#common-issues" target="_blank">5 Common SQL Server Configuration Issues PDF</a>. That&#8217;s&nbsp;because there&#8217;s a lot of well-intended but incorrect information posted on the internet about tempdb.&nbsp;</p>



<h2 class="wp-block-heading">What Is tempdb? </h2>



<p>Let&#8217;s start with a very brief description of tempdb. When SQL Server needs some additional workspace to resolve a query, it uses a built-in system database called tempdb. A query&nbsp;may use tempdb for sorting operations, cursors, temporary tables, or even aggregation operations among other things. Since there is only one tempdb database for each SQL Server instance, it can be quite heavily used.&nbsp;</p>



<p>By default, when you install SQL Server, one&nbsp;data file is created for the tempdb database. Having only one data file, however, can hinder SQL Server&#8217;s performance. The solitary file can become a bottleneck for queries that require tempdb. This is a pretty common issue, in fact, it made our&nbsp;<a rel="noreferrer noopener" href="http://www.theserogroup.com/#common-issues" target="_blank">Top 5 List</a>.&nbsp;</p>



<h2 class="wp-block-heading">How Many tempdb Files Do You Need?</h2>



<p>So, if the default value is likely not right for you, how many tempdb&nbsp;data files should you have? The answer is: it depends.&nbsp;According to&nbsp;<a rel="noreferrer noopener" href="https://support.microsoft.com/en-us/help/2154845/recommendations-to-reduce-allocation-contention-in-sql-server-tempdb-d" target="_blank">Microsoft Support</a>, the best approach is to create one tempdb data file per logical processor up to 8 data files. </p>



<p>If your system has more than 8 logical processors, start with 8 data files and monitor your server&#8217;s workload to determine if more data files would be beneficial.&nbsp;If you do find that an increase is warranted, add 4 data files at a time, but do not add more than the number of logical processors.</p>



<h2 class="wp-block-heading">How Many tempdb Files Do You Have?</h2>



<p>How many tempdb data files does your SQL Server have? A fairly straightforward query can answer the question.&nbsp;Open Management Studio and run the following query.</p>



<pre class="wp-block-code"><code>--tell me about my tempdb
SELECT
  f.name AS &#91;file_name],
  CAST((f.size / 128.0) AS DECIMAL(15, 2)) AS &#91;size_in_MB],
  CAST(f.size / 128.0 - CAST(FILEPROPERTY(f.name, 'SpaceUsed') AS INT) / 128.0 AS DECIMAL(15, 2)) AS &#91;space_available_in_MB],
  &#91;file_id] AS &#91;file_id],
  ISNULL(fg.name, 'LOG') AS &#91;filegroup_name],
  f.physical_name AS &#91;physical_name]
FROM sys.master_files AS f
LEFT OUTER JOIN sys.data_spaces AS fg
  ON f.data_space_id = fg.data_space_id
WHERE f.database_id = 2;</code></pre>



<p>You&#8217;ll notice that the results from the&nbsp;query above&nbsp;include the folder location for each tempdb file. That&#8217;s because file placement can also have a dramatic impact on performance and even reliability. But that&#8217;s another story.</p>



<p>For more information about tempdb, check out&nbsp;<a rel="noreferrer noopener" href="https://jwebb.me/ms_doc_tempdb" target="_blank">Microsoft&#8217;s SQL Docs</a>.&nbsp;</p>



<p>Want to know more about other configuration options that could affect performance and reliability? Check out <a href="https://theserogroup.com/2019/08/06/is-my-sql-server-configured-properly/" target="_blank" rel="noreferrer noopener">Is My SQL Server Configured Properly?</a></p>



<p>[EDIT Oct 5, 2021] &#8211; Also see <a href="https://theserogroup.com/dba/how-to-configure-sql-server-tempdb/">How to Configure SQL Server tempdb?</a> for other tempdb configuration settings that can affect performance. </p>



<h2 class="wp-block-heading">Want to work with The Sero Group?</h2>



<p>Want to learn more about how SERO Group helps organizations take the guesswork out of managing their SQL Servers? It’s easy and there is no obligation. </p>



<p><a href="https://calendly.com/joe_webb">Schedule a call</a> with us to get started.</p>
<p>The post <a href="https://theserogroup.com/sql-server/how-many-tempdb-data-files-should-my-sql-server-have/">How Many tempdb Data Files Should My SQL Server Have?</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theserogroup.com/sql-server/how-many-tempdb-data-files-should-my-sql-server-have/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2433</post-id>	</item>
		<item>
		<title>Are Your SQL Servers Safe? IIS Attacks Increased 782x in One Quarter</title>
		<link>https://theserogroup.com/sql-server/are-your-sql-servers-safe-iis-attacks-increased-782x-in-one-quarter/</link>
		
		<dc:creator><![CDATA[Joe Webb]]></dc:creator>
		<pubDate>Mon, 15 Oct 2018 15:24:17 +0000</pubDate>
				<category><![CDATA[SQL Assess]]></category>
		<category><![CDATA[SQL Audit]]></category>
		<category><![CDATA[SQL Security]]></category>
		<category><![CDATA[SQL Server]]></category>
		<guid isPermaLink="false">http://theserogroup.com/?p=2193</guid>

					<description><![CDATA[<p>Just when we thought that most cybersecurity attacks came via social engineering, we see this. Attacks on IIS, Microsoft&#8217;s web server, increased from 2,000 in Q1 2018 to over 1.7 million in Q2 2018. That&#8217;s a mind-boggling 782x increase! This is according to an esentire Security Advisory released last week. Hackers go-to tool of choice? PowerShell was the most commonly&#8230; <br /> <a class="read-more" href="https://theserogroup.com/sql-server/are-your-sql-servers-safe-iis-attacks-increased-782x-in-one-quarter/">Read more</a></p>
<p>The post <a href="https://theserogroup.com/sql-server/are-your-sql-servers-safe-iis-attacks-increased-782x-in-one-quarter/">Are Your SQL Servers Safe? IIS Attacks Increased 782x in One Quarter</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Just when we thought that most cybersecurity attacks came via social engineering, we see this. Attacks on IIS, Microsoft&#8217;s web server, increased from 2,000 in Q1 2018 to over 1.7 million in Q2 2018. That&#8217;s a mind-boggling 782x increase! This is according to an <g class="gr_ gr_496 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="496" data-gr-id="496">esentire</g><a href="https://www.esentire.com/news-and-events/press-releases/iis-attacks-increase-according-to-threat-report/" target="_blank" rel="noreferrer noopener"> Security Advisory</a> released last week. Hackers <g class="gr_ gr_1093 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep" id="1093" data-gr-id="1093">go-to</g> tool of choice? PowerShell was the most commonly used technique. </p>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" decoding="async" width="474" height="280" src="http://theserogroup.com/wp-content/uploads/2018/10/iisattacks.png" alt="" class="wp-image-2199" srcset="https://theserogroup.com/wp-content/uploads/2018/10/iisattacks.png 474w, https://theserogroup.com/wp-content/uploads/2018/10/iisattacks-300x177.png 300w" sizes="auto, (max-width: 474px) 100vw, 474px" /></figure></div>



<p>The scary part is that behind many IIS <g class="gr_ gr_4 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del" id="4" data-gr-id="4">web sites</g> sits the honeypot that the hackers are <g class="gr_ gr_5 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-del replaceWithoutSep" id="5" data-gr-id="5">after:</g> customer and other proprietary data in a Microsoft SQL Server database. Many websites, such as customer portals, online stores, software-as-a-service sites, and others, contain specific information about individuals that, if exposed, will cost the company dearly.</p>



<p>As my friend and SQL Server expert Steve Jones (<a href="https://twitter.com/way0utwest" target="_blank" rel="noopener">@way0utwest</a>) recently tweeted:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>&#8220;The amount of shareholder value that can be lost due to a data breach is the amount of shareholder value you have.&#8221; </p></blockquote>



<p>

Agreed. A well-targeted attack can bring down a company.

</p>



<p>Fortunately, Microsoft SQL Server can be made extremely secure if configured properly. Encryption, Role-based security, Auditing, and other mechanisms allow administrators to define, limit, and monitor access at a very granular level.</p>



<p>The problem is that not all SQL Servers are configured properly. Over 96% of the SQL Server instances we&#8217;ve assessed deviate from industry best practices in security, performance, or other configurations. This is troubling.</p>



<p>What can you do? Spend some time with your application developers, with your system and network administrator, and with your DBA team to review the layers of security designed into your systems. Are the Windows Servers patched and up to date? Have the appropriate rules been defined in your firewalls? And, of course, are your SQL Servers configured properly?</p>



<p>Not sure where to start with security for your SQL Servers? Review the following:</p>



<ul class="wp-block-list"><li><a href="https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/overview-of-sql-server-security" target="_blank">Overview of SQL Server Security</a></li><li><a href="https://docs.microsoft.com/en-us/sql/relational-databases/security/securing-sql-server?view=sql-server-2017" target="_blank" rel="noopener">Securing SQL Server</a></li><li><a href="https://blogs.msdn.microsoft.com/sqlsecurity/" target="_blank">MSDN SQL Server Security Blog</a></li><li><a href="https://www.mssqltips.com/sql-server-tip-category/19/security/" target="_blank">MSSQLTips SQL Server Security Tips</a></li></ul>



<p>Have questions? Give us a call. Our SQL Server Configuration Assessments maybe a good place for you to start.</p>
<p>The post <a href="https://theserogroup.com/sql-server/are-your-sql-servers-safe-iis-attacks-increased-782x-in-one-quarter/">Are Your SQL Servers Safe? IIS Attacks Increased 782x in One Quarter</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2193</post-id>	</item>
		<item>
		<title>Why 9 Out of 10 SQL Servers Aren&#8217;t Configured with Best Practices</title>
		<link>https://theserogroup.com/sql-server/why-9-out-of-10-sql-servers-arent-configured-with-best-practices/</link>
					<comments>https://theserogroup.com/sql-server/why-9-out-of-10-sql-servers-arent-configured-with-best-practices/#comments</comments>
		
		<dc:creator><![CDATA[Joe Webb]]></dc:creator>
		<pubDate>Wed, 06 Jun 2018 13:00:20 +0000</pubDate>
				<category><![CDATA[SQL Assess]]></category>
		<category><![CDATA[SQL Audit]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[Sero]]></category>
		<category><![CDATA[Sero Group]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Consultant]]></category>
		<category><![CDATA[SQL Server Consultant]]></category>
		<category><![CDATA[SQL Server Management]]></category>
		<category><![CDATA[TempDB]]></category>
		<category><![CDATA[The Sero Group]]></category>
		<guid isPermaLink="false">http://theserogroup.com/?p=1849</guid>

					<description><![CDATA[<p>&#8220;The nice thing about standards is that you have so many to choose from,&#8221; quipped renown computer scientist Andrew Tanenbaum. In the SQL Server world, we have industry best practices. These are guidelines that most every knowledgeable database professional will agree is a good idea or a good baseline. Sure there are exceptions, specific tweaks&#8230; <br /> <a class="read-more" href="https://theserogroup.com/sql-server/why-9-out-of-10-sql-servers-arent-configured-with-best-practices/">Read more</a></p>
<p>The post <a href="https://theserogroup.com/sql-server/why-9-out-of-10-sql-servers-arent-configured-with-best-practices/">Why 9 Out of 10 SQL Servers Aren&#8217;t Configured with Best Practices</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>&#8220;The nice thing about standards is that you have so many to choose from,&#8221; quipped renown computer scientist Andrew Tanenbaum.</p>



<p>In the SQL Server world, we have industry best practices. These are guidelines that most every knowledgeable database professional will agree is a good idea or a good baseline. Sure there are exceptions, specific tweaks to accommodate certain workloads, but the best practices are a generally a good starting point. Then you can customize for your needs.</p>



<p>As part of our practice, we regularly examine SQL Server instances to ensure they are configured with industry best practices in mind. We check configuration settings, maintenance jobs, and alerts, among other things, to help ensure&nbsp;the systems are protected and highly available.</p>



<p>Our findings: 9 out of&nbsp;10 SQL Server instances we assess do not adhere to these industry best practices. Now, this isn&#8217;t a scientific study conducted by Forrester Research. Rather it&#8217;s our direct experiences working with hundreds of SQL Servers and clients.</p>



<h2 class="wp-block-heading" id="h-why-aren-t-most-sql-servers-configured-with-best-practices">Why Aren&#8217;t Most SQL Servers Configured with Best Practices?</h2>



<p>We&#8217;ve found five predominant&nbsp;reasons for this.</p>



<h3 class="wp-block-heading" id="h-sql-server-is-so-easy-to-set-up"><strong>SQL Server is so easy to set up</strong></h3>



<p>Many years ago, I taught a bunch of Oracle DBAs how to install, configure, and administer SQL Server. The hands-on lab allocated an hour for the installation, They were incredulous. &#8220;It can&#8217;t be done that quickly.&#8221; But it was. Find the media, double-click Setup, click Next-Next-Next, and it&#8217;s installed. Unfortunately, that&#8217;s where many people stop. They accept all of the defaults and never go back to configure the instance properly. The defaults are not best practices.</p>



<h3 class="wp-block-heading" id="h-sql-server-just-works"><strong>SQL Server just works</strong></h3>



<p>Even with the defaults, SQL Server is pretty responsive and resilient. It&#8217;s a testament to the quality of the product. You can neglect it, take it for granted, and still it keeps on keeping on. We&#8217;ve assessed (and subsequently remediated) systems that haven&#8217;t been touched in years. No patches applied. No maintenance performed. Nothing but users hitting it every day. Yet, it still works. That doesn&#8217;t mean it&#8217;s good or safe. In fact, we are frequently&nbsp;called into a new client because something has gone terribly wrong and the company needs help getting SQL Server out of the ditch. The better care you take of your SQL Server, the better it will be to you.</p>



<h3 class="wp-block-heading" id="h-introducing-the-accidental-dba"><strong>Introducing the accidental DBA</strong></h3>



<p>Many IT organizations don&#8217;t have the need for a full-time, dedicated Database Administrator. They only have&nbsp;a few SQL Server instances with 10 or 20 databases. Hiring a DBA isn&#8217;t in the cards. But someone has to care for the databases, has to think about backups and restores, disaster recovery, and high availability. Someone has to throw hardware at the problem when performance suffers. That&#8217;s when the CIO, a network admin, or an application developer steps up to do it in their &#8220;spare&#8221; time. These are smart, capable people with no spare time to give to SQL Server. &#8220;If an ain&#8217;t broke, don&#8217;t fix it&#8221; becomes the defacto approach since the accidental DBA is super busy with her day job.</p>



<h3 class="wp-block-heading" id="h-d-uct-taping-with-hardware">D<strong>uct-taping with hardware</strong></h3>



<p>When a performance problem creeps into a production server, often the first recourse is to simply throw hardware at the problem. Reports taking too long? Add some CPUs! Imports not processing fast enough? Get faster disks! Application not responsive enough? Increase the RAM!&nbsp;Hardware can cover a multitude of SQL sins. But adding hardware gets expensive. Although the cost of hardware continues to go down, licensing costs do not. Adding an additional 8 CPUs to an Enterprise Edition of SQL Server can be expensive. And even if you have the really deep pockets to do it, hardware doesn&#8217;t address the root cause or protect your system any better.</p>



<h3 class="wp-block-heading" id="h-everyone-has-their-own-standards"><strong>Everyone has their own standards</strong></h3>



<p>Many IT organizations hire capable DBAs and let them do their jobs. That&#8217;s good. However, without a common playbook and set of standardized scripts, each DBA will handle things slightly differently, or worse, manually, and the result will be widely varying configurations. No two instances are the same. One instance may have 1 tempdb file on the C:\ and another has 8 somewhere else. One instance may have a patchwork of scheduled jobs and another may not have any. It&#8217;s like a box of chocolates. That makes troubleshooting difficult and performance unpredictable.</p>



<h2 class="wp-block-heading" id="h-so-what-should-you-do">So, What Should You Do?</h2>



<p>Best practices are exactly that, best practices. They are settings and techniques that should be adopted and applied to your SQL Server instances. Then you can tune based on your specific needs.</p>



<p>So, what should you do?</p>



<p>The first step is to know what you&#8217;re dealing with. Just how big is this elephant you&#8217;re about to eat? Assess your SQL Servers to see just how far from the best practices they really are. Then you can make a plan for updating them. Check out <a href="https://theserogroup.com/sql-server/is-my-sql-server-configured-properly/">Is My SQL Server Configured Properly?</a> for more information on assessing your SQL Server.</p>



<p>When we do assessments for companies, we have a standard script we run on each instance that looks for departures from best practices. That allows us to effectively collect, analyze, and report on the state of each instance. Sometimes there are good reasons for the variances and we discuss the rationale behind those decisions. Often we find that some remediation is recommended and we help to prioritize the findings so you&#8217;ll know where the biggest bang for your buck is. Learn about our <a href="https://theserogroup.com/#schedule-an-assessment">SQL Server Assessments</a>. </p>



<p>Whether you use our services or not, I&#8217;d recommend that you adopt a similar approach: identify what needs to change, prioritize the items, create a plan to remediate, and then work the plan.</p>



<p>In a coming post, I&#8217;ll share some of the things we look for when we assess an instance.</p>



<h2 class="wp-block-heading" id="h-want-to-work-with-the-sero-group">Want to work with The Sero Group?</h2>



<p>Want to learn more about how SERO Group helps organizations take the guesswork out of managing their SQL Servers? It’s easy and there is no obligation.&nbsp;</p>



<p><a href="https://theserogroup.com/#contact" target="_blank" rel="noreferrer noopener">Schedule a call</a> with us to get started.</p>
<p>The post <a href="https://theserogroup.com/sql-server/why-9-out-of-10-sql-servers-arent-configured-with-best-practices/">Why 9 Out of 10 SQL Servers Aren&#8217;t Configured with Best Practices</a> appeared first on <a href="https://theserogroup.com">The SERO Group</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theserogroup.com/sql-server/why-9-out-of-10-sql-servers-arent-configured-with-best-practices/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1849</post-id>	</item>
	</channel>
</rss>
