1752347 Members
5622 Online
108787 Solutions
New Discussion юеВ

Re: IMC Data Base Change

 
idareval
Contributor

IMC Data Base Change

I have a IMC currently installed and I need to change the current database to another that is installed on another server. how I can do this?

 

Thanks

25 REPLIES 25
LindsayHill
Honored Contributor

Re: IMC Data Base Change

Are you looking to dump the DBs from one server, and restore them to another server?

 

I haven't tried it, but you could probably shut down iMC, migrate all the DBs, and set up all the users. Make sure you give the users the same password.

 

Then edit C:\Program Files\iMC\deploy\conf\dma.conf, and C:\Program Files\iMC\common\conf\server-addr.xml

 

In those files, change all the references from your old server IP/hostname to the new name/IP.

 

Then restart IMC.

 

If you are creating the new users in the new DB, and you don't know the passwords used for each of the user accounts associated with each DB, use C:\Program Files\iMC\deploy\pwdmgr.bat - it will tell you what the passwords are.

 

I don't know for sure if this will work, but it would be straightforward enough to test. Since you will still have your existing DB in place, you can easily roll back.

 

BlakkheimGW
Visitor

Re: IMC Data Base Change

Hey there,

 

Sorry to resurrect this post, but I have exactly the same question. I'm trying to move the database to another server. Everything is working fine in the IMC interface : I've retrieved my devices, performance indexes and alarms etc... BUT in the "Deployment Monitoring Agent", "Environment" tab, I have an error message regarding the database. It says "Incorrect database password". When I click the "Change password" button, the "Database server address" field is greyed out and it displays the old server address.. I've captured network traffic and IMC really tries to contact the old server.

And if I try to deploy a component via the "Deploy" tab, it fails with a database error because it also tries to contact the old server.

 

I've tried to grep any remaining occurence of the old address in the whole IMC directory, without luck. Any idea ?

Lindsay, in your previous posts, you are mentionning the dma.conf file but I can't find any occurence of the database address in that file..

 

Thanks !

LindsayHill
Honored Contributor

Re: IMC Data Base Change

What do you have in deploy\conf\dbconfig.xml ?

BlakkheimGW
Visitor

Re: IMC Data Base Change

Hello Lindsay,

 

My dbconfig.xml looks like this :

 

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<dbconfigs>
  <item compId="iMC-PLAT" dbAddress="NEWIP" dbName="config_db" dbType="MySQL" dbUserName="imc_config" forceDropWhenRemove="false"/>
<item compId="iMC-NME-FAULT" dbAddress="NEWIP" dbName="monitor_db" dbType="MySQL" dbUserName="imc_monitor" forceDropWhenRemove="false"/>
<item compId="iMC-ICC" dbAddress="NEWIP" dbName="icc_db" dbType="MySQL" dbUserName="imc_icc" forceDropWhenRemove="false"/>
<item compId="iMC-REPORT" dbAddress="NEWIP}|{NEWIP" dbName="report_db}|{reportplat_db" dbType="MySQL" dbUserName="report}|{reportplat" forceDropWhenRemove="false"/>
<item compId="iMC-NME-PERF" dbAddress="NEWIP" dbName="perf_db" dbType="MySQL" dbUserName="imc_perf" forceDropWhenRemove="false"/>
<item compId="iMC-ACLM" dbAddress="NEWIP" dbName="aclm_db" dbType="MySQL" dbUserName="imc_aclm" forceDropWhenRemove="false"/>
<item compId="iMC-NETASSET" dbAddress="NEWIP" dbName="invent_db" dbType="MySQL" dbUserName="imc_inventory" forceDropWhenRemove="false"/>
<item compId="iMC-SYSLOG" dbAddress="NEWIP" dbName="syslog_db" dbType="MySQL" dbUserName="imc_syslog" forceDropWhenRemove="false"/>
<item compId="iMC-VLAN" dbAddress="NEWIP" dbName="vlanm_db" dbType="MySQL" dbUserName="imc_vlan" forceDropWhenRemove="false"/>
<item compId="iMC-VNM" dbAddress="NEWIP" dbName="vnm_db" dbType="MySQL" dbUserName="imc_vnm" forceDropWhenRemove="false"/>
</dbconfigs>

 

All occurences I've found in every file of the IMC directory have been replaced..

LindsayHill
Honored Contributor

Re: IMC Data Base Change

Hmm, that file looks correct. I'll have a look around, see if I can figure out which other files you might need to check.

kortemi
Advisor

Re: IMC Data Base Change

Hi,

I'm struggling with this same problem:

Had to move the databases to another SQL Server, to a named instance (in the old server it was on the default instance).

I've edited all of the IMC config files I can think of (list below) with the new SQL server details. All other IMC processes start OK, except jserver, which just says "Failed to connect to database".

