public String getDatabaseUrl() {
    if (getPersistenceType() != PersistenceType.IN_MEMORY) {
      String URI = getProperty(SERVER_JDBC_URL);
      if (URI != null) {
        return URI;
      } else {
        return getLocalDatabaseUrl();
      }
    } else {
      return JDBC_IN_MEMORY_URL;
    }
  }
Check persistence type Ambari Server should use. Possible values:
in-memory - use in-memory Derby database to store data
local - use local Postgres instance
remote - use provided jdbc driver name and url to connect to database
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java