Retrieving the database name and connection URL
To retrieve the database name, invoke the SYSCS_UTIL.SYSCS_GET_DATABASE_NAME() system function,
as documented in the Derby Reference Manual. You
can also use DatabaseMetaData to return the connection URL of
any local Connection.
Database connection URLretrieving from database
/* in java */
String myURL = conn.getMetaData().getURL();