Replication Add-In can be used to transfer part of HyperDoc database from one place to another. Two communication mediums are supported: Internet and physical disk transfer. It is possible to select what part of database is replicated. It is possible to transfer only the data that is missing or not up to date at the destination. When database configurations differ significantly between source and destination, replication is impossible. When database configurations differ slightly between source and destination, only the data that fits the destination is sent there.
Replication profile is a set of replication options that defines what part of the database is transferred and what is the destination of this transfer. Replication profiles are prepared by system integrators specifically for given application environment and requirements. If you need to prepare your own replication profile please refer to the section called “Replication Profiles”.
Replication Add-In works in one of two modes: simple and admin. Simple mode is activated for HyperDoc users that are not HyperDoc administrators. Admin mode activated for HyperDoc administrators. In simple mode one command is available: Execute Replication. This command presents the list of available replication profiles, allows to select one of them and execute it i.e. perform replication export operation according to selected profile. In admin mode two commands are available: Replication Profiles Management and Import Replication Package. Replication Profiles Management command presents the list of available replication profiles and allows to perform following subcommands on this list: Execute, New, Export and Delete. Execute subcommand works like in simple mode. New subcommand imports profile from a file. Such files are prepared by system integrators. Export subcommand allows to export profile to a file. Delete subcommand deletes replication profile from the database. Import Replication Package command allows to import from selected directory the data prepared by executing replication profile, which was configured to store replicated data on disk.
The simple disk-based replication is performed in two steps. First on the source side you select Execute Replication … command for a profile that was prepared to store data on disk. Replication Add-In creates some files in replication folder. This folder name can be hard-coded in replication profile or you may be asked to enter it. Make sure that this folder is empty before replication. Then you make this folder contents accessible on the destination side, for example by copying files through FTP or CD. On the destination side you select Import Replication Package… command from the Add-Ins menu. On the Replication Options – Import form you select replication folder and press OK button. Replication folder is the folder you copied replication output to.
If there is a HyperDoc Internet Server 4.8 (or higher) installed on the destination database and both source and destination databases are connected to the same network, e.g. the Internet, it is possible to use Internet-oriented replication profiles.
New replication feature has been added to Replicator Add-in - replication of Security Classes. To enable this option please add following entry to your replication profile:
Security = “1”
Setting this option to "1" causes replication of all SecurityClasses and UserRights associated with SecurityClasses.
This add-in is installed with HyperDoc.
To enable this Add-in add new line to database in table HdocAddIns:
In field ProgID write in ReplicatorAddIn.App.
ProgID | DisplayName |
ReplicatorAddIn.App |
HDocRepProfiles table is needed to run ReplicatorAddIn.
Execute the following SQL statement to create HDocRepProfiles table.
CREATE TABLE HDocRepProfiles ( ID VARCHAR(50) NOT NULL, RepProfile MEMO NOT NULL, Description VARCHAR(255), CONSTRAINT HDocRepProfiles_PK PRIMARY KEY (ID) );
CREATE TABLE HDocRepProfiles ( ID VARCHAR(50) NOT NULL, RepProfile TEXT NOT NULL, Description VARCHAR(255), CONSTRAINT HDocRepProfiles_PK PRIMARY KEY (ID) );
Replication profile is a set of replication parameters and options gathered in form of an XML file. It describes what and where should be replicated. Before explaining its structure in detail, let's see a general replication profile scheme. If attribute default value is "0", then it has this value in following example. The same with "1". Other values are examples. All is optional unless specified otherwise.
<?xml version="1.0"?> <ReplicationProfile Incremental="0" Filter="0"> <ReplicationParams> <ObjectList ObjSetID="<numeric object set id>"> <ObjectType Name="<object type name>"> <DBObject> <ObjectAttr Name="<key field name>" Value="<key field value>" /> </DBObject> </ObjectType> <HObject ObjID="<very cryptic object id>" /> <CurrentObject /> <CurrentObjectSet /> </ObjectList> <Hierarchies> <Hierarchy Name="<hierarchy name>" /> </Hierarchies> <Options AllObjects = "0" AllDocsForObj = "0" SpotDocLinks = "0" ExtendDocSet = "0" SubTrees = "0" ObjectSets = "0" ObjectSetLinks = "0" Spots = "0" Redlining = "0" Presentations = "0" SymbolLibrary = "0" Icons = "0" PrintTemplates = "0" ConnectedObjectSets = "0" ObjectSetsContents = "0" FullParentData = "0" FullObjSetContentsData = "0" AllVersions = "0" DocSetsMode="0" ContainedObjectSets = "0"/> </ReplicationParams> <Destination Type="< 'file' or 'http' >" SaveSignature="<full xml file name>"> <http URL="<destination url>" UserName="<user name>" Password="<user password>" Connection="<HyperHouse connection name>" Filter="<full xml file name or url>" ReferenceSignature="<full xml file name or url>" NumOfRetries="<number of automatic retries before raising an error>" DelayBetweenRetries="<base delay between retries in seconds>" /> <file Directory="<full destination directory name>" Package="<package xml file name>" Filter="<full xml file name or url>" ReferenceSignature="<full xml file name or url>" </Destination> <UserInput Incremental = "0" Filter = "0" UserName = "0" Password = "0" Options = "0" URL = "0" Connection = "0" ObjectList = "0" Hierarchies = "0" FilterString = "0" RefSignatureString = "0" Directory = "0" Package = "0" /> </ReplicationProfile>
- <CurrentObject />
This element element represents the HyperDoc current business object. While using a profile with <CurrentObject /> element you must make sure, that proper object is the current one.
- <CurrentObjectSet />
This element element represents the HyperDoc current object set. While using a profile with <CurrentObjectSet /> element you must make sure, that proper object set is the current one.
- <DBObject>
This element represents single business object identified by its object type, primary key field name and value.
- <Destination>
<Destination> element controls replication destination parameters - mainly where replication is directed. It can have two attributes: 'Type' and 'SaveSignature'. 'Type' attribute is obligatory and can have one of two values: "file" and "http". Value "file" means that the replication destination will be a disk directory indicated in 'Directory' parameter, which is in this case obligatory. Value "http" means that the replication destination will be HyperDoc Internet Server indicated in URL parameter, which is also in this case obligatory. 'SaveSignature' attribute is optional. It is full xml file name. It indicates where replicated data signatures should be stored. They can be used as 'ReferenceSignature' for the next replication, if it is incremental. <Destination> element must have exactly one of two child elements: <http> and <file> (according to the value of its 'Type' attribute).
- <file>
<File> element has one obligatory attribute: 'Directory', which defines the replication destination. Other parameters of <file> element are: 'Package', 'Filter' and 'ReferenceSignature'. 'Package' attribute is the full name of output file with a list of other output files. 'Filter' and 'ReferenceSignature' parameters are like in 'http' element.
- <Hierarchies>
'Hierarchies' element is necessary when there is no 'HObject' element. 'Hierarchies' element lists all hierarchies to be replicated. This is needed, because with each replicated object, its parent objects are also replicated and the set of parent objects depends on the set of replicated hierarchies. If there are 'HObject' elements, then the list of replicated hierarchies is derived from them and does not need to be explicitly included. However, it can be - to specify more hierarchies.
- <HObject>
This element represents single business object identified by very cryptic text string.
- <http>
'Http' element has three obligatory attributes: 'URL', 'UserName' and 'Password'. 'URL' points to destination HyperDoc Internet Server. 'UserName' and 'Password' allow to login to this server. 'Http' element has also optional parameters: 'Connection', 'Filter' and 'ReferenceSignature'. 'Connection' parameter defines HyperHouse connection. 'Filter' is a full file name or an URL to HTTP page returning destination DB configuration for filtered replication. 'ReferenceSignature' is a full file name or an URL to HTTP page returning last created signature for incremental replication. 'Filter' and 'ReferenceSignature' are not necessary in standard HyperDoc Online installation.
- <ObjectAttr>
This element represents primary key value of a single business object. It has two obligatory attributes: 'Name' and 'Value'. Name="<key field name>" The value of this attribute of <ObjectAttr> element is the primary key field name of given object. Value="<key field value>" The value of this attribute of <ObjectAttr> element is the primary key field value of given object.
- <ObjectList>
<ObjectList> element contains objects which define, what part of DB should be replicated. These objects can be defined in one of five forms: - as object set identified by 'ObjSetID' attribute, - as <DBObject> elements, - as <HObject> elements, - as <CurrentObject/> element, - as <CurrentObjectSet/> element. <DBObject> elements are grouped with <ObjectType> elements. <ObjectType> element contains <DBObject> elements representing objects of the same type. Each <DBObject> is identified with <ObjectAttr> element containing primary key field name and value of this object. <HObject> is identifed with 'ObjID' attribute, which value is complex internal representation of object identification and should not be interpreted. If 'AllObjects' parameter is not set to "1", then there should be at least one <DBObject> or <HObject> element or 'ObjSetID' attribute should be specified. If 'AllObjects' parameter is set to "1", then <ObjectList> element is not necessary and almost ignored (<HObject> elements can only extend replicated hierarchy list).
- <ObjectType>
This element is used to group <DBObject> elements of the same type.
- <Options>
<Options> element is optional. It can have numerous attributes. They all determine what is replicated.
- <ReplicationParams>
<ReplicationParams> element controls what is replicated. It has three child elements: <ObjectList>, <Hierarchies> and <Options>. The last two are optional.
- <ReplicationProfile>
This is the main element of each replication profile.
- <UserInput>
UserInput element is optional. It groups names of parameters, which values are intended to be entered manually by a user when replication profile is used to perform replication. These parameters correspond to parameters with the same names in other parts this document. If given parameter in the <UserInput> element is set to "1", then user will be asked to enter a value for replication parameter with the same name.
- AllDocsForObj="0"
When this option is set to "1", all documents connected to indicated objects are replicated. Otherwise only one document per object is replicated: the default one or (if there is no default document defined) the first from the list of connected documents.
- AllObjects="0"
Setting this option to "1" causes replication of all objects belonging to indicated hierarchies.
- AllVersions="0"
When this option is set to "1", all versions of physical documents to be replicated are replicated. Otherwise only current versions are replicated.
- ConnectedObjectSets="0"
If this option is set to "1" and 'ObjectSets' option is set to "1", then only object sets connected to indicated objects are replicated.
- Connection="<HyperHouse connection name>"
This attribute is optional. It defines HyperHouse connection and is used in HyperHouse mode only.
- Connection = "0"
If this attribute of <UserInput> element is set to "1", then before execution of this replication profile user will be prompted to provide a value for this parameter. See the description of 'Connection' parameter above.
- ContainedObjectSets="0"
If this option is set to "1" and 'ObjectSets' option is set to "1", then only object sets with all contained objects to be replicated anyway are replicated.
- DelayBetweenRetries="<base delay between retries in seconds>"
This attribute is optional. It defines base time period between subsequent retries. Note: actually each try extends delay by this value - so effective delay is: NumberOfTry * DelayBetweenRetries.
- Directory="<full destination directory name>"
This attribute is obligatory. It defines the replication destination.
- Directory = "0"
If this attribute of <UserInput> element is set to "1", then before execution of this replication profile user will be prompted to provide a value for this parameter. See the description of 'Directory' parameter above.
- DocSetsMode="0"
This option controls document set export and can have one of three values: 0 - no document sets are exported 1 - only those sets are exported, which documents are to be replicated anyway 2 - all document sets are exported (with all their contained documents)
- ExportConfiguration= "1"
Creates XML file with configuration of database that is being replicated.
- ExtendDocSet="0"
Setting this option to "1" modifies above ('SpotDocLinks') option. When it is set, then all spot-doc links with spots on replicated documets are replicated, even if destination documents of these links were not intended to be replicated - now they are added to the set of replicated documents.
- Filter="<full xml file name or url>"
This attribute is optional. It is not necessary in standard HyperDoc Online installation. It points to the destination DB configuration xml description.
- Filter="<full xml file name or url>"
This attribute is optional. It is not necessary in standard HyperDoc Online installation. It points to the destination DB configuration xml description.
- Filter="0"
If the value of this attribute is "1", then replication will be filtered, i.e. destination DB configuration will determine what data will be replicated, in contrast to source DB configuration, when this element is omitted or "0". Filtering is used to avoid replicating data that is not going to be visible on the destination, because of configuration differences between source and destination.
- Filter = "0"
If this attribute of <UserInput> element is set to "1", then before execution of this replication profile user will be prompted to provide a value for this parameter. See the description of 'Filter' parameter above.
- FilterString = "0"
If this attribute of <UserInput> element is set to "1", then before execution of this replication profile user will be prompted to provide a value for this parameter. See the description of 'FilterString' parameter above.
- FullObjSetContentsData="0"
If this option is set to "1" and 'ObjectSetsContents' option is set to "1", then object set contained objects are treated the same as indicated objects, e.g. they are replicated with connected documents.
- FullParentData="0"
When this option is set to "1", parents of indicated objects are treated the same as indicated objects, e.g. they are replicated with connected documents.
- Hierarchies = "0"
If this attribute of <UserInput> element is set to "1", then before execution of this replication profile user will be prompted to provide a value for this parameter. See the description of 'Hierarchies' parameter above.
- Icons="0"
When this option is set to "1", icons referenced by replicated TVD files are replicated.
- Incremental="0"
If the value of this attribute is "
1
", then replication will be incremental, i.e. only differences between source and destination will be replicated. In this case and when Type="file
", then 'ReferenceSignature
' parameter should be specified. You often want to keep source and destination databases synchronized. First you replicate subset of interest, but when this subset elements are modified on the source, you would like to update them on the destination accordingly. You could perform replication again but in order not to transfer for the second time the whole data that did not changed on the source you use incremental replication - it helps avoiding unnecessary transfers.- Incremental = "0"
If this attribute of <UserInput> element is set to "1", then before execution of this replication profile user will be prompted to provide a value for this parameter. See the description of 'Incremental' parameter above.
- Name="<hierarchy name>"
This attribute of <Hierarchies> element is obligatory. It is used to identify given hierarchy.
- Name="<object type name>"
This attribute of <ObjectType> element is obligatory. It identifies given object type. All child <DBObject> elements represent objects of this type.
- NumOfRetries="<number of tries before raising an error>"
This attribute is optional. Actually, it defines number tries (not retries) before error is generated. Value "0" means: do not retry automatically AND do not allow manual retry (i.e. replication behaves as before introducing this functionality); value "1" means: do not retry automatically AND allow manual retry; value "n" where n > 1 means: retry automatically n - 1 times and then allow manual retry.
- ObjectList = "0"
If this attribute of <UserInput> element is set to "1", then before execution of this replication profile user will be prompted to provide a value for this parameter. See the description of 'ObjectList' parameter above.
- ObjectSetLinks="0"
If this option is set to "1", then all links between objects to be replicated and object sets to be replicated are replicated.
- ObjectSets="0"
If this option is set to "1", then all object sets are replicated (unless 'ConnectedObjectSets' or 'ContainedObjectSets' is set to "1").
- ObjectSetsContents="0"
If this option is set to "1", then objects belonging to object sets to be replicated are replicated with their parents in all indicated hierarchies.
- ObjID="<very cryptic object ID>"
This attribute of <HObject> element is obligatory. It is used to identify given object. Besides it contains hierarchy identification. This hierarchy is added to the list of hierarchies to be replicated. That is why in this case explicit hierarchy list can be empty, i.e. <Hierarchies> element can be not specified.
- ObjSetID="<numeric Object Set ID>"
If this optional attribute is set, then given object set determines, what is replicated. In this case <DBObject> and <HObject> elements are ignored.
- Options = "0"
If this attribute of <UserInput> element is set to "1", then before execution of this replication profile user will be prompted to provide a value for this parameter. See the description of 'Options' parameter above.
- Options SaveTvdAsSvg = "1"
This parameter force replication to save all
tvd
files assvg
files that can be used in HDC import.- Package="<package xml file name>"
This attribute is optional. It is the full name of output file with a list of other output files containing replicated data.
- Package = "0"
If this attribute of <UserInput> element is set to "1", then before execution of this replication profile user will be prompted to provide a value for this parameter. See the description of 'Package' parameter above.
- Password="<user password>"
This attribute is obligatory. It is used to login to destination HyperDoc Internet Server.
- Password = "0"
If this attribute of <UserInput> element is set to "1", then before execution of this replication profile user will be prompted to provide a value for this parameter. See the description of 'Password' parameter above
- Presentations="0"
When this option is set to "1", all presentation definitions are replicated. Otherwise no presentation definitions are replicated.
- PrintTemplates="0"
When this option is set to "1" print templates located in TemplateDirectory specified in ini file are replicated.
- ReferenceSignature="<full xml file name or url>"
This attribute is optional. It is not necessary in standard HyperDoc Online installation. It points to xml signatures of destination DB replicated fragment.
- ReferenceSignature="<full xml file name or url>"
This attribute is optional. It is not necessary in standard HyperDoc Online installation. It points to xml signatures of destination DB replicated fragment.
- RefSignatureString = "0"
If this attribute of <UserInput> element is set to "1", then before execution of this replication profile user will be prompted to provide a value for this parameter. See the description of 'RefSignatureString' parameter above.
- SaveSignature="<full xml file name>">
This attribute is optional. Replication will save in this file signatures of replicated data. This file can be used as 'ReferenceSignature' for the next replication, if it is incremental.
- SpotDocLinks="0"
If this option is set to "1", then spot-doc links between spots on replicated documents and replicated documents are replicated.
- Spots="0"
Spots and redlining are not replicated by default. Setting one of these options to "1" enables replication of spots or redlining respectively.
- SubTrees="0"
Setting this options to "1" causes replication of all objects belonging to subtrees of indicated objects in all indicated hierarchies.
- SymbolLibrary="0"
When this option is set to "1", symbol library file is replicated. Symbol library contains for example vector tools used in presentations. Example of symbol library is STAMPS.TVD file in HyperDoc demo DB.
- Type="< 'file' or 'http' >"
This attribute is obligatory. It determines whether replication will be directed to a disk to a HyperDoc Online server.
- URL="<destination url>"
This attribute is obligatory. It points to destination HyperDoc Internet Server.
- URL = "0"
If this attribute of <UserInput> element is set to "1", then before execution of this replication profile user will be prompted to provide a value for this parameter. See the description of 'URL' parameter above.
- UserName="<user name>"
This attribute is obligatory. It is used to login to destination HyperDoc Internet Server.
- UserName = "0"
If this attribute of <UserInput> element is set to "1", then before execution of this replication profile user will be prompted to provide a value for this parameter. See the description of 'UserName' parameter above.
12:22:51: Execution of replication profile started 12:22:51: Retrieving objects for replication... 12:22:51: Replicating to: C:\DOCUME~1\XXX\LOCALS~1\Temp\7\rad9AC27.tmp 12:22:54: Start of external signatures loading... 12:22:55: Local signatures obtained 12:22:55: External signatures obtained 12:22:55: Replication statistics ================================ Added Updated Deleted ================================ Dict. values: 0 0 0 Objects: 0 0 0 Log. docs: 2 0 0 Phys. docs: 2 0 0 Phys. doc. ver.: 6 0 Spot files: 2 0 0 Redlinings: 2 0 0 Object sets: 0 0 0 Doc. sets: 0 0 0 Links Obj.-Doc.: 2 0 0 Links Spot-Obj.: 0 0 Links Spot-Doc.: 0 0 0 Links ObjSet-Obj.: 0 0 0 ================================ Presentations: 0 0 0 SymbolLibrary: 0 1 0 Icons: 1 0 0 PrintTemplates: 3 1 1 ================================ 12:23:07: Joined data obtained 12:23:08: Physical documents processed 12:23:08: Redlining processed 12:23:08: Supporting data processed 12:23:08: Transferring files to: http://demo.hyperhouse.se/staging 12:23:08: Package total size is 1906KB 12:23:08: Package.xml 12:23:08: LA141601.gp4 12:23:08: LA141601.taf 12:23:09: LA140001.gp4 12:23:11: LA140001.taf 12:23:11: LA581701tif.tif 12:23:12: LA581701tif.taf 12:23:12: MA002701cal.cal 12:23:14: MA002701cal.taf 12:23:14: MA013901tif.tif 12:23:14: MA013901tif.taf 12:23:14: MA021001cal.cal 12:23:16: MA021001cal.taf 12:23:16: MA025401tif.tif 12:23:17: MA025401tif.taf 12:23:18: MA033701cal.cal 12:23:19: MA033701cal.taf 12:23:19: 1219905.TVD 12:23:19: 526450.TVD 12:23:19: 736921.TVD 12:23:19: 520002.TVD 12:23:19: STAMPS.TVD 12:23:20: logo.bmp 12:23:20: a3.tvd 12:23:20: A4.tvd 12:23:21: a4plan.tvd 12:23:21: a4planutanlogga.tvd 12:23:21: Package.19.xml 12:23:22: Package transferred. Total size is 1906KB 12:23:22: Commit operation in progress. Please wait... 12:23:22: Replication error - -2147221501 from DataExchanger.PackageSender.CommitPackage Error message from DataExchangerS.PackageReceiver object. CommitPackage failed. Error Source=XMLConnector, Number=0x4C Error Description=Error copying file:\\server\dfs\demo\Updates\{D0C2E6ABB09246D4B689E968BA57402
Databases are not compatible or error in HH db configuration
16:10:00: Execution of replication profile started 16:10:00: Retrieving objects for replication... 16:10:00: Replicating to: C:\DOCUME~1\XXX\LOCALS~1\Temp\3\radD0968.tmp 16:10:06: Start of external signatures loading... 16:10:07: Local signatures obtained 16:10:07: Replication error - -2147221503 from ReplicationManager:LoadHTTPXML Cannot retrieve XML: http://demo.hyperhouse.se/staging/GetDBSignature.asp?ConnectionID=demo_Conn_1 Status=400, StatusText= ResponseText=<?xml version="1.0" encoding="UTF-8"?> <XMLError><Error Type="page" Number="424" Source="XMLConnector" Description="Object required"/></XMLError> ReadyState=4 16:10:07: Replication failed
Databases are not compatible or connection error occurred
08:03:39: Execution of replication profile started 08:03:39: Retrieving objects for replication... 08:03:39: Replicating to: C:\DOCUME~1\XXX\LOCALS~1\Temp\7\radA2821.tmp 08:03:40: Start of external signatures loading... 08:03:40: Local signatures obtained 08:03:40: External signatures obtained 08:03:40: Replication error - 91 from Replicator Object variable or With block variable not set 08:03:40: Replication failed
User account does not exist (for regular user) - connection error
09:16:49: Execution of replication profile started 09:16:49: Retrieving objects for replication... 09:16:51: Replicating to: C:\DOCUME~1\XXX\LOCALS~1\Temp\3\radD46FE.tmp 09:16:57: Start of external signatures loading... 09:16:59: Local signatures obtained 09:17:08: Replication error - -2147221503 from ReplicationManager:LoadHTTPXML Cannot retrieve XML: http://demo.hyperhouse.se/staging/GetDBSignature.asp?ConnectionID=demo_Conn_1 Status=401, StatusText=Unauthorized ResponseText=<html><body>Error: -2147221503, HHAdmin.Connections.IsUserInRole, User account not exist. userIdent=XXX</body></html> ReadyState=4 09:17:08: Replication failed
Access Denied
13:39:45: Execution of replication profile started 13:39:45: Retrieving objects for replication... 13:39:46: Replicating to: C:\DOCUME~1\XXX\LOKALA~1\Temp\rad33A29.tmp 13:39:47: Replication error - -2147221503 from ReplicationManager:LoadHTTPXML Cannot retrieve XML: http://demo.hyperhouse.se/staging/GetDBSignature.asp?ConnectionID=demo_Conn_1 Status=407, StatusText=Proxy Authentication Required ResponseText=<HTML><HEAD> <TITLE>Access Denied</TITLE> </HEAD> <BODY> <FONT face="Helvetica"> <big><strong></strong></big><BR> </FONT> <blockquote> <TABLE border=0 cellPadding=1 width="80%"> <TR><TD> <FONT face="Helvetica"> <big>Access Denied (authentication_failed)</big> <BR> <BR> </FONT> </TD></TR> <TR><TD> <FONT face="Helvetica"> Your credentials could not be authenticated: "General authentication failure due to bad user ID or authentication token." You will not be permitted access until your credentials can be verified. </FONT> </TD></TR> <TR><TD> <FONT face="Helvetica"> This is typically caused by an incorrect username and/or password, but could also be caused by network problems. </FONT> </TD></TR> <TR><TD> <FONT face="Helvetica" SIZE=2> <BR> For assistance, contact your network support team. </FONT> </TD></TR> </TABLE> </blockquote> </FONT> </BODY></HTML> ReadyState=4 13:39:47: Replication failed
Unauthorized
09:16:49: Execution of replication profile started 09:16:49: Retrieving objects for replication... 09:16:51: Replicating to: C:\DOCUME~1\XXX\LOCALS~1\Temp\3\radD46FE.tmp 09:16:57: Start of external signatures loading... 09:16:59: Local signatures obtained 09:17:08: Replication error - -2147221503 from ReplicationManager:LoadHTTPXML Cannot retrieve XML: http://demo.hyperhouse.se/staging/GetDBSignature.asp?ConnectionID=demo_Conn_1 Status=401, StatusText=Unauthorized ResponseText=<html><body>Error: -2147221503, HHAdmin.Connections.IsUserInRole, User account not exist. userIdent=XXX</body></html> ReadyState=4 09:17:08: Replication failed
The INSERT statement conflicted with the FOREIGN KEY constraint
11:12:04: Package transferred. Total size is 12508KB 11:12:04: Commit operation in progress. Please wait... 11:12:14: Replication error - -2147221501 from DataExchanger.PackageSender.CommitPackage Error message from DataExchangerS.PackageReceiver object. CommitPackage failed. Error Source=MicrosoftRDO.RdoQuery, Number=0x9C42 Error Description=[Type: 'HDV_H1_ORG2GRP', Attributes: {BORGITM_ID: '10007248', BORGITM_DESCR: 'Bostads AB Ekeby', BORGITM_OWNER: '10007248'}, Path: {Status: 'add'} / {Name: 'HDV_H1_ORG2GRP'}/{} / {StageMode: 'update'}] TSLDBTreeRun.DBObject.SaveNewObjectEx: Error number: 40002 01000: [Microsoft][ODBC SQL Server Driver][SQL Server] The statement has been terminated. Error number: 547 23000: [Microsoft][ODBC SQL Server Driver][SQL Server] The INSERT statement conflicted with the FOREIGN KEY constraint "FK_BORGITM_ID_12". The conflict occurred in database "demo", table "dbo.HDV_H1_ORG3GRP", column 'BORGITM_ID'. 11:12:14: Replication failed
Cannot insert the value NULL into column
11:15:25: Package transferred. Total size is 926KB 11:15:25: Commit operation in progress. Please wait... 11:15:26: Replication error - -2147221501 from DataExchanger.PackageSender.CommitPackage Error message from DataExchangerS.PackageReceiver object. CommitPackage failed. Error Source=MicrosoftRDO.RdoQuery, Number=0x9C42 Error Description=[Type: 'HDV_H2_OBJECT', Attributes: {OBJECT_ID: '71200001', FI2SPACE_NAME: '71200001', FI2SPSYS_ID: '282', FI2SPACE_COMMENT: '2', FI2SPACE_DESCR: 'KÖK', FI2SPACE_FULLNAME: 'Servicehuslägenhet', HD_OBJCUSTOM1: 'Majstångsvägen 6', HD_OBJCUSTOM2: '12633', HD_OBJCUSTOM3: 'Hägersten', FI2SPACE_GUID: '71200001', HD_HIERCLASS: 'OBJ02'}, Path: {Status: 'add'} / {Name: 'HDV_H2_OBJECT'} / {} / {StageMode: 'update'}] TSLDBTreeRun.DBObject.SaveNewObjectEx: Error number: 40002 01000: [Microsoft][ODBC SQL Server Driver][SQL Server] The statement has been terminated. Error number: 515 23000: [Microsoft][ODBC SQL Server Driver][SQL Server] Cannot insert the value NULL into column 'FI2SPACE_ID', table 'demo.dbo.HDV_H2_OBJECT'; column does not allow nulls. INSERT fails. 11:15:26: Replication failed
What is reparenting?
Before
- ROOT - A - x1 - y1 - B - x2 - y2
After
- ROOT - A - x1 - y1 - x2 - B - y2
In this case, we can say that reparenting occurred for object “x2
” – parent was changed from object B
to A
.
In that example, replicating only object “x2
” or on higher levels will result in Reparenting Warning.
Important
It is now safe to replicate only object “x2
” (of the example above), it will be replicated correctly and no data will be lost.
The warning message informs in case of unplanned reparenting.
Mentioned above warning message is:
Application Name:
TSLScheduledReplication
Default installation folder:
c:\Program Files\Tessel Software Line\HyperDoc\Program (here the TSLScheduledReplication.exe is stored).
Note
Please note that TSLScheduledReplication.exe will only be available in pointed path if you have installed HyperDoc with HIS Component.
The tool is designed to automatically run the replication process from HyperDoc database to HIS and then promotion to archive. Tool also changes order in promotion so the time when archive database is offline is minimized. The task can be scheduled to be done at desired time and user's attention at that time is not needed once the replication process is configured/planned using Windows Task Scheduler. After the replication process is done the user will be notified with email message with log stating the replication status (success/failure).
TSLScheduledReplication is run in windows command line.
TSLScheduledReplication application uses 3 parameters:
Full path to hyperdoc INI file - HyperDoc.ini,
Name_of_replication_profile (stored in hyperdoc database),
Full_path_to_email_profile (optional parameter, file is stored on disk).
Example of program command line:
c:\Program Files\Tessel Software Line\HyperDoc\Program\TSLScheduledReplication.exe "C:\Hyperhouse\DemoDB\Configuration\HDocAsp.ini" "test_profile" "C:\TSL.DEV\HyperDoc\Current\GenerateSignature\userEmail.xml"
"c:\Program Files\Tessel Software Line\HyperDoc\Program\TSLScheduledReplication.exe" - sets which application will be run
"C:\Hyperhouse\DemoDB\Configuration\HDocAsp.ini" - set this to tell the tool which HyperDoc configuration file it should use
"test_profile" - this is name of the existing replication profile that was already added to your HyperDoc Client and it's configuration will be used in scheduled replication. This replication profile links to XML file that keeps replication configuration.
"C:\TSL.DEV\HyperDoc\Current\GenerateSignature\userEmail.xml" - path to configuration XML file which configure sending the confirmation email (see also below).
Important
While using automatic replication/promotion it is advised to observe automatic updates/restart times for servers on both side.
When you are logging to Hyperhouse.se, TSLScheduledReplication uses user and password that are stored in replication profile.
This application uses Microsoft component named "CDO.Message" to send email.
Example of email profile file:
<?xml version="1.0"?> <mail to="Name <name@mail.com>" from="TSLScheduledReplication<noreply@mail.com>"> <configuration> <sendusing>2</sendusing> <smtpserver>smtp.mail.com</smtpserver> <smtpserverport>25</smtpserverport> <smtpconnectiontimeout>60</smtpconnectiontimeout> </configuration> </mail>
Required attribute in <mail> tag: to=""
Optional attributes in <mail>
tag: from=""
sender=""
cc=""
bcc=""
All configuration tags are described on Microsoft site here.
More information can also be found on MSDN site.
Important
<CurrentObject /> or <CurrentObjectSet /> cannot be used for automatic replication. It can be used only for user operated replication.
Examples of available commands:
Replicate selected object with subtree (object parameters + hierarchy, other options are allowed)
<ReplicationProfile Incremental="1" Filter="0"> <ReplicationParams> <ObjectList> <ObjectType Name="Regions"> <DBObject> <ObjectAttr Name="Region_ID" Value="Region002" /> </DBObject> </ObjectType> </ObjectList> <Hierarchies> <Hierarchy Name="HDocHierarchyDefinition" /> </Hierarchies> <Options /> </ReplicationParams>
Replicate indicated object (by single HObject, other options are allowed)
<ReplicationProfile Incremental="1" Filter="0"> <ReplicationParams> <ObjectList> <HObject ObjID="HDocHierarchyDefinition|1|Level_1|5"/> </ObjectList> <Options SubTrees="1" AllDocsForObj="1" SpotDocLinks="1" AllVersions="0" Spots="1" Redlining="1" ObjectSets="1" ObjectSetLinks="1" DocSetsMode="1" ContainedObjectSets="1" Presentations="1"/> </ReplicationParams>
Replicate entire hierarchy: (other options are allowed)
<ReplicationProfile Incremental="1" Filter="0"> <ReplicationParams> <Options AllObjects="1"/> <Hierarchies> <Hierarchy Name="HDocHierarchyDefinition" /> </Hierarchies> </ReplicationParams>
To configure scheduled replication you must create new task in Windows Task Scheduler.
On Windows XP the functionality is available from Control Panel\Scheduled Task.
The instruction below were created based on Windows Vista/7 behaviour:
Go to Computer Management menu (right click on Computer then Manage),
On left pane expand System Tools and click on Task Scheduler,
On right pane click
Create Task...
Fill in the info in General tab according to you needs,
On Triggers tab create new Trigger - here you can set when and how often scheduled replication will be done,
On Actions tab you specify what and how is triggered at designated time,
Go through rest of tabs to set all other options you need.