Control replication & replication agents through Workflow.

Hi,
we have a requirement where in we need to enable & disable replication agents through a java process. Is it possible ?
Thanks
Vinay

Hello Vinay,
Not sure if there is method to disable the agent through API because the enable/disable property is configuration property and stored with that agent in CQ (for example /etc/replication/agents.author/publish/jcr:content). But what you can do to accomplish that is as below.
AgentManager agentMgr = sling.getService(AgentManager.class);
or
@Reference
AgentManager agentMgr;
Agent agent = agentMgr.getAgents().get(id);
AgentConfig cfg = agent == null ? null : agent.getConfiguration();
String agentPath=cfg.getConfigPath();
Node agentNode=resourceresolver.getResource(agentPath).adaptTo(Node.class);
agentNode.setProperty("enabled",false);
I hope above helps you to proceed.
Thanks,
Pawan

Similar Messages

  • Not able to start the Connection Digital Networking Replication Agent Service

    Hi All,
         I am getting the following alert through RTMT, when i tried to start the service in Unity Connection Serviceability, it doesn't start.   Unity Connection 8.5.1.  It is still in the stopped status, Although service is not important, however it is pushing a lot of rtmt alert.   Could you please help me how to start this Connection Digital Networking Replication Agent Service. 
    Service operational status is DOWN. Connection Digital Networking Replication Agent.
    Thanks
    Barry

    Thanks for Nadeem and Aokanlawon, for the quick reply.
    1.  You are right  i got only one cluster i understand its not working,  However howcome this service was started in pub UC and was working. I will disable anyway now as i got only one cluster. It all started when I started to fix the following alerts which was pushed by sub Unity Connections(Branchsite)
    Failed to retrieve DbSpace usage information when running the "Monitor the Unity Connection databases" SysAgent task.
    This alert started coming after there was a network connection drop between HQ cucm and the branch sub UC, after the drop, all ports disconnected between these two servers, services deactivated in Sub UC, after the network connection back again, ports connected back and the most of the services activated.  However the following services were not in the running state in Sub UC.   I found these information from the sysagent trace log.  I thought to fix this error  is to start the Connection Database Proxy in Sub UC.  However this has stopped the following service 'Connection' Database Proxy' and 'Connection Digital Network Replication Agent' in Pub UC.  I managed to start Connection Database Proxy in Pub UC, however Connection Digital Network Replication agent is now in deactivated status.
    Critical Services
    connection exchange notification web service
    connection mailbox sync
    connection message transfer agent
    connection notifier
    Optional services
    Connection Database Proxy
    Connection Digital Networking Replication Agent
    Connection Speechview processor
    2. How do I stop the alert from sub UC
    Failed to retrieve DbSpace usage information when running the "Monitor the Unity Connection databases" SysAgent task.
    Thanks

  • Replication agent to activate only certain paths

    Is there a way in CQ 5.3 to setup a replication agent to only process requests for certain repository paths? I am just trying to find out if this can be done without any custom replication agents and/or transport agents.
    So for example - AgentA is only allowed to replicate content from path /content/aa/bb. AgentB should replicate content from all other paths except for /content/aa/bb.

    Hi Jörg,
    Thanks for the response. It does kind of works, but it will be hard to identify which one are genuinely rejected content for replication & the authentication failed one's.
    And remember this has to be managed for reverse replication as well. So there will be always be a bunch of items in the queue re-trying to publish.
    If someone publishes a content, what CQ does at the moment is, it hands over the content to all the agents configured and let the agents determine what access rights they have.
    But it would be nice if there's a middle man process, who hands over the content to the appropriate agent. Because I believe there should be loads of clients trying to have both intranet and internet sites delivered through a single platform. The current architecture doesn't allows to mark contents as intranet specific one's and internet specific one's.
    Thanks Jörg
    Saravanan

  • The replication agent has not logged a progress message in 5 minutes. This might indicate an unresponsive agent or high system activity. Verify that records are being replicated to the destination and that connections to the Subscriber, Publisher, and Dis

    Does anyone know what is this mean and how to fix this?
    I checked the records and they are not being replicated, and the connection to the subscriber are not active for some reason; but I don't know how to fix it.
    Thanks
    Philly Database developer

    It basically means that the replication agent has not logged a status message back to the replication subsystem.
    Basically you can't stop it, and these messages let you know if the agent has hung.
    However you can delay the time before the subsystem will report this message. Do this by the following query - this will delay this message to 10 minutes from the default of 5 minutes. I have set this to days when replicating over ISDN/Phone lines.
    USE master
    exec sp_changedistributor_property
    @property = N'heartbeat_interval',
    @value = 10;
    GO
    looking for a book on SQL Server 2008 Administration?
    http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search?
    http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941
    after changes below query...USE master
    exec sp_changedistributor_property
    @property = N'heartbeat_interval',
    @value = 10;
    GO still not working...

  • How to automate checking status of Replication agent and Replication queue in CQ5

    As part of monitoring the status of replication agents and replication queue, is it possible to automate the checking process?
    We can check them from GUI, but from a monitoring perspective we are loking for a mechanism where the status can be checked continuously and we are alerted whenever there is some issue.
    1. Check status of replication agent (enabled/disabled)
    2. Check status of replication queue (if the queue is blocked)
    Thanks in advance
    nkrao

    you can pull the queue from the page the same way the UI gets the list
    in the table:
    curl -u admin:admin
    "http://localhost:4502/etc/replication/agents.author/publish/jcr:content.queue.json?agent=p ublish"
    and then use a shell library like ticktick.sh to parse the json
    response. A sample of how to get the bundles loaded and installed from
    CQ using the ticktick library can be found here
    https://github.com/kristopolous/TickTick
    http://ruben42.wordpress.com/2012/04/24/using-ticktick-sh-to-parse-json-responses-from-ado be-cq5-5/

  • Replication agent has not logged a progress

    Hi expert,
    I have problem with my transactional replication.
    Below details info of my SQL Server.
    OS = Windows Server 2008 R2 Enterprise
    SQL Server = MS SQL Server 2008 R2
    Two Servers (by the way I'm using Hyper-V VM)
    1. SQL-1 is the publisher
    2. SQL-2 is the subscriber
    Right now I have this error message
    The replication agent has not logged a progress message in 10 minutes. This might indicate an unresponsive agent or high system activity. Verify that records are being replicated to the destination and that connections to the Subscriber, Publisher, and Distributor
    are still active.
    From replication monitor it was the Snapshot Agent that having this error.
    Meanwhile Log Reader Agent status is 'running' with no error.
    How to troubleshoot this error message, for me to reactivate my replication.
    Let me know if you need further information/log.
    Thanks in advance,
    Afira Imra

    This means the replication agent has not communicated to the replication subsystem for 10 minutes or whatever is set in your heartbeat interval.
    use sp_helpdistributor_properties in your distribution database to determine what your heartbeat interval is.
    Change it to something larger by doing sp_changedistributor_property 'heartbeat_interval',20
    to set it to 20 minutes.
    use select * from sys.sysprocesses to identify yoru replication agent and then observer cpu and physical_io to see if they are changing. This will indicate it it is hung or blocked.
    I find that during index creation you will get this message a lot.
    looking for a book on SQL Server 2008 Administration?
    http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search?
    http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941

  • TT12039: Could not get port number of TimesTen replication agent on remote

    i use the "ttRepAdmin -duplicate -from yymhcc_active -host mt2 -setMasterRepStart -uid musicclub -pwd musicclub -remoteDaemonPort 17001 -keepCG -cacheUid musicclub -cachePwd musicclub -localhost "mt4" yymhcc_standby;"
    TT12039: Could not get port number of TimesTen replication agent on remote host. Either the replication agent was not started, or it was just started and has not communicated its port number to the TimesTen daemon
    at the mt4 machine :
    ping mt2
    PING mt2 (10.25.71.26) 56(84) bytes of data.
    64 bytes from mt2 (10.25.71.26): icmp_seq=1 ttl=64 time=0.138 ms
    64 bytes from mt2 (10.25.71.26): icmp_seq=2 ttl=64 time=0.108 ms
    at mt2
    ttAdmin -query yymhcc_active
    RAM Residence Policy : manual
    Manually Loaded In RAM : True
    Replication Agent Policy : manual
    Replication Manually Started : True
    Cache Agent Policy : manual
    Cache Agent Manually Started : True
    and
    repschemes;
    Replication Scheme Active Standby:
    Master Store: YYMHCC on MT2
    Master Store: YYMHCC_STD on MT4
    Excluded Tables:
    None
    Excluded Cache Groups:
    None
    Excluded sequences:
    None
    Store: YYMHCC on MT2
    Port: 21000
    Log Fail Threshold: (none)
    Retry Timeout: 30 seconds
    Compress Traffic: Disabled
    Store: YYMHCC_STD on MT4
    Port: 20000
    Log Fail Threshold: (none)
    Retry Timeout: 30 seconds
    Compress Traffic: Disabled
    1 replication scheme found.

    when i use: ttRepAdmin -duplicate -from yymhcc -host mt2 -setMasterRepStart -uid musicclub -pwd musicclub -remoteDaemonPort 17001 -keepCG -cacheUid musicclub -cachePwd musicclub -localhost "mt4" yymhcc_standby
    TT8179: Cannot create duplicate store : store already exists
    master odbc config :
    [yymhcc_active]
    Description=For Active Master
    Driver=/usr/local/timesten/TimesTen/tt70/lib/libtten.so
    DataStore=/usr/local/timesten/TimesTen/yymhcc/yymhcc
    DatabaseCharacterSet=ZHS16GBK
    ConnectionCharacterSet=ZHS16GBK
    Authenticate=1
    OracleID=yymhcc
    OraclePWD=mc
    UID=mc
    PWD=mc
    #ipcs memory size(M)
    PermSize=8192
    Connections=2047
    #permsize*20%
    TempSize=1024
    PassThrough=1
    WaitForConnect=0
    Isolation=0
    Logging=1
    DurableCommits=0
    CkptFrequency=600
    CkptLogVolume=256
    #LogBuffSize=256000
    LogBuffSize=524288
    LogFileSize=256
    LogFlushMethod=1
    LogPurge=1
    LockLevel=0
    LockWait=5
    SQLQueryTimeout=5
    RecoveryThreads=16
    subscriber config :
    [yymhcc_standby]
    Driver=/usr/local/timesten/TimesTen/tt70/lib/libtten.so
    #DataStore=/usr/local/timesten/TimesTen/yymhcc_std/yymhstd
    DatabaseCharacterSet=ZHS16GBK
    ConnectionCharacterSet=ZHS16GBK
    Authenticate=1
    OracleID=yymhcc
    OraclePWD=mc
    UID=mc
    PWD=mc
    PermSize=8192
    Connections=2047
    #permsize*20%
    TempSize=1024
    PassThrough=1
    WaitForConnect=0
    Isolation=0
    Logging=1
    DurableCommits=0
    CkptFrequency=600
    CkptLogVolume=256
    #LogBuffSize=256000
    LogBuffSize=524288
    LogFileSize=256
    LogFlushMethod=1

  • Error while starting replication agent

    Hi,
    I am getting the following error while starting to replication agent
    **** [TimesTen][TimesTen 11.2.2.2.0 ODBC Driver][TimesTen]TT8191: This store (M3*
    on TH0986) is not involved in a replication scheme -- file "eeMisc.c", lineno 23
    *11, procedure "sbEeGridErrorProc"*
    **** ODBC Error = S1000, TimesTen Error = 8191*
    Please help me out.

    This indicates some mismatch between your replication scheme definition and your overall environment (such as machine hostnames, IP addresses etc.).
    Can you please provide:
    1. Exact TimesTen version (output of ttversion command)
    2. DSN settings for the database(s) in question from sys.odbc.ini (or Windows registry)
    3. Output of the O/S hostname command on all participating machines (or Windows equivalent)
    4. Exact text of CREATE REPLICATION or CREATE ACTIVE STANDBY PAIR statement.
    5. Contents of /etc/hosts from all participating machines (if you are using hosts file based name resolution)
    Thanks,
    Chris

  • Replication agent doesn´t free memory after expensive operation

    Our environment is made up of master node and 17 subscriber.
    We have issued a delete action implying 1000000 rows. During the deletion, normal CPU, memory and swap usage was observed. Later, CPU usage has recovered while memory and swap has not. The most memory consumming process was timestenrep with 9Gb.
    Deletion has been correctly replicated to all nodes. However, the replication agent needed to be restarted manually in order to recover memory/swap.
    Why the replication agent did not recover on its own and free memory?
    Definition in sys.odbc.ini
    Datastore=/data/db/xxxx
    PermSize=4000
    tempSize=250
    DurableCommits=0
    TypeMode=1
    LogFileSize=64
    LogBuffSize=65536
    MemoryLock=3
    LockWait=10
    PrivateCommands=1
    Authenticate=0
    DatabaseCharacterSet=WE8ISO8859P15
    ConnectionCharacterSet=WE8ISO8859P15
    CkptFrequency=300
    CkptLogVolume=128
    Connections=90
    TimesTen Version installed (ttVersion command)
    TimesTen Release 7.0.5.0.0 (64 bit Solaris) (ivpnges2tt70:17000) 2008-04-04T01:19:41Z
    Instance admin: root
    Instance home directory: /opt/TimesTen/ivpnges2tt70
    Daemon home directory: /var/TimesTen/ivpnges2tt70
    Regards,
    Matú

    In a replicated environment, executing very large transactions (such as deleting 1M rows in a single transaction) is a very hazardous thing to do and is something you should avoid at all costs. It can cause a number of serious problems. Transactions should be limited to no more than a few thousand operations. If you need to empty a table, use TRUNCATE instead. This will execute far more quickly, generate less log and will not cause problems for replication. If you cannot use TRUNCATE then you should break the DELETE up into multiple smaller transactions. For example if you wish to delete all row where 'startdate' is less than some value and this is likely to result in a large number of deletions then you could repeatedly execute the following sequence:
    DELETE FIRST 1000 FROM sometable WHERE startdate < :someval;
    COMMIT;
    and just keep doing this until the 'rows affected' value is zero.
    The same applies to large inserts and updates.
    The memory usage behaviour of the replication daemon, while perhaps not ideal, is correct and as expected. When you delete 1M rows in a single transaction the replication daemon has to allocate memory (via malloc) for 17x copies (in your case) of the transaction data. That is probably a lot of memory. Once the transaction has been replicated to all 17 subscribers. This memory is moved to an internal 'free' list for re-use but is not returned to the O/S until the replication agent is terminated. Since it such a bad idea to execute these large transactions this behaviour is generally not a problem.
    Chris

  • Do I need license to patch agent through grid control deployment wizard

    In grid control, we have license to use database diagnostics pack and database tuning pack.
    I know wihtout license for provision pack, I cannot patch database homes using grid control deployment tab. But I'm wondering if I can patch grid control agent through deployment page without license for the prvision pack.
    thanks

    There is no management pack license needed for patching the agent. You can get clear details what link needs what packs when you click on '+' symbol (Show Management Pack Information) right to the "About Oracle Enterprise Manager" at the extreme down on OEM screen.
    When you click on "Show Management Pack Information", it will show what pack needed next to every link in paranthesis. If there is no pack information mentioned next to link means, there is no license needed for that link.

  • Why SAP SRM material replication happens through CRM middleware?

    Can some one help me to understand, Why SAP SRM material replication happens through CRM middleware? Is there any functional/Technical reason behind this design?

    Dear Sridhar,
    SRM releases later SRM 4.0 are working with the same middleware implementation,
    there where no changes between the releases. The SRM middleware implementation
    was decoupled from the CRM middleware development at that time.
    (Middleware is based on the basis functionality of queued Remote Function Calls qRFC)
    Regards
    Laszlo

  • TimesTen 7.0.6.9: Replication Agent fails with Error 17029 and 8191

    The replication agent failed to start with error 17029 and 8191.
    /etc/hosts look like:
    1.1.1.1 server1.tt.com server1 => `hostname` returns this
    2.2.2.2 server1-2.tt.com server1-2
    SQL statement to create a replication schema looks like:
    CREATE REPLICATION AAA.R1
    MASTER dsn1 on server1-2
    SUBSCRIBER dsn2 on server2
    STORE dsn1 on "server1-2" PORT 17013
    STORE dsn2 on "server2" PORT 17013;
    call ttRepStart();
    call ttRamPolicySet('always');
    call ttRepPolicySet('always');
    quit
    This fails with
    17029: This store (dsn1 on server1.tt.com) is not involved as a local store in replication scheme AAA.R1
    8191: This store (dsn1 on server1.tt.com) is not involved in a replication scheme
    In addition, replication files are created with dsn1 as a prefix.
    I added ttHostNameSet('server1-2'); before ttRepStart(), but it did not seem to take effect. I also tried ROUTE statement; however, the error did not disappear.
    How can I make this work?

    Yes you have to specify the hostname output in the replication DDL.
    This is what you can find in the replication Doc
    "When specifying the host for a data store in a replication element, you should always use the name returned by the hostname command, as replication uses the this same host name to verify that the current host is involved in the replication scheme. Replication schemes may not be created that do not include the current host.
    If a host contains multiple network interfaces (with different IP addresses), you should specify which interfaces are to be used by replication using the ROUTE clause. You must specify a priority for each interface. Replication tries to first connect using the address with the highest priority."

  • Does Replication agent process requests sequentially or parallely?

    I would like to know if the replication process is carried out by the agent in a sequential manner or parallel. My focus is on understanding when a replication agent queue is Blocked..?
    If for some reason, a page that is activated fails to get replicated does this cause a queue block situation and the requests made further remain pending in the queue?
    Thanks

    Yes. The queue is processed in first in first out order - if the replication of the first one fails it is put into the queue and retried endless till it succeeds with a time delay of 60000 milliseconds between retries.     The log of the agent queue will provide information why the replication fails.  More details about sling event and jobs at
    http://sling.apache.org/site/eventing-and-jobs.html

  • Unable to auto-start cache and replication agents

    Hi,
    Everytime we start server, we need to manually start cache and replication agents!
    Is there any way to configure them starting automatically???

    Yes:
    ttAdmin -repPolicy always -cachePolicy always DSN
    Chris

  • The replication agent has not logged a progress message in 5 minutes. This might indicate an unresponsive agent or high system activity. Verify that records are being replicated to the destination and that connections to the Subscriber,

    Hello Everyone,
    Suddnly stop merge replication. transaction cannot replicated from publiser to sunscriber.
    I tried to set  heartbeat_interval= 5 but still not working..
    The replication agent has not logged a progress message in 5 minutes. This might indicate an unresponsive agent or high system activity. Verify that records are being replicated to the destination and that connections to the Subscriber, Publisher, and Distributor
    are still active.
    What is the problem with merge replication and why this erroe comes..
    any solution of this error or reconfigure merge replication?
    please give me a solution

    Run profiler on the subscriber to see what the merge agent is doing there. It is possible that there is some blocking that is causing the agent to hang. You might want to set the heartbeat to 10 or higher. The default is IIRC 5.
    looking for a book on SQL Server 2008 Administration?
    http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search?
    http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941

Maybe you are looking for