{"id":2193,"date":"2016-09-13T16:42:31","date_gmt":"2016-09-13T16:42:31","guid":{"rendered":"http:\/\/pariswells.com\/blog\/?p=2193"},"modified":"2018-09-05T04:10:27","modified_gmt":"2018-09-05T04:10:27","slug":"reset-sql-server-sa-password-with-account-without-sufficient-privileges","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/fixes\/reset-sql-server-sa-password-with-account-without-sufficient-privileges","title":{"rendered":"Reset SQL Server SA password with account without sufficient privileges"},"content":{"rendered":"<h2>One Way without Restart Service<\/h2><p>I\u2019ve come across a great way of resetting a SQL server \u201csa\u201d password if you don\u2019t have it, don\u2019t have an account with sufficient privileges to reset it via SSMS, and most importantly, don\u2019t have to stop the SQL services so processing can continue.<img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-2194 img-responsive\" src=\"http:\/\/pariswells.com\/blog\/wp-content\/uploads\/2016\/09\/FKGQX81HUIS863C.MEDIUM1-150x150.jpg\" alt=\"fkgqx81huis863c-medium1\" width=\"150\" height=\"150\" \/><\/p><p>All you will need is psexec \u00a0(in the sysinternals \u00a0toolkit) available here \u00e0 <a href=\"https:\/\/technet.microsoft.com\/en-us\/sysinternals\/pxexec.aspx\">https:\/\/technet.microsoft.com\/en-us\/sysinternals\/pxexec.aspx<\/a><\/p><p>Once the tools are extracted to a directory on the server:<\/p><p><strong>Psexec.exe \u2013s \u2013i \u201c{full path to the ssms.exe\u201d}<\/strong><\/p><p>This will start the SQL Management Studio as the NTSERVICE\\SYSTEM account \u2026 enter the name of the SQL Server (or localhost) and then you\u2019re in \u2026 reset the sa password in there<\/p><p>&nbsp;<\/p><h2>Another way<\/h2><p>&nbsp;<\/p><ol><li>Stop SQL Server Service<\/li><li>Start is with\u00a0<pre><code id=\"code-30-27901-2\" class=\"code-1 nolinks\">net start MSSQLSERVER \/m\"SQLCMD\"<\/code><\/pre><\/li><li><pre><code id=\"code-30-27901-3\" class=\"code-1 nolinks\">sqlcmd -SServerName\\InstanceName<\/code><\/pre><\/li><li><pre><code id=\"code-30-27901-4\" class=\"code-1 nolinks\">CREATE LOGIN RecoveryAcct WITH PASSWORD=\u2019TempPass1\u2019<br \/>GO<br \/><\/code><\/pre><\/li><li><pre><code id=\"code-30-27901-5\" class=\"code-1 nolinks\">SP_ADDSRVROLEMEMBER RecoveryAcct,SYSADMIN<\/code><br \/>GO<\/pre><pre><code id=\"code-30-27901-4\" class=\"code-1 nolinks\"><\/code><\/pre>This was on Microsoft SQL Server 2008 (SP2) &#8211; 10.0.4067.0 (X64). <br \/><pre>\u00a0<\/pre><\/li><\/ol>","protected":false},"excerpt":{"rendered":"<p>One Way without Restart ServiceI\u2019ve come across a great way of resetting a SQL server \u201csa\u201d password if you don\u2019t have it, don\u2019t have an account with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[1595,673,1593,1591,1592,1594],"class_list":["post-2193","post","type-post","status-publish","format-standard","hentry","category-fixes","tag-ntservicesystem","tag-permissions","tag-psxec","tag-reset-sql-password","tag-sa","tag-system"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/2193","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=2193"}],"version-history":[{"count":3,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/2193\/revisions"}],"predecessor-version":[{"id":3607,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/2193\/revisions\/3607"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=2193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=2193"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=2193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}