What is the use of “nolock” option in the command “activate config”?
The activation in Shareplex 7.6 and up uses “live” option, meaning that the activation process will attempt to lock a table and if the table is currently involved in a transaction or if there is an exclusive lock placed on it, then the activation process will wait for the lock to be released and in the process will keep retrying to bring it in replication until the timeout occurs as determined by the setting of the parameter SP_OCF_LOCK_WAIT_TIME. If the timeout occurs, there will be an error condition whereby the table will not be brought in replication. To avoid such errors, one can use the “nolock” option in activation. This is a new option in activation which did not exist in earlier Shareplex versions. The syntax is:
sp_ctrl>activate config <config_file_name> nolock
When using this option, the activation will not attempt to acquire any lock on the source table and will bring it in replication regardless of any open transaction or presence of exclusive lock on it. In case there are any open transactions when the table was brought into replication, then the existing DML pertaining to such open transactions will of course be ignored, but subsequent DML in those open transactions will be captured since the table is now a part of replication. This will result in partial transactions captured by SharePlex. The thing to note is that not all objects are brought into the fold of replication instantaneously so there can be objects in replication with partial transactions and there can be others that will not miss any transactions depending on how busy the source database is and when an object was brought into replication. Due to this the target table may be out of sync with the source table and may require means like repair, copy, etc, to sync the target table.
The parameter is akin to the setting of environment variable SP_OCF_SKIP_ANALYZE to 1 in prior Shareplex versions.
Related solutions: SOL75667 and SOL75675