I am stumped, anyone for help?

Here's the list of files that I've edited:

FOLDER:  ..\IMC\common\conf:
server-addr.xml

FOLDER: ..\IMC\deploy\conf
component-env.xml
dbconfig..xml

FOLDER: ..\IMC\dbman\etc
dbman.conf

FOLDER: ..\IMC\client\web\apps\imc\reports
iMCCRconfig.xml

FOLDER: ..\IMC\client\web\apps\imc\reportsv2
dataSource.xml

FOLDER: ..\IMC\client\web\apps\rptviewer\WEB-INF\repository\data
<serverip>.xml
127.0.0.1.xml

Since the databases now exist in a named instance, I've entered the server addresses in the following format. Is this correct, or am I doing something wrong here? (example from server-addr.xml

<db-config address="<dbserverIP>\IMC" dbname="aclm_db" password="<pwhash>" type="SQLServer" username="imc_aclm"/>

In component-env.xml I've configured the following:

<component id="iMC-PLAT">
    <var name="DATABASE_PORT" value="1433"/>
    <var name="DATABASE_ADDRESS" value="1<dbserverIP>"/>
    <var name="DATABASE_TYPE" value="SQLServer"/>
    <var name="DATABASE_NAME" value="config_db"/>
    <var name="DATABASE_PASSWORD" value="<pwhash>"/>
    <var name="DEPLOY_IP" value="127.0.0.1"/>
    <var name="JDBC_INSTANCE_NAME" value=""/>
    <var name="DATABASE_INSTANCE" value="IMC"/>
    <var name="DATABASE_USER_NAME" value="imc_config"/>
    <var name="INSTANCE_NAME" value=""/>
    <var name="VERSION" value="7.2-E0403"/>
    <var name="INNER_VERSION" value="V700R001B06D008"/>
  </component>

Have I correctly understood the entries DATABASE_ADDRESS and DATABASE_INSTANCE?

In dbconfig.xml I've the following for each table:
<item compId="iMC-ACLM" dbAddress="<sbserverIP\IMC" dbName="aclm_db" dbType="SQLServer" dbUserName="imc_aclm" forceDropWhenRemove="false"/>

And in dbman.xonf I've got the following:

# DBMAN Configurations

Language = en
# Common Configurations
EnableDbman = 1
BackHoseIp =
PrimaryHost = 1
MaxLogSize = 10485760
FileReserveTime = 7
CommandPort = 2810
SessionTimeout = 300
FaultIp = 127.0.0.1
IfTransToHost  = 0

# Primary Common Configurations
BackupAtOnce = 0
BackupTime = 4
BackupTimeMinute = 0
AfterFTPSave = 2
# iMC server Configurations
ServerCount = 1

iMCIP1 = 127.0.0.1
DBaseIP1 = <dbserverIP>
DBType1 = 1
DBInstance1 = IMC
PrimaryDbSaUserName1 = sa
PrimaryDbSaPassword1 = <pwhash>
PrimaryDbPort1 = 1433
DBCount1 = 10

# Primary 1 Configurations
BackupPath1_127.0.0.1 = D:\IMCBackup
BackupPath1_10.158.90.138 = F:\SQL_BackUp\IMC

PrimaryDbInst1_1 = <dbserverIP>\IMC@aclm_db
PrimaryDbUser1_1 = imc_aclm
PrimaryDbPassword1_1 = <pwhash>
PrimaryDbInst1_1_iMC-ACLM = 7.2.E0403
ifbackup1_1 = 1
iftrans1_1 = 0

Is there something I've got wrong in the above examples?

Please help, this is driving me round the bend...

LindsayHill
Honored Contributor

Re: IMC Data Base Change

I suspect that you need to change "INSTANCE_NAME", not "DATABASE_INSTANCE".

I also don't think that you can specify the address in that format.

What you could do as an experiment is to set up a new named instance, and a new IMC install on a different server (just install with the trial license). Then you can see what format IMC uses in those files, and change your production config as needed.

LindsayHill
Honored Contributor

Re: IMC Data Base Change

Oh and the other thing you could look at is doing something like doing a backup & restore, but restoring to the new DB location.

JasonL1
Frequent Advisor

Re: IMC Data Base Change

I have done this. It is, from an ultra high level, copy, paste, redirect, done. I copied the databases and moved them to a fresh SQL VM, installed IMC (the same version that you are using), copied the databases over as a backup then, using IMC, restored the databases. Once the database move was done, I redirected the main IMC server to the new DB server within its config file.

I have attached the document that was sent to me by the HP Engineer, I followed most of the instructions but, I skipped making two new servers and edited the file it has you copy. That was done simply to save time and resources.

As always, make sure you have a recent backup for your server before you make these changes. You could easily make your day worse.