Showing posts with label Veridata. Show all posts
Showing posts with label Veridata. Show all posts

Monday, December 30, 2013

Create a Simple Job for a Host Target in EM12c

Afternoon folks! I received a text from a customer of mine asking whether I had any documentation to create jobs in EM12c. To be specific, the job in question could have been setup via crontab or windows jobs but since I had recommended consolidation of newer jobs in EM12c, this was a good question. The easiest route was to refer the customer to Oracle Documentation, but I have a few hours to kill and thought it would make a good post.

The job in question, is a veridata compare job. You could just as easily, replace that job with <insert script name here>. I’d like to show you how to set it up.

First, let’s make sure that our script actually works. For those who are not familiar with Veridata, it is Oracle’s solution to data comparison when replication is in use. The Veridata suite contains a Command Line Interface (CLI) called vericom that can be used to perform minimal activities on the jobs and compare pairs configured within it. I should have probably written another post on configuring jobs, but I’ll leave that for another day.

My innocent script is located in the $VERIDATA_HOME directory.

[oracle@as-sandbox-n1 scripts]$ pwd
/u01/app/oracle/product/11.2.1.0/veridata/scripts
[oracle@as-sandbox-n1 scripts]$ ls -lhtr
total 4.0K
-rwxrwxrwx 1 oracle oinstall 68 Nov  8 12:43 vericom_run_job.sh
[oracle@as-sandbox-n1 scripts]$ cat vericom_run_job.sh 
/u01/app/oracle/product/11.2.1.0/veridata/vericom.sh -j BLUE_YELLOW

A sample execution of the script looks like:

VERIDATA_HOME /u01/app/oracle/product/11.2.1.0/veridata
JRE_HOME: /u01/app/oracle/product/11.2.1.0/veridata/jre
JAVA_OPTS: -Xmx1024m -Djava.awt.headless=true
Oracle GoldenGate Veridata Command Line Interface - Version 11.2.1.0  OGGVDT_11.2.1.0.0_PLATFORMS_121108.1625
Job BLUE_YELLOW started
Run ID: (1027,0,0)
Number of Compare Pairs: 3
Number of Compare Pairs With Errors: 3
Number of Compare Pairs With OOS: 0
Number of Compare Pairs With No OOS: 0
Number of Compare Pairs Cancelled: 0
Job Report Filename: /u01/app/oracle/product/11.2.1.0/veridata/shared/data/rpt/BLUE_YELLOW/00001027/BLUE_YELLOW.rpt
Run ID: (1027,0,0)
Job Completion Status: IN SYNC

That was the easy part :)

1. Now, let’s log into EM12c and navigate to the Jobs home page.

NewImage

2. Since we need to create a job and the default option under “Create Library Job” is set to “OS Command”, click on Go.

NewImage

 

3. From here, you can give the job a name and description, and add a target where it will run.

NewImage

 

4. In the parameters tab, enter the absolute path of the script. You have the option of embedding the script within the job itself by choosing a different “Command Type”.

NewImage

 

5. I already have a Preferred Named Credential Set configured for this host, so the defaults as left. Alternatively, you could pick one of the other two options as well, but it all depends on your configuration.

NewImage

 

6. The insane schedule is merely to illustrate a point. You can pick your own.

NewImage

 

7. I generally do not make alterations to the Access tab, however, you may want to delegate ownership and access to other users. Click on “Save to Library”.

NewImage

 

8. And that’s it!

NewImage

 

9. I waited a few minutes before checking for the jobs activity.

NewImage

 

10. Cool, the first one completed successfully. You can drill down to the log of the execution.

NewImage

 

I’ve only scratched the surface of the job system in EM12c. There are several other options while creating jobs (see screenshot below). One of the most interesting for me are the multi-task jobs which I hope to write an article on eventually.

NewImage

For the moment, I hope you enjoyed the article and found it useful.

Cheers!

continue reading "Create a Simple Job for a Host Target in EM12c"

Thursday, December 5, 2013

GoldenGate Veridata 11.2.1 Agent Installation

With my previous post, I completed the Server component install and moving ahead I’d like to proceed with the agent installs. The Veridata server communicates with the hosts (that are running on each target and source servers) via the Veridata Agents. There are basically two types of agents; Java based and the C-Agent. The latter is designed for NonStop SQL/MP and Enscribe databases running on the NonStop platform.

Components:
NewImage

For this example, I will install the Java based agent.

Installation

1. Create the Tablespace, User, and Grant Privileges.

SQL> create tablespace ggate_data datafile '/u003/oradata/gvddvs01/ggate_ata.dbf' size 500m autoextend on;

