SQL Remote replication on master/details tables

Hello,

I am trying to replicate data in publication containing 5 tables on a SQLA
5.5.03 database, say Table A to E.

Table A is the primary table. Subscriptions are made base on a column value
of this table.
Table B has a foreign key referencing Table A.
Table C is a link table to link Table B, D and E.  Table C has 3 foreign
keys referencing Table B, D and E.

The publication is:
Create publication pub_name(
Table A subscribe by Col1,		//Col1 is the primary key to Table A
Table B subscribe by Col1,		//Col1 is the fkey reference to Table A
Table D subscribe by (select Col1 from B, C where B.Col2=C.Col2 and
C.Col3=D.Col3),
Table E subscribe by (select Col1 from B, C where B.Col2=C.Col2 and
C.Col4=E.Col4),
Table C subscribe by (select Col1 from B where B.Col2 = C.Col2))

Col2 is the link field between tables B and C, Col 3 for tables C and D,
Col4 for tables D and E.

When I run the SQL Remote on the consolidate database, no error was
reported.

However, when I try to replicate it on the remote database using the SQL
Remote, an error was reported:

<SQL Statement failed: (-194) no primary key value for foreign key
'fkeyname' in table 'C'>

I have checked the records in the consolidate database and nothing is wrong
about that, any idea?

I have tried this on both 16 and 32 bit on NT and DOS/Win31, same results.

Thanks in Advance,
Kevin Wong.

0
Guardian
1/23/1998 5:14:00 AM
sybase.sqlanywhere.replication 4591 articles. 0 followers. Follow

10 Replies
594 Views

Similar Articles

[PageSpeed] 39
Get it on Google Play
Get it on Apple App Store

It seems really odd that you have a SUBSCRIBE BY (primary key).  Is
that what you meant?  So each site could only receive one row of table
A.

What action did you perform that was being replicated?
Update/insert/delete on what table?


Leo Tohill - Team Powersoft
-- Please post in newsgroup, not via email <
0
leotohill
1/23/1998 6:33:25 AM
Leo,

You are right, actually, we need 2 levels of replication.

A head office database will serve as the consolidate data base for our
branches, each branch is represented by a row in Table A (Col1), each
branch will only get data of their own.

Table B is the Agent table which stores all the agents' detail in the head
office, agents are related to branch, and only the branch's agents will be
replicated to the branch.

Table D is the Client table and E is the Contract table, this 2 tables have
got a many-to-many relationship.  Table C is the link table of this 2 and
in the same time related them with the Agent.

The first level of replication is from head office to the branches, and the
second level is from the branch to the agents, the branches and agents will
only get their own data.

As Col1 is a foreign key of the Agent Table, I have to replicate it down
the line to prevent the referential integrity problem.  Or is there any way
to get around this?

I used the Transaction Log utility to convert the Log file of the branch
database into a .SQL file and found that there is no attempt to insert a
Client record.  It seems that in the SUBSCRIBE BY of a publication, you are
not allowed to use 2 tables in the FROM clause of a subquery.  Is this the
case?

Leo Tohill <leotohill@csi.com> wrote in article
<34c83965.669703@forums.powersoft.com>...
> It seems really odd that you have a SUBSCRIBE BY (primary key).  Is
> that what you meant?  So each site could only receive one row of table
> A.
> 
> What action did you perform that was being replicated?
> Update/insert/delete on what table?
> 
> 
> Leo Tohill - Team Powersoft
> -- Please post in newsgroup, not via email <
> 
0
Guardian
1/24/1998 12:43:34 AM
> It seems that in the SUBSCRIBE BY of a publication, you are
>not allowed to use 2 tables in the FROM clause of a subquery.  Is this the
>case?

Sure you can.  The subscribe by clause can be a select of great
complexity if you like <g>.  It can do joins and UNIONs.  

Keep in mind that the table being published in not included in the
FROM clause of the subscribe by select.  THis bit me once.  For
example,

CREATE PUBLICATION pub1 

(TABLE table1 SUBSCRIBE BY (SELECT someid FROM table2, table3
WHERE table1.somecol = table2.somecol and table2.someothercol =
table3.someothercol AND blah blah blah)

Note that table1 is not in the FROM clause but is referenced in the
WHERE clause.)

Hope this helps.   I hope to address your other questions later after
I have time to study your posting.  But I have to do paid work right
now.... <g>

Regards,

Leo Tohill - Team Powersoft
-- Please post in newsgroup, not via email <
0
leotohill
1/24/1998 3:34:35 PM
Leo,

I tried to include the publish table in the FROM clause but it did not
seems to work.

Using my original publication script, the extraction of the remote database
worked perfectly. However, if I include the publish table in the FROM
clause, it will extract all the records in Table D and E to the remote
database regardless of who is the subscriber.

And still the replication did not work.  As I say in my previous message,
when I inspect the translated SQL file from the LOG file, the INSERT
statments for Table D and E were missing, it seems that SQL Remote has
never picked those transactions up from the consolidate database.

There are INSERTs for Table A and B, then Table C, when it tries to commit
the transactions, the integrity check forces the all the transactions to
rollback.


Regards,
Kevin,
Guardian Assurance Limited (NZ)


Leo Tohill <leotohill@csi.com> wrote in article
<34ca08d6.4272268@forums.powersoft.com>...

> Sure you can.  The subscribe by clause can be a select of great
> complexity if you like <g>.  It can do joins and UNIONs.  
> 
> Keep in mind that the table being published in not included in the
> FROM clause of the subscribe by select.  THis bit me once.  For
> example,
> 
> CREATE PUBLICATION pub1 
> 
> (TABLE table1 SUBSCRIBE BY (SELECT someid FROM table2, table3
> WHERE table1.somecol = table2.somecol and table2.someothercol =
> table3.someothercol AND blah blah blah)
> 
> Note that table1 is not in the FROM clause but is referenced in the
> WHERE clause.)
> 
> Hope this helps.   I hope to address your other questions later after
> I have time to study your posting.  But I have to do paid work right
> now.... <g>
> 
> Regards,
> 
> Leo Tohill - Team Powersoft
> -- Please post in newsgroup, not via email <
> 
0
Guardian
1/28/1998 4:29:25 AM
>I tried to include the publish table in the FROM clause but it did not
>seems to work.

