{"id":4281,"date":"2014-12-02T21:12:56","date_gmt":"2014-12-02T20:12:56","guid":{"rendered":"http:\/\/dollarunderscore.azurewebsites.net\/?p=4281"},"modified":"2014-12-09T13:22:29","modified_gmt":"2014-12-09T12:22:29","slug":"installation-of-sma-runbook-worker-fails-unable-to-communicate-with-sql-server","status":"publish","type":"post","link":"https:\/\/p0wershell.com\/?p=4281","title":{"rendered":"Installation of SMA Runbook Worker fails (Unable to communicate with SQL Server)"},"content":{"rendered":"<p>When installing a new SMA (Service Management Automation) runbook worker or web service it might fail with the following error message in the log:<br \/>\n&#8220;Product: System Center 2012 R2 Service Management Automation Runbook Worker &#8212; Unable to communicate with SQL Server using database information provided.&#8221;<\/p>\n<p>If you are doing a manual installation using the wizard it will look like this:<br \/>\n<a href=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/sma_installation_failed.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/sma_installation_failed.png\" alt=\"sma_installation_failed\" width=\"751\" height=\"568\" class=\"alignnone size-full wp-image-4291\" srcset=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/sma_installation_failed.png 751w, https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/sma_installation_failed-300x226.png 300w, https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/sma_installation_failed-624x471.png 624w\" sizes=\"(max-width: 751px) 100vw, 751px\" \/><\/a><\/p>\n<p>Not sure if this matters, but in my case, the database is hosted in a SQL AlwaysOn Availability Group on a non-default port (not 1433), and we are using &#8220;Windows Authentication&#8221;, or a &#8220;trusted&#8221; connection to log into the database.<\/p>\n<p>After investigating this issue and looking at the network communication I realized that the installation actually tries to validate the connection on the database-settings page, but when it&#8217;s finally time to start the installation, it just fails right away. Also, I found that the connection at the &#8220;verify sql settings&#8221;-step is established via a service (svchost.exe or CcmExec.exe), which could explain why this workaround actually works (it&#8217;s probably using the same component in the OS).<\/p>\n<p>I finally found a workaround for this issue though, which is pretty weird, but it got me through the installations of all my runbook workers and web services so I thought I&#8217;d share it if anyone else is experiencing this issue.<\/p>\n<p><strong>Workaround using temporary ODBC-connection<\/strong><br \/>\nWe will not actually create the connection, just fill in enough information to be able to do a test.<\/p>\n<p>Fill in all the settings in the SMA Runbook Worker-wizard but <em>do not<\/em> click &#8220;Install&#8221; at the last page.<\/p>\n<p>Instead, start the &#8220;ODBC Data Sources (64-bit)&#8221; (%windir%\\system32\\odbcad32.exe) using the same account as your installation wizard is running with and click &#8220;Add&#8230;&#8221;, see below:<br \/>\n<a href=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc1.png\" alt=\"odbc1\" width=\"608\" height=\"428\" class=\"alignnone size-full wp-image-4301\" srcset=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc1.png 608w, https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc1-300x211.png 300w\" sizes=\"(max-width: 608px) 100vw, 608px\" \/><\/a><\/p>\n<p>Then click &#8220;Finish&#8221;:<br \/>\n<a href=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc2.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc2.png\" alt=\"odbc2\" width=\"478\" height=\"359\" class=\"alignnone size-full wp-image-4311\" srcset=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc2.png 478w, https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc2-300x225.png 300w\" sizes=\"(max-width: 478px) 100vw, 478px\" \/><\/a><\/p>\n<p>Fill in the details of your database for SMA (the first two fields can be anything):<br \/>\n<a href=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc3.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc3.png\" alt=\"odbc3\" width=\"520\" height=\"369\" class=\"alignnone size-full wp-image-4321\" srcset=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc3.png 520w, https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc3-300x212.png 300w\" sizes=\"(max-width: 520px) 100vw, 520px\" \/><\/a><\/p>\n<p>Fill in the name of your sql server, click next, and choose &#8220;Client Configuration&#8221; if you are using a non-default port and fill in the one you are using:<br \/>\n<a href=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc4.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc4.png\" alt=\"odbc4\" width=\"600\" height=\"320\" class=\"alignnone size-full wp-image-4331\" srcset=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc4.png 600w, https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc4-300x160.png 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>Click next, and choose to change default database to master (not 100% sure this is needed, but a thread @technet suggested this), like this:<br \/>\n<a href=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc5.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc5.png\" alt=\"odbc5\" width=\"520\" height=\"369\" class=\"alignnone size-full wp-image-4332\" srcset=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc5.png 520w, https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc5-300x212.png 300w\" sizes=\"(max-width: 520px) 100vw, 520px\" \/><\/a><\/p>\n<p>Press &#8220;Finish&#8221; at the next step, but instead of pressing &#8220;OK&#8221; you choose &#8220;Test Data Source&#8230;&#8221; and you should see a successful test:<br \/>\n<a href=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc6.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc6.png\" alt=\"odbc6\" width=\"378\" height=\"393\" class=\"alignnone size-full wp-image-4341\" srcset=\"https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc6.png 378w, https:\/\/p0wershell.com\/wp-content\/uploads\/2014\/12\/odbc6-288x300.png 288w\" sizes=\"(max-width: 378px) 100vw, 378px\" \/><\/a><\/p>\n<p>Immediately switch back to your SMA Runbook Worker wizard and press Install, it should now go through fine!<\/p>\n<p>When the installation has finished, go back to your &#8220;ODBC connection test&#8221; and choose OK, then Cancel three times to exit the wizard for creating a ODBC-connection without actually creating it.<\/p>\n<p>I hope this helps someone else!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When installing a new SMA (Service Management Automation) runbook worker or web service it might fail with the following error message in the log: &#8220;Product: System Center 2012 R2 Service Management Automation Runbook Worker &#8212; Unable to communicate with SQL Server using database information provided.&#8221; If you are doing a manual installation using the wizard [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[951,311],"tags":[971,961],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3Zj0A-173","_links":{"self":[{"href":"https:\/\/p0wershell.com\/index.php?rest_route=\/wp\/v2\/posts\/4281"}],"collection":[{"href":"https:\/\/p0wershell.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/p0wershell.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/p0wershell.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/p0wershell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4281"}],"version-history":[{"count":0,"href":"https:\/\/p0wershell.com\/index.php?rest_route=\/wp\/v2\/posts\/4281\/revisions"}],"wp:attachment":[{"href":"https:\/\/p0wershell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/p0wershell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4281"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/p0wershell.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}