How To: How to get the database name from the source without using hvr_cap_loc ?
Scenario:
Currently hvr supports only hvr_cap_loc variable in RenameExpression and loc_db_name. However in some cases customers require the entire capture location name and not just 5 characters which is limited to 5 characters for hvr_cap_loc
Overview:
In the article we will see how to get database name on the source
Steps:
Step 1] Manually add column to the table in hvr catalogs
Double click the table under Table Explorer and select Properties
2. On the next window select Add Column
3. Type the column name, Datatype , Byte Length, Character Length
4. Click on OK
Step 2] Add action like below to the channel on the source group and table
ora2sql SRC test2 * ColumnProperties /Name=pdb_name /Absent /CaptureExpression=select name from v$database /Datatype=varchar2
Step 3] Initialize the channel with ‘Table Enrollment’ and ‘Scripts and Jobs’
Step 4] Refresh the table so that the data is populated on the Target