Right.. reread my previous message: I said NOT to do this. 

>Using my original publication script, the extraction of the remote database
>worked perfectly. However, if I include the publish table in the FROM
>clause, it will extract all the records in Table D and E to the remote
>database regardless of who is the subscriber.

Yes, by placing the table in the FROM clause I think you are
introducing a cartesian product join which is probably hell on
performance and would likely produce the results you see.

I just realized that I hadn't responded to your message.  Right now
I'm covered up with work and need a little more time to examine your
full problem.  Post in this thread again if you have new information
or want to bug me to respond more quickly.  Otherwise I'll be back
again in a couple of days. 

Leo Tohill - Team Powersoft
-- Please post in newsgroup, not via email <
0
leotohill
2/5/1998 4:49:54 AM
It seems mysterious that it works perfectly when I use DBXTRACT, all data
were replicated to the remote database, but when I tried to replicate using
DBREMOTE, it just doesn't like it.

I really need a answer on this urgently.

Thanks.

Leo Tohill <leotohill@csi.com> wrote in article
<34d94354.4426141@forums.powersoft.com>...
> >I tried to include the publish table in the FROM clause but it did not
> >seems to work.
> 
> Right.. reread my previous message: I said NOT to do this. 
> 
> >Using my original publication script, the extraction of the remote
database
> >worked perfectly. However, if I include the publish table in the FROM
> >clause, it will extract all the records in Table D and E to the remote
> >database regardless of who is the subscriber.
> 
> Yes, by placing the table in the FROM clause I think you are
> introducing a cartesian product join which is probably hell on
> performance and would likely produce the results you see.
> 
> I just realized that I hadn't responded to your message.  Right now
> I'm covered up with work and need a little more time to examine your
> full problem.  Post in this thread again if you have new information
> or want to bug me to respond more quickly.  Otherwise I'll be back
> again in a couple of days. 
> 
> Leo Tohill - Team Powersoft
> -- Please post in newsgroup, not via email <
> 
0
Guardian
2/5/1998 6:05:48 AM
I need more information. Please provide a timeline of what you did in
your test including:

  I presume you began with DBEXTRCT for the remote.  
  Did you update the consolidated db?  In what way?
  did you update the remote db?  in what way?
  When and at what locations, in what order,  did you run dbremote?
  When and where did you run dblog to examine the transaction log?

Thanks. 

  
Leo Tohill - Team Powersoft
-- Please post in newsgroup, not via email <
0
leotohill
2/9/1998 1:15:08 AM

Leo Tohill <leotohill@csi.com> wrote in article
<34de5763.2836684@forums.powersoft.com>...
> I need more information. Please provide a timeline of what you did in
> your test including:
> 
>   I presume you began with DBEXTRCT for the remote.  

Everything is start from scratch, I create the consolidate database, create
all database objects necessary.  Then I create  2 remote users using the
FILE system. I extract a remote database for one remote user (Branch1)
before any data are entered into the database.  The remote database was on
the same machine but under a different directory.

>   Did you update the consolidated db?  In what way?

I use a SQL script file to update the tables in the database under ISQL. 
After the update, I start the dbremote for the consolidate.  Everything
seems fine and message were sent to the remote users.

>   did you update the remote db?  in what way?

I did not update any table in the remote database during the process.

>   When and at what locations, in what order,  did you run dbremote?

Next I run the dbremote for the Branch1 on the same machine.  That's when I
get the error.

>   When and where did you run dblog to examine the transaction log?

After I got the error, I use dblog to convert the log file of both the
consolidate and remote databases and examime them.

Then I extract the remote database for the other remote user (Branch2) to
yet another directory on the same machine.  All the data I expected were in
the new remote database.


I have tried this on different machine on different platforms (WinFrame,
NT4, Win31, DOS), and got the same results.
> 
> Thanks. 
> 
>   
> Leo Tohill - Team Powersoft
> -- Please post in newsgroup, not via email <
> 
0
Guardian
2/9/1998 4:57:44 AM
>I use a SQL script file to update the tables in the database under ISQL. 
>After the update, I start the dbremote for the consolidate.  Everything
>seems fine and message were sent to the remote users.

Referring back to your description of the tables, what tables did you
update?  Did you insert, update, or delete, and if multiple updates
were issued, in what order were they issued?


The error at the remote was a foreign key error, correct?  Which
foreign key failed?  (Excuse me if you already reported this)  

Try using -Z on DBREMOTE, and -O to capture the output.  This will
give a trace of every SQL action performed by DBRemote.  On the remote
site dbremote, how does its output compare to the updates you issued
at the consolidated db?


Leo Tohill - Team Powersoft
-- Please post in newsgroup, not via email <
0
leotohill
2/9/1998 2:19:51 PM
Leo Tohill <leotohill@csi.com> wrote in article
<34df0fa7.1053616@forums.powersoft.com>...
> Referring back to your description of the tables, what tables did you
> update?  Did you insert, update, or delete, and if multiple updates
> were issued, in what order were they issued?
> 

There are 5 tables, description as follow:

Branch:	BranchNo	Integer	NotNull <PK>
	BranchName	Char(15) NotNull

