{"id":49038,"date":"2022-12-31T00:00:00","date_gmt":"2022-12-30T23:00:00","guid":{"rendered":"https:\/\/jotelulu.com\/blog\/how-to-make-your-sql-server-more-secure\/"},"modified":"2022-12-31T00:00:00","modified_gmt":"2022-12-30T23:00:00","slug":"make-sql-server-more-secure","status":"publish","type":"post","link":"https:\/\/jotelulu.com\/en-gb\/blog\/make-sql-server-more-secure\/","title":{"rendered":"How to Make Your SQL Server More Secure"},"content":{"rendered":"<p>In this article, we&rsquo;ll look at the current best practices to<strong>&nbsp;make your SQL server more secure<\/strong>. Focusing on SQL Server 2022 deployed on a Microsoft Windows Server, we&rsquo;ll examine the steps you can take to protect your data and have the most resilient and secure architecture possible.<\/p>\n<p><strong>NOTE:<\/strong> <em>Please note that the content of this article is mainly focused on Windows Server, but some of the recommendations here will also be valid for GNU\/Linux systems.<\/em><\/p>\n<p>As well as the tips that we&rsquo;ll share with you in this article, we also recommend that you check out the article titled <a href=\"https:\/\/jotelulu.com\/blog\/requisitos-planificacion-instalacion-sql-server-2022\/\" target=\"_blank\" rel=\"noopener\">SQL Server 2022 Installation Requirements and Planning<\/a> on our blog.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong>Tips and Best Practices to Make Your SQL Server More Secure<\/strong><\/h2>\n<p>The first thing that is important to stress is that&nbsp;<strong>you can never have too much security<\/strong>. That&rsquo;s why it is important to have&nbsp;<strong>multiple layers&nbsp;<\/strong>that provide different levels of protection for your data and systems.<\/p>\n<p>When securing any IT system, it&rsquo;s essential to take a holistic approach. That means&nbsp;<strong>applying security measures to all levels and&nbsp;<\/strong><strong>aspects&nbsp;<\/strong>of your installations, whether it&rsquo;s the physical server installation, security patches or the way in which queries are designed.<\/p>\n<p>With that in mind, in this article, we&rsquo;re going to take a look at the different aspects to consider if you want to keep your SQL database server as secure as possible.<\/p>\n<p>&nbsp;<\/p>\n<h3><strong>Physical Security<\/strong><\/h3>\n<p>Before you think about software security, the first thing you need to do is ensure that&nbsp;<strong>your server is physically secure<\/strong>. It doesn&rsquo;t matter what firewalls, antivirus programs, patches or access controls you use; it will all be completely worthless if there is no physical security for your server. This means preventing people from physically getting to the server, ensuring that the server temperature is regulated, etc. Otherwise, someone could simply walk in and turn it off or even remove it altogether.<\/p>\n<p>Physical server security can actually be quite complex. First, you should ideally ensure that&nbsp;<strong>the servers are located in their own separate room&nbsp;<\/strong>with&nbsp;<strong>access controls<\/strong>. This could be by using an electronic lock or a biometric system, for example. That room should also have some kind of <strong>fire extinguishing system<\/strong> and&nbsp;<strong>air conditioning&nbsp;<\/strong>to keep the temperature stable and stop the servers from overheating.<\/p>\n<p>Then, while it&rsquo;s not strictly speaking a form of physical security, you should also consider the other utilities and services that your server needs. For example, you should consider whether you have&nbsp;<strong>redundant power supplies&nbsp;<\/strong>or&nbsp;<strong>uninterrupted power supplies<\/strong> (UPS). You may even want to consider having power connections from different energy providers just in case. And then you may want to consider having a&nbsp;<strong>redundant internet connection<\/strong> in case your main one fails. All of these elements will play a key part in ensuring that your server is physically protected from all manner of attack or incident.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong>OS Security<\/strong><\/h2>\n<p>This is something that I will never get tired of saying: if you don&rsquo;t have a resilient operating system, it will be impossible for any application that you run to be completely secure.<\/p>\n<p>When first setting up your infrastructure, it&rsquo;s essential&nbsp;<strong>to only deploy the services you need&nbsp;<\/strong>on the server. Ideally, you should only have one service per server,&nbsp;<strong>making use of virtual machines, containers<\/strong>, etc. That way, you&rsquo;ll avoid creating single points of failure. Of course, for databases, you should definitely deploy them on a separate server that is only used for this service.<\/p>\n<p>It is also important to&nbsp;<strong>apply all available patches and updates&nbsp;<\/strong>that apply to you, but don&rsquo;t install any that aren&rsquo;t relevant.<\/p>\n<p>For example, if you don&rsquo;t have a given piece of hardware, it may end up being counterproductive to install a patch for it. Similarly, if there is an available patch for Office but you don&rsquo;t have Office installed, it&rsquo;s best not to install the patch as it could contain a bug that may cause wider issues.<\/p>\n<p>Ideally, you should have a test environment available where you can trial any updates before applying them to your production servers.<\/p>\n<p>Of course, it almost goes without saying that you need to make sure that you have&nbsp;<strong>antivirus and antimalware software installed<\/strong>. The number of threats is forever increasing, and it&rsquo;s important to keep yourself protected against them.<\/p>\n<p>Lastly, it&rsquo;s important not to forget the&nbsp;<strong>Operating System firewall<\/strong>. Make sure you only open the ports you need. If you need help with this, we recommend checking our article titled <a href=\"https:\/\/jotelulu.com\/en-gb\/support\/tutorials\/managing-sql-ports-on-your-windows-server\/\">Managing SQL Ports on Your Windows Server<\/a> or the article on Microsoft Learn about the <a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/integration-services\/service\/integration-services-service-ssis-service?view=sql-server-ver16\">Windows Integration Services Service<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<p>Now that we&rsquo;ve looked at physically securing your server and the steps to secure your operating system, let&rsquo;s take a look at how to make your SQL Server more secure.<\/p>\n<p>&nbsp;<\/p>\n<h3><strong>SQL Server Files Security<\/strong><\/h3>\n<p>SQL Server stores some&nbsp;<strong>files&nbsp;<\/strong>using the operating system&rsquo;s file system. To avoid any potential problems, you should&nbsp;<strong>restrict access&nbsp;<\/strong>to these files. To determine which folder locations you need to restrict, run the following function in SSMS:<\/p>\n<p><em>SELECT CONVERT(char(20), SERVERPROPERTY(&lsquo;productlevel&rsquo;));<\/em><\/p>\n<p><strong>NOTE: <\/strong><em>In this tutorial, we&rsquo;re working with SQL Server 2022, which is 16.x, but we&rsquo;ll explain this for those that might have a different version. <\/em><\/p>\n<p>Here is a table of the possible results:<\/p>\n<table width=\"283\">\n<thead>\n<tr>\n<td width=\"170\"><strong>Version<\/strong><\/td>\n<td width=\"66\"><strong>*nnn*<\/strong><\/td>\n<td width=\"47\"><strong>{nn}<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td width=\"170\">SQL Server 2022 (16.x)<\/td>\n<td width=\"66\">160<\/td>\n<td width=\"47\">16<\/td>\n<\/tr>\n<tr>\n<td width=\"170\">SQL Server 2019 (15.x)<\/td>\n<td width=\"66\">150<\/td>\n<td width=\"47\">15<\/td>\n<\/tr>\n<tr>\n<td width=\"170\">SQL Server 2017 (14.x)<\/td>\n<td width=\"66\">140<\/td>\n<td width=\"47\">14<\/td>\n<\/tr>\n<tr>\n<td width=\"170\">SQL Server 2016 (13.x)<\/td>\n<td width=\"66\">130<\/td>\n<td width=\"47\">13<\/td>\n<\/tr>\n<tr>\n<td width=\"170\">SQL Server 2014 (12.x)<\/td>\n<td width=\"66\">120<\/td>\n<td width=\"47\">12<\/td>\n<\/tr>\n<tr>\n<td width=\"170\">SQL Server 2012 (11.x)<\/td>\n<td width=\"66\">110<\/td>\n<td width=\"47\">11<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>Once you know which version of SQL Server you are running, you can <strong>use the table able to complete this folder location<\/strong><strong>&nbsp;<\/strong>&ldquo;&lt;drive letter&gt;:Program FilesMicrosoft SQL Servernnn&rdquo;.<\/p>\n<p>Where:<\/p>\n<ul>\n<li><strong>&lt;drive letter&gt;:<\/strong> is the <strong>drive <\/strong>where SQL Server is installed.<\/li>\n<li><strong>nnn<\/strong>: identifies the <strong>version <\/strong>of SQL Server.<\/li>\n<\/ul>\n<p>It&rsquo;s also important to remember that there may be&nbsp;<strong>other components&nbsp;<\/strong>depending on your installation.<\/p>\n<ul>\n<li><strong>MSSQL<\/strong>: <strong>SQL Server Storage Engine<\/strong>. This will be followed by a version number, an underscore and the secondary version, a full stop and an instance name. For example: MSSQL{nn}.MSSQLSERVER.<\/li>\n<li><strong>MSAS<\/strong>: <strong>Analysis Services<\/strong>. This will be followed by a version number, an underscore and the secondary version, a full stop and an instance name. For example: MSAS{nn}.MSSQLSERVER.<\/li>\n<li><strong>MSRS<\/strong>: <strong>Reporting Services<\/strong>. This will be followed by a version number, an underscore and secondary version, a full stop and an instance name. For example: MSSQL{nn}.&lt;instance&gt;.<\/li>\n<\/ul>\n<p>Having said all that, for an instance called &laquo;Test1&raquo;, the folder locations would be as follows:<\/p>\n<ul>\n<li><em>C:Program FilesMicrosoft SQL ServerMSSQL16<\/em><\/li>\n<li><em>C:Program FilesMicrosoft SQL ServerMSAS16.Test1<\/em><\/li>\n<li><em>C:Program FilesMicrosoft SQL ServerMSRS16.Test1<\/em><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3><strong>SQL Server Security in the System Registry<\/strong><\/h3>\n<p>Just as you need to protect SQL Server files on the file system, you also need to&nbsp;<strong>protect entries in the Windows Registry&nbsp;<\/strong>(which you can access using RegEdit).<\/p>\n<p>Once you know which version you&rsquo;re running, you should protect the following registry entries which are found in <strong>&laquo;<\/strong><strong>HKLMSoftwareMicrosoftMicrosoft SQL Server&lt;instance&gt;&rdquo;<\/strong>.<\/p>\n<p>For the previous example of an instance called &laquo;Test1&raquo;, these entries would be found at:<\/p>\n<ul>\n<li><em>HKLMSoftwareMicrosoftMicrosoft SQL ServerMSSQL16.Test1<\/em><\/li>\n<li><em>HKLMSoftwareMicrosoftMicrosoft SQL ServerMSAS16.Test1<\/em><\/li>\n<li><em>HKLMSoftwareMicrosoftMicrosoft SQL ServerMSRS16.Test1<\/em><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3><strong>Configure SQL Server Database Engine for Encrypting Connections<\/strong><\/h3>\n<p>To further secure your platform, you should&nbsp;<strong>apply encryption to all inbound connections&nbsp;<\/strong>to Microsoft SQL Server. There is the option to enable encryption just for a specific group of clients, but in our opinion, this is much less secure than enabling it for everyone.<\/p>\n<p>To configure encryption, you first need to configure SQL Server to&nbsp;<strong>use a certificate&nbsp;<\/strong>that meets the certificate requirements for SQL Server. This will then allow you to apply other measures that give your DBMS an additional layer of security.<\/p>\n<p>In this article, we don&rsquo;t want to get too bogged down in the detail if we can help it. So, to find out how to configure SQL Server to use a certificate, check out <a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/database-engine\/configure-windows\/configure-sql-server-encryption?view=sql-server-ver16\">this page on Microsoft Learn<\/a>, where you can also learn how to change the encryption settings for your instance of SQL Server. With these two steps, you can enable encryption for all inbound connections to SQL Server when using a certificate from a trusted certification authority.<\/p>\n<p>&nbsp;<\/p>\n<h3><strong>Changing Accounts Used by Services<\/strong><\/h3>\n<p>Another fairly simple measure that you can implement is to&nbsp;<strong>change the accounts used by services <\/strong>to authenticate SQL Server. This is really important, both changing passwords (which should be easy as they should be unique) and changing user names so that they&rsquo;re not generic. This will significantly increase security.<\/p>\n<p>To change these accounts, you will need to open the SQL Server management tool, which you can either run from the Start menu in Windows or by running the program found at &laquo;C:WindowsSysWOW64SQLServerManager&lt;nn&gt;.msc&raquo;, where &lt;nn&gt; is the version of SQL Server that you have installed.<\/p>\n<p>Under the heading &laquo;SQL Server Files Security&raquo;, we explained how to find out which version of SQL Server you&rsquo;re running. For example, if you are running SQL Server 2022, the version number would be 16 and the file location for the management tool would be&nbsp;&laquo;C:WindowsSysWOW64SQLServerManager16.msc&raquo;.<\/p>\n<p><strong>NOTE:&nbsp;<\/strong><em>When a password is changes in the SQL Server management tool, the changes will take effect immediately without the need to restart the service.<\/em><\/p>\n<p>&nbsp;<\/p>\n<h3><strong>Dynamic Data Masking<\/strong><\/h3>\n<p>Dynamic data masking (DDM) provides an <strong>additional layer of protection&nbsp;<\/strong>by&nbsp;<strong>limiting access&nbsp;<\/strong>to data by non-privileged users.<\/p>\n<p><strong>NOTE:&nbsp;<\/strong><em>DDM is only available from SQL Server 2016 onwards.<\/em><\/p>\n<p>This measure provides a good level of security with relatively little design effort. Dynamic data masking allows customers to specify<strong> how much data they want to reveal for their query and who has access to it<\/strong>.<\/p>\n<p>One of the benefits of DDM is that it can be applied to fields that you don&rsquo;t want to filter out. Other details from the same table can be shown while preventing access to specific columns.<\/p>\n<p>To implement DDM, you will need to designate a&nbsp;<strong>central data masking policy&nbsp;<\/strong>which will act on the sensitive fields in the database. Next, you will need to&nbsp;<strong>designate the privileged users or roles&nbsp;<\/strong>that will have access to the data. They will be the only ones with access. Access will be denied to all other users and roles.<\/p>\n<p>Dynamic data masking is configured using T-SQL commands, but there are limits to their use and you will need to follow a specific syntax.<\/p>\n<p>Firstly, it&rsquo;s&nbsp;<strong>not possible to use DDM&nbsp;<\/strong>on the following column types.<\/p>\n<p>To begin with, we need to know that&nbsp;<strong>you cannot use DDM&nbsp;<\/strong>on the following types of columns.<\/p>\n<ul>\n<li>Encrypted columns<\/li>\n<li>FILESTREAM<\/li>\n<li>COLUMN_SET<\/li>\n<li>A column in a PolyBase external table<\/li>\n<li>A column with data masking can&rsquo;t be a key for a FULLTEXT index.<\/li>\n<\/ul>\n<p>It&rsquo;s also important to bear in mind that you can&rsquo;t configure masks for computed columns. However, if a computed column uses a column with a mask, the resulting data will be masked.<\/p>\n<p>To <strong>set up DDM<\/strong>, you will need <strong>CREATE TABLE and ALTER <\/strong><strong>permissions<\/strong>, whereas to <strong>modify, add, replace or remove <\/strong>a mask, you&rsquo;ll require <strong>ALTER ANY MASK and ALTER TABLE permissions<\/strong>. Lastly, users with <strong>SELECT permissions <\/strong>will be able to <strong>view the table<\/strong>, as with any other query, but it&rsquo;ll depend on the possibility of access.<\/p>\n<p>To learn more about this option, we recommend reading <a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/relational-databases\/security\/dynamic-data-masking?view=sql-server-ver16\">this article on the Microsoft Learn site<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<h3><strong>Extended Protection for the Database Engine<\/strong><\/h3>\n<p>There is a security feature on SQL Server that for some reason is not activated by default. Instead, the&nbsp;<strong>administrator needs to turn it on<\/strong>. This feature is called Extended Protection for Authentication.<\/p>\n<p>Extended Protection for Authentication is a feature of the network components implemented by the Operating System. This feature <strong>makes connections more secure <\/strong>when they are made using Extended Protection.<\/p>\n<p>This feature uses either service binding or channel binding to&nbsp;<strong>prevent authentication relay attacks<\/strong>, where an attacker uses credentials to pass for a legitimate server and authenticate themselves on the service.<\/p>\n<p>To enable this function, open the SQL Server Configuration Manager, expand SQL Server Network Configuration, right-click on &laquo;Protocols of _&lt;instance&gt;&raquo; and click on Properties (&lt;instance&gt; is the name of the instance you wish to configure).<\/p>\n<p>Then, on the Advanced tab, activate the &laquo;Extended Protection&raquo;, checking that Forced Protocol Encryption is also enabled.<\/p>\n<p>You&rsquo;ll need to restart the database for the changes to take effect.<\/p>\n<p>&nbsp;<\/p>\n<h3><strong>Review the SA Account<\/strong><\/h3>\n<p>The&nbsp;<strong>SA account is a well-known account <\/strong>that&nbsp;is built in to SQL Server and has generated much debate between SQL Server administrators and OS administrators. This account is used to log on to the SQL Server database engine and has special administrator privileges.<\/p>\n<p>It&rsquo;s created by default when deploying an instance of SQL Server. It can&rsquo;t be restricted, but it can be disabled.<\/p>\n<p>We recommend disabling SQL server authentication and using Windows authentication only. This means that the SA account will be present but disabled and will use a randomly created complex password.<\/p>\n<p>&nbsp;<\/p>\n<h3><strong>Limiting SQL Server Guest Users<\/strong><\/h3>\n<p>Just like many other applications, SQL Server also allows people to connect as a&nbsp;<strong>guest user<\/strong>. Guest user permissions are&nbsp;<strong>applied to all users&nbsp;<\/strong>that have access to the database with having their own account.<\/p>\n<p>This account can&rsquo;t be removed, but it can be disabled by revoking its CONNECT permission.<\/p>\n<p><strong>NOTE: <\/strong><em>You can use the T-SQL command &ldquo;REVOKE CONNECT FROM GUEST;&rdquo; provided the database is not master or tempdb.<\/em><\/p>\n<p>&nbsp;<\/p>\n<h3><strong>Protection Against Side-channel Attacks<\/strong><\/h3>\n<p>IT systems require&nbsp;<strong>physical components&nbsp;<\/strong>to operate, and this leads to the&nbsp;<strong>generation of all kinds of &lsquo;footprints&rsquo;<\/strong>, such as timing, images, sound, etc.<\/p>\n<p>Side-channel attacks exploit these &lsquo;footprints&rsquo; to obtain sensitive information using an algorithm that analyses the data output patterns of a computer or system.<\/p>\n<p>The following are ways that you can&nbsp;<strong>minimise the risk&nbsp;<\/strong>of a side-channel attack on your SQL Server system:<\/p>\n<ul>\n<li>Keep your <strong>system as up to date&nbsp;<\/strong>as possible (we&rsquo;ve already said this, but we can&rsquo;t stress it enough).<\/li>\n<li>Don&rsquo;t forget the most recent <strong>firmware updates&nbsp;<\/strong>for any local hardware.<\/li>\n<li>If you are working with a&nbsp;<strong>public cloud<\/strong>, <strong>add additional protection&nbsp;<\/strong>against side-channel attacks with isolated virtual machines, dedicated hosts or Confidential Compute virtual machines.<\/li>\n<li>In the case of the&nbsp;<strong>private cloud<\/strong>, there are options like Microsoft Hyper-V <strong>shielded virtual machines<\/strong>.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3><strong>Protection Against SQL Injection<\/strong><\/h3>\n<p>SQL injection is a&nbsp;<strong>web service <\/strong><strong>security vulnerability <\/strong>whereby an attacker can&nbsp;<strong>interfere with a query<\/strong><strong>&nbsp;<\/strong>that an applications makes to a database.<\/p>\n<p>Attackers normally use this vulnerability to <strong>view data <\/strong>that they normally wouldn&rsquo;t be able to retrieve, including data belonging to other users or any other information that the application can access.<\/p>\n<p>In more serious cases, the attacker will be able to even&nbsp;<strong>modify or delete data&nbsp;<\/strong>contained in the database, causing persistent changes to the application&rsquo;s content and behaviour.<\/p>\n<p>The following are some steps that you can take&nbsp;<strong>to minimise the risk&nbsp;<\/strong>of SQL injection:<\/p>\n<ul>\n<li>Construct dynamically generated <strong>SQL statements <\/strong>in a <strong>parameterised <\/strong>manner.<\/li>\n<li>Both security administrators and developers should <strong>review all code that calls EXECUTE, EXEC or &laquo;sp_executesql&raquo;<\/strong>.<\/li>\n<li><strong>Review processes<\/strong> that construct SQL statements.<\/li>\n<li>Always <strong>validate <\/strong><strong>user inputs<\/strong>.<\/li>\n<li>Scrub <strong>error outputs <\/strong>from being spilled.<\/li>\n<\/ul>\n<p>Furthermore, <strong>you should disallow <\/strong>the following input characters:<\/p>\n<ul>\n<li><strong>&ldquo;;&rdquo;<\/strong> Query delimiter.<\/li>\n<li><strong>&ldquo;&rsquo;&rdquo;<\/strong> Character data string delimiter.<\/li>\n<li><strong>&ldquo;&mdash;&ldquo;<\/strong> Single-line comment delimiter.<\/li>\n<li><strong>&ldquo;\/ * &hellip; * \/&rdquo;<\/strong> Comment delimiters.<\/li>\n<li><strong>&ldquo;xp_&rdquo;<\/strong> Catalogue-extended stored procedures, such as &laquo;xp_cmdshell&raquo;.<\/li>\n<\/ul>\n<p>It is not recommended to use&nbsp;<strong>&laquo;xp_cmdshell&raquo;&nbsp;<\/strong>on an SQL Server environment. Use&nbsp;<strong>&laquo;SQLCLR&raquo;&nbsp;<\/strong>instead.<\/p>\n<p>&nbsp;<\/p>\n<h3>Windows Authentication for Reporting Services<\/h3>\n<p>The operating system handles the authentication of users for Reporting Services through <strong>integrated security <\/strong>or the validation of user credentials.<\/p>\n<p>However, this doesn&rsquo;t necessarily need to be the case. Instead,&nbsp;<strong>it is possible to develop customised authentication&nbsp;<\/strong>within Reporting Services to support additional authentication schemes. This can be achieved through the security extension interface called &laquo;IAuthenticationExtensio2&raquo;.<\/p>\n<p>To learn more about this feature, we recommend checking out this <a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/reporting-services\/extensions\/security-extension\/authentication-in-reporting-services?view=sql-server-ver16\">page on the Microsoft website<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<h3><strong>System and Database Audits<\/strong><\/h3>\n<p><strong>Compiling regular reports&nbsp;<\/strong>as well as&nbsp;<strong>audits&nbsp;<\/strong>for applications and operating systems is an excellent measure to help keep your systems secure. That&rsquo;s why it&rsquo;s important to&nbsp;<strong>establish audit policies for your servers&nbsp;<\/strong>and your&nbsp;<strong>databases<\/strong>.<\/p>\n<p>When creating an audit, <strong>don&rsquo;t forget the tables or columns that contain sensitive data&nbsp;<\/strong>that may be subject to any security measures.<\/p>\n<p>As well as creating these rules reports, it&rsquo;s obviously also important to&nbsp;<strong>review then regularly<\/strong> to check that everything is OK and act if an issue is found.<\/p>\n<p>To find out more information about audits, check out this page about <a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/relational-databases\/security\/auditing\/sql-server-audit-database-engine?view=sql-server-ver16\">SQL Server Audits on the Microsoft Learn site<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<h3><strong>Secure Passwords<\/strong><\/h3>\n<p>Something that we have always insisted on, and will continue to insist on, is the importance of&nbsp;<strong>using strong passwords<\/strong>. So, I&rsquo;d like to finish this article by answering a simple question: What does Microsoft consider to be a strong password?<\/p>\n<p>In reality, this will depend a little on the requirements of your domain or verification application. And given the increasing computer power dedicated to breaking passwords, we&rsquo;re having to use increasingly more characters. However, in general terms, a&nbsp;<strong>good password&nbsp;<\/strong>should:<\/p>\n<ul>\n<li>Be <strong>at least 8 characters long<\/strong><\/li>\n<li><strong>Not<\/strong> include the <strong>name <\/strong>of an <strong>organisation<\/strong>, <strong>user<\/strong> or <strong>person<\/strong><\/li>\n<li><strong>Not&nbsp;<\/strong>include&nbsp;<strong>any word&nbsp;<\/strong>currently in the dictionary<\/li>\n<li><strong>Not&nbsp;<\/strong>be similar to&nbsp;<strong>previous&nbsp;<\/strong>passwords<\/li>\n<li>Contain <strong>uppercase letters<\/strong><\/li>\n<li>Contain <strong>lowercase letters<\/strong><\/li>\n<li>Contain <strong>numbers<\/strong><\/li>\n<li>Contain <strong>special characters<\/strong><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>In this article, we have&nbsp;<strong>taken a look at some of the best practices&nbsp;<\/strong>for keeping Microsoft SQL Server 2022 as secure as possible. All of the advice found here is also applicable for other versions of SQL server that are currently supported, whether on-premises or cloud-based.<\/p>\n<p>We&rsquo;ve covered physical security, permissions, masking, passwords and many other steps that you can take to make your systems more resilient.<\/p>\n<p>All of these measures will help improve security. But the best thing you can do, as we always say, is&nbsp;<strong>plan carefully when deploying a service<\/strong>. This will help to eliminate the majority of vulnerabilities or errors that can occur.<\/p>\n<p>Obviously, this article has to end somewhere (thankfully), and we wouldn&rsquo;t want to bore you. That&rsquo;s why we&rsquo;ve left out some other interesting topics, such as the use of <a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/t-sql\/functions\/cryptographic-functions-transact-sql?view=sql-server-ver16\">Transact-SQL Cryptographic Functions<\/a>. But maybe we&rsquo;ll tackle these in a future article.<\/p>\n<p>We hope that this article helps you to improve your database security. But remember, these are just a few tips. We definitely recommend doing your own research to see if there&rsquo;s anything else you can do to make your SQL server more secure.<\/p>\n<p>Thanks for reading!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we&rsquo;ll look at the current best practices to&nbsp;make your SQL server more secure. Focusing on SQL Server 2022 deployed on a Microsoft Windows Server, we&rsquo;ll examine the steps you can take to protect your data and have the most resilient and secure architecture possible. NOTE: Please note that the content of this [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":16965,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[13],"tags":[],"class_list":["post-49038","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud-y-sistemas"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Make Your SQL Server More Secure<\/title>\n<meta name=\"description\" content=\"In this article, we&#039;ll look at the current best practices to\u00a0make SQL server more secure when installed on Windows Server.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jotelulu.com\/en-gb\/blog\/make-sql-server-more-secure\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Make Your SQL Server More Secure\" \/>\n<meta property=\"og:description\" content=\"In this article, we&#039;ll look at the current best practices to\u00a0make SQL server more secure when installed on Windows Server.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jotelulu.com\/en-gb\/blog\/make-sql-server-more-secure\/\" \/>\n<meta property=\"og:site_name\" content=\"Jotelulu\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-30T23:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2023\/01\/SQL-seguridad-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1211\" \/>\n\t<meta property=\"og:image:height\" content=\"729\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Juan Ignacio Oller Aznar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Juan Ignacio Oller Aznar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"17 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/make-sql-server-more-secure\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/make-sql-server-more-secure\\\/\"},\"author\":{\"name\":\"Juan Ignacio Oller Aznar\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/#\\\/schema\\\/person\\\/2ae97818cae086c48f108cd74234aca9\"},\"headline\":\"How to Make Your SQL Server More Secure\",\"datePublished\":\"2022-12-30T23:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/make-sql-server-more-secure\\\/\"},\"wordCount\":3327,\"image\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/make-sql-server-more-secure\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jotelulu.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/SQL-seguridad-1.jpg\",\"articleSection\":[\"Cloud y sistemas\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/make-sql-server-more-secure\\\/\",\"url\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/make-sql-server-more-secure\\\/\",\"name\":\"How to Make Your SQL Server More Secure\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/make-sql-server-more-secure\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/make-sql-server-more-secure\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jotelulu.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/SQL-seguridad-1.jpg\",\"datePublished\":\"2022-12-30T23:00:00+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/#\\\/schema\\\/person\\\/2ae97818cae086c48f108cd74234aca9\"},\"description\":\"In this article, we'll look at the current best practices to\u00a0make SQL server more secure when installed on Windows Server.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/make-sql-server-more-secure\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/make-sql-server-more-secure\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/make-sql-server-more-secure\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jotelulu.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/SQL-seguridad-1.jpg\",\"contentUrl\":\"https:\\\/\\\/jotelulu.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/SQL-seguridad-1.jpg\",\"width\":1211,\"height\":729,\"caption\":\"Imagen. C\u00f3mo mejorar la seguridad de tu SQL server\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/make-sql-server-more-secure\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Make Your SQL Server More Secure\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/#website\",\"url\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/\",\"name\":\"Jotelulu\",\"description\":\"Cloud Paradise for Tech Companies\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/#\\\/schema\\\/person\\\/2ae97818cae086c48f108cd74234aca9\",\"name\":\"Juan Ignacio Oller Aznar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/87efd80399b2c40a1d78dd5cee4e788d3f6c29d33e3b67bcfbc6abbf91d0fdcf?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/87efd80399b2c40a1d78dd5cee4e788d3f6c29d33e3b67bcfbc6abbf91d0fdcf?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/87efd80399b2c40a1d78dd5cee4e788d3f6c29d33e3b67bcfbc6abbf91d0fdcf?s=96&d=mm&r=g\",\"caption\":\"Juan Ignacio Oller Aznar\"},\"url\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/author\\\/juanignaciooller\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Make Your SQL Server More Secure","description":"In this article, we'll look at the current best practices to\u00a0make SQL server more secure when installed on Windows Server.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jotelulu.com\/en-gb\/blog\/make-sql-server-more-secure\/","og_locale":"en_GB","og_type":"article","og_title":"How to Make Your SQL Server More Secure","og_description":"In this article, we'll look at the current best practices to\u00a0make SQL server more secure when installed on Windows Server.","og_url":"https:\/\/jotelulu.com\/en-gb\/blog\/make-sql-server-more-secure\/","og_site_name":"Jotelulu","article_published_time":"2022-12-30T23:00:00+00:00","og_image":[{"width":1211,"height":729,"url":"https:\/\/jotelulu.com\/wp-content\/uploads\/2023\/01\/SQL-seguridad-1.jpg","type":"image\/jpeg"}],"author":"Juan Ignacio Oller Aznar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Juan Ignacio Oller Aznar","Estimated reading time":"17 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jotelulu.com\/en-gb\/blog\/make-sql-server-more-secure\/#article","isPartOf":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/make-sql-server-more-secure\/"},"author":{"name":"Juan Ignacio Oller Aznar","@id":"https:\/\/jotelulu.com\/en-gb\/#\/schema\/person\/2ae97818cae086c48f108cd74234aca9"},"headline":"How to Make Your SQL Server More Secure","datePublished":"2022-12-30T23:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/make-sql-server-more-secure\/"},"wordCount":3327,"image":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/make-sql-server-more-secure\/#primaryimage"},"thumbnailUrl":"https:\/\/jotelulu.com\/wp-content\/uploads\/2023\/01\/SQL-seguridad-1.jpg","articleSection":["Cloud y sistemas"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/jotelulu.com\/en-gb\/blog\/make-sql-server-more-secure\/","url":"https:\/\/jotelulu.com\/en-gb\/blog\/make-sql-server-more-secure\/","name":"How to Make Your SQL Server More Secure","isPartOf":{"@id":"https:\/\/jotelulu.com\/en-gb\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/make-sql-server-more-secure\/#primaryimage"},"image":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/make-sql-server-more-secure\/#primaryimage"},"thumbnailUrl":"https:\/\/jotelulu.com\/wp-content\/uploads\/2023\/01\/SQL-seguridad-1.jpg","datePublished":"2022-12-30T23:00:00+00:00","author":{"@id":"https:\/\/jotelulu.com\/en-gb\/#\/schema\/person\/2ae97818cae086c48f108cd74234aca9"},"description":"In this article, we'll look at the current best practices to\u00a0make SQL server more secure when installed on Windows Server.","breadcrumb":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/make-sql-server-more-secure\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jotelulu.com\/en-gb\/blog\/make-sql-server-more-secure\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/jotelulu.com\/en-gb\/blog\/make-sql-server-more-secure\/#primaryimage","url":"https:\/\/jotelulu.com\/wp-content\/uploads\/2023\/01\/SQL-seguridad-1.jpg","contentUrl":"https:\/\/jotelulu.com\/wp-content\/uploads\/2023\/01\/SQL-seguridad-1.jpg","width":1211,"height":729,"caption":"Imagen. C\u00f3mo mejorar la seguridad de tu SQL server"},{"@type":"BreadcrumbList","@id":"https:\/\/jotelulu.com\/en-gb\/blog\/make-sql-server-more-secure\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/jotelulu.com\/en-gb\/"},{"@type":"ListItem","position":2,"name":"How to Make Your SQL Server More Secure"}]},{"@type":"WebSite","@id":"https:\/\/jotelulu.com\/en-gb\/#website","url":"https:\/\/jotelulu.com\/en-gb\/","name":"Jotelulu","description":"Cloud Paradise for Tech Companies","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jotelulu.com\/en-gb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/jotelulu.com\/en-gb\/#\/schema\/person\/2ae97818cae086c48f108cd74234aca9","name":"Juan Ignacio Oller Aznar","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/87efd80399b2c40a1d78dd5cee4e788d3f6c29d33e3b67bcfbc6abbf91d0fdcf?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/87efd80399b2c40a1d78dd5cee4e788d3f6c29d33e3b67bcfbc6abbf91d0fdcf?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/87efd80399b2c40a1d78dd5cee4e788d3f6c29d33e3b67bcfbc6abbf91d0fdcf?s=96&d=mm&r=g","caption":"Juan Ignacio Oller Aznar"},"url":"https:\/\/jotelulu.com\/en-gb\/author\/juanignaciooller\/"}]}},"_links":{"self":[{"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/posts\/49038","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/comments?post=49038"}],"version-history":[{"count":0,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/posts\/49038\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/media\/16965"}],"wp:attachment":[{"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/media?parent=49038"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/categories?post=49038"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/tags?post=49038"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}