Cannot query tables in remote database

Hi, I have looked around for similar topics but have not found anything that would be close to my problem. I created a public link to a remote database from my portal database, it is a public link and I can query tables in the remote database just fine when I am on the sqlplus prompt. When I try to create a report, or a dynamic page, it lets me go through the wizard steps ok, however when I run it as a portlet or just run it as a report/page it does not seem to be able to see the query. Below is the response I get from running it as a portal. I am logged in as portal30.
ORA-01017: invalid username/password; logon denied
ORA-02063: preceding line from C2K (WWV-11230)
Failed to parse as PORTAL30_PUBLIC - select * from populate@c2k (WWV-08300)
The preference path does not exist:
ORACLE.WEBVIEW.PARAMETERS.1320061995 (WWC-51000)
The preference path does not exist:
ORACLE.WEBVIEW.PARAMETERS.1320061995 (WWC-51000)
Error: Unable to execute query (WWV-10201)
Please help, I have tried everything from public to private synonyms for the linked tables and it just does not work. I am using the most recent version of portal that came with ias 1.0.2.2.0

Actually I solved my problem, it looks like I should have used the db link utility with the portal, I linked the databases on the sqlplus command line and it seems like that was the issue.

Similar Messages

  • DUPLICATE DB : ORA-17629: Cannot connect to the remote database server

    [oracle@ora11g1 ~]$ export ORACLE_SID=sales
    [oracle@ora11g1 ~]$ rman target sys/sales@sales
    Recovery Manager: Release 11.2.0.1.0 - Production on Wed Jun 5 13:00:15 2013
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    connected to target database: SALES (DBID=690066655)
    RMAN> connect auxiliary sys/salestby2@salestby2
    connected to auxiliary database: SALES (not mounted)
    RMAN> DUPLICATE TARGET DATABASE FOR STANDBY FROM ACTIVE DATABASE SPFILE
    2> SET DB_NAME= 'sales'
    3> SET DB_UNIQUE_NAME= 'salestby2'
    4> SET control_files='/u02/oradata/salestby2/control01.ctl','/u02/oradata/salestby2/control02.ctl'
    5> SET DB_FILE_NAME_CONVERT='/u02/oradata/sales/','/u02/oradata/salestby2/'
    6> SET LOG_FILE_NAME_CONVERT='/u02/oradata/sales/','/u02/oradata/salestby2/';
    Starting Duplicate Db at 05-JUN-13
    using target database control file instead of recovery catalog
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID=20 device type=DISK
    contents of Memory Script:
    backup as copy reuse
    targetfile '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwsales' auxiliary format
    '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwsalestby2' targetfile
    '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfilesales.ora' auxiliary format
    '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfilesalestby2.ora' ;
    sql clone "alter system set spfile= ''/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfilesalestby2.ora''";
    executing Memory Script
    Starting backup at 05-JUN-13
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=58 device type=DISK
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 06/05/2013 13:05:26
    ORA-17629: Cannot connect to the remote database server
    ORA-17627: ORA-01017: invalid username/password; logon denied
    ORA-17629: Cannot connect to the remote database server
    continuing other job steps, job failed will not be re-run
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 06/05/2013 13:05:27
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 06/05/2013 13:05:27
    ORA-17629: Cannot connect to the remote database server
    ORA-17627: ORA-01017: invalid username/password; logon denied
    ORA-17629: Cannot connect to the remote database server

    Welcome to the oracle forums!
    Please take some time to go through [url https://forums.oracle.com/forums/ann.jspa?annID=1535]FAQ PAGE
    Always post 4 digit oracle version and OS details.
    Post any query out put between \  \ tags
    Mark your questions as answered if you get the answer
    Password of SYS user on primary and standby must be same.Copy the password file from primary to standby server
    scp $ORACLE_HOME/dbs/orapwv112 <oracle_user@auxiliary_host>:/u01/app/oracle/product/11.2/dbs/orapwdupv112

  • Hierarchical Query/START WITH/Remote Database error

    Running on: EE 10.1.0.4.0 - 64bit
    Remote DB: EE 11.1.0.6.0 - 64bit Production
    Trying:
    <PRE>
    WITH
    Moo
    AS
    SELECT
    1
    FROM
    Dual@EPO11_Link A
    CONNECT BY
    LEVEL = 1
    START WITH
    EXISTS (SELECT * FROM Dual@EPO11_Link B WHERE A.Dummy = B.Dummy)
    SELECT
    FROM
    Moo;
    </PRE>
    Getting:
    ORA-00904: "A3"."$nso_col_1": invalid identifier
    ORA-02063: preceding line from EPO11_LINK
    00904. 00000 - "%s: invalid identifier"
    *Cause:   
    *Action:
    - The CTE's query runs fine on its own.
    - removing the @ from the first Dual@EPO11_Link , works.
    - removing the @ from the second Dual@EPO11_Link , errors:
    ORA-02016: cannot use a subquery in a START WITH on a remote database
    02016. 00000 - "cannot use a subquery in a START WITH on a remote database"
    *Cause:   
    *Action:
    Error at Line: 10 Column: 24
    - Removing the START WITH clause, works.
    - Changing the START WITH clause's "=" to "IN", works.
    - Changing the START WITH to EXISTS (SELECT * FROM Dual@EPO11_Link B WHERE A.Dummy = B.Dummy) results in:
    ORA-00904: "A3"."DUMMY": invalid identifier
    ORA-02063: preceding line from EPO11_LINK
    00904. 00000 - "%s: invalid identifier"
    *Cause:   
    *Action:
    Am i missing something here?
    Edited by: Brian Tkatch on Jan 19, 2012 1:27 PM

    Searching error messages books:
    These have the ORA-02016:
    8: http://docs.oracle.com/cd/A58617_01/server.804/a58312/newch228.htm#19589
    9: http://docs.oracle.com/cd/A91202_01/901_doc/server.901/a90202/e1500.htm#1001663
    These do not have the ORA-02016:
    10R1: http://docs.oracle.com/cd/B14117_01/server.101/b10744/e1500.htm#ORA-02009
    10R2: http://docs.oracle.com/cd/B19306_01/server.102/b14219/e1500.htm#ORA-02009
    11R1: http://docs.oracle.com/cd/B28359_01/server.111/b28278/e1500.htm#ORA-02009
    Starting with (heh) 10R1 a bunch of error messages were removed regarding hierarchical queries, including this one.
    Is it allowed or not?

  • Selecting from Materialized Query Tables (DB2 UDB database)

    When selecting what objects I wish to view in my Reports, I am unable to see any Materialized Query Tables in the list.  I am able to see the "normal" Tables and Views, just not any Materilized Query Tables.
    Please let me know what I need to set or customize in-order to see and then select fields from these.

    Thanks everyone.
    I was able to find the answer.
    For the new report, in the "Create New Connections"...choose "OLE DB (ADO)" --> then "Microsoft OLE DB Providers for ODBC Drivers"  --> click on the "Next" button --> choose the database --> then user/password details (..and so forth).

  • Best way to create table at remote database side

    Hi ..
    I have one table around 60GB and i want to sync this table with remote side database table.
    Options
    1> Creat DB link and then fetch data.
    Problem <<Performace issue and May be chance of Network chock >>
    2> Using DBMS_REDFINITION package.
    Problem <<Again we need 60GB Extra sapce to create New table and Related indexes >>
    Can any one suggest me by any other way we can sync table at remote side with source with out adding space and no down time?
    Thanks
    Mahantesh

    Still a duplicate thread. Still needs to be moved to the correct forum.

  • Querying Tables from seperate Databases

    I'm sure this is very simple, but I cannot figure out how to query information from two tables that live in two seperate databases.
    Ex.
    Select database1.table1.field1, database1.table1.field2, database2.table1.field1
    from database1 left outer join database2 on database1.table1.field1 = database2.table1.field1
    Any help would be appreciated!

    If you are using "database" in the Oracle sense, rather than in the sense that other databases use the term (i.e. a SQL Server "database" is analogous to an Oracle schema), you would need a database link.
    In database 1
    CREATE [PUBLIC] DATABASE LINK dblink_name
      CONNECT TO username
      IDENTIFIED BY password
      USING tns_aliasThen
    SELECT tab1.field1, tab2.fieldN
      FROM table1 tab1 LEFT OUTER JOIN table2@dblink_name tab2 ON (tab1.field1 = tab2.field1)Justin

  • Running sql query across multiple (remote) databases

    I'd like to run a query that pulls information from multiple databases which are not on the same machine. Is this possible using SQL Developer?

    If you are still interested, there is a tool that can query multiple databases and save results in a single text file that you can then modify as necessary - see www.bsutils.com/MuSQL.html

  • MV Incremental Refresh on join query of remote database tables

    Hi,
    I am trying to create a MV with incremental refresh option on a join query with 2 tables of remote database.
    Created MV logs on 2 tables in the remote database.
    DROP MATERIALIZED VIEW LOG ON emp;
    CREATE MATERIALIZED VIEW LOG ON emp WITH ROWID;
    DROP MATERIALIZED VIEW LOG ON dept;
    CREATE MATERIALIZED VIEW LOG ON dept WITH ROWID;
    Now, trying to create the MV,
    CREATE MATERIALIZED VIEW mv_emp_dept
    BUILD IMMEDIATE
    REFRESH FAST
    START WITH SYSDATE
    NEXT SYSDATE1/(24*15)+
    WITH PRIMARY KEY
    AS
    SELECT e.ename, e.job, d.dname FROM emp@remote_db e,dept@remote_db d
    WHERE e.deptno=d.deptno
    AND e.sal>800;
    Getting ORA-12052 error.
    Can you please help me.
    Thanks,
    Anjan

    Primary Key is on EMPNO for EMP table and DEPTNO for DEPT table.
    Actually, I have been asked to do an feasibility test whether incremental refresh can be performed on MV with join query of 2 remote database tables.
    I've tried with all combinations of ROWID and PRIMARY KEY, but getting different errors. From different links, I found that it's possible, but cannot create any successful testcase anyway.
    It will be very much helpful if you can correct my example or tell me the restrictions in this case.
    Thanks,
    Anjan

  • Merge a remote database table using dblink

    We have a merge statement running in source database which is merging to a table in remote database using db link. The remote table is partitonoed (interval) table.Source db is 10g and target is 11g.
    this merge statement is failing with error saying,
    error occurred at recursive SQL level 1
    00942: table or view does not exist
    ORA-02063: preceding 2 lines from ORCL_ONL_LIVE
    If anyone have any idea about this error, please share with us

    user585870 wrote:
    We have a merge statement running in source database which is merging to a table in remote database using db link. The remote table is partitonoed (interval) table.Source db is 10g and target is 11g.
    this merge statement is failing with error saying,
    error occurred at recursive SQL level 1
    00942: table or view does not exist
    ORA-02063: preceding 2 lines from ORCL_ONL_LIVE
    If anyone have any idea about this error, please share with us
    How do you explain the ORA-00942 error first ? Are you able to select that table ? Can we see the merge statement ?
    Nicolas.

  • Connecting to remote database without using db links

    Referred Thread:
    Re: Remote DB connection without DB link
    In reference to the thread above, my question goes like this:
    Let's say I want to run a query from a database and use data from another database. I have the user, password, SID and port number of the other database but do not want to create a separate connection using sqlplus or connect commands.
    Something like this:
    SQL> show user
    USER is "A"
    SQL> select a.col1, b.col2 from tab1 a, tab2@????? where <some condition>;
    Can this connection be done on the fly ?? I agree that a DB link will do the trick, but let's say I am not supposed to create objects on the other database.

    You need two sets of privs on the remote database to view data in that database schema:
    - create session (the schema must allow client connections to create schema sessions)
    - select on other schema tables whose contents to view
    You need a single priv on the local database, to connect to that remote schema on the other database:
    - create database link
    You also need the following in order to create the db link:
    - the remote schema name and password
    - IP address or hostname of the remote db server
    - the remote Listener's tcp endpoint port
    - the name of the remote database (SID, instance or service name)
    If you do not have these privs, you cannot use/access the remote database from the local database session via a database link.
    Other alternative methods needs additional privileges and objects on both the remote and local database sides - and are more complex (e.g. using web services, using web-enabled procedures, etc).

  • Error while accessing a Table on Oracle Database 10.2

    Hi Experts,
    We have a table that contains a CLOB datatype in one of its column. However when i tried to access the table i get the below error.
    <b>Table Name:</b> discrete_jobs
    <b>Error:</b>
    (Error starting at line 1 in command:
    select * from [email protected]
    Error report:
    SQL Error: ORA-22992: cannot use LOB locators selected from remote tables
    22992. 00000 - "cannot use LOB locators selected from remote tables"
    *Cause:    A remote LOB column cannot be referenced.
    *Action:   Remove references to LOBs in remote tables.)
    Pleas Help!
    Regards,
    Ravi R

    See some work arounds - "How to select table from remote database having clob field</a>

  • Unable to create publication item for remote database using db link

    The mobile repository is in instance A.
    I have to access and sync data from a table in remote database instance B.
    I have run the consolidator_rmt.sql script in instance B under schema_B. I have created a private fixed user db link in instance A under schema_A to access schema_B's tables. I then created a synonym test_B for table test_B in schema_B using the DB link.
    While creating publication item for test_B using MDW, the column list for test_B appears blank. Has anyone encountered this problem and what is the solution.
    Thanks for your help.
    Rosa.

    Hello Pruthvi ,
    See these threads
    Uninstalling MaxDB
    Work process Ended.
    Thanks
    Chandran

  • How to find whether remote database is up or not (connected via dblink)

    Hi,
    I am using dblink to connect Biz database from Dev database.(Biz, Dev - database names)
    Running dbms job using the dblink from the Dev database to update data on Biz database...
    Problem is dbms job should run if and only if the Biz database is up for which i created the dblink...
    1) How to make sure or implement the check to find whether the Biz is database is up or not in Pl/sql or sql...
    2) How to reschedule the dbms jobs once the database is up
    pls suggest me how to find whether the database is up or not b4 running the dbms job?
    Using- Oracle 10g

    The only way to know whether the remote database is up (and whether the network between the two databases is up and whether the remote database's listener is up and whether the password configured in the database link is correct and whether the local TNS alias is correct, etc) would be to actually run a query against the remote database over the database link. In other words, the way to figure out whether the link is up is to let the job run and catch & handle exceptions when there are problems.
    By default, a job scheduled via DBMS_JOB will automatically reschedule itself if there is an unhandled exception by geometrically backing off (it waits 1 minute after the first failure, 2 minutes after the second, 4, 8, 16, 32 minutes, etc until it's marked as broken after 16 failures). You could, of course, catch appropriate exceptions and handle them in a reasonable fashion and manually reschedule jobs at intervals that make more sense for your particular job.
    Justin

  • Select type_address in Portal report's sql query using remote database

    how do i select type_address item from remote database table ?
    I've already create the database link called db_link.
    I've already execute the sql statement in the specified database, and it works.
    for example: ( sql plus in the specified database )
    select syk.alamat_syarikat.alamat1 from MCS_SYARIKAT syk
    for example: ( sql statement in portal report using database link )
    select nama_syarikat, syk.alamat_syarikat.alamat1 from MCS_SYARIKAT@dblink syk
    error massage:
    Unable to describe SQL statement. Please correct it (WWV-13010)
    Invalid SQL statement: select syk.alamat_syarikat.alamat1 from MCS_SYARIKAT@dblink syk (WWV-13005)
    ORA-01001: invalid cursor (WWV-11230)
    ORA-22804: remote operations not permitted on object tables or user-defined type columns (WWV-11230)
    Failed to parse as MCS_PUBLIC - select syk.alamat_syarikat.alamat1 from MCS_SYARIKAT@dblink syk (WWV-08300)

    Here's the actual query:
    SELECT BUILD_EXT_RES_LIST(EXT_FILE.ID) A
    FROM EXT_FILE_RES, EXT_FILE
    WHERE EXT_FILE_RES.ON_OWNER_PROFILE = 'Y' AND
          EXT_FILE.OWNER_ID = :PROFILE AND
          EXT_FILE.ID = EXT_FILE_RES.EXT_ID AND
         (RES_SUBSCRIBER_YN(EXT_FILE.ID,:CURR_ID) = 'YES' OR
          ADMINYESNO(:CURR_ID,:PROFILE) = 'YES')
    ORDER BY EXT_FILE.FILE_NAMEAnd here's the actual error message:
    1 error has occurred
    Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing. ORA-00904: "SER_IS_ADMINYESNO": invalid identifier

  • Query Rewrite to Utilize Materialized Views on a Remote Database

    We have our materilized views stored at a remote database. Is there a way to utilize query rewrite to rewrite the queries issued on the local database such that queries will refer the materialized views at a remote db?
    From the documentation, I already know that the base tables for MVs and MVs should eside in the same instance or the query should be submitted on the instance where MVs reside if base tables are residing in a different remote DB to benefit from query rewrite.
    My aim is to utilize query rewrite to reduce the workload on a primary database by passing queries that can be rewritten to use MVs on a remote DB.
    Thanks for the guidance,

    My aim is to utilize query rewrite to reduce the workload on a primary database by passing queries that can be rewritten to use MVs on a remote DB. If you know that MVs are not stale or acceptable of staled data and don't see network bandwidth problems (small set of result), You would try accessing MV tables directly on remote db using dblinks.

Maybe you are looking for

  • Apple Loops and the Loop Browser

    maybe I'm missing something here, but whenever I save an edited audio file (or loop) with Apple Loops I can never seem to find the same file in the Loop Browser. (unless that is how the app is suppose to behave ...) I assumed the Loop Browser behaves

  • Activate WF for incoming post item Records Management

    Hi. Could anyone tell me the steps to activate Workflow for incoming post item (Records Managemet). I'm traying with this  Standard Task TS78800015 TS78800013 Regards

  • Set a preferred Wi-Fi connection or set sort order

    Hi All, In the Netherlands Wi-Fi Hotspot provided by Ziggo and UPC is based on a shared utilization of all Wi-Fi Modems delivered to each customer. At the moment its impossible to configure both Home Wi-Fi connection and Wi-Fi hotspot at the same tim

  • Oracle Database patching

    Hi plz help me. i want to learn oracle database patching from the people like u but before that i tried much hard to find the documentation of patching at oracle documentation center. now after searching it lot i m tired so plz can any one tell me th

  • Unhappy with a purchse!!

    I purchased a TV show Season from iTunes and found that it was not quite right. Is there a way to return it or get a refund for something you are unhappy with?