Skip to main content

"plan"

The plan object specifies interactions with replication plans

Abstract

The plan object specifies interactions with replication plans

The "plan" object specifies interactions with replication plans.

Properties summary

Table 1. "plan" object properties summary

Property

Description

Type

add_subscription

creates an array of new subscriptions inside a specified existing replication plan

Note

Each subscription can be associated with an existing publication or with a new publication as specified in the "create" action of the "publication" object.

create

creates a specified replication plan

string

delete

deletes an existing publication specified with the name parameter

delete_subscription

deletes the specified subscriptions from the specified existing replication plan

deploy

starts the deployment of the specified plan

string

resync

forces the resynchronization of the files specified under a certain publication

Note

a replication plan "name" and a "publication" or list of "files" that belong to the specified plan are required.

show

shows the details of a replication plan, the servers involved in the replication plan options, and all the subscribed publications

Note

Only "name" is required.

start

starts a replication plan

string

stop

stops an existing replication plan

array



{
  "memphis": {
     "name": "MEMPHIS",
     "host": "localhost",
     "port": "7597",
     "uid": "admin",
    "pwd": "ADMIN"
  },
  "options": {
    "profile": true,
    "replace": true,
    "ignoredeploy": false,
    "recursivedel": false,
    "recursivesearch": true
  },
  "plan": {
    "actions": [
      "create",
    ],
    "name": "planFiles",
    "sourceEngine": "FAIRCOMS@HOST001",
    "destEngine": "FAIRCOM2@HOST002",
    "subscriptions": [
      {
        "name": "subFiles",
        "bidirectional": false,
        "redir": [
        {
          "source": "E:\\sw\\eu_database\\",
          "target": "D:\\backup\\repldata\\"
        }
        ],
        "publication": {
          "name": "pubFiles",
          "create": false
        }
      }
      ]
    }
  }
{
  "memphis": {
     "name": "MEMPHIS",
     "host": "localhost",
     "port": "7597",
     "uid": "admin",
    "pwd": "ADMIN"
  },
  "options": {
    "profile": true,
    "replace": true,
    "ignoredeploy": false,
    "recursivedel": false,
    "recursivesearch": true
  },
  "plan": {
    "actions": [
      "create"
    ],
    "name": "planFiles",
    "sourceEngine": "FAIRCOMS@HOST001",
    "destEngine": "FAIRCOM2@HOST002",
    "subscriptions": [
      {
        "name": "subFiles",
        "bidirectional": false,
        "redir": [
        {
          "source": "Z:\\db",
          "target": "D:\\backup\\repldata\\"
        }
        ],
        "publication": {
          "name": "pubPW",
          "create": true,
          "mode": "folder",
          "item": "Z:\\db\\pw",
          "wildcards": ["*dat"],
          "recursive": true
        }
      }
      ]
    }
  }
{
  "memphis": {
    "name": "MEMPHIS",
    "uid": "admin",
    "pwd": "ADMIN"
  },
  "plan": {
    "actions": [
      "create",
      "deploy",
      "start"
    ],
    "name": "planFiles",
    "sourceEngine": "FAIRCOMS@MAURO-PC",
    "destEngine": "FAIRCOM2@MAURO-PC",
    "subscriptions": [
      {
      "name": "subFiles",
      "bidirectional": false,
      "publication": {
          "name": "pubFiles",
          "create": false
        }
      }
      ]
    }
  }
{
  "memphis": {
    "name": "MEMPHIS",
    "uid": "admin",
    "pwd": "ADMIN"
  },
  "plan": {
    "actions": [
      "create"
    ],
    "name": "planFiles2",
    "sourceEngine": "FAIRCOMS@MAURO-PC",
    "destEngine": "FAIRCOM2@MAURO-PC",
    "subscriptions": [
      {
      "name": "subFiles",
      "bidirectional": false,
      "publication": {
          "name": "pubFiles2",
          "create": true,
          "mode": "files",
          "items": [
            "E:\\sw\\eu_ldf\\dbf\\ML\\*.*dat"
          ]
        }
      }
      ]
    }
  }
{
  "memphis": {
     "name": "MEMPHIS",
     "host": "localhost",
     "port": "7597",
     "uid": "admin",
    "pwd": "ADMIN"
  },
  "options": {
    "profile": true,
    "replace": true,
    "ignoredeploy": false,
    "recursivedel": false,
    "recursivesearch": true
  },
  "plan": {
    "actions": [
      "deploy"
    ],
    "name": "planFiles"
    }
  }
{
  "memphis": {
     "name": "MEMPHIS",
     "host": "localhost",
     "port": "7597",
     "uid": "admin",
    "pwd": "ADMIN"
  },
  "options": {
    "profile": true,
    "replace": true,
    "ignoredeploy": false,
    "recursivedel": false,
    "recursivesearch": true
  },
  "plan": {
    "actions": [
      "create",
      "deploy"
    ],
    "name": "planFiles",
    "sourceEngine": "FAIRCOMS@HOST001",
    "destEngine": "FAIRCOM2@HOST002",
    "subscriptions": [
      {
        "name": "subFiles",
        "bidirectional": false,
        "redir": [
        {
          "source": "Z:\\db",
          "target": "D:\\backup\\repldata\\"
        }
        ],
        "publication": {
          "name": "pubPW",
          "create": true,
          "mode": "folder",
          "item": "Z:\\db\\pw",
          "wildcards": ["*dat"],
          "recursive": true
        }
      }
      ]
    }
  }
{
  "memphis": {
     "name": "MEMPHIS",
     "host": "localhost",
     "port": "7597",
     "uid": "admin",
    "pwd": "ADMIN"
  },
  "options": {
    "profile": true,
    "replace": true,
    "ignoredeploy": false,
    "recursivedel": false,
    "recursivesearch": true
  },
  "plan": {
    "actions": [
      "start"
    ],
    "name": "planFiles"
    }
  }
{
  {
  "memphis": {
     "name": "MEMPHIS",
     "host": "localhost",
     "port": "7597",
     "uid": "admin",
     "pwd": "ADMIN"
  },
  "options": {
    "profile": true,
    "replace": true,
    "ignoredeploy": true,
    "recursivedel": false,
    "recursivesearch": true
  },
  "plan": {
    "actions": [
      "create",
      "start"
    ],
    "name": "planFiles",
    "sourceEngine": "FAIRCOMS@HOST001",
    "destEngine": "FAIRCOM2@HOST002",
    "subscriptions": [
      {
        "name": "subFiles",
        "bidirectional": false,
        "redir": [
        {
          "source": "Z:\\db",
          "target": "D:\\backup\\repldata\\"
        }
        ],
        "publication": {
          "name": "pubPW",
          "create": true,
          "mode": "folder",
          "item": "Z:\\db\\pw",
          "wildcards": ["*dat"],
          "recursive": true
        }
      }
      ]
    }
  }
{
  "memphis": {
     "name": "MEMPHIS",
     "host": "localhost",
     "port": "7597",
     "uid": "admin",
     "pwd": "ADMIN"
  },
  "plan": {
    "actions": [
      "stop"
    ],
    "name": "planDatabase"
    }
  }
{
  "memphis": {
     "name": "MEMPHIS",
     "host": "localhost",
     "port": "7597",
     "uid": "admin",
    "pwd": "ADMIN"
  },
  "options": {
    "profile": true,
    "replace": true,
    "ignoredeploy": false,
    "recursivedel": false,
    "recursivesearch": true
  },
  "plan": {
    "actions": [
      "delete"
    ],
    "name": "planFiles"
    }
  }
{
  "memphis": {
     "name": "MEMPHIS",
     "host": "localhost",
     "port": "7597",
     "uid": "admin",
     "pwd": "ADMIN"
  },
  "options": {
    "profile": true,
    "replace": true,
    "ignoredeploy": false,
    "recursivedel": true,
    "recursivesearch": true
  },
  "plan": {
    "actions": [
      "delete",
      "stop"
    ],
    "name": "planFolders"
    }
  }
{
  "memphis": {
     "name": "MEMPHIS",
     "host": "localhost",
     "port": "7597",
     "uid": "admin",
    "pwd": "ADMIN"
  },
  "plan": {
    "actions": [ "resync" ],
    "name": "plan1",
    "publication": "pub3"
  }
}
{
  "memphis": {
    "name": "MEMPHIS",
    "uid": "admin",
    "pwd": "ADMIN"
  }
  "plan": {
    "actions": [ "resync" ],
    "name": "planFiles",
    "files": [
      "E:\\sw\\eu_ldf\\dbf\\ML\\abadata\\c\\custmast.dat",
      "E:\\sw\\eu_ldf\\dbf\\ML\\abadata\\c\\custordr.dat"
  ]
  }
}
{
  "memphis": {
    "name": "MEMPHIS",
    "uid": "admin",
    "pwd": "ADMIN",
    "port": "7597"
  },
  "options": {
    "profile": true,
    "replace": true,
    "ignoredeploy": false,
    "recursivedel": false,
    "recursivesearch": false
  },
  "plan":{
    "actions": "add_subscriptions",
    "name":"planALPHA",
    "subscriptions":[
      {
        "name": "subD",
        "publication": {
          "create":false,
          "name":"pubFilesD"
        }
      },
      {
        "name": "subI",
        "publication":{
            "create":true,
            "name":"pubFilesI",
            "mode":"files",
            "items": [
                "E:\\sw\\eu_ldf\\dbf\\ML\\data\\i\\*.*dat"
              ]
        }
      }
    ]
  }
}
{ "memphis": { "name": "MEMPHIS", "uid": "admin", "pwd": "ADMIN", "port": "7597" }, "options": { "profile": true, "replace": true, "ignoredeploy": false, "recursivedel": false, "recursivesearch": false }, "plan":{ "actions": ["delete_subscriptions"], "name":"planBETA", "subscriptions":[ { "name": "subC", "publication": { "name":"pubFiles" } }, { "name": "subD", "publication": { "name":"pubFilesD" } }, { "name": "subI", "publication":{ "name":"pubFilesI" } } ] }
}
{ "memphis": { "name": "MEMPHIS", "uid": "admin", "pwd": "ADMIN", "port": "7597" }, "plan": { "actions": [ "show" ], "name": "planData01" } }

The "create" action creates a new plan.

Note

The "create" action in "plan" always takes a list of subscriptions and each subscription is associated with an existing or new publication. The "create" action in the "publication" object defines new publications.

Properties summary

Table 2. "create" actions summary

Property

Description

Type

destEngine

contains the logical name of the destination engine

string

name

specifies the name of the plan

string

sourceEngine

contains the logical name of the source engine that is publishing the publication

string

subscriptions

contains a list of subscriptions

array



the "deploy" action starts the deployment of the specified plan.

  • The "plan" can be an existing plan or it can be created and deployed.

  • If the plan or availability group already exists only "name" is required.

  • The "deploy" action implies the start of the replication plan after its successful deployment.

  • This action can be specified together with the "create" action

The "start" action starts a replication plan.

  • The plan can be created within the same JSON or it can already exist.

  • The plan or group should be deployed to be started correctly, but the "ignoredeploy" main option can override this constraint.

  • You may want to start a plan without the deployment if the target files have already been copied manually.

  • The "start" operation is skipped if the deployment action is requested in the same file.

  • Typically, the "start" operation is used to start plans that have already been stopped.

The "stop" action stops an existing replication plan,

  • Only "name" is required.

  • A stopped plan or group may be restarted using the "start" action.

  • It can be run together with "delete".

The "delete" action deletes an existing publication specified with the name parameter.

  • Make use of the "recursivedel" option to delete all the dependencies.

  • The plan must be stopped in order to be deleted.

  • The "stop" action can be run together with "delete".

The "delete_subscriptions" action deletes the specified subscriptions from the specified existing replication plan.

  • In order to correctly identify the subscription, the associated publication's "name" must also be specified.

  • This command will not remove any of the publications.