8 Replies Latest reply on Mar 24, 2014 3:03 AM by maxel

    Moving Chargeback Server Database

    dsohayda Enthusiast

      I'm trying to move our Chargeback 2.5 server in stages and I'm having problems on my first stage; moving the chargeback DB.

      The DB was copied to the new database server successfully, and I updated the four xml files with the new database server name.

      Under the System Health tab of the web GUI I'm even seeing the newly updated DB server name under General Info>vCenter Chargeback Database.

      However, when I try running the Chargeback 2.6 install to upgrade the DB connection test shows the old database server name and it is grayed out.

      I've restarted the server after making the xml file changes, but still the same thing happens.

      Any suggestions?

      Thanks

        • 1. Re: Moving Chargeback Server Database
          PramodCV Novice
          VMware Employees

          Hi,

          Changing DB IP manually is not recommended in CBM. For doing this we have built in utilitiy. Please refer the User Guide Chapter 8 Administration Utilities -

           

          vCenter Chargeback Manager IP Address Reset Utility.

           

          Thanks

          Pramod.

           

          • 2. Re: Moving Chargeback Server Database
            Richard Novice
            VMware Employees

            Hi,

             

            Installer seems to be using the address for DB server taken from the following file which were created during the original installation.

             

            \.....VMware vCenter Chargeback\Uninstall_VMware vCenter Chargeback\installvariables

             

             

            When you look inside the file, you can see the following 3 parameters pointing to the old DB server's address.

            ------

            DB_HOST=

            dbHostPort=

            dbUrl=

            ------

             

            Change the address to the new DB server and go through the upgrade.  Now the DB server's address in "Database Configuration" section of the installation wizard should be pointing to the new DB server.

             

            Regards,

            Richard

            • 3. Re: Moving Chargeback Server Database
              dprabhakaran Enthusiast
              VMware Employees

              Richard,

                It is highly recommended to use the tool (mentioned by Pramod) instead of tweaking the parameters by hand. This is because DB information is scattered across many places, hence hand tweaking may result in a non-working environment!

               

              Thanks

              Diwakar

              • 4. Re: Moving Chargeback Server Database
                Richard Novice
                VMware Employees

                Hi Diwakar,

                 

                I understand hand tweaking is not the right way, but "vCenter Chargeback Manager IP Address Reset Utility." mentioned by Pramod does not work since this utility doesn't seem to allow to change the DB server's address.

                 

                SB has tried the utility, but no success....

                 

                Regards,

                Richard

                • 5. Re: Moving Chargeback Server Database
                  PramodCV Novice
                  VMware Employees

                  Hi,

                  Apologies for the incorrect inputs in the above post.

                  Earlier post pointed steps to change the CBM Server IP .

                   

                  To change the DB IP address, we dont have a utility built in. We would need to change in Hibernate Config files manually. The file is present in multiple location like Apache-tomcat folder, DC folders(VC DC,VCD DC and VSM DC)  and same files would be present in all the nodes and load balance setup. The file name that needs to be changed is "hibernate.cfg.xml". Please find the location(in the attached image) of the file where changes has to be made.

                   

                  Note changes has to be made in line - <property name="connection.url">jdbc:sqlserver://;serverName=<Replace the new ip address>;databaseName=<DatabaseName></property>

                   

                  Thanks

                  Pramod.

                   

                  hibernate_cfg_xml.JPG

                  • 6. Re: Moving Chargeback Server Database
                    dprabhakaran Enthusiast
                    VMware Employees

                    Hi Richard,

                      I would like to apologize for the incorrect that I provided in my previous post. To add to PramodCV's comment, if you are not willing to change the files by hand, the other option is, take a backup of Chargeback DB, reinstall chargeback server & DCs using the DB backup. I know this is slightly a lengthy approach but lot safer one!

                     

                    Thanks

                    Diwakar

                    • 7. Re: Moving Chargeback Server Database
                      dsohayda Enthusiast

                      this looks like what I was looking for. Thank you

                      • 8. Re: Moving Chargeback Server Database
                        maxel Enthusiast

                        One Question, has the CB database agent scheduled rollup jobs that have to been moved also like in the vcenter databases?