Here you can find the source of getDatabaseId(DatabaseMetaData md)
private static String getDatabaseId(DatabaseMetaData md) throws SQLException
//package com.java2s; import java.sql.DatabaseMetaData; import java.sql.SQLException; public class Main { private static String getDatabaseId(DatabaseMetaData md) throws SQLException { return md.getDatabaseProductName() + " " + md.getDatabaseProductVersion(); }// ww w . ja v a2 s.co m }