Tablespace created.

SQL> create role veridata_role;

Role created.

SQL> grant create session to veridata_role;

Grant succeeded.

SQL> grant create table to veridata_role;

Grant succeeded.

SQL> grant create view to veridata_role;

Grant succeeded.

SQL> grant create procedure to veridata_Role;

SQL> grant create synonym to veridata_role;

Grant succeeded.
SQL> create user ggate identified by ggate default tablespace ggate_data;

User created.

SQL> grant veridata_role to ggate;

Grant succeeded.

SQL> grant unlimited tablespace to veridata_role;

Grant succeeded.

2. Create directories

greed101:(oracle) [green] $ echo $ORACLE_HOME
/u001/app/oracle/product/11.2.0
greed101:(oracle) [green] $ mkdir /u001/app/oracle/product/veridata_agent
greed101:(oracle) [green] $ mv V35569-01.zip /u001/app/oracle/product/veridata_agent
greed101:(oracle) [green] $ cd /u001/app/oracle/product/veridata_agent/

3. Unzip Binaries

greed101:(oracle) [green] $ ls -ltr
total 15664
-rw-rw-r--    1 oracle   dba         8018466 Oct 30 16:04 V35569-01.zip
drwxr-xr-x    6 oracle   dba             256 Nov  7 11:16 ../
drwxr-xr-x    2 oracle   dba             256 Nov  7 11:16 ./
greed101:(oracle) [green] $ unzip V35569-01.zip
Archive:  V35569-01.zip
   creating: agent/
   creating: agent/classes/
   creating: agent/drivers/
   creating: agent/lib/
   creating: agent/licenses/
  inflating: agent/JavaAgent.jar
  inflating: agent/agent.bat
  inflating: agent/agent.properties.sample
  inflating: agent/classes/log4j.properties
  inflating: agent/drivers/gvdb2.jar
  inflating: agent/drivers/gvsybase.jar
  inflating: agent/drivers/ojdbc6.jar
  inflating: agent/drivers/sqljdbc.jar
  inflating: agent/lib/commons-dbcp-1.2.2.jar
  inflating: agent/lib/commons-pool-1.3.jar
  inflating: agent/lib/log4j-1.2.12.jar
  inflating: agent/lib/ucp.jar
  inflating: agent/licenses/Apache-LICENSE-2.0.txt
  inflating: agent/licenses/notices.txt
  inflating: agent/agent.sh
  inflating: ogg-veridata-readme-11.2.1.0.0.doc
  inflating: ogg-veridata-readme-11.2.1.0.0.txt
  inflating: ogg_veridata_relnotes_11.2.1.0.0.doc
  inflating: ogg_veridata_relnotes_11.2.1.0.0.pdf
greed101:(oracle) [green] $ ls -ltr
total 16416
drwxr-xr-x    6 oracle   dba            4096 Nov  8 2012  agent/
-rw-r--r--    1 oracle   dba          220968 Dec  4 2012  ogg_veridata_relnotes_11.2.1.0.0.pdf
-rw-r--r--    1 oracle   dba           97280 Dec  4 2012  ogg_veridata_relnotes_11.2.1.0.0.doc
-rw-r--r--    1 oracle   dba           39424 Dec  4 2012  ogg-veridata-readme-11.2.1.0.0.doc
-rw-r--r--    1 oracle   dba           14661 Dec  4 2012  ogg-veridata-readme-11.2.1.0.0.txt
-rw-rw-r--    1 oracle   dba         8018466 Oct 30 16:04 V35569-01.zip
drwxr-xr-x    6 oracle   dba             256 Nov  7 11:16 ../
drwxr-xr-x    3 oracle   dba            4096 Nov  7 11:17 ./

4. Create a copy of the agent.properties.sample file as agent.properties and edit the files highlighted.

# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# The server.port property is the port where the Veridata agent listens
# for connection requests.
server.port=8500

# The database.url specifies the JDBC connection URL for the database.
# Samples for all supported databases are shown below.
database.url=jdbc:oracle:thin:@greed101:1521:green

# DB2 z/OS sample database connection URL
#database.url=jdbc:veridata:db2://localhost:447;LocationName=DB2

# DB2 LUW sample database connection URL
#database.url=jdbc:veridata:db2://localhost:50000;DatabaseName=sample

# Oracle sample database connection URL
#database.url=jdbc:oracle:thin:@localhost:1521:orcl

# Uncomment the following line to change the timeout for idle connections
# in the Oracle connection pool.  The value is in seconds.  The default
# value in the Veridata Agent is 600 seconds.
#oracle.connection.cache.InactivityTimeout=600

