Thursday 17 August 2017

Interview Q & A for Oracle Golden Gate Part - 2

41. What are the steps required to add a new table to an existing replication setup?
The steps to be executed would be the following:
  • Include the new table to the Extract & pump process.
  • Obtain starting database SCN and Copy the source table data to the target database
  • Start Replicat on target at the source SCN database point.

42. What does the GoldenGate CSN equate to, in the Oracle Database?
It is equivalent of the Oracle database SCN transaction number.

43. How do you create a CSV file from the Extracted data?
You will have to use the CSV Flat File Adaptor to create CSV files. The source would be the extract trail files which use the configuration of the adaptor settings to generate CSV files.

44. What is the purpose of the DEFGEN utility?
When the source and the target schema objects are not the same (different DDL’s) the Replicat process needs to know the source definition of the objects. The output from the DEFGEN utility is used in conjunction with the trail data to determine which column value in the trail belongs to which column.

45. We want to setup one-way data replication for my online transaction processing application. However, there are compressed tables in the environment. Please suggest how I can achieve it.
You must use OGG 11.2 and configure GoldenGate Integrated Capture process to extract data from compressed tables.
Note: Pre OGG 11.2 doesn’t support extracting data from compressed tables

46. We want to setup one-way data replication using Integrated Extract for my Oracle database running 10.2.0.4. Please suggest the best architecture to achieve it.
Oracle GoldenGate Integrated Capture process supports Oracle databases 10.2 and higher. But if you are running Oracle database 10.2 and want to you Oracle GoldenGate Integrated Capture process then you must configure downstream topology.

47. I am migrating my Oracle database from non-exadata to exadata but my source OGG software and target OGG software versions are different (Say Source is running OGG 11.1 and target is running OGG 11.2). How can I configure my OGG process to work in such configuration?
It is recommended that all instances of Oracle GoldenGate be the same version to take advantage of the new functionality, but this is not possible all the time and is not required. In this scenario, OGG provides a parameter called ‘FORMAT RELEASE’ which allows customers to use different versions of Oracle GoldenGate Extract, trail files, and Replicat together.
Example: RmtTrail /u01/app/oracle/dirdat, Format Release 11.1
Note: The input and output trails of a data pump must have the same trail file version.

48. What are the different OGG Initial load methods available?
OGG has 2 functionalities, one it is used for Online Data Replication and second for Initial Loading.
If you are replicating data between 2 homogeneous databases then the best method is to use database specific method (Exp/Imp, RMAN, Transportable tablespaces, Physical Standby and so on). Database specific methods are usually faster than the other methods.
—If you are replicating data between 2 heterogeneous databases or your replicat involves complex transformations, then the database specific method can’t be used. In those cases, you can always use Oracle GoldenGate to perform initial load.
Within Oracle GoldenGate you have 4 different ways to perform initial load.
  • Direct Load – Faster but doesn’t support LOB data types (12c include support for LOB)
  • Direct Bulk Load – Uses SQL*LOAD API for Oracle and SSIS for MS SQL SERVER
  • File to replicat – Fast but the rmtfile limit is 2GB. If the table can’t be fit in 1 rmtfile you can use maxfiles but the replicat need to be registered on the target OGG home to read the rmtfiles from source.
  • File to Database utility – depending on the target database, use SQL*LOAD for Oracle and SSIS for MS SQL SERVER and so on.
Oracle GoldenGate initial loading reads data directly from the source database tables without locking them. So, you don’t need downtime but it will use database resources and can cause performance issues. Take extra precaution to perform the initial load during the non-peak time so that you don’t run into resource contention.

49. I have a table called ‘TEST’ on source and target with same name, structure and data type but in a different column order. How can your setup replication for this table?
OGG by default assumes that the sources and target tables are identical. A table is said to be identical if and only if the table structure, data type and column order are the same on both the source and the target.
If the tables are not identical you must use the parameter ‘SOURCEDEFS’ pointing to the source table definition and ‘COLMAP’ parameter to map the columns from source to target.

50. What is the best practice to delete the extract files in OGG?
Use the manager process to delete the extract files after they are consumed by the extract/replicat process

PURGEOLDEXTRACTS /u01/app/oracle/dirdat/et*, USECHECKPOINTS, MINKEEPHOURS 2

No comments:

Post a Comment