{"id":635,"date":"2011-10-06T11:08:06","date_gmt":"2011-10-06T10:08:06","guid":{"rendered":"http:\/\/www.amikkelsen.com\/?p=635"},"modified":"2011-10-06T11:08:06","modified_gmt":"2011-10-06T10:08:06","slug":"vmware-chargeback-change-mssql-database-ip-andor-port","status":"publish","type":"post","link":"https:\/\/www.amikkelsen.com\/?p=635","title":{"rendered":"VMware Chargeback: Change MSSQL database IP and\/or port"},"content":{"rendered":"<p>Yesterday I was supposed to\u00c2\u00a0receive last months billing reports from our vCloud Director\u00c2\u00a0environment.<br \/>\nBut for some reason this didn&#8217;t happen \ud83d\ude41<\/p>\n<p>I tried to logon to the VCCB web front end, but that wasn&#8217;t possible &#8211; the page just timed out.<br \/>\nThen I checked the VCCB \u00c2\u00a0services and all was running.<br \/>\nJust to be sure I rebooted the server, with no luck.<\/p>\n<p>Then I started to be scared&#8230;..<\/p>\n<p>I checked the database login\u00c2\u00a0credentials, and the were correct.<br \/>\nSo what happend?<\/p>\n<p>After a quick google \u00c2\u00a0I found a <a href=\"http:\/\/communities.vmware.com\/message\/1705111\" target=\"_blank\">community thread<\/a> about changing the IP for the back end database, and from this I located the config files containing the database connection information.<\/p>\n<ol>\n<li><em>Installation_Directory<\/em>\\apache-tomcat-6.0.18\\webapps\\vCenter-CB\\WEB-INF\\classes\\hibernate.cfg.xml<\/li>\n<li><em>Installation_Directory<\/em>\\DataCollector-Embedded\\classes\\hibernate.cfg.xml<\/li>\n<\/ol>\n<p>Locate the line<\/p>\n<pre>&lt;property name=\"connection.url\"&gt;jdbc:sqlserver:\/\/10.0.0.100;databaseName=vcenter_chargeback;integratedSecurity=false&lt;\/property&gt;<\/pre>\n<p>Here you can change the connection string as you see fit.<br \/>\nThe connection string is based on Microsoft JDBC, so you are able to change it to fit you needs, choosing from all JDBC parameters. <a href=\"http:\/\/support.microsoft.com\/kb\/313100\">http:\/\/support.microsoft.com\/kb\/313100<\/a><\/p>\n<p>I solved my problem by adding the port number of the MSSQL server to the connection string.<\/p>\n<pre>10.0.0.100:14331<\/pre>\n<p>I also found that you need to update 2 other config files.<\/p>\n<ol>\n<li><em>Installation_Directory<\/em>\\Config.xml<\/li>\n<li><em>Installation_Directory<\/em>\\DataCollector-Embedded\\Config.xml<\/li>\n<\/ol>\n<p>Locate the line<\/p>\n<pre>&lt;hostport&gt;10.0.0.100&lt;\/hostport&gt;<\/pre>\n<p>Here you just need to update the IP and\/or port number.<br \/>\nI needed to add the portnumber.<\/p>\n<pre>&lt;hostport&gt;10.0.0.100:14331&lt;\/hostport&gt;<\/pre>\n<p>As you can see in the config.xml you are also able to change other parameters like<\/p>\n<ul>\n<li>Databasename<\/li>\n<li>username<\/li>\n<li>Password<br \/>\nThis is encrypted so you need to update this through the\u00c2\u00a0supplied VCCB tool.<br \/>\nStart -&gt; All Programs -&gt; VMware -&gt; VMware vCenter Chargeback -&gt; vCenter Chargeback Tools -&gt; Update vCenter Chargeback Database Credentials<\/li>\n<\/ul>\n<p>When you have updated all 4 configuration files, restart all services or restart the server.<\/p>\n<p>Wait a few minutes and then login to the VCCB web front end&#8230;.<\/p>\n<p>All is now working \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday I was supposed to\u00c2\u00a0receive last months billing reports from our vCloud Director\u00c2\u00a0environment. But for some reason this didn&#8217;t happen \ud83d\ude41 I tried to logon to the VCCB web front end, but that wasn&#8217;t possible &#8211; the page just timed out. Then I checked the VCCB \u00c2\u00a0services and all was running. Just to be sure\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.amikkelsen.com\/?p=635\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[299,289,300],"tags":[335,307,308,302,306,304,303,301,132,305],"class_list":["post-635","post","type-post","status-publish","format-standard","hentry","category-chargeback","category-cloud","category-vcenter-chargeback","tag-chargeback","tag-config-xml","tag-hibernate-cfg-xml","tag-ip","tag-jbdc","tag-mmsql","tag-port","tag-vccb","tag-vcenter","tag-vcloud"],"_links":{"self":[{"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/posts\/635","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=635"}],"version-history":[{"count":3,"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/posts\/635\/revisions"}],"predecessor-version":[{"id":638,"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/posts\/635\/revisions\/638"}],"wp:attachment":[{"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=635"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=635"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.amikkelsen.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=635"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}