Query builder: tables from Database Link

Hi APEX people,
Is there a way to use tables from a (remote) Database Link in the Query Builder?
In the Query Builder I seem to have only access to locally (schema) stored tables.
I already tried to define a Synonym for the remote tables I wanted to use, but that didn't work either.
Thanks in advance.
Maurice

Hi,
First of all, can you select from them ie
SELECT  *
FROM my_table@my_linkAlso you can't see them as tables in the schema because they're not tables in the schema.
Try creating a view like...
CREATE OR REPLACE FORCE VIEW m_table_vw AS
SELECT *
FROM my_table@my_link;You should be able to see the view in the schema in the query builder and use that.
Cheers
Ben

Similar Messages

  • Query to table in Database Link returns value from local table

    Hi
    I made a databaselink (Create database link db_a.world connect to db_a identified by <user> using 'db_a.world')
    Then I query a table, connected as a user in db_b.world (this is our developer database - identical to db_a): Select count(*) from table@db_a.world.
    When I get the result - it comes from the database I am logged in to (db_b)! - This is easy to check, because when I run select count(*) from table - it shows the same number. When I connect to the remote database, the same query shows another (correct) number.
    When I created the database link, Oracle demanded a loopback clause. Why is that, and can this be the reason for the strange behaviour?
    Thanx
    Anders
    Narvik, Norway

    Hi Anders,
    A loopback database link is when you want to test connecting to the same database as say a different user. It can be used for testing purposes. Creating a database link doesn't require a loopback clause. The reason why you are getting the same row count as db_b.world because db_a.world has been created as a loopback link.
    In the example you have Create database link db_a.world connect to db_a identified by <user> using 'db_a.world' , the clause after 'connect to' is meant to be the username and the clause after 'identified by' is meant to be the password.
    So, create a regular database link like this:
    create database link db_a_link connect to <user> identified by <passwd> using <service name>
    You shouldn't get an error message that the loopback clause has to be specified. Then try querying and hopefully it will work.
    -Raj

  • [nQSError: 46115] - Admin Tools: can't import table from database .

    hi all,
    Need your help, i am using Bi Administration Tool, and i try to import tables from database,but encounter issue:
    (1)."File->import->from database...",select connection type as OCI 10g/11g, type TNS Name,User Name and Password,then click "OK".
    (2).select table "BI_DATA",and then click button "import",it show prompt:"Failed to perform requested action".
    (3).i try to click the symbol "+" on the left of table "BI_DATA", it show below prompt:
    [nQSError: 46115] No Unicode translation is available for some of the input characters for MultiByteWideChar().
    is there anyone can help me? thanks.
    the BI version is:
    Build: 10.1.3.4.1.090414.1900
    Release Version: Oracle Business Intelligence 10.1.3.4.1
    Package: 090414.1900

    I meet the problem, too! I can't solve it. Is anyone who can help me.
    My email is [email protected]
    thanks in avdvanced!

  • Labview 2013 are closing when I try read table from database.

    Labview 2013 are closing when I try read table from database.
    I don't get error message, Labview just crashes. I'm use Labview x32 and Database Connectivity Toolkit connective on Windows 7 x64. I connect to PostgreSQL with ODBC driver, connection is stable.
    In my database I have many tables, I can read all them without one.
    When I try read bad table I get data and then labview crash. When I restart Labview I don't have any message about error.
    Also I try use LabSQL-1.1a. But it has same result.
    Solved!
    Go to Solution.
    Attachments:
    DBT.png ‏104 KB
    LabSQL.png ‏67 KB

    Try connecting using UDL file. What operation you are doing with database
    You can create the same.. Do this Tools --> Create Data link..
    Then go to http://www.ni.com/pdf/manuals/371525a.pdf link and see page 3-5. It will help
    Kudos are always welcome if you got solution to some extent.
    I need my difficulties because they are necessary to enjoy my success.
    --Ranjeet

  • OBIEE Error while importing table from database

    Hi
    I am getting the following error when i am trying to import table from database.
    [nQSError: 16001]ODBC error state: IM004 code:0 message:
    [Microsoft][ODBC Driver Manager] Driver`s SQLAllocHandle on SQL_HANDLE_ENV failed.
    Any idea y such error.
    Thanks and Regards,
    Andy

    Looks like an error in the ODBC driver, not OBIEE as such.
    Have you tried googling it?
    Can you post details about your OS and DB.

  • How to display multiple tables from database using netbeans swing gui

    plz reply asap on how to display multiple tables from database using netbeans swing gui into the same project

    Layered Pane with JTables or you can easily to it with a little scripting and HTML.
    plzzzzzzzzzzzzzzzzz, do not use SMS speak when posting.

  • Query with Tables from another Database

    Hi.
    I have a problem with a Query that executes a stored procedure that inserts data in a Table from another DataBase. The problem is when I try to execute a Query with the data related of that table using the user parameters of SBO ('[%0]'....'[%3]'). I use the following parameters for reference to the Table:
    "....FROM [-BDName-].[dbo].[-TableName-] T1..... "
    Any suggestions? Thanks a lot....
    (Suggestions in English or Spanish)

    None

  • Synonym required to query custom tables from Oracle Apps database

    When creating an Answers report that queries from a table owned by a custom schema (not APPS), I cannot query the table and get error. Once I add a Synonym for APPS on this table, then OBIEE works normally.
    Since OBIEE is logging in as the APPS user, are Synonyms required for all non-APPS tables/views or is there another feature of the Administrator where it can store the table alias (our typical owner of custom tables is XXFI)?

    OK, well "compare" can mean one of two things: Compare structure or compare contents. Here is a quick script to compare column structures of two tables on one database:
    (select COLUMN_NAME,
    DATA_TYPE,
    DATA_LENGTH,
    DATA_PRECISION,
    DATA_SCALE,
    NULLABLE
    from dba_Tab_columns
    where owner=:OWNR1
    and table_name = :tablename
    minus
    select COLUMN_NAME,
    DATA_TYPE,
    DATA_LENGTH,
    DATA_PRECISION,
    DATA_SCALE,
    NULLABLE
    from dba_Tab_columns
    where owner=:ownr2
    and table_name = :tablename)
    union all
    (select COLUMN_NAME,
    DATA_TYPE,
    DATA_LENGTH,
    DATA_PRECISION,
    DATA_SCALE,
    NULLABLE
    from dba_Tab_columns
    where owner=:ownr2
    and table_name = :tablename
    minus
    select COLUMN_NAME,
    DATA_TYPE,
    DATA_LENGTH,
    DATA_PRECISION,
    DATA_SCALE,
    NULLABLE
    from dba_Tab_columns
    where owner=:ownr1
    and table_name = :tablename)
    If this query returns any rows, then these indicate that there are structural differences between the tables. We do a minus in both directions to ensure that an additional column in either schema will be returned in the query.
    If you are going across dblinks to remote tables then you have to amend the "dba_tab_columns" to "sys.dba_tab_columns@yourdblink"
    If you also want to compare indexes, triggers, etc then do the same sort of thing for the associated dba_ views for those objects.
    And if you want to compare table contents, then often the fastest way is also to check minuses in both directions, if the tables are not too big:
    e.g.
    (select * from schema1.table@dblink1
    minus
    select * from schema2.table@dblink2)
    union all
    (select * from schema2.table@dblink2
    minus
    select * from schema1.table@dblink1)
    local tables, of course, simply omit the "@dblink" issues.
    There are tools to help in such things. TOAD, for example, has a pretty good schema comparison tool, and there are plenty of other options out there. But if you need to script this yourself then the logic I've shown is a good starting point.
    Cheers,
    Mike

  • Query a remote table with Database Links

    How do database links work with ODP.NET? The following code produces an "ORA-02041: client database did not begin a transaction" error on the Fill method.
    SQL (in acme instance):
    CREATE DATABASE LINK sales.hq.acme.com
    CONNECT TO scott IDENTIFIED BY tiger
    USING 'sales'
    VB .NET:
    Dim cn As New OracleConnection("Data Source=acme;User ID=scott;Password=tiger;")
    Dim da As New OracleDataAdapter("SELECT * FROM [email protected]", cn)
    Dim ds As New DataSet
    da.Fill(ds, "RemoteEmp")

    Just read running procedure on remote db???
    Changed first line to
    Dim cn As New OracleConnection("Data Source=acme;User ID=scott;Password=tiger;Enlist=false")
    and it works now.
    That's what I get for searching the forum instead of browsing.

  • Accessing Tables via Database Links.

    Hello. I have created a database link in order to allow me to access tables that exist in a database separate from the one that APEX exists on. The link seems to work because I can query these tables in the APEX SQL Commands windows by running the following command,
    Select * from table_name@database_link;
    However, when I try to create an application in Application Builder, these tables do not seem to be accessible. Also, I can't see them in the Object Browser. I believe this problem is related to db permissions of some sort, but don't know how to correct it. Thank you for your help.

    Hello:
    The kind of view tht you have created is updateable.
    You can create an APEX form to do DML against this view much like in the manner you would create a form against a table.
    The link below might help
    Re: Cannot build form off from view?
    Varad

  • Query DB2 tables from oracle using normal view

    This is with regard to querying db2 tables using oracle views. The view is created using dblink. The querying is not an one time activity.querying will be done once in a day. Can i use normal view (will it work ) or should i use materialised view. will i be able to view the added records in db2 table using normal view?
    thanks,
    vinodh

    Vinodh2 wrote:
    This is with regard to querying db2 tables using oracle views. The view is created using dblink. The querying is not an one time activity.querying will be done once in a day. Can i use normal view (will it work ) or should i use materialised view. will i be able to view the added records in db2 table using normal view?How can the SQL select statement via a dblink not work for a view, but the same SQL select statement work for a materialised view?
    Do you think the database link or remote database care whether the select SQL that hits it, comes from a PL/SQL procedure, a view, a materialised view, a job or whatever else? It has no idea what/who is behind that select SQL - and nor does it care.
    As for the benefits of a view vs. a materialised view - that depends on the requirements for needing to use that foreign database's data in the local database.

  • Tables not in Query Builder table list bug?

    In HTML DB version 1.6.0.00.87 we have tables defined in our schema in our workspace. When we create a view and click on the [Query Builder] link, no tables are in the drop down list for our schema. Why? The schema is there. I can go into the SQL Workshop and query the records our of the tables, but they are not listed in the [Query Builder].
    I tried this same function but with my workspace at htmldb.oracle.com. The tables in my schema are listed there.
    Is this a bug that was fixed in version 1.6.1.00.02?

    There is one schema assigned to the workspace. That schema is listed in the pop-up window. Here are the steps I am doing:
    1.) Click on SQL Workshop
    2.) Click on Create Object
    3.) Click on View
    4.) The correct schema is listed in the Schema field. There is only one schema in the drop-down list for the Schema field.
    5.) Click on [Query Builder]. A separate browser window appears with the correct schema. There is only one value in the drop-down list for the schema. "- Select Table -" is in the TABLE field.
    6.) I click on the TABLE field to get a list of tables for the schema. Only "- Select Table -" is listed. No other tables are listed.
    I can cancel the Create View and return to the main page of the SQL Workshop. I can click on Tables to see what table are available. I select the correct SCHEMA and see the list of tables.
    I tried this in the same version of HTML DB (v 1.6.0.00.87) in a different database ie. a different HTML DB repository and received the same results, missing tables in the pop-up page
    I do not know why the tables do not list in the [Query Builder] for the Create View.

  • Query Builder Table Limit

    What is the limit on the number of tables that Query Builder can display? I am new to BI Publisher and when I connect to my datasource and select my schema I get the message "The list of tables is too long." There are about 80 tables in the selected schema.
    We will have some developers working on our project who are not familiar with this applications schemas and would like to know what the limit is so we can understand how big a problem it will be for us and whether we should use something other than Query Builder to write our queries.
    Thanks.

    Hi
    I get the same message.I connected to the Apps database and the connection was successful.
    I would retrieve tables from schema which has 60 tables in it.For others even when I enter the first few letters in the serach entry field they cannot be retrived.
    I installed the BI Publisher 10.1.3.3.2 for Windows x86 (703 MB) on my local machine and I'm using http://wal1cd231.cis.concentra.corp:9704/xmlpserver/
    to login into BI publisher enterprise using the administrator credentials provided when installed.
    Any solution???

  • Using Interactive Report with SQL query accessing tables via db link

    Is there a known issue with using the interactive report in version 3.1.2.00.02 with SQL that is accessing tables via a database link? I get the error 'not all variables bound', I do not get this error when using the standard report for the same SQL?
    Thanks,
    Edited by: [email protected] on May 26, 2009 2:59 PM

    Varad,
    Good question, failed to check that. In fact there are errors. Dump file c:\oraclexe\app\oracle\admin\xe\bdump\xe_s002_3640.trc
    Mon Jun 15 08:48:11 2009
    ORACLE V10.2.0.1.0 - Production vsnsta=0
    vsnsql=14 vsnxtr=3
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    Windows XP Version V5.1 Service Pack 3
    CPU : 2 - type 586, 1 Physical Cores
    Process Affinity : 0x00000000
    Memory (Avail/Total): Ph:1051M/2038M, Ph+PgF:2273M/3934M, VA:1302M/2047M
    Instance name: xe
    Redo thread mounted by this instance: 1
    Oracle process number: 16
    Windows thread id: 3640, image: ORACLE.EXE (S002)
    *** ACTION NAME:(PAGE 2) 2009-06-15 08:48:11.743
    *** MODULE NAME:(APEX:APPLICATION 112) 2009-06-15 08:48:11.743
    *** SERVICE NAME:(SYS$USERS) 2009-06-15 08:48:11.743
    *** CLIENT ID:(ADMIN:232384011651572) 2009-06-15 08:48:11.743
    *** SESSION ID:(24.931) 2009-06-15 08:48:11.743
    *** 2009-06-15 08:48:11.743
    ksedmp: internal or fatal error
    ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [_LdiDateFromArray+55] [PC:0x608B04F3] [ADDR:0x0] [UNABLE_TO_WRITE] []
    Current SQL statement for this session:
    select Stage,Procedure,Stp,FW,Reslt,MSG,date_run
    from bi_msg_VW@dwitnm
    order by 1
    ----- PL/SQL Call Stack -----
    object line object
    handle number name
    2FE1EA14 1207 package body SYS.DBMS_SYS_SQL
    2FE1F064 328 package body SYS.DBMS_SQL
    2ABDC520 5097 package body APEX_030200.WWV_RENDER_REPORT3
    2BD5E55C 1538 package body APEX_030200.WWV_FLOW_DISP_PAGE_PLUGS
    2BD5E55C 366 package body APEX_030200.WWV_FLOW_DISP_PAGE_PLUGS
    335BDA88 11190 package body APEX_030200.WWV_FLOW
    2BDBD1C8 255 procedure APEX_030200.F
    2AB58D10 30 anonymous block
    ----- Call Stack Trace -----
    I didn't include the call stack, it is too large. Now I'm even more puzzled that the IR would work while a sql report would fail.
    Bob

  • Create View from Database Links - Question

    Question
    I'm missing something simple.
    I'm trying to create a view, from a Database Link.
    CREATE VIEW view_name
    AS SELECT a.*
    FROM schema.tablename@dblink a;
    When I run this in the SQL Commands window.
    I get this error message.
    ORA-00933: SQL command not properly ended
    What am I missing? Any help is appreciated...

    <i>CREATE VIEW vw_name
    AS SELECT a.*
    FROM [email protected] a;
    </i>
    <br>
    1) User (schema) which is creating view must have proper db_link to source database. For that try this for testing purpose:
    select 1 from [email protected]<br>
    If this fail then db_link is not ok! This step is absolute must to go any further step to!!!
    <br>
    2) when db_link is set, then your view should be named as:
    CREATE VIEW vw_name
    AS SELECT *
    FROM <b>schema_name</b>.[email protected];<br>
    please pay attention to "schema_name", because from remote side every table is in some schema so it really need declaration of owner schema.
    <br>
    Hope this helps...

Maybe you are looking for

  • How to use iCloud on more than 5 devices without constant de-authorizing/authorizing devices

    I have more than 5 Apple devices, laptops, and PCs. How do I use my iTunes and iCloud on all of them without constant authorizing/de-authorizing them? It is very annoying.

  • Transfering playlist to itunes on a new computer

    I currently have iTunes on my computer and all my music is kept on a external hard drive and would like to transfer everything to a new computer. I've done this once before and I lost all of my playists that I made. Is there a way to save/load my pla

  • Compile issues

    After creating the folio and building the application in the DPS App Builder the signing process fails.  I have tracked this to having two compiled folios located in the Local Store folder on my mac that is showing zero bytes.  The other compiled fol

  • Drop-down list problem

    This code isn't working. I'm trying to use the data entered into instances of assessment.Objectives.objectivesdetail.objectivesdetail to populate the dropdown lists later in the form. assessment.Objectives.objectivesdetail.objectivesdetail::exit - (J

  • My Creative Cloud Download keeps failing, and it give me error code: 205.

    I'm on Windows 8.1 pro and I cannot figure out why it won't work, anyone had this problem? Got a solution?