Getting Started with Azure
- Getting started
- Step 1: Configuring HVR for Azure
- Step 2: Setting up your on-premises Hub and Source databases
- Step 3: Install HVR on-premises
- Step 4: Create source location
- Step 5: Create target location (including target database)
- Step 6: Setting up your Replication Configuration (“Channel”)
- Step 7: Initialize the channel
- Step 8: Perform Initial Load
- Step 9: Starting the replication
- Optional Step: Securing HVR communications with SSL
9 easy steps to configure HVR for Azure
HVR stands for High Volume Replicator. Our software offers real-time heterogeneous data replication software across platforms including Azure. With HVR you get everything you need for data replication including schema creation, initial data load, real-time change data capture and delivery, and compare/repair. A typical implementation requires an installation of the software on the source and on the target server.
HVR for Azure, available from the Azure marketplace, is an Azure VM image containing all necessary components to connect to Azure SQL and Microsoft SQL and Oracle, enabling replication from/into all supported on-premises platforms. With a few clicks, the Azure platform is ready to receive or send data through HVR.
HVR for Azure takes care of the firewall settings, necessary database drivers and required HVR components on Azure. Connecting from on-premises to Azure normally does not require any additional measures.
HVR uses a hub and spoke architecture. In an on-premises to cloud setup, the on-premises HVR installation will be nominated to be the hub. The hub share its installation with the source database or be installed on a separate server.
This Quick start guide explains the 9 easy steps required to get an HVR replication running starting from the installation of HVR on Azure and on-premises.
In the Azure portal, go to the Azure Marketplace, find and select “HVR for Azure” and press “Create”.
In step Basics: Select VM Disk type to be “HDD” as to be able to select the entry level machine types (A) in the next step. Enter the credentials you wish to use, select or create a resource group and determine the location you want HVR to run in (typically the same as your databases). Press “OK”.
In step Size: Select the appropriate machine type. Azure will suggest machine type A1, which is perfectly suitable to run the HVR for Azure. Press “Select”.
In step Settings, you will need to choose the storage account and network settings. Default Azure will create new ones. If this is your first time, the default settings are OK. Advanced users may want to reuse existing storage accounts and virtual networks. Press “OK”.
In step Summary, all your choices are listed for your reference. Press “OK”.
In step Buy, you will be shown the regular costs of the VM you are going to deploy. The HVR Software itself is priced €0.000, as the image does not contain a license. Press “Purchase”.
You will now see the VM image seeing deployed in the Marketplace. This will take a while. Once it is finished, the details of the created VM can be accessed in “Virtual Machines: in the portal.
Default, no DNS name is created for the IP address of the VM. To create a DNS name, Click on the IP address of the created VM (ldquo;Public IP address/DNS name label”. You will see the IP resource used for the VM (default “VMname”-ip). When accessing its “Configuration”, you can enter a DNS name for your VM.
In this start guide we will assume a Windows hub with an SQL Server database for both the source and HVR catalogs. HVR supports numerous other OS-es and databases as well.
The SQL server source database will probably exist, the hub database needs to be created. The same SQL server installation may be used for both, as the hub database is a minimal and static database holding only the catalogs.
To use log based capture on your SQL server source database, make sure SQL server replication components are installed and run the SQL server “Configure Distribution Wizard” to create a distribution database. Though HVR uses its own log based capture methods, these components are necessary to be able to instantiate replication tasks on SQL server.
If you created an empty source database for your HVR POC, you need to populate it with tables. For a quick start, this HVR has included in the distribution several example replication setups, called “demo channels”. Please find them in the directory %HVR_HOME%\demo. Demo01 contains 2 tables, dm01_product and dm01_order, which can be loaded into your channel. You may do so by using the following script:
You will have received instructions where to download the HVR installation files after registering on the HVR website info.hvr-software.com/azure-trial-request for Azure. Download the 64 bit windows installer ( hvr xxxxx windows x64 64bit setup.exe) and run the HVR installer. Accept the defaults, check creation of the environment variables.
Start the HVR GUI by clicking its icon. On first start HVR will ask for the credentials of the hub database (“register hub”). Select SQL server as database type and enter the details for your hub database you just created. Leave “connect to HVR on a remote machine unchecked”. HVR will create the necessary tables in the database and be ready for use.
To create a location for your on-premises source database, right click on location configuration and press new. The dialog for location properties appears. This database will probably be on the same server as your hub, so its location properties should look like this (enter the source database you created or an existing database).
Press Test to test if HVR can successfully connect to the database location.
On Azure, there needs to be a target database available. For convenience, let’s assume a Azure SQL database will be used. Create the database in the Azure portal (with a new or existing database server). Check the Azure SQL firewall configuration that it accepts connections from Azure resources (“Allow Access to Azure Services” )
In the HVR hub, create a location for your Azure database. This will be a remote location, so enter the Azure VM’s IP on node and its credentials:
Enter the Azure SQL database you just created and its corresponding database server. Make sure to append the username by the short database name separated with@ like in the example.
Test your connections by pressing the test connection button
Some common errors during connection test and their solution:
- F_JB0506: Connection attempt timed-out after 10 seconds : wrong VM name and / or portnumber.
- F_JG202C: Attempt to log on as user ” failed. : Wrong username /password for VM.
- F_JD21AE: Unable to connect to SQL Server database ” on node: wrong credentials for database.
The Replication definition can be found under “Channel Definitions”. It should be empty. Create your first channel by right clicking selecting “Channel Definitions” and selecting “New Channel”
The Channel should now be listed with 2 subitems, “Location Groups” and “Tables”. We are going to add location groups, actions and tables to the channel to complete the setup:
First create 2 location groups, one for source and one for target, called SOURCE and TARGET respectively, by rightclicking “Location Groups” and selecting “New Group”
For SOURCE, select your (MS SQL Server) source database location to be part of the group, for TARGET your Azure database location.
Next, we’ll add the actions required to tell HVR to do on the locations. For the SOURCE location group, the action is Capture, for the TARGET it is Integrate.
Right click on the SOURCE location group, press “New Action” and select “Capture”
No specific parameters need to be set so just press OK.
For the TARGET location group repeat the process but select Action “Integrate”
Please check the option /burst Integrate action catalog. This forces the operations to Azure to be performed in performance optimized mode transferring all data at once to Azure before applying it to the target
Right Click on “Tables” and select “Table Explore” to add tables to the channel. You will be asked which database to explore for tables, select your source database. You will be presented a list of tables, select the ones to include in the channel and press add.
Now the configuration of the channel is finished and all it left to let HVR create the necessary jobs and structures to replicate. Choose “HVR initialize” from the menu by right clicking on the channel name. Leave the radio button on Create or Replace Objects and all locations checked and press “initialize”
At this point, the replication jobs are created but not started.
If your source database already contains data, you will want to make sure this data is on your target as well. For this, HVR can be used too, including the creation of the necessary tables on the target to hold this data (target DDL creation).
Choose HVR Refresh and select your target (the source will be preselected). Check “create absent tables” “if mismatched” and “with index” for target DDL creation and finally press “Refresh”
This will not only populate your target with data but will also create the necessary tables and indexes to store this data in.
Got to the scheduler and start the jobs – with it the scheduler will be started.
Your replication is now running. Test it by performing some transactions on the source. You can check the replication results by running Compare. You can see replication statistics in graphs and reports by rightclicking the channel in the scheduler and choosing “Statistics”
The HVR for Azure Image creates a remote listener agent without network encryption. This is advisable only for POC environments. To setup your VM for production, the remote listener agent should be reconfigured to force encryption of all data.
- Login to your Azure VM using remote desktop
- Open a command window with administrator privileges and enter the following commands:
- Exit the Remote Desktop session to the Azure VM and add Action”LocationProperties /SslRemoteCertificate hvr” for your Azure location (or group) on your hub
- In this example we used the included certficate hvr. It is possible and advisable to use your own certificate instead, generate it using hvrsslgen (see the HVR manual section “Configuring Encrypted Network Connections”), copy the priv_key and pub_cert to the Azure VM and the pub_cert only to the hub, both in location %HVR_HOME%\lib\cert.