As a general rule, if you want to do anything with JDBC you are going to need to connect to the database. Its couterintuitive to try to find out stuff about the database, but not connect to it to do so. So what you are asking can't be done. But it does make me wonder why you are asking it. Why can't you connect to the database?