Adviser:	AdviserNo	Integer	NotNull <PK>
	BranchNo	Integer	NotNull
	AdviserName	Char(30) NotNull
	<FK> BranchFK (BranchNo references Branch(BranchNo)

Client: 	ClientNo	Integer 	NotNull <PK>
	ClientName	Char(30) NotNull

Policy:	PolicyNo	Integer	NotNull <PK>
	PolicyType	Char(10) NotNull
	PolicyValue	Money NotNull Default 0

ACPLink:	AdviserNo	Integer	NotNull
		ClientNo	Integer	NotNull
		PolicyNo	Integer	NotNull
	<PK> (AdviserNo, ClientNo, PolicyNo)
	<FK> Adviser (AdviserNo) references Adviser(AdviserNo)
	<FK> Client (ClientNo) references Client(ClientNo) Check On Commit
	<FK> Policy (PolicyNo) references Policy(PolicyNo) Check On Commit

The publication is:
Create publication pub_name(
Table Branch subscribe by BranchNo,
Table Adviser subscribe by BranchNo,
Table ACPLink subscribe by (select BranchNo from Adviser 
			where Adviser.AdviserNo = ACPLink.AdviserNo),
Table Client subscribe by (select BranchNo from Adviser, ACPLink 
			where Adviser.AdviserNo=ACPLink.AdviserNo 
			and ACPLink.ClientNo=Client.ClientNo),
Table Policy subscribe by (select BranchNo from Adviser, ACPLink 
			where Adviser.AdviserNo=ACPLink.AdviserNo
			and ACPLink.PolicyNo=Policy.PolicyNo))

In my SQL script, I populate the tables with test data in this order:
1. Branch
2. Adviser
3. Client
4. Policy
5. ACPLink.

> 
> The error at the remote was a foreign key error, correct?  Which
> foreign key failed?  (Excuse me if you already reported this)  
> 
> Try using -Z on DBREMOTE, and -O to capture the output.  This will
> give a trace of every SQL action performed by DBRemote.  On the remote
> site dbremote, how does its output compare to the updates you issued
> at the consolidated db?

I have attached 5 files with this message:
1. Ho1.out  - output captured when running dbremote on the consolidate db
2. Branch1.out - output captured when running dbremote on the remote db for
remote user 'Branch1'

NB: I can't understand the content of the output as they seems to be
encrypted.  But the output at the remote db is much longer than the
consolidate db.

3. Ho.sql - SQL file converted from the transaction log after the Extract
and Remote on both remote
    users
4. Branch1.sql - SQL file converted from the transaction log after the
running dbremote for remote user
    'Branch1'
5. Branch2.sql - SQL file converted from the transaction log after the
running dbremote for remote user
    'Branch2'

One thing I noticed that is in the extract, the dbremote is actually
populate the tables before it applies the table constraints.
> 
> 
> Leo Tohill - Team Powersoft
> -- Please post in newsgroup, not via email <
> 
Leo Tohill <leotohill@csi.com> wrote in article
<34df0fa7.1053616@forums.powersoft.com>...
> Referring back to your description of the tables, what tables did you
> update?  Did you insert, update, or delete, and if multiple updates
> were issued, in what order were they issued?
> 

There are 5 tables, description as follow:

Branch:	BranchNo	Integer	NotNull <PK>
	BranchName	Char(15) NotNull

Adviser:	AdviserNo	Integer	NotNull <PK>
	BranchNo	Integer	NotNull
	AdviserName	Char(30) NotNull
	<FK> BranchFK (BranchNo references Branch(BranchNo)

Client: 	ClientNo	Integer 	NotNull <PK>
	ClientName	Char(30) NotNull

Policy:	PolicyNo	Integer	NotNull <PK>
	PolicyType	Char(10) NotNull
	PolicyValue	Money NotNull Default 0

ACPLink:	AdviserNo	Integer	NotNull
		ClientNo	Integer	NotNull
		PolicyNo	Integer	NotNull
	<PK> (AdviserNo, ClientNo, PolicyNo)
	<FK> Adviser (AdviserNo) references Adviser(AdviserNo)
	<FK> Client (ClientNo) references Client(ClientNo) Check On Commit
	<FK> Policy (PolicyNo) references Policy(PolicyNo) Check On Commit

The publication is:
Create publication pub_name(
Table Branch subscribe by BranchNo,
Table Adviser subscribe by BranchNo,
Table ACPLink subscribe by (select BranchNo from Adviser 
			where Adviser.AdviserNo = ACPLink.AdviserNo),
Table Client subscribe by (select BranchNo from Adviser, ACPLink 
			where Adviser.AdviserNo=ACPLink.AdviserNo 
			and ACPLink.ClientNo=Client.ClientNo),
Table Policy subscribe by (select BranchNo from Adviser, ACPLink 
			where Adviser.AdviserNo=ACPLink.AdviserNo
			and ACPLink.PolicyNo=Policy.PolicyNo))

In my SQL script, I populate the tables with test data in this order:
1. Branch
2. Adviser
3. Client
4. Policy
5. ACPLink.

> 
> The error at the remote was a foreign key error, correct?  Which
> foreign key failed?  (Excuse me if you already reported this)  
> 
> Try using -Z on DBREMOTE, and -O to capture the output.  This will
> give a trace of every SQL action performed by DBRemote.  On the remote
> site dbremote, how does its output compare to the updates you issued
> at the consolidated db?

Below is part of the output captured from dbremote:
1. Output captured when running dbremote on the consolidate db:

	Sybase SQL Remote Message Agent Version 5.5.03 Build #1666
	Copyright by Sybase, Inc., and its subsidiaries, 1988, 1997. 
	All rights reserved. Sybase is a trademark of Sybase, Inc.
	Incoming messages from directory n:\anydata\ho
	1998-02-10 19:24:13.912
	Processing transactions from active transaction log
	Sending message to "branch1" (0-0000000000-0)

	Message (1796 bytes)
	<----Encrypted message from dbremote---->

	Sending message to "branch2" (0-0000000000-0)

	Message (39 bytes)
	02xwx&Pwcesux&1S@9I83FiVx&0wcesui[ige_e

	Execution completed

2. Output captured when running dbremote on the remote db for remote user
'Branch1'

	Sybase SQL Remote Message Agent Version 5.5.03 Build #1666
	Copyright by Sybase, Inc., and its subsidiaries, 1988, 1997. 
	All rights reserved. Sybase is a trademark of Sybase, Inc.
	Incoming messages from directory n:\anydata\branch1

	Message (1796 bytes)
	<----Encrypted message from dbremote (identical with those in 1)---->

	Received message from "ho_pub" (0-0000000000-0)
	Applying message from "ho_pub" (0-0000000000-0)
	SQL statement failed: (-194) no primary key value for foreign key 'Client'
in table 'ACPLink'
	Transaction failed

	Message (9457 bytes)
	Usage:isqlreadC:\ANYDATA\BRANCH1\RELOAD.SQL%Thiscommandfilereloadsadatabase
tha
	twasunloadedusing"dbxtract".%(version:5.5.03Build#1666)SETOPTIONStatistics=
3go
	SETOPTIONDate_order='YMD'go%%%%%%%%%%%%%%%%%%%%%%%%%Cre
	ateuseridsandgrantuserpermissions%%%%%%%%%%%%%%%%%%%%%%%
	%GRANTCONNECTTO"DBA"IDENTIFIEDBY"SQL"goGRANTRESOURCE,DBA,SCHEDULETO"DBA"goG
RANT
	CONNECTTO"dbo"goGRANTGROUPTO"dbo"goGRANTRESOURCE,DBATO"dbo"goGRANTCONNECTTO
"ho_p
	ub"IDENTIFIEDBYENCRYPTED'\x61\x65\x9F\xC8\x78\x49\xCF\x80\x2B\x0B\xFA\xE3\x
35\x8
	0\x9C\x7C\x24\x5E\xF3\x4D\x45\x2B\x56\xA0\x90\x09\xBB\xB7\xAE\xB5\xF9\x3B\x
8E\x5
	5\x98\xA2'goGRANTREMOTEDBATO"ho_pub"goGRANTCONNECTTO"branch1"IDENTIFIEDBYEN
CRYPT
	ED'\x1C\x03\xA2\xE2\x7B\x01\xE8\x1A\xFC\x03\xB0\x12\xBA\x29\xCA\x60\x01\x6C
\x04\
	xB3\x7B\x4A\xF8\x76\xDD\xCB\x4A\xD9\x90\xE1\x43\x6D\x98\xDE\x10\x4B'goGRANT
REMOT
	EDBATO"branch1"gocommitworkgo%%%%%%%%%%%%%%%%%%%%%%%%%C
	reateuser-definedtypes%%%%%%%%%%%%%%%%%%%%%%%%commitwor
	kgo%%%%%%%%%%%%%%%%%%%%%%%%%Createtables%%%%%%%
	%%%%%%%%%%%%%%%%%CREATETABLE"DBA"."Branch"("BranchNo"integerNOT
	NULL,"BranchName"char(20)NOTNULL,PRIMARYKEY("BranchNo"))goCREATETABLE"DBA".
"Advi
	ser"("AdviserNo"integerNOTNULL,"BranchNo"integerNOTNULL,"AdviserName"char(3
0)NOT
	NULL,PRIMARYKEY("AdviserNo"))goCREATETABLE"DBA"."Client"("ClientNo"integerN
OTNUL
	L,"ClientName"char(30)NOTNULL,PRIMARYKEY("ClientNo"))goCREATETABLE"DBA"."Po
licy"
	("PolicyNo"integerNOTNULL,"PolicyType"char(10)NOTNULL,"PolicyValue"moneyNOT
NULLD
	EFAULT0,PRIMARYKEY("PolicyNo"))goCREATETABLE"DBA"."ACPLink"("AdviserNo"inte
gerNO
	TNULL,"ClientNo"integerNOTNULL,"PolicyNo"integerNOTNULL,PRIMARYKEY("Adviser
No","
	ClientNo","PolicyNo"))gocommitworkgo%%%%%%%%%%%%%%%%%%%%%%
	%%%Reloaddata%%%%%%%%%%%%%%%%%%%%%%%%INPUTINTO"DBA".
	"Branch"FROMC:\ANYDATA\BRANCH1\UNLOAD\161.datFORMATASCIIBYORDERgoINPUTINTO"
DBA".
	"Adviser"FROMC:\ANYDATA\BRANCH1\UNLOAD\162.datFORMATASCIIBYORDERgoINPUTINTO
"DBA"
	."Client"FROMC:\ANYDATA\BRANCH1\UNLOAD\163.datFORMATASCIIBYORDERgoINPUTINTO
"DBA"
	."Policy"FROMC:\ANYDATA\BRANCH1\UNLOAD\164.datFORMATASCIIBYORDERgoINPUTINTO
"DBA"
	."ACPLink"FROMC:\ANYDATA\BRANCH1\UNLOAD\165.datFORMATASCIIBYORDERgocommitwo
rkgo
	%%%%%%%%%%%%%%%%%%%%%%%%Addforeignkeydefinitions%%%
	%%%%%%%%%%%%%%%%%%%%%ALTERTABLE"DBA"."Adviser"ADDFOREIGNKEY
	"Branch"("BranchNo")REFERENCES"DBA"."Branch"("BranchNo")goALTERTABLE"DBA"."
ACPLi
	nk"ADDFOREIGNKEY"Adviser"("AdviserNo")REFERENCES"DBA"."Adviser"("AdviserNo"
)goAL
	TERTABLE"DBA"."ACPLink"ADDFOREIGNKEY"Client"("ClientNo")REFERENCES"DBA"."Cl
ient"
	("ClientNo")CHECKONCOMMITgoALTERTABLE"DBA"."ACPLink"ADDFOREIGNKEY"Policy"("
Polic
	yNo")REFERENCES"DBA"."Policy"("PolicyNo")CHECKONCOMMITgocommitworkgo%%%%%%
	%%%%%%%%%%%%%%%%%%%Createfunctions%%%%%%%%%%%%%
	%%%%%%%%%%%commitworkgo%%%%%%%%%%%%%%%%%%%%%%%
	%%Createviews%%%%%%%%%%%%%%%%%%%%%%%%commitworkgo%%
	%%%%%%%%%%%%%%%%%%%%%%%Setoptionvalues%%%%%%%%%
	%%%%%%%%%%%%%%%SETOPTIONStatistics=goSETOPTIONDate_order=go%SQLO
	ptionStatementsforuserSETOPTION"PUBLIC"."Blocking"='ON'goSETOPTION"PUBLIC".
"Che
	ckpoint_time"='60'goSETOPTION"PUBLIC"."Conversion_error"='ON'goSETOPTION"PU
BLIC"
	."Date_format"='YYYY-MM-DD'goSETOPTION"PUBLIC"."Date_order"='YMD'goSETOPTIO
N"PUB
	LIC"."Isolation_level"='0'goSETOPTION"PUBLIC"."Lock_rejected_rows"='OFF'goS
ETOPT
	ION"PUBLIC"."Precision"='30'goSETOPTION"PUBLIC"."Recovery_time"='2'goSETOPT
ION"P
	UBLIC"."Replicate_all"='OFF'goSETOPTION"PUBLIC"."Row_counts"='OFF'goSETOPTI
ON"PU
	BLIC"."Scale"='6'goSETOPTION"PUBLIC"."Thread_count"='0'goSETOPTION"PUBLIC".
"Thre
	ad_stack"='750'goSETOPTION"PUBLIC"."Thread_swaps"='18'goSETOPTION"PUBLIC"."
Times
	tamp_format"='YYYYMMDDHH:NN:SS.SSS'goSETOPTION"PUBLIC"."Time_format"='HH:NN
:SS
	.SSS'goSETOPTION"PUBLIC"."Wait_for_commit"='OFF'goSETOPTION"PUBLIC"."Quoted
_iden
	tifier"='ON'goSETOPTION"PUBLIC"."Allow_nulls_by_default"='ON'goSETOPTION"PU
BLIC"
	."Automatic_timestamp"='OFF'goSETOPTION"PUBLIC"."Query_plan_on_open"='OFF'g
oSETO
	PTION"PUBLIC"."Cooperative_commits"='ON'goSETOPTION"PUBLIC"."Cooperative_co
mmit_
	timeout"='250'goSETOPTION"PUBLIC"."Delayed_commits"='OFF'goSETOPTION"PUBLIC
"."De
	layed_commit_timeout"='500'goSETOPTION"PUBLIC"."Non_keywords"=''goSETOPTION
"PUBL
	IC"."SQL_flagger_error_level"='W'goSETOPTION"PUBLIC"."SQL_flagger_warning_l
evel"
	='W'goSETOPTION"PUBLIC"."Ansi_blanks"='OFF'goSETOPTION"PUBLIC"."Ansi_intege
r_ove
	rflow"='OFF'goSETOPTION"PUBLIC"."String_rtruncation"='OFF'goSETOPTION"PUBLI
C"."D
	ivide_by_zero_error"='ON'goSETOPTION"PUBLIC"."Ansinull"='ON'goSETOPTION"PUB
LIC".
	"Ansi_permissions"='ON'goSETOPTION"PUBLIC"."Close_on_endtrans"='ON'goSETOPT
ION"P
	UBLIC"."Tsql_variables"='OFF'goSETOPTION"PUBLIC"."RI_Trigger_time"='AFTER'g
oSETO
	PTION"PUBLIC"."Tsql_hex_constant"='ON'goSETOPTION"PUBLIC"."Chained"='ON'goS
ETOPT
	ION"PUBLIC"."Nearest_century"='0'goSETOPTION"PUBLIC"."Fire_triggers"='ON'go
SETOP
	TION"PUBLIC"."Background_priority"='OFF'goSETOPTION"PUBLIC"."Login_mode"='S
tanda
	rd'goSETOPTION"PUBLIC"."Float_as_double"='OFF'goSETOPTION"PUBLIC"."Default_
times
	tamp_increment"='1'goSETOPTION"PUBLIC"."Escape_character"='ON'goSETOPTION"P
UBLIC
	"."Continue_after_raiserror"='OFF'goSETOPTION"PUBLIC"."Auto_commit"='OFF'go
SETOP
	TION"PUBLIC"."Auto_refetch"='ON'goSETOPTION"PUBLIC"."Bell"='ON'goSETOPTION"
PUBLI
	C"."Command_delimiter"=';'goSETOPTION"PUBLIC"."Commit_on_exit"='ON'goSETOPT
ION"P
	UBLIC"."Echo"='ON'goSETOPTION"PUBLIC"."Headings"='On'goSETOPTION"PUBLIC"."I
nput_
	format"='ASCII'goSETOPTION"PUBLIC"."ISQL_log"=''goSETOPTION"PUBLIC"."NULLS"
='(NU
	LL)'goSETOPTION"PUBLIC"."On_error"='PROMPT'goSETOPTION"PUBLIC"."Output_form
at"='
	ASCII'goSETOPTION"PUBLIC"."Output_length"='0'goSETOPTION"PUBLIC"."Output_nu
lls"=
	''goSETOPTION"PUBLIC"."Quiet"='OFF'goSETOPTION"PUBLIC"."Screen_format"='TEX
T'goS
	ETOPTION"PUBLIC"."SQLConnect"=''goSETOPTION"PUBLIC"."SQLStart"=''goSETOPTIO
N"PUB
	LIC"."Statistics"='3'goSETOPTION"PUBLIC"."Truncation_length"='30'goSETOPTIO
N"PUB
	LIC"."Verify_all_columns"='Off'goSETOPTION"PUBLIC"."Delete_old_logs"='Off'g
oSETO
	PTION"PUBLIC"."Qualify_owners"='On'goSETOPTION"PUBLIC"."Quote_all_identifie
rs"='
	Off'goSETOPTION"PUBLIC"."Replication_error"=''goSETOPTION"PUBLIC"."Subscrib
e_by_
	remote"='On'goSETOPTION"PUBLIC"."Verify_threshold"='1000'gocommitworkgo%%%%

	%%%%%%%%%%%%%%%%%%%%Createusermessages%%%%%%%%%%
	%%%%%%%%%%%%%%commitworkgo%%%%%%%%%%%%%%%%%%%%
	%%%%%Createprocedures%%%%%%%%%%%%%%%%%%%%%%%%commi
	tworkgo%%%%%%%%%%%%%%%%%%%%%%%%%Createtriggers%%%%
	%%%%%%%%%%%%%%%%%%%%commitworkgo%%%%%%%%%%%%%%
	%%%%%%%%%%%CreateSQLremotedefinitions%%%%%%%%%%%%%%%%
	%%%%%%%%CREATEREMOTETYPE"FILE"ADDRESS'n:\\anydata\\branch1'goGRANTPUBLI
	SHTO"branch1"goGRANTCONSOLIDATETO"ho_pub"TYPE"FILE"ADDRESS'n:\\anydata\\ho'
goCRE
	ATEPUBLICATION"DBA"."ho_pub"(TABLE"DBA"."Branch",TABLE"DBA"."Adviser",TABLE
"DBA"
	."ACPLink",TABLE"DBA"."Client",TABLE"DBA"."Policy")goCOMMENTONPUBLICATION"D
BA"."
	ho_pub"IS''goCREATESUBSCRIPTIONTO"DBA"."ho_pub"FOR"ho_pub"goSTARTSUBSCRIPTI
ONTO"
	DBA"."ho_pub"FOR"ho_pub"gocommitworkgo%%%%%%%%%%%%%%%%%%%%%
	%%%%Checkviewdefinitions%%%%%%%%%%%%%%%%%%%%%%%%GRA
	NTCONNECTTO"DBA"IDENTIFIEDBYENCRYPTED'\x90\x0F\x43\x67\xA4\x82\x3B\x2E\xA7\
x44\x
	40\x60\x38\xDD\xE6\xB1\x79\x0D\xA2\x66\x57\x4D\x02\x64\x8B\xC0\x42\x08\x5F\
xAF\x
	D3\xC2\xDD\xF3\x93\x77'gocommitworkgo%%%%%%%%%%%%%%%%%%%%%
	%%%Createintegratedlogins%%%%%%%%%%%%%%%%%%%%%%%%co
	mmitworkgo

	Deleting corrupt message
	1998-02-10 19:24:51.826
	Processing transactions from active transaction log
	Sending message to "ho_pub" (0-0000000000-0)
	
	Message (40 bytes)
	02xwx&Pwcbpbx&1SF6G:E@wiVx&0wcbpbi[ige3a

	Execution completed

3. Part of the SQL file showing update of tables on the consolidate db

	%%CONNECT-1002-"dba"-1998/feb/10 19:18
	%%BEGIN TRANSACTION-1002
	BEGIN TRANSACTION
	go
	%%INSERT-1002
	INSERT INTO "DBA".Branch(BranchNo,BranchName)
	VALUES (101,'North Island')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Branch(BranchNo,BranchName)
	VALUES (102,'South Island')
	go
	%%COMMIT-1002
	COMMIT WORK
	go
	%%BEGIN TRANSACTION-1002
	BEGIN TRANSACTION
	go
	%%INSERT-1002
	INSERT INTO "DBA".Adviser(AdviserNo,BranchNo,AdviserName)
	VALUES (101001,101,'Agent N1')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Adviser(AdviserNo,BranchNo,AdviserName)
	VALUES (101002,101,'Agent N2')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Adviser(AdviserNo,BranchNo,AdviserName)
	VALUES (102001,102,'Agent S1')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Adviser(AdviserNo,BranchNo,AdviserName)
	VALUES (102002,102,'Agent S2')
	go
	%%COMMIT-1002
	COMMIT WORK
	go
	%%BEGIN TRANSACTION-1002
	BEGIN TRANSACTION
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100001,'Client 1')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100002,'Client 2')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100003,'Client 3')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100004,'Client 4')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100005,'Client 5')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100006,'Client 6')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100007,'Client 7')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100008,'Client 8')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100009,'Client 9')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100010,'Client 10')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100011,'Client 11')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100012,'Client 12')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100013,'Client 13')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100014,'Client 14')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100015,'Client 15')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100016,'Client 16')
	go
	%%COMMIT-1002
	COMMIT WORK
	go
	%%BEGIN TRANSACTION-1002
	BEGIN TRANSACTION
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000001,'SG+',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000002,'PSP',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000003,'RT+',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000004,'RTB+',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000005,'SGD',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000006,'SG+',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000007,'PSP',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000008,'SG+',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000009,'PSP',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000010,'RTB',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000011,'SG+',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000012,'PSP',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000013,'RT+',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000014,'RTB+',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000015,'SGD',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000016,'SG+',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000017,'PSP',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000018,'SG+',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000019,'PSP',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000020,'RTB',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000021,'SG+',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000022,'SG+',0)
	go
	%%COMMIT-1002
	COMMIT WORK
	go
	%%BEGIN TRANSACTION-1002
	BEGIN TRANSACTION
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101001,100001,80000001)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101001,100001,80000002)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101001,100002,80000001)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101001,100002,80000002)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101001,100003,80000003)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101001,100003,80000004)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101001,100004,80000004)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101001,100004,80000005)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101002,100005,80000006)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101002,100005,80000007)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101002,100006,80000006)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101002,100006,80000007)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101002,100006,80000008)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101002,100007,80000009)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101002,100008,80000010)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101002,100008,80000011)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102001,100009,80000012)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102001,100009,80000013)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102001,100010,80000012)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102001,100010,80000013)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102001,100011,80000014)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102001,100011,80000015)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102001,100012,80000015)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102001,100012,80000016)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102002,100013,80000017)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102002,100013,80000018)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102002,100014,80000017)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102002,100014,80000018)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102002,100014,80000019)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102002,100015,80000020)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102002,100016,80000021)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102002,100016,80000022)
	go
	%%COMMIT-1002
	COMMIT WORK
	go
	
