Oracle Database for APM 9.1 Page based on Title Slide from Slide Layout palette. Design is cacorp 2006. Oracle Database for APM 9.1 Title text for Title or Divider pages should be either 40 pt for short titles /28 pt for subtitles or 32 pts for longer titles /24 pt for subtitles. DATE should always be 20 pts. Michal Lehotsky July 2012
Agenda How to Get the Oracle Account Accessing Oracle DB Oracle structure Export and import with Oracle APM Installation on Oracle Migration to Oracle Q & A June 7, 2018 Standard Element Library Copyright © 2008 CA
How to Get the Oracle Account Go to http://servicedesk.ca.com and search for “Oracle Metalinks”. You will find this information: If you require access to the Oracle Metalinks, please follow the steps below: Go to the following url: https://support.oracle.com/CSP/ui/flash.html#tab=Dashboard(page=Dashboard&id=gn8hohxi()) Enter your login credentials If you do not have log in credentials you will need to register. To do so, please follow the instructions below: From the login page select Create your Oracle account now Fill out the form as requested Your userid should be your CA email address, either firstname.lastname@ca.com or PMFkey@ca.com Once you have submitted the registration form, an automatic email will be generated and sent to the CA Metalink Administrator. The Administrator will review the registration request ensuring that the requestor is a CA employee. Once this is verified, the administrator will grant access to the requestor. If there are any issues in accessing Metalink, contact the Oracle Alliance Manager June 7, 2018 Standard Element Library Copyright © 2008 CA
Privileges with Oracle account Able to download Oracle products Access to Oracle Technical support Access to Oracle Education News and Events Additional information can be found http://servicedesk.ca.com and https://km.ca.com/rnd/MyTeams/BizDev/Documents/ORACLE- %20SW%20Support%20Access%20GuidelinesV1.4%20final.docx Download and installation instructions are described in the documents above. June 7, 2018 Standard Element Library Copyright © 2008 CA
How to access Oracle DB Using web browser at “https://<IP>:1158/em/” Using “SQL Plus” Start->Oracle->Application Development-> SQL Plus (command line) Using “SQL Developer” (GUI) June 7, 2018 Standard Element Library Copyright © 2008 CA
SQL Developer Most useful from list above Can be downloaded from Oracle web side Can access DB remotely Can be used to run queries, see tables, creating users, granting privileges and much more! June 7, 2018 Standard Element Library Copyright © 2008 CA
SQL Developer June 7, 2018 Standard Element Library Copyright © 2008 CA
Oracle structure June 7, 2018 Standard Element Library Copyright © 2008 CA
Import and export data in Oracle Export/import using ‘exp/imp’ (we will not talk about it) Older tool Slower with less options Export/import using ‘expdp/impdp’ Oracle Data Pump is a newer, faster and more flexible alternative to the "exp" and "imp" Use parallel execution rather than a single stream of execution, for improved performance June 7, 2018 Standard Element Library Copyright © 2008 CA
Export/import using ‘expdp/impdp’ Pre-work: CREATE OR REPLACE DIRECTORY export_test AS ‘D:\exported_db'; GRANT READ, WRITE ON DIRECTORY export_test TO admin; Export Schema: expdp qualcomm_2/quality@orcl schemas=qualcomm_2 directory=export_test dumpfile=qualcomm_2.dmp logfile=qualcomm_2.log; Import back the same schema: impdp admin/quality@orcl schemas=qualcomm_2 directory=export_test dumpfile=qualcomm_2.dmp logfile=imp_qualcomm_2.log June 7, 2018 Standard Element Library Copyright © 2008 CA
Import Customer’s DB dump file Guiding Principles Successful restores includes knowing the answer to these questions about DB you are about to restore: The Oracle version The CEM administrators account The command used to export the database (exp or expdp) The type of dump (complete, incremental, or incremental) Size of database being restored June 7, 2018 Standard Element Library Copyright © 2008 CA
Import Customer’s DB dump file Step 1: Create tablespace (not required if we use existing tablespace) This tablespace will be used for imported tables create tablespace CUST_TS datafile ‘D:\oracle_data\CUST_TS_DATA_1.DBF’ size 5g; alter tablespace CUST_TS add datafile ‘D:\oracle_data\CUST_TS_DATA_2.DBF’ size 5g; Step 2: Create CEM User Account Create the CEM User account along with password and associate it with the tablespace that was just created. Set the correct permissions on the account. create user customer identified by quality default tablespace CUST_TS; grant connect, resource, create view to customer; June 7, 2018 Standard Element Library Copyright © 2008 CA
Import Customer’s DB dump file Step 3: Create Directory Alias and permissions Create the directory alias and needed permissions to do the import CREATE OR REPLACE DIRECTORY cust_dir AS 'D:\customer db'; GRANT READ, WRITE ON DIRECTORY cust_dir TO customer; Step 4: Run the import Run it from the command line: The command remaps the schema from APM to ‘cust_user’ and tablespace from APMDATA to CUST_TS impdp admin/quality directory= cust_dir dumpfile=cust_db.dmp REMAP_SCHEMA=apm:customer REMAP_TABLESPACE=APMDATA:CUST_TS logfile=cust_db_import.log June 7, 2018 Standard Element Library Copyright © 2008 CA
Preparation of Oracle DB for APM Installation Oracle, it needs to be Enterprise Edition with partitioning enabled We need to create the APM user Grant privileges to APM user Create tablespace (if necessary) and set it as default tablespace for APM user Run ALTER SYSTEM SET ALTER SYSTEM SET deferred_segment_creation=FALSE scope=both; (To allow space to be allocated to a table when the Create Table statement is executed on Oracle 11g R2 and later versions) June 7, 2018 Standard Element Library Copyright © 2008 CA
Migration to Oracle Requirements In order for migration to be successful we need to have source DB (including all data), destination DB and machine from which is migration executed in the same time zone. Migration across time zones (for example PST to IST) is not supported. Recommended to run ALTER SYSTEM SET open_cursors =2000 SCOPE=BOTH; Syntax migration.bat -srcDatabaseName cemdb -srcDatabaseType postgres -srcHost localhost -srcPassword quality -srcPort 5432 -srcUser admin -tgtDatabaseName orcl -tgtDatabaseType oracle -tgtHost localhost -tgtPassword quality -tgtPort 1521 -tgtUser admin June 7, 2018 Standard Element Library Copyright © 2008 CA
Migration to Oracle Steps: Create 9.1.0.0 empty schema in Oracle using “createschema” script (we can only create schema for major releases, in our case it is 9.1.0.0) Upgrade created schema on Oracle to required version using “upgradeschema” script Migrate Data using “migration” script Oracle -> Postgres migration is not supported June 7, 2018 Standard Element Library Copyright © 2008 CA
Q&A June 7, 2018 Standard Element Library Copyright © 2008 CA