Database synchronization Issues
1. There is a primary database server A and another database server B, the client first accesses database B, when the B database server is hung up to access a, when DML operations on database B, while the A is updated, if the communication between A and B fails, the updated data is stored in the temporary table, when the communication is resumed, Automatically update and delete the temporary data, also when B is not available, the data temporarily exists in a, B to restore the connection, a to B update, how to implement?
Database Synchronization Update Step: Mainly uses the MSSQL database replication function (Local publishing and local subscription to complete the primary database server and database server synchronization)
Conditions: 1. Two PC, Environment: Win7 operating system +mssql2008, one PC master database server (publish), another PC to do database server (subscription). Note: 1. Ensure that the MSSQL2008 of both PCs can remotely access each other's database 2. The snapshot file will be saved with FTP (see below)
Start: Start the SQL2008 database service on the primary database server as
Connecting to the SQL2008 server
Create a new database in the SQL2008 database on the primary database server named "Db_test" and a table msgs,msgs the fields in the table as
The database and the table are created well.
Create a local publishing step in replication as follows:
To build an FTP snapshot file, you need to set up an FTP site as follows:
The condition is: To turn on FTP 21 port
1. Start Internet Information Services (IIS) Manager
To continue publishing: Go back to the database---Find the publish "Yangfeizai" action we created
The release is now complete.
Then create the subscription on the database server: steps below
SQL Server 2008 Replication publication Subscription (data synchronization)