Azure SQL Data Sync
2019 3 8일 금요일
오후 2:32
Azure SQL Data Sync
 
 
온프레미스 MS SQL DB Azure PaaS SQLdatabase sync
Sync type : 양방향, -> , <- 모두 가능함.
Sync 테이블, 컬럼 상세하게 지정가능함.
 
중간에 허브데이터베이스가 존재함.
온프렘 DB ---- Azure 허브 DB ---- Azure SQL DB
 
시작은 한번에 하나의 소스 데이터베이스만...
동기화 그룹을 만들 때 단 하나의 데이터베이스에 있는 데이터부터 시작합니다. 여러 데이터베이스에 데이터가 있으면 SQL 데이터 동기화는 각 행을 해결해야 하는 충돌로 처리합니다. 이 충돌 해결이 초기 동기화를 느리게 만드는 원인입니다. 여러 데이터베이스에 데이터가 있으면 데이터베이스 크기에 따라 초기 동기화가 며칠부터 몇 달까지 걸릴 수 있습니다.
 
변경 내용이 전파되지 않으면 어떻게 될까요?
·         동기화 그룹이 경고 상태로 표시됩니다.
·         세부 정보는 포털 UI 로그 뷰어에 표시됩니다.
·         문제를 45일 내 해결하지 않으면 데이터베이스가 만료됩니다. (45일 이상 오프라인일 경우 만료로 설정)
 
기본 키
동기화 그룹의 각 테이블에는 기본 키가 있어야 합니다. SQL 데이터 동기화 서비스는 기본 키가 없는 테이블을 동기화 할 수 없습니다.
 
