{"id":19822,"date":"2023-05-15T03:39:51","date_gmt":"2023-05-15T03:39:51","guid":{"rendered":"https:\/\/www.top-password.com\/blog\/?p=19822"},"modified":"2023-05-15T03:39:51","modified_gmt":"2023-05-15T03:39:51","slug":"reset-lost-sa-password-for-sql-server-2022","status":"publish","type":"post","link":"https:\/\/www.top-password.com\/blog\/reset-lost-sa-password-for-sql-server-2022\/","title":{"rendered":"How to Reset Lost SA Password for SQL Server 2022"},"content":{"rendered":"<p>Cannot authenticate using the sa account credential? The default sa password does not work? If you cannot establish a connection using SQL Server Management Studio or restore the master.mdf database, doing a password reset should be the fastest way to regain access to your SQL Server instance. In this tutorial we&#8217;ll walk you through the steps of resetting lost sa password for SQL Server 2022.<\/p>\n<p><strong>Part 1: Stop SQL Server Service<\/strong><\/p>\n<p>To get started, we need to stop the SQL Server service and find where the master.mdf database is located using File Explorer. Follow these steps:<\/p>\n<ol>\n<li>Click the <strong>Start<\/strong> button. When the Start menu appears, expand the &#8220;Microsoft SQL Server 2022&#8221; folder and click &#8220;<strong>SQL Server 2022 Configuration Manager<\/strong>&#8220;.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/sql-server-2022-configuration-manager.png\" alt=\"\" width=\"594\" height=\"395\" class=\"alignnone size-full wp-image-19826\" srcset=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/sql-server-2022-configuration-manager.png 594w, https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/sql-server-2022-configuration-manager-300x199.png 300w\" sizes=\"auto, (max-width: 594px) 100vw, 594px\" \/>\n<\/li>\n<li>In the left-hand side of the window, click the &#8220;SQL Server Services&#8221; entry. In the right pane, right-click &#8220;<strong>SQL Server (MSSQLServer)<\/strong>&#8221; or a named instance, and then choose <strong>Stop<\/strong>.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/stop-sql-server-2022-service.png\" alt=\"\" width=\"600\" height=\"315\" class=\"alignnone size-full wp-image-19827\" srcset=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/stop-sql-server-2022-service.png 600w, https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/stop-sql-server-2022-service-300x158.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/>\n<\/li>\n<li>Next, double-click the &#8220;SQL Server (MSSQLServer)&#8221; service to open the Properties dialog. Go to the &#8220;<strong>Startup Parameters<\/strong>&#8221; tab, and you&#8217;ll see the full path of the master.mdf file which is displayed in the &#8220;Existing parameters&#8221; list box.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/sql-server-startup-parameters.png\" alt=\"\" width=\"517\" height=\"539\" class=\"alignnone size-full wp-image-19828\" srcset=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/sql-server-startup-parameters.png 517w, https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/sql-server-startup-parameters-288x300.png 288w\" sizes=\"auto, (max-width: 517px) 100vw, 517px\" \/><\/p>\n<p>For SQL Server 2022, the default location is <code>C:\\Program Files\\Microsoft SQL Server\\MSSQL16.MSSQLSERVER\\MSSQL\\DATA<\/code>.<\/li>\n<li><a href=\"https:\/\/www.top-password.com\/blog\/open-file-explorer-in-windows-11\/\" rel=\"noopener\" target=\"_blank\">Open File Explorer<\/a> and browse to the above location, and check if the master.mdf file can be found.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/master-mdf-location.png\" alt=\"\" width=\"600\" height=\"342\" class=\"alignnone size-full wp-image-19829\" srcset=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/master-mdf-location.png 600w, https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/master-mdf-location-300x171.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/>\n<\/li>\n<\/ol>\n<p><strong>Part 2: Reset Lost SA Password for SQL Server 2022<\/strong><\/p>\n<ol>\n<li>After opening the <a href=\"https:\/\/www.top-password.com\/sql-server-password-recovery.html\">SQL Server Password Changer<\/a> utility, click the <strong>Open File<\/strong> button in the right side.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/sql-server-password-changer.png\" alt=\"\" width=\"600\" height=\"411\" class=\"alignnone size-full wp-image-19830\" srcset=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/sql-server-password-changer.png 600w, https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/sql-server-password-changer-300x206.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/>\n<\/li>\n<li>Choose the master.mdf file for your SQL Server 2022 instance, and then click <strong>Open<\/strong>.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/open-master-mdf.png\" alt=\"\" width=\"600\" height=\"341\" class=\"alignnone size-full wp-image-19831\" srcset=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/open-master-mdf.png 600w, https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/open-master-mdf-300x171.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/>\n<\/li>\n<li>You&#8217;ll get the list of all database users. Simply choose the <strong>sa<\/strong> account and click the &#8220;<strong>Change Password<\/strong>&#8221; button.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/change-sql-server-2022-sa-password.png\" alt=\"\" width=\"600\" height=\"411\" class=\"alignnone size-full wp-image-19832\" srcset=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/change-sql-server-2022-sa-password.png 600w, https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/change-sql-server-2022-sa-password-300x206.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/>\n<\/li>\n<li>Enter a new sa password and click <strong>OK<\/strong>. Close the SQL Server Password Changer utility.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/enter-new-sa-password.png\" alt=\"\" width=\"450\" height=\"192\" class=\"alignnone size-full wp-image-19833\" srcset=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/enter-new-sa-password.png 450w, https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/enter-new-sa-password-300x128.png 300w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/>\n<\/li>\n<\/ol>\n<p><strong>Part 3: Connect to SQL Server 2022 with New SA Password<\/strong><\/p>\n<p>Open the SQL Server 2022 Configuration Manager and start the SQL Server service, then launch the SQL Server Management Studio, you can then log in to the sa account with your new password!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/login-to-sa-with-management-studio.png\" alt=\"\" width=\"600\" height=\"366\" class=\"alignnone size-full wp-image-19834\" srcset=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/login-to-sa-with-management-studio.png 600w, https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/login-to-sa-with-management-studio-300x183.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>If you get the error message &#8220;<code>Login Failed for User (Microsoft SQL Server, Error: 18456)<\/code>&#8220;, it&#8217;s possible that the authentication method of the SQL server is not properly configured. You need to use the second method descried in <a href=\"https:\/\/www.top-password.com\/knowledge\/sql-server-authentication-mode.html\" rel=\"noopener\" target=\"_blank\">this article<\/a> to enable mixed mode authentication.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/sql-server-error-18456.png\" alt=\"\" width=\"717\" height=\"198\" class=\"alignnone size-full wp-image-19835\" srcset=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/sql-server-error-18456.png 717w, https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2023\/05\/sql-server-error-18456-300x83.png 300w\" sizes=\"auto, (max-width: 717px) 100vw, 717px\" \/><\/p>\n<p>That&#8217;s it!<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Cannot authenticate using the sa account credential? The default sa password does not work? If you cannot establish a connection using SQL Server Management Studio or restore the master.mdf database, doing a password reset should be the fastest way to regain access to your SQL Server instance. In this tutorial we&#8217;ll walk you through the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,7,10],"tags":[5180,5179,5177,5178,5176],"class_list":["post-19822","post","type-post","status-publish","format-standard","hentry","category-others","category-sql-server","category-tips-tricks","tag-forgot-sa-password-sql-server","tag-forgot-sql-server-2022-password","tag-reset-sa-password-sql-server-2022","tag-reset-sql-server-2022-password","tag-sql-server-2022-password-recovery"],"_links":{"self":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/19822","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/comments?post=19822"}],"version-history":[{"count":10,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/19822\/revisions"}],"predecessor-version":[{"id":19842,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/19822\/revisions\/19842"}],"wp:attachment":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/media?parent=19822"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/categories?post=19822"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/tags?post=19822"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}