[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference orarep::nomahs::dec_data_distributor

Title:The Replication Option for Rdb
Notice:Product renamed to Replication Option for Rdb
Moderator:BROKE::PROTEAU
Created:Wed Mar 02 1994
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:287
Total number of notes:1231

285.0. "rep updates & views" by BROKE::BITHER () Tue Apr 29 1997 19:37

Hi,

Clarification/confirmation needed.

Rep Option v7, v6

Customer wants to do a replication update transfer of a view consisting
of multiple tables from a source db to a table in the target db.   

Could you please comment on the accuracy of the following?

  According to the documentation, pg 9-35 2nd paragraph of "replic-and-
  extr-move-clause' in order to move a view from a source db to a target
  db and have it end up being a table in the target db rather than a view,
  they need to do an extraction transfer and they need to use the "move
  tables" command.  This cannot be done with a replication update transfer 
  right?

  Instead, to move views in a replication update transfer you must:
    - use the "move views" clause
    - transfer both the view definition and all tables that comprise
       the view in the same transfer def
    - the view itself will be defined in the target db along with the
       tables that make up the view.  The view will not be a table in
       the target db.

QUESTIONS:

How do you get the "move views" clause to work?  When I try to define a
transfer using move views I get a syntax error:

SQL> create transfer kids_replicate type is replication
cont> move views
move views
     ^
%SQL-W-LOOK_FOR_STT, Syntax error, looking for:
%SQL-W-LOOK_FOR_CON,            TABLE, TABLES,
%SQL-F-LOOK_FOR_FIN,    found VIEW instead

I used ROR 6.0 because 7.0 was not installed on our system until later
today.  Now it is installed but it bugchecks so I still cannot test
using v7.0.

Also, I tried doing an extraction transfer moving a view using "move
tables" and I get the following error:

SQL> create transfer kids_replicate type is extraction
cont> move tables     (can't put views here - causes syntax error)
cont> select * from kids_view
cont> to existing filename 'db_test_target'
cont> with no checking
cont> log is kids.log;
%SQL-W-CMPBYWNRL, Invalid computed field VNAME will not be transferred from rela
tion KIDS_VIEW
%SQL-W-CMPBYWNRL, Invalid computed field VAGE will not be transferred from relat
,,,
etc. this 2nd error message is repeated many, many times.  VAGE is the 2nd
and last column of a 2-column table.

Is this because I didn't also transfer all the tables comprising view
kids_view in this same transfer?  An answer to this last question on
extractions transfers is not as urgent as answers to the replication update
issues as it is not something the customer is waiting for.  Just something I 
tried during my tests.

Thanks, Diane

T.RTitleUserPersonal
Name
DateLines
285.1Here's my view on the subjectBROKE::PROTEAUJean-Claude ProteauWed Apr 30 1997 10:1874
>  According to the documentation, pg 9-35 2nd paragraph of "replic-and-
>  extr-move-clause' in order to move a view from a source db to a target
>  db and have it end up being a table in the target db rather than a view,
>  they need to do an extraction transfer and they need to use the "move
>  tables" command.  This cannot be done with a replication update transfer 
>  right?

Right.

>  Instead, to move views in a replication update transfer you must:
>    - use the "move views" clause
>    - transfer both the view definition and all tables that comprise
>       the view in the same transfer def
>    - the view itself will be defined in the target db along with the
>       tables that make up the view.  The view will not be a table in
>       the target db.

Right.  That is, the view will remain a view in the target.  It is still a
table, in Rdb terms, it just doesn't have physical data stored in it.

>How do you get the "move views" clause to work?  When I try to define a
>transfer using move views I get a syntax error:
>
>SQL> create transfer kids_replicate type is replication
>cont> move views
>move views
>     ^
>%SQL-W-LOOK_FOR_STT, Syntax error, looking for:
>%SQL-W-LOOK_FOR_CON,            TABLE, TABLES,
>%SQL-F-LOOK_FOR_FIN,    found VIEW instead

If you're moving a view as a view, you first must move the tables on which the
view is based  I suspect SQL requires the MOVE TABLES clause to precede the
MOVE VIEWS clause.

>Also, I tried doing an extraction transfer moving a view using "move
>tables" and I get the following error:
>
>SQL> create transfer kids_replicate type is extraction
>cont> move tables     (can't put views here - causes syntax error)
>cont> select * from kids_view
>cont> to existing filename 'db_test_target'
>cont> with no checking
>cont> log is kids.log;
>%SQL-W-CMPBYWNRL, Invalid computed field VNAME will not be transferred from rela
>tion KIDS_VIEW
>%SQL-W-CMPBYWNRL, Invalid computed field VAGE will not be transferred from relat
>,,,
>etc. this 2nd error message is repeated many, many times.  VAGE is the 2nd
>and last column of a 2-column table.

Hmm, there's something more to this than meets the eye.  It is legal to name
a view in a MOVE TABLES clause of an EXTRACTION transfer.  You ought not to
have gotten a syntax error.  Oh, perhaps I'm interpreting what you said in the
wrong way.  You can't put it on the same line as the MOVE TABLES clause, but
it works on a continuation line?  If that's what you're saying, that's bizarre.
SQL, so far as I know, treats line continuation the same as if it sees a space
character.

>Is this because I didn't also transfer all the tables comprising view
>kids_view in this same transfer?  An answer to this last question on
>extractions transfers is not as urgent as answers to the replication update
>issues as it is not something the customer is waiting for.  Just something I 
>tried during my tests.

When you "materialize" a view by naming it in a MOVE TABLES clause, you don't
have to name the tables on which the view is based.  That's not the problem.
The problem is that prior to ROR 7.0 (your test was with ROR 6.0) it was not
possible to materialize a computed column.  Since your office is 24.7 feet
from mine, any further questions about this might be handled more easily face
to face.

Claude