4. Part of SQL file converted from the transaction log after the running
dbremote for remote user 'Branch1'

	%CHECKPOINT-0000 at 1998/feb/10 19:18
	%%CONNECT-1004-"dba"-1998/feb/10 19:24
	%%BEGIN TRANSACTION-1004
	BEGIN TRANSACTION
	go
	%%INSERT-1004
	INSERT INTO "DBA".Branch(BranchNo,BranchName)
	VALUES (101,'North Island')
	go
	%%INSERT-1004
	INSERT INTO "DBA".Adviser(AdviserNo,BranchNo,AdviserName)
	VALUES (101001,101,'Agent N1')
	go
	%%INSERT-1004
	INSERT INTO "DBA".Adviser(AdviserNo,BranchNo,AdviserName)
	VALUES (101002,101,'Agent N2')
	go	
	%%INSERT-1004
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101001,100001,80000001)
	go
	%%INSERT-1004
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101001,100001,80000002)
	go
	%%INSERT-1004
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101001,100002,80000001)
	go
	%%INSERT-1004
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101001,100002,80000002)
	go
	%%INSERT-1004
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101001,100003,80000003)
	go
	%%INSERT-1004
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101001,100003,80000004)
	go
	%%INSERT-1004
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101001,100004,80000004)
	go
	%%INSERT-1004
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101001,100004,80000005)
	go
	%%INSERT-1004
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101002,100005,80000006)
	go
	%%INSERT-1004
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101002,100005,80000007)
	go
	%%INSERT-1004
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101002,100006,80000006)
	go
	%%INSERT-1004
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101002,100006,80000007)
	go
	%%INSERT-1004
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101002,100006,80000008)
	go
	%%INSERT-1004
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101002,100007,80000009)
	go
	%%INSERT-1004
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101002,100008,80000010)
	go
	%%INSERT-1004
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (101002,100008,80000011)
	go
	%%ROLLBACK-1004
	ROLLBACK WORK
	go
	%%CONNECT-1003-"dba"-1998/feb/10 19:24
	%%BEGIN TRANSACTION-1003
	BEGIN TRANSACTION
	go
	%%COMMIT-1003
	COMMIT WORK
	go
	%CHECKPOINT-0000 at 1998/feb/10 19:26

    Note that no transaction for the Tables Client and Policy are recorded.
 
