Here you can find the source of getDBMSName(Connection conn)
public static String getDBMSName(Connection conn) throws SQLException
//package com.java2s; //License from project: Apache License import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.SQLException; public class Main { public static String getDBMSName(Connection conn) throws SQLException { DatabaseMetaData dmd = conn.getMetaData(); return dmd.getDatabaseProductName(); }//w ww.jav a 2 s . co m }