Move ZCM10 embedded Sybase database to a external server

I wanted to move a embedded Sybase database of a existing ZCM10 installation  to a external (SLES11) server for better performance.

In this example I’m assuming you have already installed a SLES11 server.

Step 1 Installing the Sybase database server

  1. Mount the iso file in (for example) /mnt/iso by giving the command mount -o loop /tmp/ZENworks10_sp3.iso /mnt/iso
  2. Give the command sh /mnt/iso/setup.sh -c –zcminstall
    The -c option provides additional options that you do not have when installing the Primary Server, especially if you want to make your OEM database a remote database. You can view the SQL files generating the ZENworks database, create access users, view creation commands (OEM Sybase only), and so on.
    The –zcminstall tells the installation that ZCM is already installed and you want to use the device to configure another instance of the ZENworks database (on the same device or on another device) by using the external database installation program.
  3. Select you language and click on next.
  4. If you want you can read the welcome message, after you did this click on next.
  5. Accept the license Agreement and click next.
  6. Select the type of database (in my case OEM Sybase SQL Anywhere) you want to use. The lower section is from the documentation site:
    • OEM Sybase SQL Anywhere: Installs the default Sybase 10 database for ZENworks. It is configured as a service, the database user is created, and the required tables for the Primary Server are established.

      If you select this option, you must use the -o (or –sybase-oem) parameter with the setup.exe installation executable in order to successfully install to the database when you install the Primary Server software. This parameter allows ZENworks to authenticate the database prior to performing any operations on it.

      You should use the -o parameter only when you are using the Sybase installation that is provided on the Novell ZENworks 10 Configuration Management SP3installation DVD.

      You must also select the Remote Sybase SQL Anywhere option during installation of the Primary Server.

    • Sybase SQL Anywhere: Sets up an existing Sybase database for writing ZENworks information to it.

    • Microsoft SQL Server: Creates a ZENworks database on a Microsoft SQL Server.

    • Oracle: Specifies a user schema that you can use to set up an external Oracle 10g database schema for use with ZENworks.

  7. Select the where the database will run on (default 2638).
  8. Specify the Sybase Access Configuration:
    Database Name: (default zenworks_database)
    Username: (default zenadmin)
    Password: (whatever you want)
    Database Server Name: (default zenworks_database_server)
  9. Select the folder where the database will be installed (default /opt/novell/zenworks/database).
  10. Accept the default database configuration.
  11. You will get a overview op the SQL scripts that will be executed as part ot the database creation. Click on Next in order to proceed with the database creation.
  12. You will get a overview of the database creation command information. Click Next.
  13. You will receive a message that over you click on OK the database installation starts.
  14. After a while the Sybase database is installed. Now we are ready to move the existing database.

Step 2 Move the existing embedded Sybase database to external

  1. First we have to stop de Sybase deamon on the ZCM server where we want to migrated the database from and the new database server. You can do does by entering /etc/init.d/sybase-asa stop as root.
    In step 4 you’ll start the database on the new server. When I tried this the first time I got a error “A database server with that name has already started”. The cause of this error was that ZENworks restarted the database. So the original database was in the air again. I resolved this by renaming the /var/opt/novell/zenworks/database directory to database-org. Now the Sybase database cannot find the file and cannot start the database.
  2. Copy the file zenworks_database.conf located in /etc/opt/novell/zenworks to the destination server. In this file the options and database file are configured.
  3. Copy the database directory located in /var/opt/novell/zenworks to the destination server. In this directory the actual database file are located.
  4. Start the database on the new database server by entering the command /etc/init.d/sybase-asa start and make sure the database starts when the servers starts by entering the command insserv /etc/init.d/sybase-asa
  5. Make sure the database is started successful by looking at /vat/log/messages and by checking the deamon by /etc/init.d/sybase-asa status
  6. On the source server where the embedded Sybase database was installed edit the zmd.xml file located in /etc/opt/novell/zenworks/datamodel
    • Change the value of the Embedded key to false
    • Change the value of the server key to the ip adres of new Sybase database server
    • Make sure that the value of the port key is matching the port where the new database runs on.
      You can check this by looking at the port value by giving the command:
      /etc/opt/novell/zenworks/zenworks_database.conf
      on the new database server.
  7. Restart the ZCM deamons
    • /etc/init.d/novell-zenmntr restart
    • /etc/init.d/novell-zenserver restart
    • /etc/init.d/novell-zenloader restart

The Zen server is now pointing to the new Sybase database

About Michael
Michael Wilmsen is a VMware training/consultant (no specific order) with more than 15 years in the IT industry. Main focus is VMware vSphere, Horizon View and Site Recovery Manager with a deepdive to performance. Michael is VCDX 210, VCAP 4/5 certified, has been rewarded with the vExpert title from 2011, is a PernixPro, Nutanix Tech Champion and a Nutanix Platform Professional.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

You must be logged in to post a comment.