5. Part of SQL file converted from the transaction log after the extraction
for remote user 'Branch2'

	%%BEGIN TRANSACTION-1002
	BEGIN TRANSACTION
	go
	%%INSERT-1002
	INSERT INTO "DBA".Branch(BranchNo,BranchName)
	VALUES (102,'South Island')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Adviser(AdviserNo,BranchNo,AdviserName)
	VALUES (102001,102,'Agent S1')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Adviser(AdviserNo,BranchNo,AdviserName)
	VALUES (102002,102,'Agent S2')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100009,'Client 9')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100010,'Client 10')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100011,'Client 11')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100012,'Client 12')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100013,'Client 13')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100014,'Client 14')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100015,'Client 15')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Client(ClientNo,ClientName)
	VALUES (100016,'Client 16')
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000012,'PSP',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000013,'RT+',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000014,'RTB+',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000015,'SGD',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000016,'SG+',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000017,'PSP',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000018,'SG+',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000019,'PSP',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000020,'RTB',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000021,'SG+',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".Policy(PolicyNo,PolicyType,PolicyValue)
	VALUES (80000022,'SG+',0)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102001,100009,80000012)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102001,100009,80000013)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102001,100010,80000012)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102001,100010,80000013)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102001,100011,80000014)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102001,100011,80000015)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102001,100012,80000015)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102001,100012,80000016)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102002,100013,80000017)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102002,100013,80000018)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102002,100014,80000017)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102002,100014,80000018)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102002,100014,80000019)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102002,100015,80000020)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102002,100016,80000021)
	go
	%%INSERT-1002
	INSERT INTO "DBA".ACPLink(AdviserNo,ClientNo,PolicyNo)
	VALUES (102002,100016,80000022)
	go
	%%COMMIT-1002
	COMMIT WORK
	go
	%CHECKPOINT-0000 at 1998/feb/10 19:36
	CONNECT AS DBTRAN "DBA"
	go
	%%SQL-1002
	alter table
	  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	  %    Add foreign key definitions
	  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	  "DBA".Adviser add
	  Branch foreign key(BranchNo) references
	  "DBA".Branch(BranchNo)
	go
	SET CONNECTION
	go
	DISCONNECT DBTRAN
	go
	%%COMMIT-1002
	COMMIT WORK
	go
	%CHECKPOINT-0000 at 1998/feb/10 19:36
	CONNECT AS DBTRAN "DBA"
	go
	%%SQL-1002
	alter table
	  "DBA".ACPLink add
	  Adviser foreign key(AdviserNo) references
	  "DBA".Adviser(AdviserNo)
	go
	SET CONNECTION
	go
	DISCONNECT DBTRAN
	go
	%%COMMIT-1002
	COMMIT WORK
	go
	%CHECKPOINT-0000 at 1998/feb/10 19:36
	CONNECT AS DBTRAN "DBA"
	go
	%%SQL-1002
	alter table
	  "DBA".ACPLink add
	  Client foreign key(ClientNo) references
	  "DBA".Client(ClientNo) check on commit
	go
	SET CONNECTION
	go
	DISCONNECT DBTRAN
	go
	%%COMMIT-1002
	COMMIT WORK
	go
	%CHECKPOINT-0000 at 1998/feb/10 19:36
	CONNECT AS DBTRAN "DBA"
	go
	%%SQL-1002
	alter table
	  "DBA".ACPLink add
	  Policy foreign key(PolicyNo) references
	  "DBA".Policy(PolicyNo) check on commit
	go
	SET CONNECTION
	go
	DISCONNECT DBTRAN
	go
	%%COMMIT-1002
	COMMIT WORK
	go
	

   One thing I noticed that is in the extract, the dbremote is actually
   populate the tables before it applies the table constraints.