# Uncomment the following line to change the time between checks for
# timeout outs in the Oracle connection pool. The value is is seconds.
# The default value in the Veridata agent is 300 seconds.
#oracle.connection.cache.PropertyCheckInterval=300

# Oracle OCI bequeath database connection URL
# The OCI libraries must available and the JDBC
# driver must match the OCI libraries.
#database.url=jdbc:oracle:oci:@

# SQL Server  database connection URL
#database.url=jdbc:sqlserver://localhost:1433

# Teradata  database connection URL
#database.url=jdbc:teradata://localhost/DBS_PORT=1025,CHARSET=UTF8

# Sybase database connection URL
#database.url=jdbc:veridata:sybase://localhost:5000;ApplicationName=VeriAgent;MaxPooledStatements=20

# The server.driversLocation property is the directory
# containing the JDBC driver jar file(s).
# The path is relative to the Veridata agent
# installation directory.
server.driversLocation = drivers

# The server.jdbcDriver property specifies the list of
# JDBC driver jar files.  Sample lists for the
# supported databases are shown below.
#server.jdbcDriver=<server.jdbcDriver>

#For DB2 uncomment the following line:
#server.jdbcDriver=gvdb2.jar

# For Oracle uncomment the following line:
server.jdbcDriver=ojdbc6.jar

# For SQL Server uncomment the following line:
#server.jdbcDriver=sqljdbc.jar

# For Teradata uncomment the following line:
#server.jdbcDriver=terajdbc4.jar tdgssconfig.jar

#For Sybase uncomment the following line:
#server.jdbcDriver=gvsybase.jar

# The database.transaction.isolation property controls the
# transaction isolation level used during initial compare.
# The default value for Sybase, DB2, SQL Server and Teradata is
# READ_UNCOMMITTED.  The only value supported for Oracle
# is READ_COMMITTED.  SQL Server versions 2005 above also support
# the value SNAPSHOT which requires that ALLOW_SNAPSHOT_ISOLATION is
# enabled in the database.
#
# Confirm out of sync always uses the READ_COMMITTED
# transaction isolation level.
#database.transaction.isolation=READ_UNCOMMITTED

5. Set the JRE_HOME or JAVA_HOME parameter, and start the agent.

greed101:(oracle) [green] $ ./agent.sh start

6. Check the agent run log

greed101:(oracle) [green] $ ./agent.sh run
[VERIAGT-BOOT] INFO Looking for home directory.
[VERIAGT-BOOT] INFO Found bootstrap class in file:/u001/app/oracle/product/veridata/agent/JavaAgent.jar!/com/goldengate/veridata/agent/Bootstrap.class.
[VERIAGT-BOOT] INFO Home directory: /u001/app/oracle/product/veridata/agent
[VERIAGT-BOOT] INFO Preparing classpath.
[VERIAGT-BOOT] INFO Searching library directory /u001/app/oracle/product/veridata/agent/lib.
[VERIAGT-BOOT] INFO Driver location: /u001/app/oracle/product/veridata/agent/drivers
[VERIAGT-BOOT] INFO Drivers to load: ojdbc6.jar
[VERIAGT-BOOT] INFO Classpath:
[VERIAGT-BOOT] INFO     /u001/app/oracle/product/veridata/agent/JavaAgent.jar
[VERIAGT-BOOT] INFO     /u001/app/oracle/product/veridata/agent/lib/commons-dbcp-1.2.2.jar
[VERIAGT-BOOT] INFO     /u001/app/oracle/product/veridata/agent/lib/commons-pool-1.3.jar
[VERIAGT-BOOT] INFO     /u001/app/oracle/product/veridata/agent/lib/log4j-1.2.12.jar
[VERIAGT-BOOT] INFO     /u001/app/oracle/product/veridata/agent/lib/ucp.jar
[VERIAGT-BOOT] INFO     /u001/app/oracle/product/veridata/agent/classes
[VERIAGT-BOOT] INFO     /u001/app/oracle/product/veridata/agent/drivers/ojdbc6.jar
[VERIAGT-BOOT] INFO Initializing.
[VERIAGT-BOOT] INFO Invoking startup method: public static void com.goldengate.veridata.agent.VeridataAgent.main(java.lang.String[])
Setting up agent log
Agent log redirected to /u001/app/oracle/product/veridata/agent/veridata-agent.log

7. Check the log for messages

