Installing multiple schemas (database instances) on the same APM Database Server

Document ID : KB000028778
Last Modified Date : 14/02/2018
Show Technical Document Details

 

Postgres

 

1.      Using the APM installer.

 

Note: You have to install on the APM database server locally. Remote installation is not supported with this option.

 

Follow these steps to successfully setup a new database instance:

 

-        Make sure that Postgres Database is already installed and running.

 

-        Start the APM installer.

 

-        Follow normal installation steps and when asked for DB type then select “Postgres” and choose “Upgrade Database Schema/Create New Database Schema” option.

 

-        Enter the port and postgres/admin users as already exist for existing Postgres installation. 

 

-        Enter a new and unique database instance name. Click Next.

 

-        Select OK at the Create New Schema popup message.

 

-        The database instance is created. Verify through pgadmin or other means that you can access it and the schema has been created.

 

 

2.      Installing manually

 

Note: this can be installed locally or remotely.

 

Follow these steps to successfully setup a new database instance.

 

-        Run the createdb-postgres script. This creates empty database instance. Make sure to choose new and unique name. The syntax and example are the following:

 

createdb-postgres <dbserverhost> <dbinstalldir> <dbname> <dbserviceuser> <dbservicepwd> <dbadminuser> <dbadminpwd> <dbport <optional>>

 

For example: ./createdb-postgres.sh localhost /opt/database/ new_cemdb postgres quality admin quality 5432

 

-        Run the createschema script. This creates major release schema (tables, constraints, etc.) for empty DB instance we created above. Major release can be for example 9.1, 9.5 and so on. The syntax and example are the following:

         

createschema -databaseName <database_name> -databaseType <database_type> -host <host_name> -port <port_number> -releaseVersion <version> -scriptsDir <directory> -user <user_name> -password <password>

 

 

For example: ./createschema.sh -databaseType postgres -databaseName new_cemdb -host

                                      localhost -port 5432 -user admin -password quality -releaseVersion 9.6.0.0

                                    -scriptsDir /root/Introscope9.6.0.0/install/database-scripts/ >

                                     /tmp/createschema.log

 

 

-        Run the upgradeschema script to upgrade to a minor version such as 9.6.1. The syntax and example are the following


upgradeschema -databaseName <DB_NAME> -databaseType postgres -desiredVersion <APM_MINOR_VERSION> -host <DB_HOSTNAME> -is64bit yes -password <PASSWORD_FOR_USER_ADMIN> -port <DB_PORT> -scriptsDir <APM_DB_SCRIPT_DIR> -user admin

 

For example: ./upgradeschema -databaseName new_cemdb -databaseType Postgres -desiredVersion 9.6.1.0 -host 10.15.81.33  -is64bit 64 -password quality -port 5432 -scriptsDir /opt/wily/Introscope9.6.0.0/install/database-scripts/  -user admin

 

-        The database instance is created. Verify through pgadmin or other means that you can access it and the schema has been created.

 

 

Oracle

 

 

 

The same installer and scripts are used. The following are the differences.

 

-        In createschema and upgradeschema, the –databaseType argument should be Oracle and   –scriptsDir should point to Oracle scripts in APM installation

 

-        Do the following at the Oracle System level:

 

o   Create an Oracle user

 

o   Do prereq steps outlined in Installation Guide (including Oracle user privileges)

 

-        When using  the installer, Use the new Oracle user

 

-        Complete all other required database fields

 

-        Verify with new connection to database in Oracle Developer software

 

-        Both Oracle installations can be done locally or remotely