API Actions – Replication Mgmt

Documentation

Documentation Index

CloudBasic:

 

API Documentation:

Rest API Actions - Replication Management

<< Back to main Rest API Documentation page

Create SQLServer-to-SQLServer Replication

Request Syntax – using XML parameter encoding:

POST /api/Replication/CreateSqlToSqlReplication 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"?>
<CreateReplicationRequest>
<ReplicationMethod>ContinuousWithAutoSeeding</ReplicationMethod>
<ReplicateLoginsUsersAndRoles>false</ReplicateLoginsUsersAndRoles>
<ReplicateTablesOnly>false</ReplicateTablesOnly>
<ParallelTablesLimit>5</ParallelTablesLimit>
<RebuildIndexes>false</RebuildIndexes>
<IgnoreDbDependencies>true</IgnoreDbDependencies>
<Source>
<ConnectionString>Data Source=your-source-db-server;Initial Catalog=your-source-db;Persist Security Info=False;User ID=user-name;Password=******;Connect Timeout=1280</ConnectionString>
<EncryptDataInTransit>false</EncryptDataInTransit>
<ChangeTrackingRetentionPeriod>2 DAYS</ChangeTrackingRetentionPeriod>
</Source>
<Destination>
<ConnectionString> Data Source=your-destination-db-server;Initial Catalog=your-destination-db;Persist Security Info=False;User ID=user-name;Password=******;Connect Timeout=1280</ConnectionString>
<EncryptDataInTransit>false</EncryptDataInTransit>
<ReplicateCompatibilityLevel>true</ReplicateCompatibilityLevel>
<AddUpdateTimestamp>false</AddUpdateTimestamp>
</Destination>
</CreateReplicationRequest>

 

Request Parameters

 

Parameter   Description Required
ReplicationMethod ContinuousWithAutoSeeding Continuous replication w/ automatic seeding and change tracking activation
Replicate entire SQL Server or a single database w/ automatic seeding (no backup/restore required; destination/read-replica databases are created automatically). Upon successful completion of the seeding, a change tracking schedule (under \Replication\Replication Schedules) will be configured automatically.
This option is suitable for replicating smaller size databases. It can be utilized to replicate large size databases if SQL Server backup/restore is not available.
All RDS and EC2 SQL Server version 2008 and above, and including Web Edition are supported.
Replication scenarios include but are not limited to continuous replication of:
• On-Premise, RDS or EC2 SQL Server to one or multiple RDS or EC2 SQL Server instances for Reporting or DR.
• RDS to one or multiple RDS Multi-AZ Readable-Replica instances for HA and/or to offload primary
• RDS to one or multiple RDS Cross-Region (Multi-AR) Readable-Replica instances located in same or multiple regions for DR and/or Data-Locality.
Yes
ReplicateLoginsUsersAndRoles Indicates whether the users and roles will be replicated from the source database instance to the destination database instance.
Type: String
Default: None
Valid value: true/ false
 Yes
ReplicateTablesOnly Indicates whether the replication process will replicate all data or only the structure of the database instance.
Type: String
Default: None
Valid value: true/ false
Type: String
Default: None
 Yes
ParallelTablesLimit  Indicates the maximum number of parallel table replications at any given moment. Instances with insufficient performance can get saturated if a large number of parallel table replications is requested.
Type: Numeric
Default: None
 Yes
RebuildIndexes  Indicates whether the indexes should be rebuilt in the destination database instance.
Type: String
Default: None
Valid value: true/ false
 Yes
IgnoreDbDependencies  Indicates whether the cross-database dependencies should be enforced or not in the destination database instance.
Type: String
Default: None
Valid value: true/ false
 Yes
Source ConnectionString A valid connection string to the source database instance.
Type: String
Default: None
 Yes
EncryptDataInTransit Indicates whether data in transit should be encrypted.
Type: String
Default: None
Valid value: true/ false
Yes
ChangeTrackingRetentionPeriod Specifies the period that Change Tracking data is saved for before being automatically purged.
Type: String
Default: None
Valid values: 12 Hours, 1 Day, 2 Days, 3 Days, 4 Days, 5 Days, 6, Days, 7 Days, 8 Days
Yes
Destination ConnectionString A valid connection string to the source database instance.
Type: String
Default: None
 Yes
EncryptDataInTransit Indicates whether data in transit should be encrypted.
Type: String
Default: None
Valid value: true/ false
Yes
ReplicateCompatibilityLevel   Yes
AddUpdateTimestamp   Yes
IsAdmin   Indicates whether the user will be granted administrative privileges or not.
Type: String
Default: None
Valid value: true/ false
 Yes

 

Request Headers

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