Get Data Moving 1
Results 1 to 5 of 5

Thread: Replicate Command Line - Misc Command

  1. #1
    stevenguyen is offline Senior Member
    Join Date
    May 2014
    Posts
    277
    Rep Power
    5

    Replicate Command Line - Misc Command

    The repctl is from the ~\Attunity\replicate\bin directory (run as Administrator)

    Get task list:

    gettasklist search_pattern="%"



    Get task status:

    repctl gettaskstatus task="TaskName"



    Get task source and target:

    gettask name="TaskName"



    Get task full:

    gettaskfullstruct task_name="TaskName"



    Get table list:

    gettablesstatus task="TaskName" mask=127 last_update_time=0



    Get database info:

    getobject object_name="DatabaseName" object_type=01



    Get table DDL:

    gettabledef task="TaskName" database_name="DatabaseName" table_owner="Owner" table_name="TableName"



    Get table manipulation lists:

    gettablemanipulationlist task="TaskName"

  2. #2
    SriVathsa is offline Junior Member
    Join Date
    Apr 2018
    Posts
    3
    Rep Power
    0
    Steven,
    We use a product for batch processing with successor/ predecessor relationship to keep the data integrity.

    All our batch jobs are unix shell scripts.

    repctl connect ip=xx.xx.xx.xx\; gettaskstatus SOM_NAME\; disconnect\;

    The return code is 0, which means this commands succeeded, but how do I get status of a task in the parameter that will let me know if I need complete the job or sleep for a few more mins?

    Thanks
    Sri

  3. #3
    stevenguyen is offline Senior Member
    Join Date
    May 2014
    Posts
    277
    Rep Power
    5
    try the :

    Get task status:

    repctl gettaskstatus task="TaskName"

  4. #4
    SriVathsa is offline Junior Member
    Join Date
    Apr 2018
    Posts
    3
    Rep Power
    0
    Quote Originally Posted by stevenguyen View Post
    try the :

    Get task status:

    repctl gettaskstatus task="TaskName"
    But, I'm looking for the "state" as "STOPPED" or "RUNNING" or "ERROR"

  5. #5
    Hein is offline Senior Member
    Join Date
    Dec 2007
    Location
    Nashua, NH - USA.
    Posts
    132
    Rep Power
    11
    Quote Originally Posted by SriVathsa View Post
    But, I'm looking for the "state" as "STOPPED" or "RUNNING" or "ERROR"
    Let me start by pointing out that Attunity is would like folks to use the Attunity Enterprise Manager RestAPI as a documented, stable, interface to manage Replicate.

    The use of REPCTL is discouraged.

    What scripting language would you prefer to use?

    I like to use GETSERVERSTATUS for a quick task state overview.
    You can find an example in the ControlTasks.ps1 powershell script i wrote.
    Look specifically for "$TaskState"
    This script, and many others can be downloaded from: https://files.attunity.com/url/heinpublicscripts

    Hope this help,
    Hein

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •