VMware Cloud Community
dsohayda
Enthusiast
Enthusiast
Jump to solution

Moving Chargeback Server Database

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

Tags (2)
1 Solution

Accepted Solutions
richmax
VMware Employee
VMware Employee
Jump to solution

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

View solution in original post

Reply
0 Kudos
8 Replies
PramodCV
Enthusiast
Enthusiast
Jump to solution

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.

Reply
0 Kudos
richmax
VMware Employee
VMware Employee
Jump to solution

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

Reply
0 Kudos
dprabhakaran
Enthusiast
Enthusiast
Jump to solution

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

Reply
0 Kudos
richmax
VMware Employee
VMware Employee
Jump to solution

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

Reply
0 Kudos
PramodCV
Enthusiast
Enthusiast
Jump to solution

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

Reply
0 Kudos
dprabhakaran
Enthusiast
Enthusiast
Jump to solution

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

dsohayda
Enthusiast
Enthusiast
Jump to solution

this looks like what I was looking for. Thank you

Reply
0 Kudos
maxel
Enthusiast
Enthusiast
Jump to solution

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

Reply
0 Kudos