Query the column names from Public database links

Greetings,
I would like to retrieve the list of all the column names from a public database link. A regular ALL_TAB_COLUMNS doesn't seem to be working.
Thanks
John9569

Hi,
I think your DBA needed to create a synonym for you to have access of that remote database view.
CREATE SYNONYM synonym_name
FOR view_name@db_link;Then you can find the column names by
DESC   synonym_nameGuru's , please correct me If I am wrong.
Thanks
Edited by: user10679113 on Mar 12, 2009 12:28 PM
Edited by: user10679113 on Mar 12, 2009 12:33 PM

Similar Messages

  • Retrieve password from public database-link

    In the past we have created a public database-link to another database. Unfortunately we forgot the password and want to have it back. Sice the database-link is public, the password can not be found in user_db_links.
    Is it possible to retrieve a password from a public database-link?

    Hi,
    I know resetting in an Option for you but in worst case. Coming to the point you can get from "sys.link$" But how far will work on 10g verison did not checked. Try and see
    Ahh. sorry Why you try "select dbms_metadata.get_ddl(’DB_LINK’,’TEST’,user) from dual
    it will give the script. If the password in encripted for 10g try with "link$" it will work.
    - Pavan Kumar N
    Edited by: Pavan Kumar on Nov 18, 2008 3:57 PM

  • How to Query the Summary Name from Custom Section Row Header Information

    I need a query that can help me retrieve the summary name from a custom section row header information.  We have a couple of Denorm tables that when the data is denormalized, the row_name field is only showing the denormalized alias name.  We would like to be able to pull the summary name from the row header information section?  How can we use the denorm alias name and join it to another table to find the associated summary name?

    The following query returns the row name as well as the denorm row name, for a given custom section, where we specify the custom section by the denorm table. You oculd do this in other ways, it just depends on how you want to retrieve the information. Is this what you are looking for?
    SELECT ml.Name [rowName], ml.langID, dr.NAME [denormRowName], dr.FKROWTEMPLATE, dt.GENERATED_TABLE_NAME
    FROM DENORM_CS_ROW dr
    inner join DENORM_CS_TABLE dt on dr.FK_DENORM_TABLE_ID = dt.ID
    inner join commonextendedattributeml ml on dr.FKROWTEMPLATE = ml.fkOwner
    where dt.NAME = 'myDenormTableName'

  • Help to get the column names from ResultSet.

    Hi,
    I hava a ResultSet and i want the column names into a String Array.
    i wrote the code to get the column names as below,
    String s = "select Dept_No,Dept_Name from tb_dept";
    rs = statement.executeQuery(s); // ResultSet defined before
    String[] columnNames1 = null;
    ResultSetMetaData meta = rs.getMetaData ( ) ;
    for (int x = 1; x <= meta.getColumnCount(); x++)
    columnNames1[x] = meta.getColumnName(x).toString();
    but i'm getting NullPointer exception. However if i print the column names means its printing the first column name and giving NullPointer Exception at the next step.
    Can anyone help me...
    Thanks,
    Rashmy

    but rs.getRow() ll give the current roe no right?
    but we can move to the last row using last() method
    and get the row count right?
    thank you yaar.
    private int getRowCount(ResultSet resultSet){
            int total = 0;
            try{
                resultSet.afterLast();
                if(resultSet.previous()) total = resultSet.getRow();
                resultSet.beforeFirst();
            }catch(SQLException sqle){
                javax.swing.JOptionPane.showMessageDialog(null,sqle);
            return total;
        }

  • How does one call a class if  one gets the class name from a database?

    Hi,
    I'm writing an application that needs to handle different types of input file.
    Each type of input file will be handled by a different processing class.
    I plan to use a controller class that will read from a database rows that each contain a file name and processor class name such that the class can then be used to process that file:
    So on a table somewhere I might have relationships like:
    file1.csv , ProcessorClassA
    file2.csv , ProcessorClassB
    file3.csv , ProcessorClassB
    My hope is that if I need a new processor class, I will not have to change the controller class. I simply write the new class say, ProcessorClassC and put an entry in my table for:
    file4.csv , ProcessorClassC
    So, finally, the question...
    I can read in the new class name into a string but how can I employ that class or instantiate objects of that new class and use their methods.
    The rationale is that so that the controller class needs no further modifications no matter how many new processor classes are required.
    Any ideas anyone?

    A factory class? I'm all ears... or is that another
    days work...?Look e.g. here (or Google for "Factory Design Pattern"):
    http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/FactoryPattern.htm

  • Finding the column names from a table.

    I am on 10g
    I would like to find out the columns of a table where there are null columns in a table.....this table contains about 300 + columns where i do not want to put where condition for all the columns
    is there a way i can write a sql to find?
    for a given table or the results set that i need to get, i will have same results for all the rows, so it
    cant be like col1 is null on row1, but col2 is not null on row2 ...they are all identical....
    example table, but it has 300 + cols
    F_IND     H_IND     P_IND     DMA_IND
    N     N          
    N     N          
    N     N          
    N     N          Thanks

    select count(col1), count(col2), count(col3), ...
    from your table;
    The results with 0s are null throughout the table (or the table has no rows).

  • Finding same column name from multiple database tables

    I am needing to find all tables in a database that contain the same column. ie: which tables in database A have col_a in it.
    Is it possible to do a sql code to qry all of this?
    Thanks

    No, Ignacio did not, at least, not really. ;)
    The usage of ALL_TAB_COLUMNS only has info for tables which the actual user has access to.
    If you need to be sure that you search each and every table, you have to use DBA_TAB_COLUMNS (or the connected user must be a super hero...).
    Just wanted to point that out.
    Regards,
    Guido

  • Script task to read the column names dynamically and create a table in database based on excel column structure

    Hello,
    Can anyone help me out to write a vb.net script.
    I need to read the column names from excel and based on that column names I need to create a table in database(I have more than one sheet in excel).
    For each sheet columns will be changing and should create a table dynamically for each sheet.
    Any help would be appreciated.

    Refer the below script to read columns in each sheet.
    Dim excelfile As String = Dts.Variables("ExcelPath").Value.ToString
    Dim connectionstring As String = "Provider=Microsoft.Jet.OLEDB.4.0;" +
    "Data Source=" + excelfile + ";Extended Properties=Excel 8.0"
    Dim oledbcon As New OleDb.OleDbConnection(connectionstring)
    oledbcon.Open()
    Dim dt As DataTable
    Dim schemaTable As DataTable
    Dim OLEDBCMD As New OleDb.OleDbCommand
    Dim oledbdatareader As OleDb.OleDbDataReader
    Dim columns As String = ""
    dt = oledbcon.GetSchema("Tables")
    Dim TABCOMMAND(20) As String
    Dim TABCOUNT As Integer = 0
    For Each row As DataRow In dt.Rows
    TABCOMMAND(TABCOUNT) = "SELECT * FROM [" & row.Item("TABLE_NAME").ToString & "]"
    OLEDBCMD.CommandText = TABCOMMAND(TABCOUNT)
    OLEDBCMD.Connection = oledbcon
    oledbdatareader = OLEDBCMD.ExecuteReader(CommandBehavior.KeyInfo)
    schemaTable = oledbdatareader.GetSchemaTable()
    For Each myfield As DataRow In schemaTable.Rows
    For Each myproperty As DataColumn In schemaTable.Columns
    If myproperty.ColumnName = "ColumnName" Then
    columns = columns & myfield(myproperty).ToString & ","
    MsgBox(myfield(myproperty).ToString)
    End If
    Next
    Next
    oledbdatareader.Close()
    OLEDBCMD.Dispose()
    Next
    oledbcon.Close()
    Regards, RSingh

  • How to Query the Facility Name on a Formulation Spec?

    I would like to query the facility name from the scrmEntityFreeTextName table.  If I'm trying to drive my data from a formulation spec number, what table(s) do I have to join to do get from SPECSUMMARY to link to scrmEntityFreeTextName?
    select *
    from agile.scrmfacility f, agile.scrmEntityFreeTextName tn
    where f.pkid = tn.fkentity

    You can use the DatabaseAndObjectSchema tool, located in the Extensibility Pack. It is an HTML document that helps you navigate the object or data schema, and can provide the basic SQL statement needed.
    Here is the basic SQL statement it provided:
    SELECT * FROM formulationSpecification t1
    INNER JOIN DWBSpecificationRoots t2 ON t1.pkid = t2.fkOwner
    INNER JOIN dwbSpecifications t3 ON t2.pkid = t3.fkWorkingVersionParent
    INNER JOIN gsmFormulationFacilityJoin t4 ON t3.pkid = t4.fkSpecID
    INNER JOIN scrmFacility t5 ON t4.fkFacility = t5.pkid
    INNER JOIN scrmEntityFreeTextName t6 ON t5.pkid = t6.fkEntity
    where t1.pkid='581672ba6d3a-f37a-409b-a140-d4cd6eab5606' -- this uses the spec pkid
    To use specNumber instead, you join against the specSummary, then use its SpecID column for the join
    SELECT t6.name, *
    FROM
    --formulationSpecification t1
    SpecSummary s
    INNER JOIN DWBSpecificationRoots t2 ON s.SpecID = t2.fkOwner
    INNER JOIN dwbSpecifications t3 ON t2.pkid = t3.fkWorkingVersionParent
    INNER JOIN gsmFormulationFacilityJoin t4 ON t3.pkid = t4.fkSpecID
    INNER JOIN scrmFacility t5 ON t4.fkFacility = t5.pkid
    INNER JOIN scrmEntityFreeTextName t6 ON t5.pkid = t6.fkEntity
    where s.SpecNumber = '5098024-001';

  • Displaying only the column names

    hi there,
    is there any query to fetch only the column names from a table, excluding the datas from that particular column?
    Thanks,
    Balu.

    SQL> select * from dual
      2  where rownum < 1;
    no rows selected                                                                                                                                                                               

  • Public database link username

    Gentlemen,
    I would like to recreate the public database links with new username and password. Prior to that, I want to know which user the current public database link in connecting to.
    The dba_db_links table shows only the user name for private database links. Where can I find the username for public database link.
    e.g.,
    SQL> create public database link abc.domain.com connect to targetuser idenitified by targetpassword using 'abc.doman.com';
    Where I find the information about targetuser; it is not shown in dba_db_links table for public database links.
    Thanks

    This indicates that the connection information (username/password) was not specified when the database link was created.
    http://docs.oracle.com/cd/E11882_01/server.112/e25494/ds_admin002.htm#ADMIN12154
    This implies that if user A on the local database tries to use this link, then the same account (i.e. A) with the same password exists on the remote database - i.e. all of the users on the local database that use this link are duplicated on the remote database as well.
    HTH
    Srini

  • Getting column names from SYS_REFCURSOR

    Hi everybody, i have a SYS_REFCURSOR in a procedure. And i open it and fetch cursor to a record as follows:
    OPEN curgroup FOR vexpr2;
    LOOP
    FETCH curgroup INTO recType;
    END LOOP;
    recType is a Record, has two variables. Anyway, the question is can i get the column names from refcursor?
    like recType.COLUMN1 (Column1 is not a record variable ) ????
    or is there anything else to perform this operation?

    Hi,
    Despite what Billy states it is very possible to get the column names from a weak ref cursor, or describe a ref cursor with PL/SQL. It has been possible since 8i, it just relies on the little known fact that a ref cursor in PL/SQL translates directly to a ResultSet in Java so we can use a tiny JSP in the DB.
    Here is the link to the completely free, Open Source code which allows you to do this: [XUTL_REFCURSOR|http://www.chrispoole.co.uk/apps/xutlrefcursor.htm]
    And a little example:
    SQL> variable scott_cursor refcursor
    SYS@ORA10GR2
    SQL> begin
      2  open :scott_cursor for select * from scott.emp;
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SYS@ORA10GR2
    SQL> begin
      2  xutl_refcursor.describe_columns(:scott_cursor);
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SYS@ORA10GR2
    SQL> select col_name from xutl_described_columns;
    COL_NAME
    EMPNO
    ENAME
    JOB
    MGR
    HIREDATE
    SAL
    COMM
    DEPTNO
    SYS@ORA10GR2
    SQL> print :scott_cursor
         EMPNO ENAME      JOB              MGR HIREDATE                   SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17/12/1980 00:00:00        800                    20
          7499 ALLEN      SALESMAN        7698 20/02/1981 00:00:00       1600        300         30
          7521 WARD       SALESMAN        7698 22/02/1981 00:00:00       1250        500         30
          7566 JONES      MANAGER         7839 02/04/1981 00:00:00       2975                    20
          7654 MARTIN     SALESMAN        7698 28/09/1981 00:00:00       1250       1400         30
          7698 BLAKE      MANAGER         7839 01/05/1981 00:00:00       2850                    30
          7782 CLARK      MANAGER         7839 09/06/1981 00:00:00       2450                    10
          7788 SCOTT      ANALYST         7566 19/04/1987 00:00:00       3000                    20
          7839 KING       PRESIDENT            17/11/1981 00:00:00       5000                    10
          7844 TURNER     SALESMAN        7698 08/09/1981 00:00:00       1500          0         30
          7876 ADAMS      CLERK           7788 23/05/1987 00:00:00       1100                    20
          7900 JAMES      CLERK           7698 03/12/1981 00:00:00        950                    30
          7902 FORD       ANALYST         7566 03/12/1981 00:00:00       3000                    20
          7934 MILLER     CLERK           7782 23/01/1982 00:00:00       1300                    10
    14 rows selected.
    SYS@ORA10GR2
    SQL>As the demo shows describing the ref cursor does not affect the cursor in any way, it is not selected from. It is not converted into a DBMS_SQL cursor and can be passed to a front end.
    [XUTL_REFCURSOR|http://www.chrispoole.co.uk/apps/xutlrefcursor.htm] is designed to have exactly the same output and uses the same return type as DBMS_SQL DESCRIBE COLUMNS, to enable pre-existing code that uses that API to be quickly re-used.
    HTH
    Chris

  • How to get the Column names of output that is displaying in Sql Developer(Oracle 11g).

    Hi,
        I am using OCCI to interact with DB through code, which means I am writing a vc++ file to interact with Data Base and execute the Stored Procedure which I am calling from the C++ Code. And  also displaying the output of the Stored Procedures to the Front End. I am succeeded in this, but now I should be able to display  the Column names of the output to Front End. Can any one help me on this.
    Example:
    Sno  |   Sname
    ------- |-------------
    1          ABC
    2          DEF
    I am getting (1,ABC) and (2,DEF) as the output of the Stored Procedure but I need the Column names also to display. How to get them.
    Thanks in Advance..:)

    Look at Re: exporting csv via pl/sql - select statement?
    It has an example how to extract the column name from a cursor. You have to check, whether you can use DBMS_SQL.DESCRIBE_COLUMNS
    Your procedure might need another out parameter, that returns the column names , e.g. as comma separated list or as varray.

  • Find column name from constraint name

    How to fetch the column name from a constraint name to which the constraint is applied?.
    I only know the name of the constraint and can get the table name from "dba_constraints". How can I know to which column in the table this constraint is applied.
    Thanks

    What about this?
    satyaki>
    satyaki>
    satyaki>desc user_cons_columns;
    Name                                      Null?    Type
    OWNER                                     NOT NULL VARCHAR2(30)
    CONSTRAINT_NAME                           NOT NULL VARCHAR2(30)
    TABLE_NAME                                NOT NULL VARCHAR2(30)
    COLUMN_NAME                                        VARCHAR2(4000)
    POSITION                                           NUMBER
    satyaki>
    satyaki>Regards.
    Satyaki De.

  • Query to identify the recovery catalog database name from target database

    Hi,
    How to get the recovery catalog database name from the registered target database?
    i dont know my recovery catalog database for my target database.
    I know we can use the query
    select * from rc_database;
    from recovery catalog database to know all the registered database with the recovery catalog but I want to know is there any way or query to identify the recovery catalog database name from target database to which the target database is registered
    With Regards
    Boobathi P

    You can check the backup scripts which you use to backup your target database to get the catalog database name.
    And check the corresponding connect string in TNSNAMES.ORA file or tnsping to get the server details of the catalog database.
    Edited by: gopal on Apr 12, 2013 12:59 PM

Maybe you are looking for

  • How can I load a .pst file to an instrument in logic express 9?

    I have some instruments plug-in settings from my old computer that I used with logic, and I want to load them into logic so I can use them on the computer I moved them to. On any instrument I try (ES1, ES2, EXS24 and the rest) it won't allow me to lo

  • How can I change the sender email id in SO_NEW_DOCUMENT_ATT_SEND_API1

    Hi, I am using the FM "SO_NEW_DOCUMENT_ATT_SEND_API1" to send an E-Mail. I have to use the sender's E-Mail address as a general one ( Not to the SAP login user's id ). How to do this. Please advice. Thanks in advance.

  • Standard Screen Element Changes with ECC6.0 in SAP Standard Transactions

    Hi, We have upgraded our system from 4.7 to ECC6.0. I need documentation on all GUI changes with ECC6.0 for all SAP transactions/modules. I mean, for example, if Sales Order creation screen (transaction code VA01) in 4.7 have say... 12 tabs, then if

  • JDeveloper shows a fatal error when create Database or UML Diagrams

    My Platform is Windows 7 x64 with JDeveloper 11.1.2.3 JDeveloper shows an error when I do this: 1) Create a new Database Diagram. 2) Create a Table in this Database Diagram. 3) Delete the Database Diagram. 4) Try to create a new Database Diagram agai

  • Display problems with Flash 8

    1. When testing a movie created using Studio 8, the screens load correctly and display all the text, graphics etc. However when I publish the movie and either make a projector with Flash player 8 or run the movie using Flash player 8 or 9 the graphic