Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2003
    Posts
    9

    Unanswered: Primary key and replication

    Hi,

    I have a warm standby architecture ( v11.5 ) with table replication level ( set_reptable )

    an "update" statement which don't use text/image column in the where clause, generate the error message below. the table don't have Primary key constraint, but there is an index.

    my question is, if i don't use replication definition for this table, must i have definitely a primary key


    repserver errror log
    ------------------

    E. 2004/04/22 17:42:09. ERROR #1028 DSI EXEC(104(1) SYBG2R_BATCH.g2r) - dsiqmint.c(2774)
    Message from server: Message: 306, State 1, Severity 16 -- 'TEXT and IMAGE datatypes may not be used in a WHERE clause, except with the LIKE expression.
    '.
    H. 2004/04/22 17:42:09. THREAD FATAL ERROR #5049 DSI EXEC(104(1) SYBG2R_BATCH.g2r) - dsiqmint.c(2781)
    The DSI thread for database 'SYBG2R_BATCH.g2r' is being shutdown. DSI received data server error #306 which is mapped to STOP_REPLICATION. See logged data server errors for more information. The data server error was caused by output command #1 mapped from input command #17215 of the failed transaction.
    I. 2004/04/22 17:42:09. The DSI thread for database 'SYBG2R_BATCH.g2r' is shutdown.

  2. #2
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    524

    Lightbulb

    configure your replication definition using the "replicate minimal columns" option

  3. #3
    Join Date
    Nov 2003
    Posts
    9
    in fact, in a warm standby replication, i can avoid replication definitions if i use the "sp_setreptable mytable,true" command. so my table will be replicated. but i don't understand why i have this error message.

  4. #4
    Join Date
    Sep 2003
    Location
    Switzerland
    Posts
    443
    Hi HMO,

    What fadace was implying is that, if you dont have a replication definition, RepServer will carry over all the columns in the where clause, which is why you are facing this problem.

    When you define the rep def with minimal columns, RepDef will carry over only the columns specified as primary key in the Replication Definition.

    In order to use the minimal columns, you dont necessarily need to have a Primary Key defined in the table, but you need to define a logical key in the Rep Def. Remember, only those keys (defined in the RepDef) will be transferred over in the where clause. So, if they are not unique, then there are chances that RepServer will update multiple rows.

  5. #5
    Join Date
    Nov 2003
    Posts
    9

    Thumbs up

    HI trvishi,

    Thank you for your help, it's very clear

    Best regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •