To initialize a Mirror Replication Agent instance, use the ra_init command, which initializes the Mirror Replication Agent system database by reading schema information and transaction log location information from the primary Microsoft SQL Server database. The ra_init command also causes the pdb_automark_tables and pdb_auto_create_repdefs settings to take effect.
WARNING! The default value for the pdb_auto_create_repdefs configuration property is true, which will cause a replication definition to be created for each table that is marked for replication during processing of the ra_init command. If you have thousands of tables, this may result in significant additional execution time. To avoid this additional execution time, set the pdb_auto_create_repdefs configuration property to false before invoking the ra_init command. When ra_init execution completes and before replicating, execute the rs_create_repdef all command to create your replication definitions.
For a production setup, initializing a Mirror Replication
Agent instance should coincide with creating a backup copy of data
used to materialize the standby database.
To initialize a Mirror Replication Agent instance
Invoke the ra_init command:
ra_init go
A message should indicate that the procedure was successful. The Mirror Replication Agent instance is now running and has been initialized.