> 
> 
> Leo Tohill - Team Powersoft
> -- Please post in newsgroup, not via email <
> 


0
Guardian
2/17/1998 4:19:08 AM
Reply:

Similar Artilces:

Replication is not replicating
The new database is added to the replication system but all tables on the RDB are empty. Setreptable is on and there's no uncommitted transaction. It is using default action class and there's no loss detection. Queue is caught up. We turned on "dsi_buf_dump" and it shows on the error log that the transaction executed on the PDB is replicated. However, the table is again empty on the RDB. Log is not full on both RDB and RSSD. Maint user is dbo. What else can I take a look at? PDS and RDS is 11.0.3.3, RS is 11.0.3 I don't remember since what version warm ...

SP replication or Table replication
Hi, there: I want to configure RS to implement bidirectional repl between two ASE servers. The applications only access database by calling SPs. Should I just replicate SPs or plus all the tables involed? Harry ...

Replicating trigger action with SQL remote (SQL/Anywhere)
I need to replicate the actions of a trigger in one of my tables. I've tried to use the -t option when running dbremote, but this still does not replicate the trigger actions. Is there a solution to this problem? I need to replicate the action of the trigger because I'm trying to do the following: I need a sigle unique id for record in a table, and that table may be inserted into at any number of remote databases, and at the consolidated database. I've used an autoincrement column and a current publisher column as the actual unique primary key, and have another column ...

