{"id":2970,"date":"2020-04-01T00:02:27","date_gmt":"2020-03-31T18:32:27","guid":{"rendered":"https:\/\/www.24x7serversupport.com\/blog\/?p=2970"},"modified":"2020-04-01T00:02:32","modified_gmt":"2020-03-31T18:32:32","slug":"how-to-reset-sa-password-on-microsoft-sql-server","status":"publish","type":"post","link":"https:\/\/www.24x7serversupport.com\/blog\/how-to-reset-sa-password-on-microsoft-sql-server\/","title":{"rendered":"How to reset SA password on Microsoft SQL Server"},"content":{"rendered":"\n<p> Launch <strong>Sql Configuration Manager<\/strong> under <strong>Configuration Tools<\/strong> folder. <br> Look for your SQL Server instance (the default is MSSQLSERVER) and stop  the service. You can click the stop button while having the SQL Server  (MSSQLSERVER) row highlighted or you can right-click on it and select <strong>Stop<\/strong>. <\/p>\n\n\n\n<p> Launch the <strong>Command Prompt<\/strong>. <br> Next, we want to run the SQL Server in a single-user mode by adding \u201c\/m\u201d parameter with the client application name:<br> <code>net start MSSQLSERVER \/m\"SQLCMD\"<\/code> <br> Then we need to connect to the database on the machine using a trusted connection:<br> <code>sqlcmd -E -S localhost<\/code> <br> After starting the <strong>sqlcmd<\/strong>, type the following SQL statement after the prompt<\/p>\n\n\n\n<p>CREATE LOGIN tempUser WITH PASSWORD = &#8216;newpassword&#8217;<br> GO<br> ALTER SERVER ROLE sysadmin ADD MEMBER tempUser<br> GO<\/p>\n\n\n\n<p>For SQL Server 2012 or newer, use ALTER SERVER ROLE should be used instead of sp_addsrvrolemember as this system stored procedure will be removed in a future version of Microsoft SQL Server.<\/p>\n\n\n\n<p>You can type \u201cexit\u201d to quit SQLCMD.<\/p>\n\n\n\n<p>Restart the Sql Server service to get out of the single-user mode:<br> <code>net stop MSSQLSERVER<\/code> followed by <code>net start MSSQLSERVER<\/code><\/p>\n\n\n\n<p> Launch <strong>SQL Server Management Studio<\/strong> and connect to the local database using the new login you just created. <\/p>\n\n\n\n<p> Expand on <strong>Security<\/strong>, then expand on <strong>Logins<\/strong>. <\/p>\n\n\n\n<p> Right-click on user sa and select <strong>Properties<\/strong>. Enter the new password and click <strong>OK<\/strong>. And you\u2019re done. <\/p>\n\n\n\n<p> Now you can login to the database using the sa login and the new  password you set. For security purpose, make sure you delete the  tempUser afterwards. <br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Launch Sql Configuration Manager under Configuration Tools folder. Look for your SQL Server instance (the default is MSSQLSERVER) and stop the service. You can click the stop button while having the SQL Server (MSSQLSERVER) row highlighted or you can right-click on it and select Stop. Launch the Command Prompt. Next, we want to run the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[37],"tags":[],"class_list":["post-2970","post","type-post","status-publish","format-standard","hentry","category-windows"],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to reset SA password on Microsoft SQL Server | 24x7serversupport Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.24x7serversupport.com\/blog\/how-to-reset-sa-password-on-microsoft-sql-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to reset SA password on Microsoft SQL Server | 24x7serversupport Blog\" \/>\n<meta property=\"og:description\" content=\"Launch Sql Configuration Manager under Configuration Tools folder. Look for your SQL Server instance (the default is MSSQLSERVER) and stop the service. You can click the stop button while having the SQL Server (MSSQLSERVER) row highlighted or you can right-click on it and select Stop. Launch the Command Prompt. Next, we want to run the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.24x7serversupport.com\/blog\/how-to-reset-sa-password-on-microsoft-sql-server\/\" \/>\n<meta property=\"og:site_name\" content=\"24x7serversupport Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-31T18:32:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-03-31T18:32:32+00:00\" \/>\n<meta name=\"author\" content=\"24x7support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:site\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"24x7support\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-reset-sa-password-on-microsoft-sql-server\/\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-reset-sa-password-on-microsoft-sql-server\/\",\"name\":\"How to reset SA password on Microsoft SQL Server | 24x7serversupport Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\"},\"datePublished\":\"2020-03-31T18:32:27+00:00\",\"dateModified\":\"2020-03-31T18:32:32+00:00\",\"author\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-reset-sa-password-on-microsoft-sql-server\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.24x7serversupport.com\/blog\/how-to-reset-sa-password-on-microsoft-sql-server\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-reset-sa-password-on-microsoft-sql-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.24x7serversupport.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to reset SA password on Microsoft SQL Server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/\",\"name\":\"24x7serversupport Blog\",\"description\":\"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\",\"name\":\"24x7support\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to reset SA password on Microsoft SQL Server | 24x7serversupport Blog","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:\/\/www.24x7serversupport.com\/blog\/how-to-reset-sa-password-on-microsoft-sql-server\/","og_locale":"en_US","og_type":"article","og_title":"How to reset SA password on Microsoft SQL Server | 24x7serversupport Blog","og_description":"Launch Sql Configuration Manager under Configuration Tools folder. Look for your SQL Server instance (the default is MSSQLSERVER) and stop the service. You can click the stop button while having the SQL Server (MSSQLSERVER) row highlighted or you can right-click on it and select Stop. Launch the Command Prompt. Next, we want to run the [&hellip;]","og_url":"https:\/\/www.24x7serversupport.com\/blog\/how-to-reset-sa-password-on-microsoft-sql-server\/","og_site_name":"24x7serversupport Blog","article_published_time":"2020-03-31T18:32:27+00:00","article_modified_time":"2020-03-31T18:32:32+00:00","author":"24x7support","twitter_card":"summary_large_image","twitter_creator":"@24x7serversuppo","twitter_site":"@24x7serversuppo","twitter_misc":{"Written by":"24x7support","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-reset-sa-password-on-microsoft-sql-server\/","url":"https:\/\/www.24x7serversupport.com\/blog\/how-to-reset-sa-password-on-microsoft-sql-server\/","name":"How to reset SA password on Microsoft SQL Server | 24x7serversupport Blog","isPartOf":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#website"},"datePublished":"2020-03-31T18:32:27+00:00","dateModified":"2020-03-31T18:32:32+00:00","author":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401"},"breadcrumb":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-reset-sa-password-on-microsoft-sql-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.24x7serversupport.com\/blog\/how-to-reset-sa-password-on-microsoft-sql-server\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-reset-sa-password-on-microsoft-sql-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.24x7serversupport.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to reset SA password on Microsoft SQL Server"}]},{"@type":"WebSite","@id":"https:\/\/www.24x7serversupport.com\/blog\/#website","url":"https:\/\/www.24x7serversupport.com\/blog\/","name":"24x7serversupport Blog","description":"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401","name":"24x7support","url":"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/2970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/comments?post=2970"}],"version-history":[{"count":1,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/2970\/revisions"}],"predecessor-version":[{"id":2971,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/2970\/revisions\/2971"}],"wp:attachment":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/media?parent=2970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/categories?post=2970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/tags?post=2970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}