Skip to end of metadata
Go to start of metadata

 

Overview


In general, DDL operations on the DB require an exclusive lock on the table. ALTIBASE HDB uses a network-based redundancy technique in which data is matched by transmitting the transaction log generated in the local server to the other server.

DDL-like operations are not sent to the log, so DDL operations are not replicated. Therefore, different from the disk sharing method, a different method of performing DDL operations on each node (Server) is required.

 

Version


ALTIBASE HDB supports different types of DDL statements depending on the version, and the functions of DDL statements related to replication are also different.

In the case of simple DDL operation, the operation procedure in this document can be used as it is in ALTIBASE HDB 4.3.9, but it is mainly described for ALTIBASE HDB 5.3.3 or later.

 

Procedure


If there is a possibility that a large amount of data change may occur due to the DDL statement, other safer operation procedures should be used, and please refer to the DDL Guide of ALTIBASE Replication Environment.

Operation under service outages

In an environment where all services accessing the database can be stopped for a certain period of time, it can be completed with a relatively simple procedure.

StepA nodeB node
STEP 1
  •  Stop the serve (take action to prevent transactions from occurring)
    • In order to stop the service, the service port is changed after the DB is stopped, and the service is started.
    • Check the session connected to the database or checking the statement being executed
      • iSQL> select count(*) from v$session;
      • iSQL> select count(*) from v$statement where execute_flag =1 ; 
STEP 2
  •  Check that the replication gaps of the target nodes are all "0" (this means the DB where the replication sender is driven) 
    • Check the replication object to which the target table for DDL execution belongs
      • iSQL> select REPLICATION_NAME,LOCAL_USER_NAME, LOCAL_TABLE_NAME from SYSTEM_.SYS_REPL_ITEMS_;
    • Check the replication gap
      • iSQL> SELECT rep_name, rep_gap FROM v$repgap;      # Check that rep_gap is all 0.  
STEP 3
  • Stop the replication of target node
    • iSQL>  ALTER REPLICATION rep_name STOP;   # The replication object (REP_NAME) is checked in STEP 2.
STEP 4
  • Remove the target table to execute DDL from the replication object
    • iSQL> ALTER REPLICATION rep_name DROP TABLE FROM user_name.table_name TO user_name.table_name
STEP 5
  • Perform DDL operation  
    •  iSQL> ALTER TABLE t1 ADD COLUMN ( c1 INTEGER);
STEP 6
  • Add the replication target table removed in STEP 4 back to the replication object list
    • iSQL> ALTER REPLICATION rep_name ADD TABLE FROM user_name.table_name TO user_name.table_name
STEP 7
  • Start the replication at the target node
    •  iSQL> ALTER REPLICATION rep_name START
STEP 8
  • Initiate the service
    • If the service port number of the DB is changed in STEP 1, restore the service port and restart the database.
    • After restarting the DB service by running the application, check the DB status.

Operation under uninterrupted constraints


In an environment that requires uninterrupted service, there may be a limitation that one node must alternately work one node at a time while operating the database.

Under these conditions, compared to the environment in which service disruption described above is possible, several steps are required and caution may be required.

  • Please refer to the DDL guide document of the ALTIBASE replication environment.
  • Get technical support from ALTIBASE Technical Support Division (Service Portal:http://support.altibase.com/en/, TEL +82-2-2082-1114)

 

  • No labels