# 22. Virtuoso Functions Guide - REPL_PUB_INIT_IMAGE

Chapter Contents | Prev | Next
Keyword Search:
www.openlinksw.com
docs.openlinksw.com
Book Home
Contents
Preface
Virtuoso Functions Guide
Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Remote SQL Data Source
Replication
repl_add_cr
repl_add_dav_cr
repl_add_snapshot_cr
repl_create_snapshot...
repl_create_snapshot...
repl_drop_snapshot_p...
repl_drop_snapshot_s...
repl_grant
repl_init_copy
repl_init_snapshot
repl_publish
repl_pub_add
repl_pub_init_image
repl_pub_remove
repl_revoke
repl_sched_init
repl_server
repl_server_name
repl_snp_server
repl_stat
repl_subscribe
repl_unpublish
repl_unsubscribe
repl_update_snapshot
repl_disconnect
repl_new_log
repl_purge
repl_server_rename
repl_status
repl_sync
repl_sync_all
repl_text
repl_this_server
sub_schedule
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web Server & Internet
XML
XPATH & XQUERY
Functions Index

## 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);
Description

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 cration (if image is splitted on to a several files).

Parameters
publication – publication account name.
image_file_path – full path to the image file where to store the initial image of publication.
bytes_per_file – at which bytes count to split file into next slice.
Example
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 comman 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 sequentialy ...
    SQL> replay 'tbl_pub.log.1';
    ...

See Also

sub_schedule()

repl_disconnect()

repl_grant()

repl_init_copy()

repl_new_log()

repl_pub_add()

repl_pub_remove()

repl_publish()

repl_revoke()

repl_sched_init()

repl_server()

repl_server_rename()

repl_stat()

repl_status()

repl_subscribe()

repl_sync()

repl_sync_all()

repl_text()

repl_this_server()

repl_unpublish()

repl_unsubscribe()