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.
- Restrict environment - production environment.
- Non strict environment - staging environment.
- Install AGM on a staging environment.
- Backup site and system schemas.
- Restore schemas on production environment (will be done by dba user).
- Install agm on production environment.
- Optionally altering config files.
- Connect agm install to restored schemas on production.
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.
- 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;
- 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.
- After AGM is up and running , make sure you are able to login and ui is functioning.
- Shut down AGM server , run <agm>/wrapper/HPALM stop.
- Backup the Site and System admin schemas - having the output of 2 oracle DMP file.
- On Production environment restore the 2 schemas
- Install AGM RPM package on Production environment by running rpm -i AGM_ONPREM<version>.rpm
- Copy <agm>/respository folder from staging environment to same place in production environment.
- Copy file from staging environment /opt/hp/agm/conf/qcConfigFile.properties to same place in production environment.
- Change SaDbAction=connectToExisting
- Change dbConnectionString=jdbc\:mercury\:oracle\://<DB_SERVER_HOST>\:<DB_SERVER_PORT>;sid\=<DB_SID>
- Change dbPort=<DB_SERVER_PORT>
- change dbSchemaName=<PRODUCTION site admin schema> the default for example dbSchemaName=agm_siteadmin_db
- Change dbServerName=<DB_SERVER_HOST>
- Change oracleSid=<DB_SID>
- In the line containing #SKIP VALIDATIONS remove the remark (#) sign
- Change to SKIP_VALIDATIONS="-wDbSettingsValidator -wSaSchemaValidator"
- Run the configuration wizard <agm dir>./run_config.sh -nonInteractive -c /opt/hp/agm/conf/qcConfigFile.properties
- 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.
- 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.
Run the server by running <agm dir>wrapper/HPALM start
- Monitor <agm dir>/log/wrapper.log to see errors.
- Perform Restore site - as described in the Agm user manual.
- Once server is up and running open your browser and point to http://<server>:8080/agm/admin
- Go to servers/database click restore site button.
- Enter the production environment schema name for site schema.(note this is not the system admin schema)
- 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
- Open Sqlplus or any other tool with DBA permissions.
First a logical directory needs to be created , execute the following change the physical directory as necessary.
- create or replace directory AGM_DUMP_DIR as 'E:\agm_dmp\';
Export schema - open command line in a machine where oracle is installed and run the following.
- expdp system/manager@localhost schemas=<SCHEMA TO EXPORT> directory=AGM_DUMP_DIR dumpfile=<SCHEMA_NAME>.dmp logfile=<SCHEMA_NAME>.log
- Import schema - place the DMP file in the directory which mapped logically on target DB server. (like above create directory command)
Open command line in the target db machine where oracle is installed and run the following.
- impdp system/manager@localhost directory=AGM_DUMP_DIR dumpfile=<SCHEMA_NAME>.dmp full=y logfile=<SCHEMA_NAME>.log