·         전체 자릿수가 28보다 큰 소수 또는 숫자 열이 있는 경우, SQL 데이터 동기화에서 동기화 중에 전환 오버플로 문제가 발생할 수 있습니다. 소수 또는 숫자 열의 전체 자릿수를 28 이하로 제한하는 것이 좋습니다.
 
 
Requirements • Each table must have a primary key. • A table cannot have an identity column that is not the primary key. • The names of objects (databases, tables, and columns) cannot contain the printable characters period (.), left square bracket ([), or right square bracket (J).
 
 
Summary • Start with an Azure SQL DB • Go to the "Sync to other databases" blade • Set up a Sync group • Set your sync frequency and conflict resolution • Add sync members (another Azure SQL DB and\or on-prem Instance) • Install sync agent for on-prem instance • Submit agent key (aka copy Azure key to your on-prem agent) Register your local instance • Define which tables should be kept in sync
 
 
시스템 생성 대체 텍스트:
 
 
New sync group Create Not Completed Add sync members Configure group Not Complete X Create Data Sync Group Sync Group Narne Sync Database ContactManagaDb (Sen«•. cmsglser•verviw Automatic Sync on Off Sync Frequerxy ' Conflict Resolution Member win Minutes
 
 
양방향으로 선택 
New sync group 1 Create sync group None Selected 3 Configure group Not Complete X Select sync members Cont.actManag«Db Montrr Add an Azure Database NO Azure SQL database available Add an On—premises Database No On-premises database available X -1 Configure Azure Database Sync Memb« Narne Microsoft Azure Internal Consumption • SQL Server • Azure SQL Database • Syrx Directions Bi-directional Sync To the Hub From the Hub
 
 
온프레미스 DB 선택, 에이전트 설치
New sync group I Create group None Selected 3 Not Complete X Select sync members ContactMan"erDb Montrr Add an Azure Database AzureDB Add an On—premises Database No On-premises database available X Configure On-Premises Choose the Sync Agent Gateway Sync Gateway installation is requim • Select the Database Notyet selected X Select Sync Agent Existing "ents O Create a ag<nt Client Sync Agent 1 ft is rkcessary to install the sync agent client to allow the on premises database connect to Azure database. Download Name 2 Generate agent key 3 Use this kW instaued sync agent to register x a -1
 
에이전트
설치 시 Requirement 잘 확인
Choose the download you want File Name DataSyncAgent_LicenseTerrns.rtf en- us\SQLDataSyncAgent-2.O-x86- ENU.msi 87 KB go MB
 
 
kirbyslocalagent Create Sync Agent kirbyslocalagent created. Client Sync Agent It is necessary to install the »•nc agent client to allow the on premises database connect to your Azure database. Download 2 and Generate an agent key 3 Use this key in insta"ed "c agent to register this agent.
 
에이전트키를 복사해와서,
실제 에이전트 구동하여 넣어줄것
Microsoft SQL Data Sync 2.0 Microsoft SQL Data Sync 2.0 Su it Age Configuration Please enter a valid agent key to proceed. The key nust be generated from SQL Data Sync web Databases State Agent Gy Message
 
Microsoft SQL Data Sync 2.0 Sync Metadata Database Configuration lajRpLmRhdGFiYXNlLndpbmRvd3Mubm HQ29udGFjdE1hbmFnZXJEYg Login krepko
 
 
성공 후 온프렘 DB register
Microsoft SQL Data Sync 2.0 Microsoft SQL Data Sync 2.0 Reg Databases Unregister Edit Credentials Submit Agent Key Configuration Ping Sync Service SQL Sync Connected Agent
 
Sync 2.0 SQL Server Configuration I 16\kirby cont*tmanagerdb
 
온프렘 DB 등록됨.
O Microsoft SQL Data Sync 2.0 Microsoft SQL Data Sync 2.0 Register Unregister Credentials Machine kirbrOI 1816\kir Submit Agent Key Reachable Ang Sync Service Message contactmanagerdb SQL Sync Connected
 
 
다시 Azure로 돌아와서…
온프레미스 DB 상세 선택
Configure On-Premises Choose the Sync Agent Gateway kirbyslocalagent Select the Database Not yet selected > SelectDatabase Men ber Name Orrp!ggmises databases connected kirby-Ol Bi-directional Syru x
 
 
 
다 되고나서,
테이블을 눌러보면.
kirbysdemogroup Sync Stop Properties Tables X Delete Filter Logs Refrgh Logs Schema information obtained successfully. Database provisioning failed with the exc+tion Error cw Sctwna information obtained successfully. Database provisioning failed with the exception •Invahd column Database provisioning failed with the exception •Invalid column Database failed With the exception •Invahd dumn Tables Select a database Hub base Select tables to sync (tables without primary key are rut supported) d bo dbo.Acrne_ltems dboAspNetR01es dbo.AspNet1JserC1aims dboAspNetus«Logins dboAspNetUserR01es dbo AspNetUs«s dba Contacts dbo.ContactsLoad dbo 4 2 4 3 2 12 8 9 8 6 Refresh Schema elect fields to ync dbo.Contacts Zip DATA TYPE Primary Key nvarchar( 128) Error 07/21/17123553 PM 12:3521 PM 07/21/17 12:3409 PM 07/21/17 12:3303 PM PM 07/21/1712:23:17 PM MEMBER DATABASE Co ntactMa nagerDb/cmsm co ntactma ContactManagerDb/cmsw ContactManager co n tactMa
 
Select a database AzureD3 Select tables to sync (tables without primary key are rut supported) Refresh Schema elect fields to ync dboContacts dba ._MigrationHistory dboAspNetR01es dbo.AspNetUserLogins dboÄspNetUs&R01es dba Contacts dba. Dim Employe dba Store 4 2 4 3 2 30 DATA Primary Key nvarchar(max) nvarchar(128)
 
 
 
kirbysdemogroup X Proper-ties Sync Stop X filter Logs Refreh Logs Select sync members Hub ContactManagerDb Add an Azure Database AzureDB Add an On-Premises Database onpremsql x Databases Tables
 
 
 
ContactManagerDb - Sync to other databases Ill Search (Ctrl*" Overview Activity Tags Diagnose and solve problems Quick start tier (scale DTUs) Geo—Replication Auditing & Threat Detection Dynamic Data Masking Transparent data encryption Syru to other databases Properties New Sync Group Refresh Data Sync wd' be retired from the classic portal on July 1st. Existing Data Sync will be migrated. Click here for information on what you need to do next. Sync Group STATtß Sync Agent
 
 
 
 
Microsoft OneNote 2016에서 작성





+ Recent posts