API Actions: AlterReplication

API Actions: AlterReplication


Request Syntax:

XML

POST /api/AlterReplication HTTP/1.1
Host: use.your.host.name:82
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Content-Type: application/xml
X-Amz-Date: 20171115T202130Z
Authorization: AWS4-HMAC-SHA256 Credential= UQOPWUVNBALABCABCABC/20171115/us-east-1/cloudbasic/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=995374189c189e8e68ed3de82c1764ca11971711fb5179eeab2b19edd883dd74

<?xml version="1.0" encoding="utf-8"?>
<AlterReplicationRequest>
    <ReplicationId>594ed5c8-e0aa-4fd0-987f-fcfd2aaf1763</ReplicationId>
    <SourceConnectionString>Data Source=your-source-db-server;Initial Catalog=your-source-db;Persist Security Info=False;User ID=user-name;Password=******;Connect Timeout=1280</SourceConnectionString>
    <DestinationConnectionString>Data Source=your-destination-db-server;Initial Catalog=your-destination-db;Persist Security Info=False;User ID=user-name;Password=******;Connect Timeout=1280</DestinationConnectionString>
    <DataReplication>true</DataReplication>
    <SchemaReplication>false</SchemaReplication>
    <ParallelTablesLimit>20</ParallelTablesLimit>
    <ChangeTrackingBatchLimit>100000</ChangeTrackingBatchLimit>
    <CtProcessTimeoutInMinutes>60</CtProcessTimeoutInMinutes>
    <SerializedCtProcessTimeoutInMinutes>60</SerializedCtProcessTimeoutInMinutes>
    <AutoSerializedCtProcessTimeoutInMinutes>60</AutoSerializedCtProcessTimeoutInMinutes>
    <IsContinuous>false</IsContinuous>
    <RepeatIntervalInMinutes>5</RepeatIntervalInMinutes>
    <ScheduleIntervalTimeFrom>12:20:00 AM</ScheduleIntervalTimeFrom>
    <ScheduleIntervalTimeTo>11:59:59 PM</ScheduleIntervalTimeTo>
    <IsLogErrorsOnly>false</IsLogErrorsOnly>
    <TablesToExclude>[dbo].[Departments],[dbo].[Employees]</TablesToExclude>
    <ReseedingSchedule>
    	<NoPkTablesToInclude>[dbo].[NoPkTable]</NoPkTablesToInclude>
    	<PKTablesToInclude></PKTablesToInclude>
    	<FromTime>10:00:00 AM</FromTime>
    	<ToTime>10:59:59 PM</ToTime>
    	<RepeatIntervalInMinutes>100</RepeatIntervalInMinutes>
    	<ProcessTimeoutInMinutes>40</ProcessTimeoutInMinutes>
        <SerializedProcessTimeoutInMinutes>40</SerializedProcessTimeoutInMinutes>
        <AutoSerializedProcessTimeoutInMinutes>40</AutoSerializedProcessTimeoutInMinutes>
    </ReseedingSchedule>
</AlterReplicationRequest>

JSON

POST /api/AlterReplication HTTP/1.1
Host: use.your.host.name:82
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Content-Type: application/json
X-Amz-Date: 20171115T202130Z
Authorization: AWS4-HMAC-SHA256 Credential= UQOPWUVNBALABCABCABC/20171115/us-east-1/cloudbasic/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=995374189c189e8e68ed3de82c1764ca11971711fb5179eeab2b19edd883dd74

