How to install Agile Manager 2.40 without Database Administrator user

  • KM02377582
  • 01-Jun-2016
  • 01-Jun-2016

Summary

This article describes the procedure for installing Agile Manager (AGM) without having Database Administrator (DBA) user permissions.

Question

This document purpose is to describe the procedure for installing AGM without having DBA user permissions. In this document you will find the installation  plan, limitations, prerequisites, and  procedures.  

Answer

Terms

  • Restrict environment - production environment.
  • Non strict environment - staging environment.

Plan highlights
  1. Install AGM on a staging environment.
  2. Backup site and system schemas.
  3. Restore schemas on production environment (will be done by dba user).
  4. Install agm on production environment.
  5. Optionally altering config files.
  6. Connect agm install to restored schemas on production.

Limitations


Future upgrades to this installation cannot be in place and will have to be done but the other way around. backup schemas and repository , upgrade on another machine, restore.


Prerequisites
  • Knowledge how to backup and restore oracle schemas. (using impdp and expdp)
  • Have a staging environment which is separated from production ,separated AGM server and separated database server. (can be installed on laptop with oracle express).
  • Have DBA access to the staging environment database.
  • Create database user agm_admin on both Databases (staging and production), make sure the same user name and password are created on both systems.
  • In staging the user needs to have DBA permissions or admin user permissions (agm_admin) as described in the AGM installation guide.
  • In the production environment the user can be as limited as this set of permissions.
                                      
Create agm_admin user and role
-- create agm_admin user and role.
drop user agm_admin cascade;
drop role agm_admin_role;
create user agm_admin identified by agm_admin;
create role agm_admin_role;
 
grant CTXAPP to agm_admin;
grant CREATE SESSION to agm_admin_role;
grant CREATE TABLE to agm_admin_role;
grant CREATE VIEW to agm_admin_role;
grant CREATE TRIGGER to agm_admin_role;
grant CREATE SEQUENCE to agm_admin_role;
grant SELECT ON SYS.DBA_REGISTRY to agm_admin_role;
grant SELECT ON SYS.DBA_ROLES to agm_admin_role;

  


 
The Procedure


  1. Install AGM on a staging environment , for db user use the agm_admin user created before. its important he will also be used in production so do not use system manager user.
  2. After AGM is up and running , make sure you are able to login and ui is functioning.
  3. Shut down AGM server , run  <agm>/wrapper/HPALM stop.
  4. Backup the Site and System admin schemas - having the output of 2 oracle DMP file.
  5. On Production environment restore the 2 schemas
  6. Install AGM RPM package on Production environment by running rpm -i AGM_ONPREM<version>.rpm
  7. Copy <agm>/respository folder from staging environment to same place in production environment.
  8. Copy file from staging environment /opt/hp/agm/conf/qcConfigFile.properties to same place in production environment.
  9. Edit qcConfigFile.properties
    1. Change SaDbAction=connectToExisting
    2. Change dbConnectionString=jdbc\:mercury\:oracle\://<DB_SERVER_HOST>\:<DB_SERVER_PORT>;sid\=<DB_SID>
    3. Change dbPort=<DB_SERVER_PORT>
    4. change dbSchemaName=<PRODUCTION site admin schema> the default for example dbSchemaName=agm_siteadmin_db
    5. Change dbServerName=<DB_SERVER_HOST>
    6. Change oracleSid=<DB_SID>
  10. Edit <agm>/run_config.sh
    1. In the line containing #SKIP VALIDATIONS remove the remark (#) sign
    2. Change to SKIP_VALIDATIONS="-wDbSettingsValidator -wSaSchemaValidator"
    3. Run the configuration wizard <agm dir>./run_config.sh -nonInteractive -c /opt/hp/agm/conf/qcConfigFile.properties
  11. On production database site admin schema , edit table named DBSERVERS - remove the entry pointing to staging database server, the table should have 1 record in the table pointing to the production database server. - Please  commit the change.
  12. On production database site admin schema , edit table named APPSERVERS- remove the entry pointing to staging server, this table should have 1 record pointing to the production server. - Please commit the change.
  13. Run the server by running <agm dir>wrapper/HPALM start
    1. Monitor <agm dir>/log/wrapper.log to see errors.
  14. Perform Restore site - as described in the Agm user manual.
  15. Once server is up and running open your browser and point to http://<server>:8080/agm/admin
  16. Go to servers/database click restore site button.
  17. Enter the production environment schema name for site schema.(note this is not the system admin schema)
  18. Enter the repository path of /opt/hp/agm/repository/qc/t1_sa_2/Main/ (default location)


Export and import Oracle schema


This is not a complete guide how to do that just a quick reference example

  1. Open Sqlplus or any other tool with DBA permissions.
  2. First a logical directory needs to be created , execute the following change the physical directory as necessary.
    1. create or replace directory AGM_DUMP_DIR as 'E:\agm_dmp\';
  3. Export schema - open command line in a machine where oracle is installed and run the following.
    1. expdp system/manager@localhost schemas=<SCHEMA TO EXPORT> directory=AGM_DUMP_DIR dumpfile=<SCHEMA_NAME>.dmp logfile=<SCHEMA_NAME>.log
  4. Import schema - place the DMP file in the directory which mapped logically on target DB server. (like above create directory command)
  5. Open command line in the target db machine where oracle is installed and run the following.
    1. impdp system/manager@localhost directory=AGM_DUMP_DIR dumpfile=<SCHEMA_NAME>.dmp full=y logfile=<SCHEMA_NAME>.log