SQL Remote Replication
Anybody tried using SQL remote to do replication between two ASE? I don't need Replication Server just basic replication. since 11.9.2 comes with SQL Remote, I thought why not give it a try! Hi, I just started research on SQL-Anywhere Remote using FILE and MAPI as well. It's a realy nice feature, cause I do update data not so offten. So, just try it out. BTW what means ASE Chriss BH Ong schrieb in Nachricht <01befd97$8f8994c0$7ccdc8c8@virtual-branch>... >Anybody tried using SQL remote to do replication between two ASE? I don't >need Replication Ser...

SQL Remote Replication
I would like to use SQL Remote Replication over a telephone modem connection with a FILE type link. The app I am working on is being written in VB and contains an embedded Sybase DB (i.e. Only the DB and required run time files are distributed). The manuals show a tutorial on one PC, which works fine. It also refers to a simple file transfer mechanism that can be used to exchange files periodically to effect replication. It doesn't say which files should be transferred and to what directories? Does anyone have a specific example on how this can be done? The modem connection ...

Incomplete Replication with Mixed Function/Table Replication.
I have experimented with a Bi-Directional replication setup that follows Sybases Pending Table model, but with some minor modifications and the complete scheme does not seem to work. Anyone Have any Ideas? System uses the following; A) At replicate DB, have defined a request function replication for a procedure tst_REP_Proc. - The request function replication definition specifies the procedure is to be "delivered as" tst_MST_Proc at the Primary DB - The tst_REP_Proc stored porcedure at the Replicate DB, inserts its called arguments int...