{
	"replicationId": "594ed5c8-e0aa-4fd0-987f-fcfd2aaf1763",
	"sourceConnectionString": "Data Source=test-small-200gb.csyinqcmzc19.us-east-1.rds.amazonaws.com;Initial Catalog=TestDBAll_1;Persist Security Info=False;User ID=vpone;Password=*******",
	"destinationConnectionString": "Data Source=test-1t.csyinqcmzc19.us-east-1.rds.amazonaws.com;Initial Catalog=TestDBAll_1;Persist Security Info=False;User ID=vpone;Password=*******",
	"dataReplication": "true",
	"schemaReplication": "false",
	"parallelTablesLimit": "10",
	"changeTrackingBatchLimit": "100000",
	"ctProcessTimeoutInMinutes": "60",
	"serializedCtProcessTimeoutInMinutes": "60",
	"autoSerializedCtProcessTimeoutInMinutes": "60",
	"isContinuous": "false",
	"repeatIntervalInMinutes": "5",
	"scheduleIntervalTimeFrom": "12:20:00 AM",
	"scheduleIntervalTimeTo": "11:59:59 PM",
	"isLogErrorsOnly": "false",
	"tablesToExclude": "[dbo].[Departments],[dbo].[Employees]",
	"reseedingSchedule": {
		"noPkTablesToInclude": "[dbo].[NoPkTable]",
		"pkTablesToInclude": null,
		"fromTime": "10:00:00 AM",
		"toTime": "10:59:59 PM",
		"repeatIntervalInMinutes": "100",
		"processTimeoutInMinutes": "40",
		"serializedProcessTimeoutInMinutes": "40",
		"autoSerializedProcessTimeoutInMinutes": "40"
	}
}

 

Request Parameters

Parameter Description Required
ReplicationId The ReplicationID returned in the CreateReplication response. Yes
Type: String
Default: None
SourceConnectionString A valid ConnectionString to the source database.

Note:
Populate this parameter only when altering the source connection string; i.e. changing login and/or password.

No
Type: String
Default: None
DestinationConnectionString A valid ConnectionString to the destination database.

Note:
Populate this parameter only when altering the destination/ replica connection string; i.e. changing login and/or password.

No
Type: String
Default: None
DataReplication Populate this parameter only when turning off/on the data replication.

Note:
Important: if you need to stop/start all replications, use the StopReplicationService/ StartReplicationService commands instead.

No
Type: String
Default: None
Valid value: true/ false
SchemaReplication Populate this parameter only when turning off/on the schema replication. No
Type: String
Default: None
Valid value: true/ false
ParallelTablesLimit Populate this parameter only when altering the number of tables being replicated in parallel.

Note:
A lower number decreases the workload on source & destination servers, but it might increase latency.

No
Type: Integer
Default: None
ChangeTrackingBatchLimit Populate this parameter only when altering the change tracking batch limit.

Note:
This is the number of records per table extracted at once. This parameter controls the workload on the source server when there is a high volume of changes (i.e. 1mil per min bulk load).

No
Type: Integer
Default: 500,000
CtProcessTimeoutInMinutes Change Tracking (Ct) Time out (in minutes). Populate this parameter only when altering the change tracking time out.

Note:
If a Ct process runs longer than the specified time, it will be canceled. If Ct is canceled due to an exceeded timeout, the next Ct processes will run with doubled previous timeout. If canceled again, timeout will be doubled again. If timeout is exceeded for a 3rd time, then the Ct process will be launched without a timeout. Upon successful Ct run, the timeout will be adjusted back to the originally specified value.

No
Type: Integer
Default: 30
SerializedCtProcessTimeoutInMinutes When Serialization is activated manually, this parameter indicates the number of minutes the Ct process is allowed to run by itself before another Ct process is allowed to start in parallel.

Note:
For more information, please see the <SerializeReplications> and <ParallelDatabaseReplicationsLimit> parameters in the AlterConfiguration API method.

No
Type: Integer
Default: 30
AutoSerializedCtProcessTimeoutInMinutes When Serialization is system activated, this parameter indicates the number of minutes the Ct process is allowed to run by itself before another Ct process is allowed to start in parallel.

Note:
In scenarios where a large number of concurrent DB replications are running, the CloudBasic service can become over saturated and go through a recycle. This will restart the Ct process in a Serialized mode.

No
Type: Integer
Default: 30
IsContinuous Controls how the Ct process is scheduled.

Note:
By default, all replications run in a continuous mode in order to minimize latency. In scenarios where the replication process must run on a schedule, this value must be set to false and the frequency of execution must be provided in the RepeatIntervalInMinutes parameter.

