dsrutil target - Progress Community

Download Report

Transcript dsrutil target - Progress Community

WHO AM I
Currently with Eaton Corp as a Sr. Progress DBA for the
past 12 years
Started Programming with Progress in 1989, version 4.2
Progress Consultant/DBA for over 18 years.
Currently administrate over 95 plants in 50+
environments (5-7 db’s each, over 300)
Sizes range from 25GB to 460GB
WHAT IS REPLICATION
This is a feature/product from Progress that
provides real-Time synchronization between
two or more databases.
There is a replication server(source) and one or
more replication agents (targets).
PROS AND CONS OF OE REPLICATION
Pros
•
Supported from 10.1 and above
•
Real-time replication
•
Reporting on Target
Cons
•
Not Cheap
•
Learning Curve
•
Setup on large DB’s takes a long time
WHAT AND WHY SHOULD I SPEND THE $$$
Repl
Server
Repl
Agent
After
Image
Files
Target
DB 1
Clients
Process
Source
DB
Target
DB 2
DIFFERENT TYPES
True failover
– Run two exact same servers that contain everything that is kept in sync.
Could still have corrupt data.
• Partial failover
– Run core software on failover server and restart production DB.
• Poor man Replication
– Apply AI notes every X mins to a standby database.
• OpenEdge Replication
Can be on same or different server. ONLY replicates databases.
BEST SOLUTION
A combined solutions is BEST. And most expensive. But if your data is really needed
and zero loss data is the target, then a combine solution is the choice.
•
Two Servers that are configured the same.
•
OS and other files are kept in sync using a heartbeat or tools like rsync
•
OE Replication is used to keep databases in sync
•
OE Replication Plus is used to allow reporting on the target.
•
ODBC is connected only to the Target
TWO SYSTEMS VS. ONE SYSTEM
•
Keep OS levels the same on both systems
•
Keep supporting files like kernal, services etc in sync.
•
All software need to be in sync (progress, edi, erp, accounting)
•
ONE system
•
If you have a hardware failure you are done.
•
System can be over used and slow production down.
OUT OF THE BOX FAILOVER
•
This means you will be failing over all users to another server on crash.
•
You may use aliases to setup server names to all clients to connect.
Cleint
Cleint
Connection
Connection
Production server
contains all software
and datrabases
Reporting
Connection
Failover Server
contains all software
and replicated
databases
ODBC
Connection
EATONS’ VERSION FAILOVER
•
This means you will be failing over all users to another server on server crash
only.
•
Production databases will allows be on production server.
Reporting
Connection
Cleint
Connection
Production server
contains all software
and datrabases
Failover Server
contains all software
and replicated
databases
ODBC
Connection
EATONS’ VERSION DATABASE FAILOVER
•
Database is shutdown (source/target)
•
Target to snapped and copied to Production server and made into source. And
started up.
Reporting
Connection
Cleint
Connection
Production server
contains all software
and datrabases
Failover Server
contains all software
and replicated
databases
ODBC
Connection
EATONS’ VERSION SYSTEM FAILOVER
•
Failover server is renamed to Production server.
•
Target to snapped and copied to Production server and made into source. And
started up.
Reporting
Connection
Cleint
Connection
Production (old
Failover) Server
contains all software
and replicated
databases
ODBC
Connection
WITHOUT REPLICATION
After image Files are taken from the source machine and
applied throughout the day
• Pros:
– Cheap
• Cons:
– Not synchronous
– Must maintain the code yourself
ONLY as GOOD as you code it,
SOURCE SIDE SETUP
AI must be turned on. (this should be already on)
With the database down you need to enable site replication for the
source database.
proutil <dbname> –C enablesitereplication source
• Move the new properties file into place Currently the same
directory as the DB
• Start the source database with -DBService replserv parameter
• Do an online backup of the source
• Restore The Backup To the target
TARGET SIDE SETUP
• Restore backup to target database.
• Enable replication on target
proutil <dbname> –C enablesitereplication target!
Or prorest <dbname> <backupname> -REPLTransition (I have never TRIED THIS)
• Start the target with
-DBService replagent and –S <service or port number> parameters
• Use the dsrutil command to monitor
dsrutil <dbname> –C monitor
• Or look for the following message in the target
database .lg file
The Source and Target databases are synchronized.
(10668).
NEW PROPERTIES FILES
•Server Properties
• Agent Properties
SERVER PROPERTIES
[server]
control-agents=phramfg_agent
database=phrpmfg
transition=manual
transition-timeout=1200
defer-agent-startup=600
[control-agent.phramfg_agent]
name=phramfg_agent
database=phramfg
host=phrqa.tcc.etn.com
port=phramfg
connect-timeout=3600
replication-method=async
critical=0
Host of Failover DB
AGENT PROPERTIES
• $more phramfg.repl.properties
• [agent]
• name=phramfg_agent
• database=phrpmfg
• listener-minport=63460
• listener-maxport=63999
• [transition]
• database-role=normal
DSRUTIL MONITOR
OpenEdge Replication Monitor
Page 1
Database: /mfgpro/nhb/db1/nhbpmfg
Database is enabled as OpenEdge Replication: Source
Server is:
In Normal Processing
Number of configured agents:
1
Delay Interval (current / min / max):
365 / 5 / 500
Recovery information:
State:
No recovery being performed
Agents needing recovery:
0
Agents connected:
0
Agents in synchronization:
0
Transition information:
Type:
Manual
DSRUTIL MONITOR
R. Replication server remote agents
OpenEdge Replication Monitor
Page 1
Database: /mfgpro/nhb/db1/nhbpmfg
Database is enabled as OpenEdge Replication: Source
Remote Agents Configured:
ID Name
Host Name
1. nhbamfg_agent
Q. Quit
151.110.228.88
Database
/mfgoer/nhb/db1/nhbamfg
DSRUTIL MONITOR TARGET
Database: /mfgoer/nhb/db1/nhbamfg
Database is enabled as OpenEdge Replication: Target
Agent:
Name:
ID:
nhbamfg_agent
1
Host name:
State:
Ready:
Critical:
Method:
151.110.230.42
Normal Processing
Yes
No
Asynchronous
Agent is waiting for:
Nothing
Maximum bytes in TCP/IP message:
8504
Server/Agent connection time:
Sun Oct 12 00:15:17 2014
Delay Interval (current / min / max):
5 / 5 / 500
Transition information:
Type:
The last block received at:
Manual
Mon Oct 13 09:24:40 2014
Activity information:
Blocks received:
Blocks processed:
1060208
1060208
DSRUTIL MONITOR TARGET
Blocks acknowledged:
Notes processed:
PART 2
0
90094997
Transactions started:
2486493
Transactions ended:
2486486
Synchronization points:
649
AI Block Information:
Source RDBMS Block (Seq / Block):
Last Processed Block (Seq / Block):
31835 / 172
31835 / 170
Latency Information:
Repl Server behind Source DB by:
0
second(s)
Current Source Database Transaction: 266920035
Last Transaction Applied to Target:
266920034
Target Current as of (Target, Source): Mon Oct 13 09:24:40 2014, Mon Oct 13 09:24:40 2014 with delta of 000:00:00
MANY OPTIONS OF DSRUTIL
•
applyextent! Manual application of source AI extents to the target database.
•
Canceldefer Do not attempt reconnect to deferred replication agent.
•
connectagent or startagent Start agent(s).
•
Disablesitereplication Online disable of replication on the source database.
•
Recovery Displays the replication recovery information.
•
Relwaits Release any waits so that database activity can continue.
•
restart! Restart replication server.
•
Terminate Terminates replication server or agent.
•
Transition Transition agent to a replication-enabled database.
•
Triggertransition Places the target database into a pre-transition state.
FAILOVER
. Replication agent on target machine enters pretransition. If the server properties has
agent-shutdown-action set as normal, the agent will shut down. When this
happens, you will need to manually enter pretransition
dsrutil target -C triggertransition
at this point, try to apply all unapplied AI extents to secondary database (for manual
transition only, if auto transition, could lose unapplied AI extents)
dsrutil target -C recovery
dsrutil target -C applyExtent extent_name
4. Transition target to primary
Automatic: if the properties file is configuring this as automatic, auto transition
occurs
Manual: dsrutil target -C transition
AI FILE TYPES
•Empty – Ready and unused
• Busy – Currently in use
• Full – Being applied and once done will switch to
emtpy. Locked – Waiting to be applied
AI FILE TYPES
Extent: 1
Status: Busy
Type: Variable Length
Path: /AIpro/nhb/nhbpmfg.a1
Size: 7800
Used: 7777
Start: Mon Oct 13 09:54:53 2014
Seqno: 31837
Extent: 2
Status: Empty
Type: Variable Length
Path: /AIpro/nhb/nhbpmfg.a2
Size: 120
Used: 0
Start: N/A
Seqno: 0
THE END