how to replicate ddl tran in table level replication
Hi can we replicate alter table in table level replication For normal table level replication setup this is not possible. However, if you setup MSA replication where you can filter only set of tables to replicate, then you can enable DDL replication via the database replication definition configuration. That way you can replicate DDL as also the table. I think you will need to set sp_reptostandby <db>, ALL in primary to enable DDL replication. > Hi can we replicate alter table in table level replication ...

Replicating a table using replication defns and subscription
Hi, We have a table in a database, which is in a warm standby setup. The table has more than 128 columns and has a timestamp column. The ltm bombs out giving an error about not being able to handle more than 128 columns. Is it possible to replicate this one table using a replication defn and subscription? Would these steps be ok. use warmdb exec sp_reptable table, false exec sp_setreplicate table, true create a rep definition. define a subscription. activate it. validate it. check it. Has anyone does this before? We are having problems setting up the subscription. Pleas...

How do you get replication server to create tables at the replicate?
I want to set up replication and have replication server create the replicate table at the replicate. Is this possible at all? look at using warm standby with DDL replication. George <olayinkao> wrote in message news:EE9C0658E518EADB002B119185256BDC.002B119F85256BDC@webforums... > I want to set up replication and have replication server create the > replicate table at the replicate. Is this possible at all? ...

SQL Anywhere 8.0.2 SQL Remote FTP replication problems
Hi all, I have a problem setting up the FTP message control parameters with SQL Remote. I use the SET REMOTE FTP OPTION statement to do this. See an example. Considering a remote user with name 'pippo'... SET REMOTE FTP OPTION pippo.host = 'my_host'; SET REMOTE FTP OPTION pippo.user = 'mickey'; SET REMOTE FTP OPTION pippo.password = 'mouse'; SET REMOTE FTP OPTION pippo.root_directory = 'root_dir'; These four statements set FTP parameters for the pippo database user. This means that I want that the user pippo gain access to the replicati...

SQL Remote replication problem
We have an ASA 7.0.3.2046 setup with several branches replicating to and from a consolidated database via SQL Remote. At each end we have the following trigger on one of our tables: alter trigger DBA.tub_item before update on auction.item referencing old as old_upd new as new_upd for each row begin if current remote user is null then set new_upd.last_modified_by=current user; set new_upd.date_last_modified=getdate(*) end if end The problem that sometimes occurs is this. A user updates a field on the item table, which fires the trigger. The update action and the tr...

sql remote with replication enterprise
can I run sql remote and replication enterprise on the same machine? My system has 3 units ASA --- ASE --- ASE so the middle one need to replicate with ASA and ASE on the same machine. In order to have SSRemote and the Rep Agent for ASE run on the same database you must use SSQueue. This was available in a 5.5.04 EBF, which also means you must be at least at 5.5.04 of SSRemote. Please contact technical support and ask for an EBF for 5.5.04, including SSQueue. -- David Fishburn Sybase Please post only to the news group. Songrit Leemakdej wrote in message ... >can...

ASE Replicator or SQL Remote
We have several 11.9.x servers running on RH Linux that we need a simple replication solution for. These severs will be upgraded to 12.5 over a year or so. Rep sever seems overkill. I have been looking at the new ASE Replicator in 12.5 and SQL Remote that was designed for 11.9.x. Here are my questions: If I set up one 12.5 db and use it as the primary database can it publish data to the 11.9.x servers? Is SQL Remote going to be a supported product or is Sybase encouraging users to move to Replicator? Does SQL Remote run on Linux? Which is eaiser, more reliable? T...

SQL Remote and ASE Replicator
Hello, Is it possible to use SQL Remote and ASE Replicator on the same database? SQL Remote and Replication Server for example have such capability when you use ssqueue. -- JT Both the ASE replicator and SQL Remote for ASE need to exclusively manage ASE's secondary truncation point in order to identify the oldest data page in syslogs that they need to start scanning from. There is only 1 secondary truncation point, and by the nature of it, it can not be shared between processes to identify more than one page. This is why we included the SSQueue as a solution for an ASE ...

Web resources about - SQL Remote replication on master/details tables - sybase.sqlanywhere.replication

DNA replication - Wikipedia, the free encyclopedia
DNA replication is a biological process that occurs in all living organisms and copies their DNA ; it is the basis for biological inheritance ...

Facebook Slashes Data Replication With HDFS RAID
Avoiding replication is a key component of efficient data storage , and one method Facebook uses to accomplish this task is HDFS RAID , which ...

PolSci Replication (@PolSciReplicate) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Encryption in demand for backup and replication: Veeam
When it comes to backup and replication, Veeam has found encryption is one of the most requested feature by businesses.

John Sands Australia cuts data replication time from 14 hours to three
Corporate data replication was taking up to 14 hours to complete at greeting card company John Sands Australia until data acceleration software ...

EMC gives VMware admins the reins to replication and recovery
EMC is putting replication and recovery into the hands of VMware administrators with a software version of its RecoverPoint appliance that's ...

Facebook Slashes Data Replication With HDFS RAID - SocialTimes
Avoiding replication is a key component of efficient data storage , and one method Facebook uses to accomplish this task is HDFS RAID , which ...

rsync.net: ZFS Replication to the cloud is finally here—and it’s fast
As friendly of an online advertisement as you'll find. In mid-August, the first commercially available ZFS cloud replication target became available ...


Google deprecates old App Engine datastore in favor of High-Replication version
Google is deprecating the Master/Slave Datastore used by its cloud platform App Engine in favor of the High-Replication Datastore (HRD), which ...

Resources last updated: 12/28/2015 5:46:51 AM