No
Type: String
Default: true
Valid value: true/ false
RepeatIntervalInMinutes Specifies the frequency of execution of the Ct process in minutes.

Note:
Applicable only if IsContinuous is set to false.

No
Type: Integer
Default: None
ScheduleIntervalTimeFrom Starting time of the period when the Ct process is allowed to run.

Note:
Set this parameter only if the replication process should not run continuously.

No
Type: String
Default: None
ScheduleIntervalTimeTo Ending time of the period when the Ct process is allowed to run.

Note:
Set this parameter only if the replication process should not run continuously.

No
Type: String
Default: None
IsLogErrorsOnly Controls the granularity of the run-time logs.

Note:
By default only errors and warnings are logged. Set the value to false when you want detailed logging or when troubleshooting performance and latency issues.

No
Type: String
Default: true
Valid value: true/ false
TablesToExclude A list of tables to be excluded from replication.

Note:
Excluded tables will be removed only from the ongoing change tracking and will not be removed from the respective destination database.

No
Type: String
Default: None
ReseedingSchedule Creates or modifies an existing reseeding schedule.

Note:
Note: Tables w/ No Primary Keys (PKs) will be seeded during replication but will not be tracked for changes.
If adding PKs is not an option, you can include those tables in the reseeding schedule job for reseeding. See http://GetStarted.cloudbasic.net for more information

No
NoPkTablesToInclude The list of tables with no Primary Keys that will be included in the reseeding.

Note:
Any table without a Primary Key (No PK), regardless of whether it is excluded in the <TablesToExclude> list or not, can be included here.

Type: String
Default: None
PkTablesToInclude The list of tables with Primary Keys that will be included in the reseeding.

Note:
Only tables with Primary Keys (Pk) excluded in the <TablesToExclude> list can be included here.

Type: String
Default: None
FromTime Starting time of the period when the reseeding process is allowed to run.
Type: String
Default: None
ToTime Ending time of the period when the reseeding process is allowed to run.
Type: String
Default: None
RepeatIntervalInMinutes Specifies the frequency of execution of the reseeding process in minutes.
Type: Integer
Default: None
ProcessTimeoutInMinutes Specifies the maxim amount of time (in minutes) the reseeding process is allowed to run for.
Type: Integer
Default: None
SerializedProcessTimeoutInMinutes When Serialization is activated manually, this parameter indicates the number of minutes the reseeding process is allowed to run by itself before another reseeding process is allowed to start in parallel.

Note:
For more information, please see the <SerializeReplications> and <ParallelDatabaseReplicationsLimit> parameters in the AlterConfiguration API method

Type: Integer
Default: None
AutoSerializedProcessTimeoutInMinutes When Serialization is system activated, this parameter indicates the number of minutes the Ct process is allowed to run by itself before another Ct process is allowed to start in parallel.

Note:
In scenarios where a large number of concurrent DB replications are running, the CloudBasic service can become oversaturated and go through a recycle. This will restart the Ct process in a Serialized mode.

Type: Integer
Default: None

 

Request Headers

This implementation uses only request headers that are common to all operations. For more information please see the section Common Request Headers

 

Response Syntax:

HTTP/1.1 200
status: 200

 

Response Parameters

None

 

Error Response Syntax:

XML

HTTP/1.1 400
status: 400

<?xml version="1.0" encoding="utf-8"?>
<ErrorResponse>
	<RequestId>request-id</RequestId>
	<Errors>
        <Error>{Source\ConnectionString}:Source connection string status:InaccessibleDatabase</Error>
        <Error>{Destination\ConnectionString}:Destination connection string status:InaccessibleDatabase</Error>
	</Errors>
</ErrorResponse>

JSON

HTTP/1.1 400
status: 400

{
   "errors": [
        "{Source\ConnectionString}:Source connection string status:InaccessibleDatabase",
		"{Destination\ConnectionString}:Destination connection string status:InaccessibleDatabase"
	],
	"requestId": 20
}