Академический Документы
Профессиональный Документы
Культура Документы
Manager
Log
Trails
Overview of Tasks
Prepare the GoldenGate Environment
In order to execute this lesson, the GoldenGate application must be installed on both the source and target systems. The installation includes a sample database and scripts to generate
Page 1
initial data as well as subsequent update operations. The source and target tables are created and loaded with initial data. The GoldenGate Manager processes are also started so that other processes may be configured and started.
Source
<owner/schema>
Page 2
Exercise 1.
Page 3
SQL> @demo_ora_insert
Verify that supplemental logging has been turned on for these tables.
GGSCI> INFO TRANDATA <owner/schema>.TCUST*
Page 4
ftp> lcd <install location>/dirdef ftp> put source.def (see note below) ftp> bye
Note: To avoid overlaying existing definition files, always put the file as <db type>.def instead of source.def (e.g. Oracle.def).
In the parameter file, enter the following parameter, then save and close the file.
-- GoldenGate Manager Parameter file PORT <port>
Start Manager.
GGSCI> START MANAGER
Page 5
This displays the main SQL Server Management Studio dialog box. Right, right-click Database and select the New Database option.
The New Database dialog box appears. In the Name box, type the <database> from the Lab Preparation worksheet.
Page 6
Click OK to add the database. The main SQL Server Management Studio dialog box reappears.
Page 7
For Name, type the <login>. Select Authentication, If you selected SQL Server Authentication, type the <password> in the two Password fields. Under Defaults, select your <database> for Database, and leave Language set to the default. Do not click OK. Instead, from Select a page in the upper left-hand box, double click User Mapping.
Page 8
In the upper Users mapped to this login area, activate the checkmark next to your database. In the lower Database role membership for <database> area,, check the box for the db_owner role. Click OK to exit. The next step creates a schema that you will associate with the new user. While you have the database selected, click on the New Query button in the main menu. The right side of the dialog displays the SQL Query interface. Type in:
create schema <owner/schema>;
Page 9
Now you need to associate the new user and the schema that you have created with the new database. Right click on the Security option that is under the database and select New > User. The New Database User dialog box appears. Enter the name of your user and press the browse button labeled with three dots ().
Page 10
Select your new user <login> from the list. Then press OK. Your selected user now displays in the object names box. Press OK to exit from
Select Login.
Back in the New Database User dialog, enter the <schema> you added as the default schema and press OK.
Page 11
Select the SQL Server driver and then click Finish. The Create a New Data Source to SQL Server dialog box appears.
For Name, type <dsn>. For a description, type "GG Training Data source" when creating this source DSN. This field is optional. For Which SQL Server do you want to connect to, select the server name. Click Next. Answer the question about how SQL Server should verify the login by selecting the option that you entered when creating the <login>. Then type <login> in Login ID and <password> in Password.
Page 12
Click Next. Make certain the default database is set to the database that you created; otherwise select Change the default database to: and select it. Leave the other settings to their defaults to use ANSI.
Click Next. Leave the next dialog box set to the defaults, and click Finish. In the confirmation, click Test Data Source to test the connection. Close the confirmation dialog box and the Create a New Data Source box.
Page 13
If the correct database is not displayed in the drop down box (showing ggsdata above), click on the arrow and select it from the list. Click the File > Open and navigate to the demo_mss_create.sql script. Click Open to open the script in the New Query window. Execute the script by clicking the Execute Query button on the toolbar. Verify the results using the following commands in the input window:
sp_help tcustmer go sp_help tcustord go
Page 14
Exercise 2.
The process names used in lab exercises, for example EINIBD, are made up of 1) one character for the GoldenGate process (E for Extract, R for Replicat); 2) three or four to describe the process type (INI for initial data load, ORA for capture from or delivery to an Oracle database, etc.) and 3) two characters to create a unique identifier (usually your initials).
Page 15
Note: Remember to use <db type>.def if you renamed the source.def when you transferred it to the <target>.
Execute the following commands on the <target> system. Verify the results:
GGSCI> VIEW REPORT RINI<unique id> Query Analyzer> SELECT * FROM <owner/schema>.TCUSTMER Query Analyzer> SELECT * FROM <owner/schema>.TCUSTORD
Page 16
Exercise 3.
Note: Record the two characters selected for your <trail id>: ______. You will need this in the next step and when you set up the Replicat.
Page 17
Note: When Oracle Automatic Storage Management (ASM) is in use, the TRANLOGOPTIONS ASMUSER and ASMPASSWORD must be set in the Extract parameter file. For more information refer to the GoldenGate for Windows & UNIX Administrator and Reference manuals.
Discussion points
1. Identifying a remote system
What parameter is used to identify the remote target system? _________________________________________________________________________
Page 18
Exercise 4.
Set up checkpoints
1. Edit a GLOBALS file on the target system
Execute the following commands on the <target> system. Edit the GLOBALS parameter file to add the checkpoint table.
Shell> cd <install location> Shell> ggsci GGSCI> EDIT PARAMS ./GLOBALS
Record the checkpoint table owner and name, then save and close the file. Table owner ____________________ name ___________________ Note: You could name the table anything you want, but for training purposes we are using ggschkpt.
Page 19
Configure delivery
4. Add the Replicat checkpoint group
Execute the following commands on the <target> system to create the Replicat group named RMSS<unique id>.
GGSCI> ADD REPLICAT RMSS<unique id>, EXTTRAIL ./dirdat/<trail id>
Note: Refer to your Extract set up for the correct two-character <trail id>.
Note: Remember to use <db type>.def if you renamed the source.def when you transferred it to the the <target>.
Page 20
Discussion points
Search in the Windows//UNIX Reference Guide for the information on the following questions.
Page 21
Exercise 5.
Page 22
Verify the data by executing the following commands in the New Query window of SQL Server Management Studio on the source:
select * from TCUSTMER; select * from TCUSTORD;
Page 23
Exercise Name
Page 24