30.5 Migrating the Data from the External Sybase Database to an External Oracle Database

ZENworks 11 allows you migrate the data from the external Sybase database to an Oracle database installed on a device that does not have the ZENworks 11 installed.

IMPORTANT:If the ZENworks Reporting Server is installed on the device, the Reporting Server does not work after migrating the database. For the Reporting Server to work, you must again install the ZENworks Reporting Server on a Primary Server on which you have installed the Oracle client after migrating the database. For more information, see Section 30.5.3, Post-Migration Tasks.

Review the following to migrate the database:

30.5.1 Preparing to Move the Data

Before migrating the data from the Sybase database to Oracle database, do the following:

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

  • Save all the reports, rights.xml, and ownership.xml by using the zman report-save (rpsv) (destination folder) command. The XML files contain rights and ownership details of all the reports.

  • Make sure that the Oracle database is installed on a device that does not have ZENworks 11 installed.

  • Make sure that the USERS tablespace has sufficient space to create and store the ZENworks database schema. The tablespace requires a minimum of 100 MB to create ZENworks database schema without any data in it and an appropriate additional space depending upon the size of the database to be migrated. The database migration utility uses only the USERS tablespace by default. You cannot manually specify any other tablespace during the migration.

  • Make sure that the NLS_CHARACTERSET parameter is set to AL32UTF8 and the NLS_NCHAR_CHARACTERSET parameter to AL16UTF16 by running the following query at the database prompt:

    select parameter, value from nls_database_parameters where parameter like '%CHARACTERSET%';
    
  • (Conditional) If you want to migrate the database by creating a new user schema, ensure that the following additional requirements are met:

    • You must be aware of the database administrator credentials.

    • A tablespace must already exist for associating to the Oracle access user

  • You can choose to migrate the database by using an existing user schema that resides on a server in your network in the following scenarios:

    • The database administrator creates a user schema with the necessary rights and you get the credentials for that user schema from the database administrator. In this case, the database administrator credentials are not required to migrate the database.

    • You create a user schema in the Oracle database and choose to use it during the database migration.

    If you want to migrate the database by using an existing user schema, ensure that the following additional requirements are met:

    • Make sure that the user schema has the following rights to create the database.

      • CREATE SESSION
      • CREATE_TABLE
      • CREATE_VIEW
      • CREATE_PROCEDURE
      • CREATE_SEQUENCE
      • CREATE_TRIGGER
    • Make sure that the quota for the user schema is set to Unlimited on the USERS tablespace.

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

    • On Windows: Do the following:

      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: Do the following:

      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.

  • Make sure that your external Sybase database service is running.

  • (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.

30.5.2 Migrating the Data from the External Sybase Database to an Oracle Database

Migrating the Data from the External Sybase Database to an Oracle Database

  1. Make sure that all the tasks listed in Section 30.5.1, Preparing to Move the Data are completed.

  2. 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

  3. Enter the target database type as Oracle.

  4. Enter the IP address or host name of the Oracle database server.

  5. Enter the port used by the Oracle database server.

  6. Enter the fully qualified net service name for the Oracle database.

  7. You can choose to create a new user schema or use an existing user schema.

    If you choose to create a new schema, continue with Step 8.

    If you choose to use an existing user schema, skip to Step 9.

  8. Enter the database server administrator's username and password.

  9. Enter the schema name when prompted for the database username.

  10. Enter the database schema password when prompted for the database user's password.

    The database migration starts.

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

  12. After the database is successfully migrated, continue with Section 30.5.3, Post-Migration Tasks.

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 file has been created. The file is located in the ZENworks_installtion_path\bin directory on Windows, and in the /opt/ novell/zenworks/bin directory on Linux.

  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 Oracle.

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

    You must specify the IP address or host name of the Oracle 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. Enter the port used by the Oracle database server.

  5. Enter the fully qualified net service name for the Oracle database.

  6. Choose to use an existing schema.

  7. Enter the schema name when prompted for the database username specified before stopping the database migration.

  8. Enter the database schema password when prompted for the database user's password specified before stopping the database migration.

  9. Choose to resume the database migration.

    The database migration starts.

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

30.5.3 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 Oracle database.

If there are multiple servers in the Management Zone:

  1. From the device where you ran the migration utility, copy the following files and paste them in the appropriate directory, on all other Primary Servers:

    • zdm.xml
    • dmaccounts.properties
    • dmmappings.properties

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

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

    • On Windows: Do the following

      1. Execute the following command at the server prompt:

        novell-zenworks-configure -c Start

      2. Enter the number next to the Start action.

    • On Linux: Do the following:

      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 Start action.

  3. Migrate the ZENworks Reports from the Sybase SQL Anywhere database to an Oracle database:

    1. Install the Oracle client on a Primary Server that does not have an instance of the ZENworks Reporting Server.

    2. Install a new instance of the ZENworks Reporting Server on the device on which you have installed the Oracle client.

    3. Copy the reports to the device where the new instance of the Reporting Server is running. These are the ZENworks Reports that you saved before migrating them. For more information, see Section 30.5.1, Preparing to Move the Data.

    4. Publish the reports and restore the reporting rights and the ownership details of the reports by using the following command:

      zman rpld path_of_directory_containing_rights.xml_and_ownership.xml

    5. Uninstall the ZENworks Reporting Server instance that was installed prior to migrating the database.

The ZENworks Server now points to the new database.

For the Oracle 10g database, any administrator name is case sensitive, including login names from user sources. The default ZENworks administrator account automatically created during installation uses an initial capital, so in order to log in to ZENworks Control Center, you must enter Administrator.

NOTE:Ensure not to delete the ZENworks Sybase database files if you want to revert to using ZENworks Sybase database at a later time.