greed101:(oracle) [green] $ cat /u001/app/oracle/product/veridata/agent/veridata-agent.log
INFO:2013-11-07 11:31:35,727 (main) - Veridata Agent Version 11.2.1.0  OGGVDT_11.2.1.0.0_PLATFORMS_121108.1625 built on Thu, 8 Nov 2012 21:21:26 -0800  [VeriAgentVersion:logVersion, line 33]
WARN:2013-11-07 11:31:35,734 (main) - The specified transaction isolation level, 'READ_UNCOMMITTED', is not support for Oracle databases [Context:init, line 222]
INFO:2013-11-07 11:31:35,881 (main) - Veridata Agent starting on greed101 port 16000 [VeridataAgent:serve, line 141]
INFO:2013-11-07 11:31:40,913 (main) - Veridata Agent Version 11.2.1.0  OGGVDT_11.2.1.0.0_PLATFORMS_121108.1625 built on Thu, 8 Nov 2012 21:21:26 -0800  [VeriAgentVersion:logVersion, line 33]
WARN:2013-11-07 11:31:40,921 (main) - The specified transaction isolation level, 'READ_UNCOMMITTED', is not support for Oracle databases [Context:init, line 222]
ERROR:2013-11-07 11:31:40,950 (main) - Veridata Agent shutting down on port 16000 due to error: Address already in use [VeridataAgent:serve, line 169]
INFO:2013-11-07 11:31:40,951 (main) - Veridata Agent stopped on port -1 [VeridataAgent:serve, line 175]
INFO:2013-11-07 11:33:23,132 (main) - Veridata Agent Version 11.2.1.0  OGGVDT_11.2.1.0.0_PLATFORMS_121108.1625 built on Thu, 8 Nov 2012 21:21:26 -0800  [VeriAgentVersion:logVersion, line 33]
INFO:2013-11-07 11:33:23,176 (main) - Veridata Agent starting on greed101 port 8500 [VeridataAgent:serve, line 141]
continue reading "GoldenGate Veridata 11.2.1 Agent Installation"

Tuesday, November 26, 2013

GoldenGate Veridata 11.2.1 Server Installation

Today, I’d like to share my experience with a tool that I’ve used infrequently with GoldenGate.

Veridata is Oracle’s answer to Data Validation for environments where a replication technology is utilized. In other words, the tool is agnostic (but partial) to a set Database vendors. You can install it on a variety of platforms, and a few database types.

Components:
NewImage

Installation

1. Download and unzip the media from eDelivery.

[oracle@as-sandbox-n1 installs]$ cd veridata/
[oracle@as-sandbox-n1 veridata]$ ls -lhtr
total 147M
-rwxr-xr-x 1 oracle oinstall 145M Nov  8  2012 GoldenGate_Veridata_redhatAS40_x64.sh
-rw-r--r-- 1 oracle oinstall 216K Dec  4  2012 ogg_veridata_relnotes_11.2.1.0.0.pdf
-rw-r--r-- 1 oracle oinstall  95K Dec  4  2012 ogg_veridata_relnotes_11.2.1.0.0.doc
-rw-r--r-- 1 oracle oinstall  39K Dec  4  2012 ogg-veridata-readme-11.2.1.0.0.doc
-rw-r--r-- 1 oracle oinstall  15K Dec  4  2012 ogg-veridata-readme-11.2.1.0.0.txt
-rw-r--r-- 1 oracle oinstall 1.3M Oct 24 14:26 veridata-install.log

2. Invoke the bash script to start the installer.

[oracle@as-sandbox-n1 veridata]$ ./GoldenGate_Veridata_redhatAS40_x64.sh 
Unpacking JRE ...
Starting Installer ...

3. Click “Next”.

NewImage

4. Pick your installation directory and click “Next”.

NewImage

5. On the ports section, click “Next”.

NewImage

6. Leave the defaults and click “Next”.

NewImage

7. Enter at the account username and password. This will be used to install the tables in the repository database.

NewImage

8. Of course we will chose “Oracle” :)

NewImage

9. Confirm the Oracle Home (Veridata Home) location.

NewImage

10. Select and Instance and click Continue. This article assumes that the Veridata installation is on the same server as its intended repository.

NewImage

11. I will let the installer create a new user for me.

NewImage

12. Enter the DBA

NewImage

13. On the next screen, enter the oracle database user where the Veridata objects will be installed.

NewImage

14. Enter the default, and temp tablespace for the above user.

NewImage

15.  Check the box if you want it to start Veridata after the installation.

NewImage

16. Review the settings and click “Next”.

NewImage

17. Progress is always good.

NewImage

18. Awesome! All done.

NewImage

At this point, we can log into the Veridata Server successfully!

NewImage

In subsequent posts, I will discuss the other aspects such as the Veridata Agent install, Configuration, etc.

Cheers!
continue reading "GoldenGate Veridata 11.2.1 Server Installation"