Rare table name in database

oracle 10g / REDHAT 5
when i query dba_tables
BIN$n+sY6MW2VRrgQAB/AQAkdg==$0 table occupies 32MB of space
BIN$hD+je2pVgt/gQAB/AQAYgg==$0 table occupies 168 MB of space
BIN$n+sY6MW1VRrgQAB/AQAkdg==$0 table occupies 256 MB of space
BIN$n+mv15O9EpTgQAB/AQAiRA==$0 table occupies 952 MB of space
these tables are in two tablespaces.
what i have to do to delete these tables
how these tables were created in the database,
Please guide me.
santhanam

SQL > purge dba_recyclebin
This removes all dropped objects. You will need SYS DBA privileges to execute this.
#logged in as a user
purge recyclebin;
This command removes all your dropped objects from that logged username.

Similar Messages

  • How get all table name from database

    hi master
    sir
    how get all table name from database

    The big question is 'why'.
    Selecting from view 'dba_tables' will indeed give the list of all tables in the database, but that includes the dictionary tables and the internal tables, and many others that are probably not of interet to a person who needs to ask this question. Besides, the dba_tables view requires access to a DBA account.
    There are several other views: "user_tables" will list all the tables in this user's schema; and "all_tables" will list all the tables this user can access in some way.
    The above do not, of course, include any information about synonyms, sequences, views, indexes and so on.
    The correct answer and the meaningful answer may be two different things.

  • How To Find Out Table Name At Database Level Trigger

    Table Name
    How do I will come to know the name of table on which currently DML statement is fired ?
    e. g. My current user is SCOTT. So Scott should realize the event of DML Statement fired. Hence my question is how the trigger on User Level is to be written & how to catch the event & table name on which the statement is being executed.
    Suppose my table is as follows
    Table Name : EMP
    EMPNO number
    ENAME varchar2(10)
    JOB varchar2(9)
    MGR number
    HIREDATE date
    SAL number
    COMM number
    DEPTNO number
    Bcd number
    Brcd number
    Rec_id number
    Scn_no number
    Sequences for above table
    1. EMP_REC_ID - minimum value is 1 increment by 1 & max value is unlimited
    2. EMP_SCN_NO - minimum value is 1 increment by 1 & max value is unlimited
    I have written a trigger as follows :
    CREATE OR REPLACE TRIGGER UPD_EMP_REC_SCN BEFORE INSERT OR UPDATE OR DELETE ON EMP REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW
    DECLARE
    BEGIN
    IF (INSERTING) THEN
    SELECT EMP_REC_ID.NEXTVAL INTO :NEW.REC_ID FROM DUAL;
    ELSIF (UPDATING) THEN
    SELECT EMP_SCN_NO.NEXTVAL INTO :NEW.SCN_NO FROM DUAL;
    ELSIF (DELETING) THEN
    INSERT INTO DELETED_ROWS (TAB_NAME, BCD, BRCD, REC_ID)
    VALUES (‘EMP’, :OLD.BCD, :OLD.BRCD, :OLD.REC_ID);
    END IF;
    END;
    Hence My problem is
    If my database user contains 800 tables then I have to write down 800 triggers (i.e. for each table).
    I want to write only one trigger at database level so that I can dynamically take actions, for this I need table name and the event on which the dml event has taken place.
    Any help in this matter will be greatly appreceiated.
    Regards
    Vikrant

    You cannot write a single trigger that applies to multiple tables. If you need a trigger for every table, you will need to generate 800 triggers.
    Rather than manually generating 800 triggers, you might write a code generator that generates triggers for each of the tables by querying the data dictionary (i.e. DBA_TABLES, DBA_TAB_COLS, etc).
    Justin

  • Refresh tool and table name containing database name in Mysql

    Hi,
    when refreshing the database schema and my table name contains a database name (for example "my_other_db.my_other_table"), the refresh tool never sees weather "my_other_db.my_other_table" already exists or not. so it always generates a create-table-statement (which is syntactically correct, but of course fails, because that table exists already).
    Is there known workaround for it? I am using Mysql 5.0.x, jdbc driver 5.0.7, Kodo 4.1.4 (but this problem was there before).
    Right now i'm deleting the database names from my package.jdo-files, then doing the refresh command and after that i put back the database names. At runtime Kodo works very well with the database name before the table name.
    Thanks very much,
    Markus

    1. For WBS element under consideration, get OBJNR from PRPS table
    2. Get PO numbers from COEP where OBJNR = PRPS-OBJNR obtained in step 1

  • Table name in database

    I am not able to find table name in procedure,func and package in database where this table is used, can anybody suggest what is the coomand for this I have already used below command
    select * from all_source where text like '%MSR%'
    Please suggest any other command

    Hello,
    You may use the View DBA_SOURCE instead of ALL_SOURCE.
    Hope this help.
    Best regards,
    Jean-Valentin

  • Table Name in database- Oracle11g

    Hi All,
    When we create user in OIM (9.1.x). What is the table/column name where i can see it getting created in database?
    Thanks & Regards,
    Newbie

    There are lot of tables involved at the time of user creation. If you enabled Auditing and if you have access policies in place then OIM stores user information in many tables.
    Anyways, Organization field in USR table is identified as ACT_KEY(org key). You need to see ACT table to find the org name for org key.
    You may need to see USG table also as it stores the UGP_KEY for particular USR_KEY.
    Be specific about your requirement so we can help you what you want to acheive.

  • What are the tables name in database belongs to AGIS?

    Dear all:
    I want to know what are the tables in database belongs to AGIS , such as transactions,AGIS "Intercompany Organization Assignments"?
    My environment is : Oracle R12.1.3
    Regards
    Terry

    Terry,
    Please see these docs/links.
    Advanced Global Intercompany Systems FAQ [ID 975235.1]
    Troubleshooting AGIS Accounting [ID 813397.1]
    How to Determine Data Populated in the Reference Columns in GL,AR,AP Interface tables for AGIS Invoices [ID 853296.1]
    Oracle E-Business Suite Release 12.1 Release Content Documents [ID 561580.1]
    eTRM Version 12.1.1
    http://etrm.oracle.com/pls/et1211d9/etrm_search.search
    Thanks,
    Hussein

  • Getting problem when retriving Table name

    Hi,
    I'm having problem when i trying to get the table name from database. I'm using NetBeans 6.0, And It does n't show any error during compile and run time. I could n't find where the problem is?
    Code:_
    DatabaseMetaData dbm=conn.getMetaData();
    String[] types={"TABLES"};
    ResultSet rs=dbm.getTables("%","%","%",types);
    System.out.println("TableName:");
    while(rs.next())
    String tableName=rs.getString("TABLE_NAME");
    String tableSchema=rs.getString("TABLE_SCHEM");
    String tableCatalog=rs.getString("TABLE_CAT");
    System.out.println(tableName);
    conn.close();
    System.out.println("Disconnected from database");
    Output is:_
    MySQL Connect Example.
    TableName:
    BUILD SUCCESSFUL
    Regds,
    Prabu
    Edited by: [email protected] on Apr 16, 2008 12:32 PM

    Why did you repost? Don't do this, it is extremely rude!
    Stick with your other thread. I just gave you what I believe to be the correct answer.
    [Original Post|http://forum.java.sun.com/thread.jspa?threadID=5286520&tstart=0]

  • Alternative table name on client side

    Hi,
    i'm using java api for my publication and i have to use an alternative table name on client side. For example the table name on database back-end is 'EMP', but, the statement for the snapshot is "SELECT * FROM EMP" but i would like using another name on client side, not 'EMP'. The API doc does'not help me.
    Thanks

    I do not believe this is possible. When publishing you get an error if the publication item name is not found in the schema database.
    More complicated, but would work, would be to create a view in your main schema create view v_emp as select * from emp
    you can then use v_emp as the name, and this is what will be created on the client. Depending on the view complexity, you may need to create instead of ionsert/update/delete triggers for it, and in the publication item define the base tabe and PK values

  • Database "TABLE" name change is NOT reflecting on Designer Security

    Hi all members,
    version: BOXI 3.1
    I have change the table name in my Database for some particular reason.
    After changing the name from "A_Table" to "B_Table" it is updating the objects "select"  information correctly by itslef. BUT for security in (Manage Access Rights) old Table name is showing.
    Manaul correction is the only way for it? Can this be updated automatically.
    What is the way to achieve it through SDK.
    Kindly any member guide me.
    I have number of tables to change and each have number of securities applied in universe.
    Thanks in advance
    Regards,
    Izhar

    Universe access security is encapsulated separate from the Universe unv itself.
    Rather, it's a SI_KIND='Overload' InfoObject instance, accessible using the BusinessObjects Enterprise SDK.
    Sincerely,
    Ted Ueda

  • How can find  database field and table name

    how can find the underline database field name,table name from java page. Example. in oracle apps when we go purchaseing super user then supplier base then supplier and find supplier detail .

    Hi,
    depends on your model. If you work with ADF BC then you can use ViewLinks to access parent or detail infromation programmatically. See the developer guides for more information. Note that you wont access the tables directly but the collections that represent the records
    Frank

  • Getting the table names in an MS Access database

    Hi,
    I am new to JDBC and making a client/server application that updates a MS Access database through jdbc:odbc.
    I need to get a list of existing user tables in the db. I have found a great document on the net which has the code, however the code doesn't work. I have tried different ways and looked every where with no success. (link to the doco: http://www-128.ibm.com/developerworks/opensource/library/j-jdbc-objects/)
    Here is my dbManager class that handles all db related services in my application. I would appreciate any help I can get as I have exhusted all my avenues.
    Thanks
    Sep,
    * dbManager.java
    * Created on 31 October 2005, 10:20
    * To change this template, choose Tools | Options and locate the template under
    * the Source Creation and Management node. Right-click the template and choose
    * Open. You can then make changes to the template in the Source Editor.
    import java.io.*;
    import java.sql.*;
    import java.util.regex.*;
    * @author AUMahdavSe
    public class dbManager {
        /** Constant Declaration                */
        public static final String Driver = "sun.jdbc.odbc.JdbcOdbcDriver";
        public static final
            String sqlCreateTable = "create table TABLENAME (" +
                "name varchar (100)," +
                "surname varchar(100)," +
                "computerType integer," +
                "computerNAL varchar(20)," +
                "haveMonitor integer," +
                "monitorNAL varchar (20)," +
                "auditDate varchar(10) );";
        public static final String sqlUpdateTable = "insert into TABLENAME values" +
                " (NAMEHOLDER, SURNAMEHOLDER, COMPTYPE, COMPNAL, HAVEMON, MONNAL);";
        /** Attributes                          */
        private String dbURL = "jdbc:odbc:";
        private String Username = "admin";  // user input
        private String Password = "purina123";  // user input
        private String ODBCDataSource;  // config file
        private String dbPath;  // set through config file or defaults to current folder
        private String configFile = "config.txt"; // set either at commandline or defaults to current folder
        private Connection con = null;
        private Statement stmt = null;
        private ResultSet tables;
        private DatabaseMetaData dma;
        private ResultSetMetaData rsmd;
        private String CurrentAuditTable = "TestTable2";
        int numCols, i;
        /** Set Methodes                        */
        public void setUsername( String usr ) {
            this.Username = usr;
        public void setPassword( String pswd ) {
            this.Password = pswd;
        public void setDbPath( String path ) {
            this.dbPath = path;
        public void setODBCDataSource( String ds ) {
            this.ODBCDataSource = ds;
        public void setDbURL( String dsname ) {
            this.dbURL = this.dbURL + dsname;
        /** Get Methodes                        */
        public String getDriver() {
            return this.Driver;
        // can be run only after a connection obj is setup
        public void getMDA() {
            try {
                this.dma = this.con.getMetaData();           
            catch (SQLException ex) {
                System.err.println("database connection: " + ex.getMessage());
        public void getDBTables() {
            //now dump out the names of the tables in the database
            String[] types = new String[1];
            types[0] = "TABLES"; //set table type mask
            //note the %-sign is a wild card (not '*')
            try {
                this.tables = this.dma.getTables(null, null, "%", types);
                dumpResults("--Tables--");
                this.tables.close();
                //this.listTables();
            catch (SQLException ex) {
                System.err.println("database connection: " + ex.getMessage());
            // listing tables
            /*int count = 0;
            int numCols = 0;
            //ResultSetMetaData rsmd;
            try {
                System.out.println("Listing db tables ...");
                //this.tables.beforeFirst();
                rsmd = this.tables.getMetaData();
                numCols = rsmd.getColumnCount();
                System.out.println("number of cols: " + numCols);
                boolean more = this.tables.first();
                System.out.println("this is why: " + more);
                while ( more ) {
                    count++;
                    for (int i = 1; i <= numCols; i++)
                        System.out.print( "Table-" + count + " -> " + this.tables.getString(count)+"    " );
                    System.out.println();
                    more = this.tables.next();
            catch ( SQLException ex ) {
                System.out.println( "problem listing db tables: " + ex.getMessage() );
        /** Other Methodes                      */
        // Initialize the db parameters, like driver, username, passwd, etc.
        public void dbInitialize() {
            // load configuration from config.txt (dbPath and ODBC Data Source name)
            this.loadDbConfig();
            // loadDriver
            this.loadDriver();
            // get username and password for the ODBC from user
            this.getDSSecurity();
            // populate dbURL, username and password
            this.setDbURL( this.ODBCDataSource );
            // connect to db
            this.dbConnect();
            // get db metadata
            this.getMDA();
            // get a list of tables in db
            this.getDBTables();
        // load JDBC driver
        public void loadDriver() {
            try {
                Class.forName( getDriver() );
            } catch (Exception e) {
                System.out.println("Failed to load JDBC/ODBC driver.");
                return;
        // connects to db and create a Connection obj and a Statement obj
        public void dbConnect() {
           try {
                this.con = DriverManager.getConnection (
                    this.dbURL,
                    this.Username,
                    this.Password);
                this.stmt = con.createStatement();
            } catch (Exception e) {
                System.err.println("problems connecting to "+this.dbURL);
        // creates table tblname in db
        public void CreateTable( String tblname ) {
            try {
                String sqlcommand = mergeTblName(sqlCreateTable, tblname);
                this.stmt.execute( sqlcommand );
            catch (SQLException ex) {
                System.err.println("problems with SQL statement sent to "+this.dbURL+
                    ": "+ex.getMessage());
                System.out.println("SQL Command: " + mergeTblName(sqlCreateTable, tblname) );
        // updates db with new record(s) by executing the SQL query sqlstmt
        // and closes db connection
        public void dbUpdate( String sqlstmt ) {
            try {
                // execute SQL commands to create table, insert data
                this.stmt.execute( sqlstmt );
                this.con.close();
            } catch (Exception e) {
                System.err.println("problems with SQL sent to "+this.dbURL+
                    ": "+e.getMessage());
        // list all user tables in the db
        public void listTables() {
            //now dump out the names of the tables in the database
            int count = 0;       
            try {
                System.out.println("Listing db tables ...");
                //this.tables.beforeFirst();
                while ( this.tables.next() ) {
                    count++;
                    System.out.print( "Table-" + count + " -> " + this.tables.getString(1) );
                    System.out.println();
            catch ( SQLException ex ) {
                System.out.println( "problem listing db tables: " + ex.getMessage() );
        // checks whether tbname exist in db as a table
        // this function has to be called after dbConnect
        public boolean tableExists( String tbname ) {
            boolean tbexists = false;
            //get the database metadata
            try {
                dma = con.getMetaData();           
            catch (SQLException ex) {
                System.err.println("database connection: " + ex.getMessage());
            //now dump out the names of the tables in the database
            String[] types = new String[1];
            types[0] = "TABLES"; //set table type mask
            //note the %-sign is a wild card (not '*')
            try {
                tables = dma.getTables(null, null, "%", types);
            catch (SQLException ex) {
                System.err.println("database connection: " + ex.getMessage());
            try {
                while ( tables.next() ) {
                    if ( tbname.equalsIgnoreCase( tables.getString(1) ) ) {
                        tbexists = true;
            catch ( SQLException ex ) {
                System.err.println("database connection: " + ex.getMessage());
            return tbexists;
        // merge tablename using REGEX
        public String mergeTblName( String sqlcommand, String tbname ) {
            String REGEX = "TABLENAME";
            String INPUT = sqlcommand;
            String REPLACE = tbname;
            Pattern p = Pattern.compile(REGEX);
            Matcher m = p.matcher(INPUT); // get a matcher object
            INPUT = m.replaceAll(REPLACE);
            //System.out.println(INPUT);
            return INPUT;
        // merge feildnames specific terms using REGEX
        public String mergeFldName( Message msg ) {
            String sqlcommand;
            sqlcommand = "insert into TABLENAME values" +
                    " ('" + msg.getName() + "', '" + msg.getSurname() + "', " +
                    msg.getComputerType() + ", '" + msg.getComputerNAL() + "', " +
                    msg.getHaveMonitor() + ", '" + msg.getMonitorNAL() + "', '" +
                    msg.getDateOfMsg() + "');";
            sqlcommand = mergeTblName( sqlcommand, CurrentAuditTable );
            return sqlcommand;
        // get users input char
        /**public char getChar() {
            int i = System.in.read();
            while (i != -1) {
              // here's your character
              char c = (char) i;
              i = System.in.read();
            return (char) i;
        // load the config parameters from config.txt
        public void loadDbConfig() {
            // make a file obj pointing to the config file config.txt
            File configFile = new File( this.configFile );
            //...checks on configFile are elided
            StringBuffer contents = new StringBuffer();
            //declared here only to make visible to finally clause
            BufferedReader input = null;
            try {
              //use buffering
              //this implementation reads one line at a time
              input = new BufferedReader( new FileReader(configFile) );
              String line = null; //not declared within while loop
              int count = 0;
              while (( line = input.readLine()) != null){
                //first line in config file is dbPath
                if(count == 0) this.setDbPath( line.trim() );
                //second line in config file is ODBCDataSource
                if(count == 1) this.setODBCDataSource( line.trim() );
                count++; 
                //contents.append(line);
                //contents.append(System.getProperty("line.separator"));
            catch (FileNotFoundException ex) {
                System.err.println("the file congif.txt cannot be found ...");
                System.err.print("Enter the path to db file (e.g. c:\\temp): ");
                BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                //  read the db path from the command-line; need to use try/catch with the
                //  readLine() method
                try {
                    this.setDbPath( br.readLine() );
                catch (IOException ioe) {
                    System.out.println("IO error trying to read user input.");
                    System.exit(1);
                System.err.print("Enter the name of the ODBC Data Source: ");
                //  read the ODBC Data Source name from the command-line; need to use try/catch with the
                //  readLine() method
                try {
                    this.setODBCDataSource( br.readLine() );
                catch (IOException ioe) {
                    System.out.println("IO error trying to read user input.");
                    System.exit(1);
                ex.printStackTrace();
            catch (IOException ex){
              //ex.printStackTrace();
            finally {
              try {
                if (input!= null) {
                  //flush and close both "input" and its underlying FileReader
                  input.close();
              catch (IOException ex) {
                //ex.printStackTrace();
            //return contents.toString();
        // get datasource security details i.e. username and password
        public void getDSSecurity() {
            // get username
            System.out.print("Enter username for the ODBC DataSource: ");
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            //  read the username from the command-line; need to use try/catch with the
            //  readLine() method
            try {
                this.setUsername( br.readLine() );
            catch (IOException ioe) {
                System.out.println("IO error trying to read username.");
                System.exit(1);
            // get password
            System.out.print("Enter password: ");
            //  read the username from the command-line; need to use try/catch with the
            //  readLine() method
            try {
                this.setPassword( br.readLine() );
            catch (IOException ioe) {
                System.out.println("IO error trying to read password.");
                System.exit(1);
        private void dumpResults(String head)
         //this is a general routine to print out
         //column headers and the contents of each column
         System.out.println(head);
          try
           //get the number of columns from the metadata
           this.rsmd = this.tables.getMetaData();      
           numCols = this.rsmd.getColumnCount();
           //print out the column names
           for (i = 1; i<= numCols; i++)
             System.out.print(rsmd.getColumnName(i)+"     ");
           System.out.println();
           //print out the column contents
           boolean more = this.tables.next();
           while (more)
             for (i = 1; i <= numCols; i++)
               System.out.print(this.tables.getString(i)+"     ");
             System.out.println();
             more = this.tables.next();
         catch(Exception e)
           {System.out.println(e.getMessage());}
        /** Creates a new instance of dbManager */
        public dbManager() {
            this.dbInitialize();
    }here is the result when I make a new dbManager obj from my server class which is a multithreaded one.
    H:\java>java EchoServer
    Enter username for the ODBC DataSource: admin
    Enter password: purina123
    Tables
    TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS
    Listening for clients on 12111...
    here is the code of my server class called EchoServer:
    import java.net.*;
    import java.io.*;
    public class EchoServer
        ServerSocket m_ServerSocket;
        dbManager haDB;
        public EchoServer() 
            // db methods to setup a jdbc connection to the database
            haDB = new dbManager();
            // list tables
            //haDB.listTables();       
            //haDB.getDBTables();
            // create table
            //haDB.CreateTable("TestTable2");
            // update table
            // server code
            try
                // Create the server socket.
                m_ServerSocket = new ServerSocket(12111);
            catch(IOException ioe)
                System.out.println("Could not create server socket at 12111. Quitting.");
                System.exit(-1);
            System.out.println("Listening for clients on 12111...");
            // Successfully created Server Socket. Now wait for connections.
            int id = 0;
            while(true)
                try
                    // Accept incoming connections.
                    Socket clientSocket = m_ServerSocket.accept();
                    // accept() will block until a client connects to the server.
                    // If execution reaches this point, then it means that a client
                    // socket has been accepted.
                    // For each client, we will start a service thread to
                    // service the client requests. This is to demonstrate a
                    // multithreaded server, although not required for such a
                    // trivial application. Starting a thread also lets our
                    // EchoServer accept multiple connections simultaneously.
                    // Start a service thread
                    ClientServiceThread cliThread = new ClientServiceThread(clientSocket, id++, haDB);
                    cliThread.start();
                catch(IOException ioe)
                    System.out.println("Exception encountered on accept. Ignoring. Stack Trace :");
                    ioe.printStackTrace();
        public static void main (String[] args)
            new EchoServer();    
        class ClientServiceThread extends Thread
            Socket m_clientSocket;        
            int m_clientID = -1;
            dbManager m_db;
            boolean m_bRunThread = true;
            ClientServiceThread(Socket s, int clientID, dbManager db)
                m_clientSocket = s;
                m_clientID = clientID;
                m_db = db;
            public void run()
                // Obtain the input stream and the output stream for the socket
                // A good practice is to encapsulate them with a BufferedReader
                // and a PrintWriter as shown below.
                BufferedReader in = null; 
                PrintWriter out = null;
                Message msg = new Message();
                // Print out details of this connection
                System.out.println("Accepted Client : ID - " + m_clientID + " : Address - " + 
                                 m_clientSocket.getInetAddress().getHostName());
                try
                    in = new BufferedReader(new InputStreamReader(m_clientSocket.getInputStream()));
                    out = new PrintWriter(new OutputStreamWriter(m_clientSocket.getOutputStream()));
                    // At this point, we can read for input and reply with appropriate output.
                    // Run in a loop until m_bRunThread is set to false
                    while(m_bRunThread)
                        // read incoming stream
                        String clientCommand = in.readLine();
                        if ( clientCommand.indexOf(",") != -1 ) {
                            msg.deserialize( clientCommand );
                            System.out.println("SQL command: " + m_db.mergeFldName(msg) );
                            m_db.dbUpdate( m_db.mergeFldName(msg) );
                            //System.out.println("Name :" + msg.getName() );
                            //System.out.println("Surname :" + msg.getSurname() );
                            //System.out.println("ComputerType :" + msg.getComputerType() );
                            //System.out.println("ComputerNAL :" + msg.getComputerNAL() );
                            //System.out.println("HaveMonitor :" + msg.getHaveMonitor() );
                            //System.out.println("Monitor NAL :" + msg.getMonitorNAL() );
                            //System.out.println("AuditDate :" + msg.getDateOfMsg() );                       
                        System.out.println("Client Says :" + clientCommand);
                        if(clientCommand.equalsIgnoreCase("quit"))
                            // Special command. Quit this thread
                            m_bRunThread = false;   
                            System.out.print("Stopping client thread for client : " + m_clientID);
                        else
                            // Echo it back to the client.
                            out.println(clientCommand);
                            out.flush();
                catch(Exception e)
                    e.printStackTrace();
                finally
                    // Clean up
                    try
                        in.close();
                        out.close();
                        m_clientSocket.close();
                        System.out.println("...Stopped");
                    catch(IOException ioe)
                        ioe.printStackTrace();
    }

    I find that taking any problem and reducing it to the simplest thing is the best way to approach it.
    Why you had to post all that bloody code (especially since you didn't write it) is beyond me.
    This will list all the tables in an Access database (or any other, for that matter):
    import java.sql.Connection;
    import java.sql.DatabaseMetaData;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.ResultSetMetaData;
    import java.sql.SQLException;
    import java.util.ArrayList;
    import java.util.List;
    import org.jdom.Element;
    import org.jdom.Document;
    import org.jdom.output.XMLOutputter;
    public class TableLister
        public static final String DRIVER   = "sun.jdbc.odbc.JdbcOdbcDriver";
        public static final String DATABASE = "jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\\Edu\\Java\\Forum\\DataConnection.mdb";
        public static final String USERNAME = "admin";
        public static final String PASSWORD = "";
        public static void main(String [] args)
            try
                String driver           = ((args.length > 0) ? args[0] : DRIVER);
                String url              = ((args.length > 1) ? args[1] : DATABASE);
                String username         = ((args.length > 2) ? args[2] : USERNAME);
                String password         = ((args.length > 3) ? args[3] : PASSWORD);
                Class.forName(driver);
                Connection conn         = DriverManager.getConnection(url, username, password);
                DatabaseMetaData meta   = conn.getMetaData();
                // Bring back ALL tables and views, including SYSTEM tables.
                ResultSet tables        = meta.getTables(null, null, null, null);
                ResultSetMetaData rsmd  = tables.getMetaData();
                int numColumns          = rsmd.getColumnCount();
                List columnNames        = new ArrayList();
                for (int j = 0; j < numColumns; ++j)
                    columnNames.add(rsmd.getColumnName(j+1));
                Element root = new Element("tables");
                int tableCount = 0;
                while (tables.next())
                    Element table = new Element("table");
                    table.setAttribute("id", Integer.toString(++tableCount));
                    for (int j = 0; j < numColumns; ++j)
                        Element column = new Element((String)columnNames.get(j));
                        column.setText(tables.getString((String)columnNames.get(j)));
                        table.addContent(column);
                    root.addContent(table);
                conn.close();
                Document doc = new Document(root);
                XMLOutputter outputter = new XMLOutputter("   ", true);
                System.out.println(outputter.outputString(doc));
            catch (ClassNotFoundException e)
                System.err.println("Couldn't load JDBC driver class");
                e.printStackTrace();
            catch (SQLException e)
                System.err.println("SQL state: " + e.getSQLState());
                System.err.println("SQL error: " + e.getErrorCode());
                e.printStackTrace();
            catch (Exception e)
                e.printStackTrace();
    }Run it and see if it works for you. If it does, put the essence of the code into your stuff.
    %

  • Using column value is it possible to find the table name in the database?

    Hi all,
    using column value is it possible to find the table name in the database?
    guys i need the table value
    Note:
    oracle-9i
    for example:
    i don't know NIC(column value) in which table in the database.
    Thank you,
    with regards,
    JP.
    Edited by: Guest on Feb 27, 2012 5:42 AM

    Hi,
    As far as I understand what you are asking for I would suggest 4 data dictionaries that will help you to know the table name from the column names
    1. USER_TAB_COLS
    2. ALL_TAB_COLS
    3. DBA_TAB_COLS
    4. COLS
    These can give you detail information about the columns and respective tables at user, schema, dba level. Further information on the table can be found by querying ALL_OBJECTS table giving table_name as Object_name, or you can join the data dictionaries too.
    To know about various data dictionaries avalible in Oracle please query select * from cat;
    Let us know if you need further assistance.
    Twinkle

  • How do I list all of the table names in my excel database

    I am writing code for an electronic sales board display in my
    office. unfortunatly the datasource that is available to me is an
    excel file that is updated by the sales manager every day. each
    sales persons information is listed in a different tab and the tabs
    name is the same as the corrosponding sales person. unfortunatly we
    hire and fire many sales people every month so I need to loop
    through a list of the tab names outputing the results as the table
    name for my detail query for each sales rep.
    anyone have this query information?

    Yet another creative use of Excel as something which it's
    not, i.e. a database.
    COM it is if your access must be real-time.

  • How to pass the Dynamically table name and RELID in IMPORT  x TO y FROM DATABASE dbtab(ar) ID Key

    Hello Expert,
    I wanted to know is there any way through which we can dynamically pass the table name in IMPORT condition.
    For e.g.
    DATA : PCLT TYPE DD03L-TABNAME.
    DATA: SET_RELID TYPE T52RELID-RELID.
    DATA: key TYPE PCLKEY.
    DATA: text_version TYPE PVRSN.
    DATA: BEGIN OF ptext OCCURS 132.
    DATA: line(132).
    DATA: END OF ptext.
    SET_RELID = 'TX'.
    PCLT = 'PCL1'.
    KEY = '00001000004005     9999123119960101000'.
    TEXT_VERSION = '01'.
    IMPORT TEXT_VERSION PTEXT FROM DATABASE <PCLT>(<SET_RELID>) ID KEY.
    If i use this then it gives me error message "The Dictionary structure or table "<PCLT>" is either not active or does not exist."
    Kindly help me in this matter.
    Thanks
    Srikanth

    Hi Srikanth
    I dont know if there is another solution, but this is what i did using a dynamic subroutine, please check it
    just add this lines to your code
    DATA: prog  TYPE c LENGTH 8,
           mess TYPE string,
           sid  TYPE string,
           wrd  TYPE string,
           dir  TYPE trdir,
           OFF(3).
    DATA: lt_code TYPE TABLE OF rssource-line.
    DATA: ls_code TYPE rssource-line.
    perform call_import using pclt set_relid key.
    form call_import USING p_pclt p_set_relid p_key.
       ls_code = 'PROGRAM SUBPOOL.'.
       append ls_code to lt_code.
       ls_code = 'form get_text tables ptext using p_key changing text_version.'.
       append ls_code to lt_code.
       ls_code = 'IMPORT text_version ptext from database'.
       append ls_code to lt_code.
       concatenate p_pclt '(' p_set_relid ')' into ls_code.
       append ls_code to lt_code.
       ls_code = 'id p_key.'.
       append ls_code to lt_code.
       ls_code = 'endform.'.
       append ls_code to lt_code.
       generate subroutine pool lt_code
                           name prog
                           message mess
                           SHORTDUMP-ID sid
                           WORD WRD
                           OFFSET OFF.
       IF SY-SUBRC EQ 0.
         perform GET_TEXT IN PROGRAM (prog) tables ptext
                                              USING p_key
                                              CHANGING text_version .
       ENDIF.
    endform.
    Hope this help
    Regards
    MC

Maybe you are looking for

  • Not able to use new attribute in set defination

    Experts, I have created one custom variable employeestatus. Did the binding with 'user' object and also added in MPR 'Synchronization: Synchronization account controls users it synchronizes'.. However I am still not able to use the new attribute in S

  • What do I need for my MAC PRO to connect to my wirelessrouter in my home

    I have a Mac Pro 3.1 that i got from my old job. I now want to use it for my main computer and internet access. I have a PC that has my main modem and router in another part of house. I want to use the MAC Pro for my other computer - but connect to r

  • ITunes Store wont load on my iMac or Macbook Pro

    After updating iTunes to the latest version, 11.1.1, on both my iMac and Macbook Pro I have not been able to log in and view my account details. I also had trouble downloading previous purchases. I had to quit the program 3 times and re-download the

  • EJB-CMP Deployment Error

    Exception:weblogic.management.ApplicationException: prepare failed for accounts Module: accounts Error: Exception preparing module: EJBModule(accounts,status=NEW) Unable to deploy EJB: AccountBean2 from accounts.jar: [EJB:011055]Error deploying the E

  • Error on application world

    I just upgraded my application world and every time I try to download any thing I am getting an error