- Getting Started with Azure
Getting Started with Azure
- Getting Started
- Step 1: Configuring HVR for Azure
- Step 2: Setting up your on-premise Hub and Source databases
- Step 3: Install HVR on-premise
- 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
Our software offers real-time heterogeneous data replication 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 data validation and 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 for Azure is available in both a free edition (“Bring Your Own License” aka BYOL) as well as paid-for editions that include a license. This license covers not only your target (running on Azure) but also one or more sources (depending on edition). The BYOL version will only function if you already have a valid HVR license, or you can request an HVR trial license at Azure Trial Request.
HVR uses a hub and spoke architecture. In an on-premise to cloud setup, the on-premises HVR installation will be on the hub. The hub share its installation with the source database or be installed on a separate server.
This Quickstart Guide provides the nine easy steps required to get an HVR replication running starting from the installation of HVR on Azure and on-premise.
In the Azure portal, go to the Azure Marketplace, choose the version most appropriate for you: “Bring Your Own License”, “1 source” or “5 sources”. Note the 1 source and 5 source variants include an HVR license and come at an additional cost. Select “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 plus the price of the HVR license. The BYOL version is priced $0.00, 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 “DNS Name” / “Configure” at the Overview page of the VM. You can then 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:
Instructions on how to download HVR installation files can be found when logging in to your Azure VM using remote desktop and open the getting started link on the desktop.
You may also have received instructions where to download the HVR installation files after registering on the HVR website. 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. If you have an HVR license (when using HVR BYOL or doing a trial), copy it to %HVR_HOME%lib.
If you have acquired a paid edition of HVR for Azure like “1 source” or “5 sources”, the license will be activated later on when adding a target location.
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.
Ignore any warnings regarding missing license for now if you have a paid edition of HVR for Azure. They will disappear once you have added the HVR Azure VM as a target location (next step).
The HVR for Azure Image creates a remote listener agent with network encryption. This requires an SSL certificate to be downloaded to your hub.
Log in to your Azure VM using remote desktop and open the getting started link on the desktop. Copy the contents of the certificate and save into a certificate file (.pub_cert) on your hubmachine in %HVR_HOME%libcert.
On Azure, there needs to be a target available. For convenience, let’s assume an 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 you created in step 3, create a location for your HVR for Azure VM connecting to your just created Azure database. You do this by right-clicking on location configuration and pressing new. The dialog for location properties appears.
If you have acquired a paid Azure for HVR variant, also check box /CloudLicense. This will instruct the hub to use the license from the VM you just created. Do NOT try to copy the license file from the VM physically yourself as it is tied to the VM. The VM needs to be accessible from the hub at all times.
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.
Now create location(s) for your on-premises source database(s). Again, right click on location configuration and press new. The dialogue for location properties appears. Enter the source database you created or an existing database. When this database is on the same server as your hub, its location properties should look like this (no remote machine credentials).
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 two 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 right-clicking “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 catalogue. 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.
Go 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 right-clicking 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 set up 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%libcert.