In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
How to use Navicat Premium 12 to automatically perform database replication, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.
Download the latest version of Navicat Premium
Navicat Premium is a management tool that can connect to multiple databases. It allows you to connect to MySQL, Oracle and PostgreSQL databases simultaneously with a single program, making it more convenient to manage different types of databases.
Unlike synchronization, synchronization is an one-time process that synchronizes the schema and data of two databases, and replication is a continuous (automatic) process of replicating data between two databases (although schema updates are also possible). Replication can occur asynchronously so that there is no need to establish a permanent connection between the two databases, or to replicate during off-peak hours (for example, late at night, where there is little traffic on the database server).
The primary role of replication is to create a consolidated repository of all user databases and / or to propagate the same level of information among all users. In both cases, the result is a distributed database where users can access data related to their tasks without interfering with the work of others. Database replication is called normalization in order to eliminate data ambiguity or inconsistency between users.
Snapshot replication
As mentioned above, snapshot replication keeps two databases synchronized by replicating data from one database to another on the same or different servers. This is the simplest of the three types.
Create a data synchronization job
You must first create a data synchronization profile to automate it as a replication process. The steps to achieve homogeneous and heterogeneous synchronization in Navicat Premium 12 are described in the database synchronization strategy white paper. For the purposes of this tutorial, we will use the first example to synchronize Sakila and Sakila2 databases.
Tip: once you have created the Sakila database, you can create the Sakila2 database by right-clicking the connection in the navigation pane and selecting New Database. Then enter the database name ("sakila2") in the pop-up window.
To open the data synchronization wizard:
Select Tools-> Data Synchronization from the menu bar.
The Data Synchronization Options tab contains only a few check boxes for comparison options. We can keep it as it is:
The next step of the data synchronization wizard is to map the table. You can select the target table through the drop-down list. In this case, we do not need to provide any mapping instructions because the tables in the two databases are the same:
After comparing the data, the window displays the number of records that will be inserted, updated, or deleted in the target table. If you do not want to include tables with the same data or different structures, that is, tables that are not updated, you can uncheck the "Show identical table and others" option. There are also check boxes that deselect tables or actions that you do not want to apply to the target.
Selecting a table in the list displays the data for the source and target tables in the bottom pane. Different values between the source and destination are highlighted. In the top pane, you can uncheck records that you do not want to apply to the target.
Differential option
You can select the type of difference to display from the drop-down list. The following are possible options:
Difference: displays all records that are different in the source and target tables.
Insert: only records that do not exist in the target table are displayed.
Update: only records that exist in source and target tables with different values are displayed.
Delete: displays only records that do not exist in the source table.
Same: displays records with the same value in the source and target tables.
All Rows: displays all records in the source and target tables.
In our example, selecting "Update" or "Same" displays zero rows because there are no rows to update (insert only) and there are no identical rows:
As before, click the Deploy button to generate and display the deployment script:
Like previous screens, this screen contains a "Save Profile" button that allows you to save settings for future use. This particular screen also has a button to save the deployment script.
You can still recompile both databases or continue with the deployment script. There is a check box for continuing in the event of an error so that deployment is not stopped when an error is encountered.
When the script is executed, you can check its progress in the message log. It shows the number of records processed and the percentage completed:
After closing the dialog box, we can confirm that the sakila2 database contains data:
Don't forget to save the configuration file, because batch jobs will use it.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.