@SuppressWarnings("nls")
  private MDataConnector getMDataConnector(String name) throws NoSuchObjectException {
    MDataConnector mdc = null;
    boolean commited = false;
    Query query = null;
    try {
      openTransaction();
      name = normalizeIdentifier(name);
      query = pm.newQuery(MDataConnector.class, "name == dcname");
      query.declareParameters("java.lang.String dcname");
      query.setUnique(true);
      mdc = (MDataConnector) query.execute(name);
      pm.retrieve(mdc);
      commited = commitTransaction();
    } finally {
      rollbackAndCleanup(commited, query);
    }
    if (mdc == null) {
      throw new NoSuchObjectException("There is no dataconnector " + name);
    }
    return mdc;
  }
Alter the database object in metastore. Currently only the parameters
of the database or the owner can be changed.
@param dbName the database name
@param db the Hive Database object
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java