28.6 Moving the Data from an Embedded Sybase Database to an External Sybase Database

ZENworks 10 Asset Management allows you move the data from a Sybase SQL Anywhere database (embedded Sybase database) to an OEM Sybase database (external Sybase database).

28.6.1 Preparing to Move the Data

Before moving the data from an internal Sybase database to an external Sybase database, do the following:

28.6.2 Moving the Data from the Internal Sybase to the External Sybase

  1. On the device that has the external Sybase database installed, stop the Novell ZENworks Embedded Datastore service.

    • On Windows: Do the following:

      1. From the Windows desktop Start menu, click Settings > Control Panel.

      2. Double-click Administrative Tools > Services.

      3. Right-click the Novell ZENworks Embedded Datastore service, then click Stop, or select the Novell ZENworks Embedded Datastore service, then click Stop icon on the toolbar.

    • On Linux: At the console prompt, enter /etc/init.d/./sybase-asa stop.

  2. Stop 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. Specify the number next to the Stop action, then press Enter.

    • On Linux: Do the following:

      1. Execute the following command at the server prompt:

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

      2. Specify the number next to the Stop action, then press Enter.

  3. From the device that has the internal Sybase database installed, copy zenworks_database.conf and all files within the database directory to the appropriate directories on the device that has the external Sybase database.

    The zenworks_database.conf is located in the ZENworks_installation_path\conf\ directory on Windows and in the /etc/opt/novell/zenworks/ directory on Linux.

    The database directory is located in ZENworks_installation_path on Windows and in the /var/opt/novell/zenworks/ directory on Linux.

  4. On the device that has the external Sybase database installed, open zenworks_database.conf and make sure that it contains the correct path of the database file.

  5. On the device that has the internal Sybase database installed, edit zdm.xml (located in ZENworks_installation_path\conf\datamodel on Windows and in /etc/opt/novell/zenworks/datamodel on Linux):

    • Change the value of the Embedded entry key to false. By default, it is true.

    • Set the value of the Server entry key to the IP address of the device that has the external Sybase database installed.

    • Make sure that the value of the Port entry key is the port number on which the external Sybase database is running.

  6. On the device that has the external Sybase database installed, start the Novell ZENworks Embedded Datastore service.

    • On Windows: Do the following:

      1. From the Windows desktop Start menu, click Settings > Control Panel.

      2. Double-click Administrative Tools > Services.

      3. Right-click the Novell ZENworks Embedded Datastore service, then click Start, or select the Novell ZENworks Embedded Datastore service, then click Start icon on the toolbar.

    • On Linux: At the console prompt, enter /etc/init.d/./sybase-asa start.

  7. Assign the database role to the device that has the external Sybase database installed by running the following command in the DBISQL utility:

    delete from zZenServerRoles where Roles = 'Database';commit;

  8. Remove the Novell ZENworks Embedded Datastore service from the device that has the internal Sybase database installed:

    On the Windows device: Perform the following tasks:

    1. At the server prompt, execute the following command:

      sc delete SQLANYs_ZENDatastore

    2. Edit the%ZENWORKS_HOME%\conf\monitor.conf to remove dbsrv10 from the line highpriority=zenserver,casaserver,dbsrv10.

    On the Linux device: Perform the following tasks:

    1. Stop the Novell ZENworks Embedded Datastore service by executing the following command at the console prompt:

      /etc/init.d/sybase-asa stop

    2. Rename sybase-asa to sybase-asa1 by executing the following command:

      mv sybase-asa sybase-asa1

    3. Edit the /etc/opt/novell/zenworks/conf/monitor.conf to remove sybase-asa from the line services=novell-zenserver novell-zenload sybase-asa.

  9. 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. Specify the number next to the Start action, then press Enter.

    • On Linux: Do the following:

      1. Execute the following command at the server prompt:

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

      2. Specify the number next to the Start action, then press Enter.

  10. (Conditional) If you have installed ZENworks Reporting Server, continue with Section 28.6.3, Configuring ZENworks Reporting Server to Point from Internal Sybase to External Sybase.

28.6.3 Configuring ZENworks Reporting Server to Point from Internal Sybase to External Sybase

Do the following to point ZENworks Reporting Server to the new database:

Configuring ZENworks Reporting Server to Point to the New External Sybase on Windows

  1. Ensure that the data has been moved from the Internal Sybase to the External Sybase as explained in Section 28.6.2, Moving the Data from the Internal Sybase to the External Sybase.

  2. Procure the following information of the new database to which you want ZENworks Reporting to point:

    • UserID

    • Password

    • Server Name

    • Database Name

    • IP Address

    1. Enter the following URL in a Web browser:

      https://Reporting_Server_IP_Address/zenworks-coreadmin

    2. Click Test Service.

    3. Click the following link:

      com.novell.zenworks.datamodel.objects.Any getConfiguration() throws com.novell.zenworks.datamodel.exceptions.RemoteDataModelException, java.rmi.RemoteException;

    4. Click Invoke.

    5. Search for the following parameters and archive their values for later use:

      • username

      • Engine

      • Server

      • Port

      The values are presented within tags. For example, the value for the username parameter is presented within the <entry key=”username”></entry> tag. The default username is zenadmin.

  3. From the desktop Start menu, click Settings > Control Panel.

  4. Double-click Administrative Tools > Data Sources(ODBC).

    The ODBC Data Source Administrator dialog box is displayed.

  5. Click System DSN.

  6. Click ZENworks Database > Configure.

  7. In the ODBC Configuration for SQL Anywhere dialog box that is displayed, do the following:

    1. Click the Login tab, then fill in the following fields:

      • UserID: Specify the username of the new database. By default, this field displays zenadmin.

      • Password: Specify the value of the username parameter that you had archived in

    2. Click the Database tab, then fill in the following field:

      • Server Name: Specify the value of the Engine parameter that you had archived in Step 2.e.

    3. Click the Network tab, then set the value of the TCP/IP field as follows:

      host=<IPaddress_of_the_new_database_server:port>

      The values of the IPaddress_of _the_new_database_server and port are the values of the <entry key="Server"></entry> and <entry key="Port"></entry> tags respectively that you had archived in Step 2e.

    4. Click the ODBC tab, then click Test Connection.

      The SQL Anywhere message is displayed.

    5. Click Yes.

      A message is displayed indicating that the connection to the new database is successful.

    6. Click OK.

  8. Click OK.

  9. At the console prompt, run the novell-zenworks-configure -c UpdateBOE command.

ZENworks Reporting Server now points to the new database.

Configuring ZENworks Reporting Server to Point to the New External Sybase on Linux

  1. Ensure that the data has been moved from the Internal Sybase to the External Sybase as explained in Section 28.6.2, Moving the Data from the Internal Sybase to the External Sybase.

  2. Edit the /opt/novell/zenworks/share/boe/bobje/odbc.ini file as follows:

    • Set the value of the ServerName variable to the server name of the new database.

    • Set the value of the DatabaseName variable to the name of the new database.

    • Set the value of the CommLinks variable to the IP address and port of the new database server.

  3. Run the novell-zenworks-configure -c UpdateBOE command.

ZENworks Reporting Server now points to the new database.