This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
High I want to know how to get the tablespace in database I need to get the List of table and their tablespaces in a database (Oracle,DB2,MSSQL) if anybody know how to get using Java-JDBC please help me Advance thanks with regards bala
hi, i have created tables in ms access and connected using jdbc and worked on it using jsp. well creating tables in ms access is quite easy.And for connectivity you just have to include your database name inthe odbc data source administator inthe control panel being a sysem DSN and the driver select it as the ms access driver(*mdb). bye.
Bala, If I am not mistaken, different DBMS's define "tablespace" in different ways. In any case, as far as I know, there is nothing in the JDBC API that will return the "tablespace" names. Of-course, you can get the table names via the "getTables()" method of the "java.sql.DatabaseMetaData" interface.
If you really want the "tablespace" names, then I think you will have to directly query the data dictionary of the DBMS you are working with. Naturally, the query will vary between different DBMS's. With Oracle, you can query the ALL_TABLES view, which holds both the table name as well as the tablespace name. Since I don't work with the other DBMS's you mentioned, I can't tell you how to locate the relevant information in their data dictionaries (sorry).