REPL_PUB_INIT_IMAGE — create initial image of publication on publisher


REPL_PUB_INIT_IMAGE ( in publication varchar ,
in image_file_path varchar ,
in bytes_per_file integer );


The image creation process forces checkpoint and runs in atomic mode.

If image_file_path does not contain path components (slashes or backslashes), image slices are stored in one of backup directories defined in virtuoso.ini using round-robin strategy.

This function is used to create image of publication to be replayed on a subscribed upon initial setup. This can be used when publication data is so large to be copied via repl_init_copy() which uses VDB operations. The image file(s) created by this function must be loaded on subscriber with replay() function in order of their creation (if image is split on to a several files).



publication account name.


full path to the image file where to store the initial image of publication.


at which bytes count to split file into next slice.


Example24.325.Creating and loading of the initial image

This shows creating a image with inital data of the published items and store in the 'tbl_pub.log' file.

SQL> DB.DBA.REPL_PUB_INIT_IMAGE ('table_publication', 'tbl_pub.log', 1000000);

Furthermore the image can be loaded on a subscriber. Note that this command MUST be issued on the subscriber side. Note that REPL_PUB_INIT_IMAGE() will make more files when size of the initial file is greater than 1Mb, so in that case the additional files will be named tbl_pub.log.N where N is a sequence beginning from 1 and they also need to be loaded.

SQL> replay 'tbl_pub.log';
... if there a more than one image file load sequentially ...
SQL> replay 'tbl_pub.log.1';