24.2 Migrating the Data from the Oracle Database to an MS SQL Database

24.2.1 Preparing to Move the Data

Before migrating the data to the MS SQL database, do the following:

  • Ensure that the license state of ZENworks is Active. The product must be installed and running either in the licensed version or the evaluation version.

  • Ensure that the MS SQL database is installed on a device that does not have ZENworks installed.

  • (Conditional) If you want to create a new database on MS SQL Server, you must be aware of the database administrator credentials.

  • (Conditional) If you want to migrate the data to an existing database that resides on the MS SQL server in your network, the newly created user must be assigned the db_owner database role and you must procure the database credentials of the newly created user from the database administrator.

  • Manually stop the ZENworks services running on all other ZENworks Servers in the Management Zone.

    Stop the ZENworks services on all other ZENworks Servers in the Management Zone.

    • On Windows:

      1. Execute the following command at the server prompt:

        novell-zenworks-configure -c Start

      2. Enter the number next to the Stop action.

    • On Linux:

      1. Execute the following command at the server prompt:

        /opt/novell/zenworks/bin/novell-zenworks-configure -c Start

      2. Enter the number next to the Stop action.

  • (Optional) The status of database migration is logged into the novell-zenworks-configure.log file. By default, only the messages of the type Info and Severe are logged. If you want other message types (such as Finer, Finest, and Warning) to also be logged into the file, do the following in the novell-zenworks-configure.properties file:

    1. Set the value of Logger.logLevel to the appropriate message type.

      For example, if you want messages of the type Finest to be logged:

       #Logger.logLevel   = FINEST
    2. Uncomment the line by removing the “#” as follows:

      Logger.logLevel   = FINEST

    The novell-zenworks-configure.properties file is located in %ZENWORKS_HOME%\conf\ on Windows and in /etc/opt/novell/zenworks/ on Linux.

24.2.2 Migrating the Data from the Oracle Database to an MS SQL Database

  1. Ensure that all the tasks listed in Preparing to Move the Data are completed.

  2. Run the novell-zenworks-configure -c migration_new.DBMigration database migration utility.

  3. Select the target database type as sql-server.

  4. Choose the purging option for data before database migration.

  5. Enter the IP address or host name of the MS SQL database server.

  6. Enter the port used by the MS SQL database server.

  7. (Optional) Enter the named instance for the MS SQL Server engine.

  8. Choose to create a new database or use an existing database that resides on the MS SQL server.

    If you choose to create a new database, continue with Step 9.

    If you choose to use an existing database, skip to Step 10.

  9. (Conditional) If you choose to create a new database in Step 8, perform the following tasks:

    1. Select the authentication type (Windows or SQL Server) to be used for the database administrator user.

    2. Enter the database server administrator user name.

    3. Enter the database server administrator password.

    4. (Conditional) If you choose Windows authentication in Step 9.a, enter the database administrator’s domain name.

  10. Select the authentication type (Windows or SQL Server) to be used for the database access user.

  11. Enter the database access user name.

  12. Enter the database access user password.

  13. (Conditional) If you choose Windows authentication in Step 10, enter the database access user’s domain name.

  14. Enter the database name of the database that resides on the MS SQL server to which you want to migrate the data. If you choose to create a new database in Step 8, the database is created on the MS SQL server with the name that you specify in this step.

  15. (Conditional) If you choose to create a new database in Step 8, enter the complete path where you want the database to be created.

  16. Perform the steps from Step 5 to Step 15 for ZENworks audit database. The database migration starts.

  17. When the database migration is complete, you can verify the novell-zenworks-configure.log file to see if the migration was successful. The log file is located in %ZENWORKS_HOME%\log\ on the Windows Primary Server and in /var/opt/novell/log/zenworks/ on the Linux Primary Server.

  18. After the database is successfully migrated, continue with the following steps:

    1. Perform post-migration tasks. See Post-Migration Tasks.

    2. Re-configure the ZENworks Reporting Server to point to the MS SQL database, because it will still be pointing to the Oracle database.

24.2.3 Resuming the Database Migration

If the migration of the database is stopped for any reason, the ZENworks migration utility allows you to resume the migration if the DBMigration.xml and AuditDBMigration.xml files for ZENworks and Audit databases has been created. The file is located in the %ZENWOKS_HOME%\bin directory on the Windows Primary Server, and in the /opt/novell/zenworks/bin directory on the Linux Primary Server.

  1. Run the database migration utility.

    • On the Windows Primary Server: At the command prompt, go to ZENworks_installation_path\bin\, then enter the following command:

      novell-zenworks-configure.bat -c DBMigrateConfigureAction

    • On the Linux Primary Server: At the console prompt, go to /opt/novell/zenworks/bin, then enter the following command:

      novell-zenworks-configure -c DBMigrateConfigureAction

  2. Enter the target database type as sql database server.

  3. Enter the IP address or host name of the MS SQL database server.

    You must specify the IP address or host name of the MS SQL database server used while migrating the database. For example, if you had specified the IP address of the database server while migrating the database, then you must specify the same IP address while resuming the database migration. You cannot specify the host name of the database server.

  4. (Optional) Enter the named instance of the MS SQL Server engine.

  5. Choose to use an existing database.

  6. Enter the credentials of the database user depending on the authentication mode selected.

  7. Enter the database name.

  8. Perform from Step 1 to Step 7 for audit database migration.

  9. Choose to resume the database migration.

    The database migration starts.

  10. After the database is successfully migrated, continue with Post-Migration Tasks.

24.2.4 Post-Migration Tasks

If there is only one server in the Management Zone, all ZENworks services are automatically started after the data is successfully migrated to an MS SQL Server database.

If there are multiple servers in the Management Zone:

  1. On the device where you ran the migration utility, copy the following files to the appropriate directory on all the servers:

    • zdm.xml
    • dmaccounts.properties
    • dmmappings.properties
    • zenaudit.xml
    • zenaudit_dmaccounts.properties

    The files are located in the %ZENWORKS_HOME%\conf\datamodel directory on Windows and in the /etc/opt/novell/zenworks/datamodel directory on Linux.

    Ensure that you run permissions.sh script located at /opt/novell/zenworks/bin on the Linux server after copying the above listed files.

  2. Start all the ZENworks services on all the ZENworks Servers in the Management Zone.

The ZENworks Server now points to the new database.