public List<String> getResetTxnSequenceStmts() {
    List<String> stmts = new ArrayList<>();
    switch (dbType) {

    case DERBY:
    case CUSTOM: //ANSI SQL
      stmts.add("ALTER TABLE \"TXNS\" ALTER \"TXN_ID\" RESTART WITH 1");
      stmts.add("INSERT INTO \"TXNS\" (\"TXN_ID\", \"TXN_STATE\", \"TXN_STARTED\","
          + " \"TXN_LAST_HEARTBEAT\", \"TXN_USER\", \"TXN_HOST\")"
          + "  VALUES(0, 'c', 0, 0, '', '')");
      break;
    case MYSQL:
      stmts.add("ALTER TABLE \"TXNS\" AUTO_INCREMENT=1");
      stmts.add("SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI_QUOTES'");
      stmts.add("INSERT INTO \"TXNS\" (\"TXN_ID\", \"TXN_STATE\", \"TXN_STARTED\","
          + " \"TXN_LAST_HEARTBEAT\", \"TXN_USER\", \"TXN_HOST\")"
          + "  VALUES(0, 'c', 0, 0, '', '')");
      break;
    case POSTGRES:
      stmts.add("INSERT INTO \"TXNS\" (\"TXN_ID\", \"TXN_STATE\", \"TXN_STARTED\","
          + " \"TXN_LAST_HEARTBEAT\", \"TXN_USER\", \"TXN_HOST\")"
          + "  VALUES(0, 'c', 0, 0, '', '')");
      stmts.add("ALTER SEQUENCE \"TXNS_TXN_ID_seq\" RESTART");
      break;
    case ORACLE:
      stmts.add("ALTER TABLE \"TXNS\" MODIFY \"TXN_ID\" GENERATED BY DEFAULT AS IDENTITY (START WITH 1)");
      stmts.add("INSERT INTO \"TXNS\" (\"TXN_ID\", \"TXN_STATE\", \"TXN_STARTED\","
          + " \"TXN_LAST_HEARTBEAT\", \"TXN_USER\", \"TXN_HOST\")"
          + "  VALUES(0, 'c', 0, 0, '_', '_')");
      break;
    case SQLSERVER:
      stmts.add("DBCC CHECKIDENT ('txns', RESEED, 0)");
      stmts.add("SET IDENTITY_INSERT TXNS ON");
      stmts.add("INSERT INTO \"TXNS\" (\"TXN_ID\", \"TXN_STATE\", \"TXN_STARTED\","
          + " \"TXN_LAST_HEARTBEAT\", \"TXN_USER\", \"TXN_HOST\")"
          + "  VALUES(0, 'c', 0, 0, '', '')");
      break;
    case UNDEFINED:
    default:
      break;
    }
    return stmts;
  }
Returns the SQL query to lock the given table name in either shared/exclusive mode
@param txnLockTable
@param shared
@return
@throws MetaException
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/DatabaseProduct.java