Network Management

 View Only
last person joined: 4 hours ago 

Keep an informative eye on your network with HPE Aruba Networking network management solutions
Expand all | Collapse all

SQL Database Move

This thread has been viewed 1 times
  • 1.  SQL Database Move

    Posted Oct 15, 2021 03:09 PM

    Hello all. I am  currently running older version of IMC and trying to get them upgraded to a later version. In reading release notes, I found out that I will need to migrated to a nwq SQL server as we are currently on SQL 2008. I am on 7.3 E0605 currently. From this post https://community.hpe.com/t5/IMC/IMC-Data-Base-Change/td-p/5931131 it looks like I will need to:

    1. Build a temporary IMC server.
    2. copy my current backups from DMA to the new temp server.
    3. Restore databases to new SQL server.
    4. Shut down new temporary IMC server.
    5. edit C:\Program Files\iMC\deploy\conf\dma.conf, and C:\Program Files\iMC\common\conf\server-addr.xml
    6. Start old IMC server that points to new dbs.

    Am I missing anything on this migration? Are there any known issues getting this to work or is there a better document for migrating databases?

    Any help is appreciated.


    #imc


  • 2.  RE: SQL Database Move

    EMPLOYEE
    Posted Oct 17, 2021 03:40 PM
    Hello,

    Please go through release notes installation prerequisites from below link:

    https://support.hpe.com/hpesc/public/docDisplay?docId=a00118145en_us

    Thanks!


  • 3.  RE: SQL Database Move

    EMPLOYEE
    Posted Oct 18, 2021 02:44 AM

    Hello,

    Please make sure you follow the official Migration Guide. It's included in the 'manual' folder of the latest iMC Platform downloads. You can also find it below.

    Windows - https://support.hpe.com/hpesc/public/docDisplay?docLocale=en_US&docId=a00075552en_us

    Linux - https://support.hpe.com/hpesc/public/docDisplay?docLocale=en_US&docId=a00075554en_us

    I can't recommend manually editing config files on the old system to point it to the new DB server. It would be better to just use the new iMC system that you set up anyway and transfer the licenses on My Networking portal. You can do the transfer yourself or open a support case to have it done for you.



  • 4.  RE: SQL Database Move

    Posted Oct 19, 2021 04:05 PM

    Thanks for the response. In looking at the WIndows document mentioned, on page 9 it looks like this details a local restore, not a remote (SQL) one. Will this process work the same for SQL?



  • 5.  RE: SQL Database Move

    Posted Oct 19, 2021 04:08 PM

    Thanks for the response.



  • 6.  RE: SQL Database Move

    EMPLOYEE
    Posted Oct 20, 2021 10:06 AM

    Hello,

    I see what you mean, you might be confused by this terminology of "Locally Restore" vs. "Remotely Restore". It's actually referring to where the backup files you'd like to restore are located, and has nothing to do with a local vs. remote DB setup. Even in a remote DB deployment, you want to trigger the Restore operation via "Locally Restore" option on the DMA of the IMC server, if you've placed the DB backup files locally onto the IMC server (rather than on the DB server for example).

    Hope that makes sense.



  • 7.  RE: SQL Database Move

    Posted Oct 20, 2021 10:13 AM

    OH! That makes sense! I was definitely misunderstanding the terminology.

    I will work on this later in the week and report back if I have any issues.

    Thanks!



  • 8.  RE: SQL Database Move

    Posted Oct 22, 2021 03:12 PM

    I built a new server, installed iMC and matched it to the current production server as far as settings. Initial install was successful including the SQL database installs. I could log into the IMC web gui and see a basic setup.  I did the local restore and it seemed to run the restore until the very end when I received the "database restore failed" error. In the dbman_debug see the error below. The services started up and everything looks (in the web GUI) to be working, but I want to confirm before I open try to figure out how to get the new server licensed. 

    Anyone seen this error and should I even worry since everything looks correct?

     

    2021-10-22 14:01:03 [DEBUG] [Remove] Remove file: C:\Program Files\iMC\dbman\bin\dbop.sql.log
    2021-10-22 14:01:03 [INFO] [DBMAN] Begin to restore file 10.21.0.98@icc_dbimc_icc
    2021-10-22 14:01:03 [INFO] [CDbRestore::RestoreDatabaseList] m_PrimaryHost = 1, db remote_file_dir change to:
    2021-10-22 14:01:03 [INFO] [Client::connect_to_server] Starting connect to 10.21.0.98: 2810
    2021-10-22 14:01:03 [INFO] [Client::connect_to_server] Established connection to 10.21.0.98: 2810
    2021-10-22 14:01:03 [ERROR] [Client::send_filetrans_msg] Send file data error expect 1024 bytes infact -1 bytes
    2021-10-22 14:01:03 [INFO] [CDbRestore::RestoreOneDBase] File trans failed
    2021-10-22 14:01:03 [ERROR] [CDbRestore::RestoreDatabaseList] Fail to restore DB file in RestoreOneDBase Function 10.21.0.60@icc_db_imc_icc_db_20211022_105358_full.db
    2021-10-22 14:01:03 [INFO] [ManualRestoreBase] req asn msg:{ -- SEQUENCE --
    iErrCode 'f6'H --
    ,
    iContent '6963635f64623b3137322e32312e302e3938'H -- "icc_db;10.21.0.98" --
    }


    2021-10-22 14:01:03 [INFO] [sendTrapAlert] Send trap success

    2021-10-22 14:01:03 [ERROR] [ManualRestoreBase] Failed to manual restore databases. ManualType: 0
    2021-10-22 14:01:03 [ERROR] [response_err_code] errCode = -10
    2021-10-22 14:01:03 [INFO] [ManualRestoreBase] Begin start service.



  • 9.  RE: SQL Database Move

    Posted Oct 22, 2021 04:25 PM

    One other note, when I try to do a manual backup, I get an error also, logs from dbman_debug seen below.

    2021-10-22 15:14:10 [DEBUG] [My_Accept_Handler::handle_input] Connection established 127.0.0.1
    2021-10-22 15:14:10 [DEBUG] [CDataConnStreamQueueT::deal_msg] Receive command code: 10002
    2021-10-22 15:14:10 [DEBUG] [CDataConnStreamQueueT::deal_msg] Succeed to create ManualBackupDBase thread .
    2021-10-22 15:14:10 [INFO] [Client::connect_to_server] Starting connect to 10.21.0.98: 2810
    2021-10-22 15:14:10 [INFO] [Client::connect_to_server] Established connection to 10.21.0.98: 2810
    2021-10-22 15:14:10 [INFO] [ManualBackupDase] All server echo ok
    2021-10-22 15:14:10 [INFO] [CDbBackup::BackupAllDataBase] Begin to manual backup all databases. Backup directory: C:\dbmanbak\E605PostMigration
    2021-10-22 15:14:10 [INFO] [CDbBackup::BackupAllDataBase] ServerCount = 1
    2021-10-22 15:14:10 [INFO] [CDbBackup::BackupAllDataBase] Path: 10.21.0.98@aclm_db_imc_aclm_db_20211022_151410_full.db
    2021-10-22 15:14:10 [INFO] [Client::connect_to_server] Starting connect to 10.21.0.98: 2810
    2021-10-22 15:14:10 [INFO] [Client::connect_to_server] Established connection to 10.21.0.98: 2810
    2021-10-22 15:14:10 [ERROR] [Client::send_backupdbase_msg] Remote return error: Database backup failed when backup
    2021-10-22 15:14:10 [WARNING] [CDbBackup::BackupAllDataBase] Backup database: aclm_db failed
    2021-10-22 15:14:10 [ERROR] [ManualBackupDase] manual backing fail
    2021-10-22 15:14:10 [ERROR] [response_err_code] errCode = -1



  • 10.  RE: SQL Database Move

    Posted Oct 25, 2021 02:40 PM

    A restart of the server amd a second attempt to restore cleared up the restore issue and the error trying to backup.