Before declaring a Replication
We should have:
- Primary database and Replicate database/s.
- Instances were set in sql.ini.
- RSSD database.
Create a primary database
Create a replicate database
Create a replicated table
- The replicated table must have a primary key!
Create connections to the primary and replicated server
Add a database to the replication system
Choose: "1. Replication Server"
Choose: "2. Add a database to the replication system"
In windows:
Replication Server Information
Choose: "RS SA password"
Ctrl-a Accept and Continue
In windows:
Database Information
Add the primary database
Choose: "2. Database Information"
For the primary database: set "5. Will the database be replicated" to "yes".
Ctrl-a Accept and Continue
Change RS user to sa.
Ctrl-a Accept and Continue
Execute the Replication Server tasks now? yRunning task: check the SQL Server.Task succeeded: check the SQL Server.Running task: verify users and their passwords.Verified that 'sa' can log into Replication Server 'RSFOG2'.Verified that 'sa' can log into Replication Server 'RSFOG2'.Task succeeded: verify users and their passwords.Running task: check the database.Verified that database 'RepL16TestPrimary' exists.Verified that SQL Server 'SERVERNAME' supports replication.Added maintenance user login 'RepL16TestPrimary_maint' to database 'RepL16TestPrimary'.Verified that maintenance user 'RepL16TestPrimary_maint' can log into SQL Server 'SERVERNAME'.Task succeeded: check the database.Running task: configure database for primary data.Loading script 'rs_install_primary.sql' into database 'RepL16TestPrimary'......DoneLoaded script 'rs_install_primary.sql' successfully.DoneGranting permissions on the lastcommit functions and rs_marker.Granting permissions on the lastcommit functions.Granted maintenance user permissions on the lastcommit functions and rs_marker.Granted replication role to maintenance userTask succeeded: configure database for primary data.Running task: configure the Replication Agent.Task succeeded: configure the Replication Agent.Running task: set connection to the database.Adding database 'RepL16TestPrimary' to the replication system.Successfully executed 'create connection'. Database 'RepL16TestPrimary' is nowmanaged by Replication Server 'RSFOG2'.Task succeeded: set connection to the database.Running task: start the Replication Agent.Task succeeded: start the Replication Agent.Configuration completed successfully.Press <return> to continue.
Add a replicate database
Do the same as for the primary database, with the following changes:
- For the replicate databases: set "5. Will the database be replicated" to "no".
- "Database Replication Agent" definition is not required.
Ctrl-a Accept and Continue, Approve to run the task.
Execute the Replication Server tasks now? yRunning task: check the SQL Server.Task succeeded: check the SQL Server.Running task: verify users and their passwords.Verified that 'sa' can log into Replication Server 'RSFOG2'.Task succeeded: verify users and their passwords.Running task: check the database.Verified that database 'RepL16TestReplicate' exists.Added maintenance user login 'RepL16TestReplicate_maint' to database 'RepL16TestReplicate'.Verified that maintenance user 'RepL16TestReplicate_maint' can log into SQL Server 'SERVERNAME'.Task succeeded: check the database.Running task: configure database for replicate data.Loading script 'rs_install_replicate.sql' into database 'RepL16TestReplicate'....DoneLoaded script 'rs_install_replicate.sql' successfully.DoneGranting permissions on the lastcommit functions.Granted maintenance user permissions on the lastcommit functions.Granted replication role to maintenance userTask succeeded: configure database for replicate data.Running task: set connection to the database.Adding database 'RepL16TestReplicate' to the replication system.Successfully executed 'create connection'. Database 'RepL16TestReplicate' is now managed by Replication Server 'RSFOG2'.Task succeeded: set connection to the database.Configuration completed successfully.Press <return> to continue.
In windows:
Create replication definition, publication and subscription
Create a replication definition
Create a publication
Create a subscription
Validation and checks for the connections and the definitions
- rs_helpdb can also be good: exec rs_helpdb.
Add database and table to replication
Grant permissions to maint user on replicated DB
Activate Rep Agent
View information about all definitions and declarations
In the primary database:
In the Replication Server:
In RSSD:
Check the replication
- Insert data to the primary table.
- Check if it was replicated in the replicate database.