ORA-00022 with Database Link and Trigger

Hello altogether,
I got a very strange behaviour with my oracle 10.2.
I have two nets N1 and N2, where N1 can access the servers in N2, but not the other way round. In both nets I have an Oracle database running (D1 and D2).
In N1 I calculate some data, which must be replicated to the database in N2. I do this by using triggers on my tables in database D1 copying the inserted or changed data to D2 by using a shared public database link.
This works fine most of the time. But sometimes I get the following error:
ERROR [STDERR] Caused by: java.sql.SQLException: ORA-02068: following severe error from D2
ORA-00022: invalid session ID; access denied
ORA-06512: at "CUSTOMER", line 13
ORA-04088: error during execution of trigger 'CUSTOMER'
When I use the database links manually, they work.
Any idea?
Thank you!!
Daniel

The ORA-02068 message might be important
02068, 00000, "following severe error from %s%s"
// *Cause: A severe error (disconnect, fatal Oracle error) received from
//         the indicated database link.  See following error text.
// *Action: Contact the remote system administrator.Have you searched Oracle support for any bugs associated with the ORA-02068?
Was the remote session killed, the remote database changed to restricted session, or bounced?
I take it the distributed session is created using a dedicated session and not shared server?
HTH -- Mark D Powell --

Similar Messages

  • Ora-12154  problem with database link and transparent gateway

    Hello,
    I’m trying to make a communication between oracle and SQL server 2005.
    I use oracle 10g E.E Release 10.2.0.3.0 and the transparent gateway for SQL server 10201_gatway_win32.zip.
    Install:
    The oracle database is installed into a server named ss-serv. This server has two partition disk C and E. Oracle database is installed in E and the gateway in C. There is already a database (instance) running in the oracle home (in E).
    I configured the gateway as described into: http://download.oracle.com/docs/cd/B...3/conf_sql.htm.
    In sql server 2005, there is a database running named ClientTricks.
    I created a user named Avogadro with a login.
    In the partition C where the gateway is installed, the file inittg4msql.ora is like this:
    HS_FDS_CONNECT_INFO= ss-serv. ClientTricks
    The file sqlnet.ora where the gateway is installed is configured like this:
    SQLNET.AUTHENTIFICATION_SERVICES=(NTS)
    NAMES.DIRECTORY_PATH = (TNSNAMES, EZCONNECT)
    I configured the listener that is in the C partition where the gateway is installed, and the tnsnames that is in the oracle database in E partition disk like this:
    Listener :
    LISTENER=
    (ADDRESS=
    (PROTOCOL=TCP)
    (HOST=ss-serv)
    (PORT=1521))
    SID_LIST_LISTENER=
    (SID_LIST=
    (SID_DESC=
    (SID_NAME=tg4msql)
    (ORACLE_HOME=C:\oracle\product\10.2.0\tg_1)
    (PROGRAM=tg4msql)
    tnsnames:
    mytg4msql=
    (DESCRIPTION=
    (ADDRESS=
    (PROTOCOL=TCP)
    (HOST=ss-serv)
    (PORT=1521)
    (CONNECT_DATA=
    (SID=tg4msql))
    (HS=OK))
    After edited the listener, I stop and start the listener for the transparent gateway from administrative tools in the services.
    Then, connected in oracle (in a database named fakeclient) I created a database link in sqlplus.The the dblink were created, but when I tried to querry some data from ClientTricks by executing the following instructions:
    select * from s_client@dblink
    i got this fatal and terrible error :
    ora-12154 TNS:could not resolve the connect identifier specified
    I verified all my procedure and stapes, all seems to be good. I did a tnsping of mytg4msql
    I got this error in the command prompt:TNS-03505 fail to resolve name
    Could someone help me ?
    Sorry for my English ,I’m French
    best regards

    Hi Mkirtley,
    i clarify you what i've done:
    Pease have a look in the link in my first post. Then, i said that in oracle database home the listener is in port 1521
    here is this listener:
    SID_LIST_LISTENER=
    (SID_LIST=
    (SID_DESC=
    (SID_NAME=PLSExtproc)
    (ORACLE_HOME=E:\oracle\production\10.2.0\db_1)
    (PROGRAM=extproc)
    LISTENER=
    (DESCRIPTION_LIST=
    (DESCRIPTION=
    (ADDRESS= (PROTOCOL=TCP)(HOST=ss-serv)(PORT=1521))
    (ADDRESS= (PROTOCOL=IPC)(KEY=EXTPROC0))
    Here is the tnsnames.ora in oracle database home:
    N.B in this ora file, there's already some descriptions for the database running, so i just add these lines under the description in ora file.Here is:
    Jest=
    (DESCRIPTION=
    (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=TCP)(HOST=ss-serv)(PORT=2000))
    (CONNECT_DATA=
    (SID=tg4msql)
    (HS=OK)
    for the listener of the gateway (installed in C partition):
    SID_LIST_LISTENER=
    (SID_LIST=
    (SID_DESC=
    (SID_NAME=tg4msql)
    (ORACLE_HOME=C:\oracle\production\10.2.0\tg_1)
    (PROGRAM=tg4msql)
    LISTENER=
    (DESCRIPTION_LIST=
    (DESCRIPTION=
    (ADDRESS= (PROTOCOL=TCP)(HOST=ss-serv)(PORT=2000))
    (ADDRESS= (PROTOCOL=IPC)(KEY=EXTPROC1))
    here are all i did.
    Best regards

  • PL/SQL :ORA-04052 with Database link

    i have created a database link in my producation database as following
    CREATE PUBLIC DATABASE LINK <NAME>
    CONNECT TO <USER>
    IDENTIFIED BY <P/W>
    USING <CONNECT STRING OF TARGET DATABASE
    oracle version 9.0.2.8
    OS : Windows 2003 EE R2 SP2
    Using oracle failsafe 3.3.4 with windows cluster
    Problem Description :
    whenever i run my pl/sql procecdure to pull the data from the target database i get the following error
    ERROR at line 3
    ORA-06550:line 3 column 2
    PL/SQL : ORA-04052: error occured when looking up remote object _<SCHEMA>.<TABLE>@<DATABASE LINKE NAME>_
    ORA-00604 : ERROR occured at recursive SQL level 1
    ORA-03106 : fatal tow-task communication protocol error
    ORA-02063: preceding line from <DATABASE LINK NAME>
    I have tested the same way in the test environment the same oracle version as well the OS but without oracle failsafe and windows cluster
    the script goes smoothly with out any errors.
    i have google and checked the OTN for all available solutions but still nothing its not getting throw
    i will be very thankful for your replys and solutions
    any farther clarification i am ready
    thanks in advance

    Hi,
    This forum is for issues connecting to non-Oracle databases. As the problem is using PL/SQL to connect to another Oracle database then it would be better to post a thread in the PL/SQL forum -
    PL/SQL
    If you are trying to connect to a non-Oracle database then please give us the details of which non-Oracle database and the software you are trying to use to connect.
    Regards,
    Mike

  • Stored procedure with database link with "from table(...)"

    Hi guys,
    I've been told I can't create views on a database by the design team and so have to use this stored procedure to obtain the values.
    select HAN_ID, HAN_DS, GLOBAL_IN, LOCAL_IN
    from table(cast(ODADMIN.ODP00002_QUERY.Execute001@DBLINK(11312,'EN') as
    ODADMIN.ODP00002_001_Array@DBLINK)) WHERE LOCAL_IN = 'Y';I've been told that it works when you remove the database links (so on the actual database) when you remove the cast part. I've tried it with my link and with/without the cast part but it doesn't work. With the example above I get the error: ORA-00907: missing right parenthesis.
    When I remove the CAST-AS and the additional parenthesis it brings i get the error: ORA-00904: "ODADMIN"."ODP00002_QUERY"."EXECUTE001": invalid identifier
    When I do table( *"* ODADMIN.ODP00002_QUERY.Execute001@MWW_DEV(11312,'EN') *"* )... -- wrapping the call in speech marks I get: ORA-00972: identifier is too long
    Anyone see what's wrong? Thanks for any help.
    Mike

    Hi Ben,
    Asking now. By a view I mean one local to the database; I could create one on APEX but then I use the database link twice instead of just 1.
    His reasoning Ben:
    Firstly, Maintenance. We will have to maintain additional views (at additional code). Secondly, if the view has a JOIN, then you can't update through it (without complexities). If we have to get the View to pass the data to a Procedure (that's a pain). Also, standards..
    All update occur via either a Procedure, or a Base view, across over 1000 tables
    That's the standard, and doing things differently is costly long term
    People will not know how it works, it will have to be explained, maintained..etc.
    If the Application has the Business Rules, then updates via Base Views, that's a more standard way of developing. Also, if you update via this view, you'll update multiple rows in one call, which is in-effficient if only ONE row needs to change. Therefore, single row updates from the Application is more efficient
    The procedure is as follows:
    --SET SERVEROUTPUT ON
    DECLARE
    nPBusLoc       NUMBER(5):=11312;
    sPHanId        VARCHAR2(3):='SB1';
    sPLngId        VARCHAR2(2):='EN';
    sPDesc         VARCHAR2(30);
    sPAllowAlloc   VARCHAR2(1);
    sPShowEnq      VARCHAR2(1);
    sPAllowDel     VARCHAR2(1);
    sPShowScan     VARCHAR2(1);
    sPGlobalLocal  VARCHAR2(1);
    sPReturnCd     VARCHAR2(2);
    sPReturnTx     VARCHAR2(100);                  
    BEGIN
    ODADMIN.ODP00001.getHandlingCodes
                           (nPBusLoc    --  IN   NUMBER
                          ,sPHanId      -- IN   VARCHAR2
                          ,sPLngId      -- IN   VARCHAR2
                          ,sPDesc       -- OUT  VARCHAR2
                          ,sPAllowAlloc -- OUT  VARCHAR2
                          ,sPShowEnq    -- OUT  VARCHAR2
                          ,sPAllowDel   -- OUT  VARCHAR2
                          ,sPShowScan   -- OUT  VARCHAR2
                          ,sPGlobalLocal-- OUT  VARCHAR2
                          ,sPReturnCd   -- OUT  VARCHAR2
                          ,sPReturnTx   -- OUT  VARCHAR2                                    
    DBMS_OUTPUT.PUT_LINE('nPBusLoc                 = '||nPBusLoc              );
    DBMS_OUTPUT.PUT_LINE('sPHanId                  = '||sPHanId               );
    DBMS_OUTPUT.PUT_LINE('sPLngId                  = '||sPLngId               );
    DBMS_OUTPUT.PUT_LINE('sPDesc                   = '||sPDesc                );
    DBMS_OUTPUT.PUT_LINE('sPAllowAlloc             = '||sPAllowAlloc          );
    DBMS_OUTPUT.PUT_LINE('sPShowEnq                = '||sPShowEnq             );
    DBMS_OUTPUT.PUT_LINE('sPAllowDel               = '||sPAllowDel            );
    DBMS_OUTPUT.PUT_LINE('sPShowScan               = '||sPShowScan            );
    DBMS_OUTPUT.PUT_LINE('sPGlobalLocal            = '||sPGlobalLocal         );
    DBMS_OUTPUT.PUT_LINE('sPReturnCd               = '||sPReturnCd            );
    DBMS_OUTPUT.PUT_LINE('sPReturnTx               = '||sPReturnTx            );
    END;
    /Mike
    Edited by: Dird on 27-Aug-2009 01:50

  • Strange problem with Database LInk

    Hi Everyone,
    I have strange problem with Database Link in Oracle 11g Express Edition;
    There are two computers: computer-server and computer-client. Tnsnames.ora are the same on both computers ie.
    CT =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = krzysztof)(PORT = 1521))
    (CONNECT_DATA = (SERVICE_NAME = XE)
    I created database link :
    Create database link zdalny
    Connect to <user_id> identified by <password>
    using ‘CT’;
    Client can’t connect with server when I am using above command. But when I change “using” for using ‘krzysztof:1521’ or using ‘krzysztof’ or using ‘server IP:1521’ – everything is ok.
    Why I am asking. Because in all materials which I am reading about Oracle command with using ‘CT’ should be working correct. But there is not. Do you know, why?
    Thanks in advance and apologize for my English.
    Rgds
    Krzysztof

    Krzysztof Szymaniak wrote:
    Thanks for all replies.
    Below is server's tnsnames.ora
    CT =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = krzysztof)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (CONNECT_DATA =
    (SID = CLRExtProc)
    (PRESENTATION = RO)
    SQL Error: ORA-12154: TNS:could not resolve the connect identifier specified
    12154. 00000 - "TNS:could not resolve the connect identifier specifie
    Rgds
    Krzysztof
    PS. I tried with using 'XE' - not working.Assuming that is the correct tnsnames, of course XE is not working. You don't have a tnsnames entry for 'XE'.
    You need to be aware that when using a dblink, the client is the db in which the link is defined, not the desktop from which you connect to that database.
    I think you need to start here:
    http://edstevensdba.wordpress.com/2011/02/26/ora-12154tns-03505/
    http://edstevensdba.wordpress.com/2011/02/09/sqlnet_overview/ (Help! I can’t connect to my database )
    http://edstevensdba.wordpress.com/2011/02/16/sqlnet_client_cfg/ (Help! I can’t connect to my database (part duex) )
    The fact that your client (db link) is a database doesn't change anything taught in the above.

  • Difference between create database link and create shared Database link

    Hi Guys,
    can any one suggest me where to use "create database link" statement and where to use "Create shared database link". I have only idea that using shared database link the process can reuse connections already established to the remote server.
    In my envrionment I am used to connect with db link but sometimes its not working so try with shared link and its working fine. In local as well as remote database we are using DEDICATED only not the shared server.
    so, what the cause behind this?
    Any suggestion?
    Thanks...

    Please refer to documentation:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/ds_concepts.htm#sthref3878
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • I recently created a new Appleid and then the password to my old Appleid suddenly did not work.  When I tried to reset the password I do not receive the email with the link and Apple does not either recognize my birthday.  What to do?

    I recently created a new Appleid and then the password to my old Appleid suddenly did not work.  When I tried to reset the password I do not receive the email with the link and Apple does not either recognize my birthday.  What to do?

    Hi ingaosk,
    Thanks for the question. Based on what you stated, it seems like you did not receive the reset email. I would recommend that you read this article, it may be able to help you isolate or resolve the issue.
    If you didn't receive your Apple ID verification or reset email - Apple Support
    Thanks for using Apple Support Communities.
    Cheers,
    Mario

  • A question about CREATE PUBLIC DATABASE LINK and ORA-12154 error

    Dear all,
    I have a problem about public database link creation and I would appreciate if you could kindly give me a hand. I have the following connection parameters in my
    tnsnames.ora file:
    DGPAPROD.WORLD =
         (DESCRIPTION =
           (ADDRESS_LIST =
            (ADDRESS = (COMMUNITY=tcp.world)
              (PROTOCOL=TCP)(HOST=ORASR001)(PORT=1521)
           (CONNECT_DATA = (SID = DGPAPROD))
    ...Having the above mentioned parameters I can connect to this remote database directly in a SQL*Plus shell:
    $ sqlplus username/[email protected] works pretty well and the connection is established without any problem.
    Now, what I would like to do is to create a public database link to this remote database in order to avoid the user/connection switching for viewing the
    content of this database. I proceeded according to the syntax indicated in the Oracle online documentation:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_5005.htm#SQLRF01205
    Therefore I run the following in order to create a public database link
    CREATE PUBLIC DATABASE LINK SR001_dblink CONNECT TO user IDENTIFIED BY password USING 'DGPAPROD.WORLD';Apparently there is no error and the link is created successfully. However it cannot resolve the remote host and whenever I run the following query
    (myenterprise is the name of a table in that remote database)
    SELECT *
    FROM myenterprise@SR001_dblink
    ERROR at line 1:
    ORA-12154: TNS:could not resolve the connect identifier specifiedWhat causes this problem?
    Thanks in advance,
    Kind Regards,
    Dariyoosh

    spajdy wrote:
    You must have defined DGPAPROD.WORLD in tnsnames.oar on server where you DB is runnig.Hello there,
    Thanks a lot for this nice solution. In fact I had to add the connection parameters into the tnsnames.ora file of the server on which the link was created (not the tnsnames.ora of my oracle client stored on the localhost)
    After a bit googling I found another solution that allows to create the database link:
    CREATE PUBLIC DATABASE LINK SR001_dblink CONNECT TO user IDENTIFIED BY password USING '(DESCRIPTION =  (ADDRESS_LIST =  (ADDRESS = (COMMUNITY=tcp.world)
    (PROTOCOL=TCP)(HOST=ip_adresse)(PORT=1521)))(CONNECT_DATA = (SID = GPAPROD)))';Thanks a lot for your help!
    Kind Regards,
    Dariyoosh
    Edited by: dariyoosh on 18 nov. 2009 07:15

  • Database Link and error ORA-02019

    Oracle 9.2.0.6 on Windows 2003
    Has anybody encountered this before and been able to resolve.
    SQL> connect SchemaA/password@NSN1
    SQL> create database link MyLink1
    2 connect to REMDB identified okm135
    3 using 'STAF'
    4 /
    Database link created.
    SQL> create or replace VIEW rem_mydocs as
    2 (select * from mydocs@MyLink1)
    3 /
    View created.
    SQL> grant select on rem_mydocs to UserA ;
    Grant succeeded
    SQL> Create or replace function fn_rem_mydocs
    2 return Sys_RefCursor
    3 IS
    4 v_rc Sys_RefCursor;
    5 begin
    6  open v_rc for
    7       select * from rem_mydocs ;
    8  return (v_rc);
    9 end;
    10 /
    Function created.
    SQL> grant execute on fn_rem_mydocs to UserA;
    Grant succeeded
    SQL> connect UserA/test975@NSN1
    Connected.
    SQL> create or replace synonym rem_mydocs for SchemaA.rem_mydocs;
    Synonym created.
    SQL> create or replace synonym fn_rem_mydocs for SchemaA.sp_rem_mydocs ;
    Synonym created.
    SQL> select count(*) from rem_mydocs ;
    COUNT(*)
          324
    SQL> var g_ref refcursor
    SQL> begin :g_ref := fn_rem_mydocs; end;
    2 /
    SQL> print g_ref
    ERROR:
    ORA-02019: connection description for remote database not found                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Metalink Note:262881.1
    The information in this article applies to:
    Oracle Server - Enterprise Edition - Version: 8.0.x to 9.2.0.x
    This problem can occur on any platform.
    Errors
    ORA 2019 connection description for
    Symptoms
    Describe on a Synonym which is based on a database link may issue error:
    ORA-2019 connection description for remote database not found
    Select from the synonym works successfully.
    Cause
    Based on the Bug 3071468 this issue happens when the local
    and the remote database have different domain name in the GLOBAL_NAME.
    For example if:
    select * from global_name;
    gives from local database:
    PROD.UK.ORACLE.COM
    and the remote database has:
    TEST.US.ORACLE.COM
    then we have different domains for the global_name.
    This does not reproduce when the domain is the same for both global_names.
    Fix
    This issue is fixed in 10.1.0.2.
    For previous versions we have the following 2 workarounds:
    1. Use View in the place of the synonym. This works.
    2. Alter one of the databases global_name , so that the 2 global_names to have the same domain.
    For example in the above example chenge the TEST database as:
    sql> alter database rename global_name to test.uk.oracle.com;
    Then you would have to drop and recreate the database link.
    References
    Bug 3071468 - Ora-2019 May Occur When Describing An Synonym Using A Database Link
    Regards,
    Reza
    Message was edited by:
    Reza

  • Connect problem with db link and scheduler_jobs on 10.2.0.4.0

    hello guys
    i have got this problem, i hope someone can help me to understand and solve it.
    I have a pl/sql procedure where is referenced a table on a db_link. I own all the grants needed, and if i recall it in an anonymous block, it seems to work.
    i.e
    create or replace procedure routine_1 is
    v_app varchar2(1);
    begin
    select 'x'
    into v_app
    from other_user.some_table@my_db_link
    where rownum<2;
    end routine_1;
    Instead, while recalling it from a job scheduled with dba_scheduler package, with the same user, while opening the cursor where the db link table is referenced, i got a connect error:
    ORA-01017: invalid username/password; logon denied
    ORA-02063: preceding line from xxxxxx (where xxxxxx is the db link)
    i would like to understand where i am mistaking. I already checked the user for the connection in the scheduled job and is the same of the anonymous block call.
    thanks in advance
    Claudio

    hello dracis
    thanks for the new answer.
    i have not access to metalink. Anyway, oracle version is 10g not 11.
    Anyway, about dbms_job package (Scheduler is the newer version of dbms_job), i found a phrase on a site saying this:
    "Jobs that reference database links will fail if the database link is not fully qualified with the username and password. This is another subtle consequence of the execution environment of jobs."
    Probably the cause is that the db link, to work, must be owned by the same user that owns the procedure where is referenced. In this way we hope ownername and password are in some way accessible.
    We are trying to check this solution, but we have to wait for some grants.
    Claudio

  • Problems with Database Link in query

    When I run this code:
    SELECT NVL2(wbs1.wbs1_seq, wbs1.wbs1, pcn.pron) AS pron
         , h.fy AS data_fy
    FROM pcn_list@THE_LINK pcn
         JOIN project@THE_LINK x
         ON x.pcn_seq = pcn.pcn_seq
         JOIN
           SELECT h.project_seq
                , EXTRACT(year FROM (h.data_dt + 92)) AS fy
           FROM pcn_data@THE_LINK h
                JOIN setup@THE_LINK
                ON (
                     setup.data_dt = h.data_dt
                     OR (
                          EXTRACT(year FROM h.data_dt) > DECODE(setup.site, 'TYAD', 2006, 2007)
                          AND h.data_dt < setup.data_dt
                          AND TO_CHAR(h.data_dt, 'MMDD') = '0930'
                     OR (
                          EXTRACT(year FROM h.data_dt) BETWEEN 2000 AND DECODE(setup.site, 'TYAD', 2006, 2007)
                          AND TO_CHAR(h.data_dt, 'MM') = '09'
                          AND h.data_dt = NEXT_DAY(LAST_DAY(h.data_dt) - 7, 'FRIDAY')
           WHERE h.data_dt BETWEEN '01-SEP-06' AND '31-OCT-08'
         ) h
         ON h.project_seq = x.project_seq
         LEFT JOIN wbs1_list@THE_LINK wbs1
         ON (
                wbs1.fiscal_yr = pcn.fiscal_yr
                AND (
                      wbs1.legacy_pron = pcn.pron
                      OR SUBSTR(wbs1.legacy_pron, 1, 2) || SUBSTR(wbs1.legacy_pron, 4) = pcn.pron
              OR (
                   TRIM(wbs1.legacy_pron) IS NULL
                   AND wbs1.wbs1 = SUBSTR(pcn.pron, 1, 2)
                                   || SUBSTR(TO_CHAR(wbs1.start_dt + 92, 'YY'), 1, 1)
                                   || SUBSTR(pcn.pron, 3, 1)
                                   || SUBSTR(pcn.mission, 1, 1)
                                   || SUBSTR(pcn.pron, 4, 5)
                                   || DECODE(
                                              SUBSTR(pcn.pron, 12, 1)
                                            , '0', SUBSTR(pcn.pron, 13, 2) || SUBSTR(pcn.pron, 13, 2)
                                            , SUBSTR(pcn.pron, 11, 4)
         LEFT JOIN xref_pron_command cmd1
         ON cmd1.command_cd = SUBSTR(pcn.pron, 11, 2)
         LEFT JOIN xref_pron_command cmd2
         ON cmd2.command_cd = SUBSTR(pcn.pron, 1, 2)
         LEFT JOIN mdms@THE_LINK mdms
         ON mdms.pron = SUBSTR(pcn.pron, 1, 8) || SUBSTR(pcn.pron, 11, 1)
         LEFT JOIN if_fedlog fedlog
         ON fedlog.fsc || fedlog.niin = SUBSTR(pcn.nsn, 1, 13)
         LEFT JOIN awpsammo@THE_LINK ammo
         ON ammo.pron = pcn.pron
         LEFT JOIN if_core_workload c
         ON (
              c.site = 'SITE'
              AND NVL2(wbs1.wbs1_seq, wbs1.wbs1, pcn.pron) = c.pron
              AND h.fy = c.data_fy
    WHERE pcn.mission != 'NOP'
    AND   x.pmc_cancel_fg = 'F'
    AND   NVL(wbs1.cancel_fg, 'F') = 'F'
    AND   NVL2(wbs1.wbs1_seq, wbs1.wpc, pcn.wpc) <> 'ZZ'I get:
    ORA-00904: "SETUP"."SITE": invalid identifier
    ORA-02063: preceding line from THE_LINK
    However, if I remove any of the cmd1, cmd2, fedlog, mdms, or ammo joins, it runs properly.
    It also runs properly if I remove both "WHERE h.data_dt BETWEEN '01-SEP-06' AND '31-OCT-08'" (line 25) and "AND x.pmc_cancel_fg = 'F'" (third line from the end).
    Also, there are three different external sites; the problems happen on two of them, but on a third, the code works as is.
    The query also works if:
    * I remove the links and run it directly on the external sites
    * I add something that makes it return no rows immediately (for example, "AND 0 = 1" as the last line)
    * "WHERE h.data_dt BETWEEN '01-SEP-06' AND '31-OCT-08'" is replaced by "WHERE h.data_dt = '30-SEP-09'" (which returns rows)
    * For that matter, at one of the problem sites, changing the first date in that WHERE clause to anything between '19-JUN-09' and '29-SEP-09' works, but '18-JUN-09' and earlier causes the error; at the other, the earliest working date is '02-NOV-08'.
    All three external databases, as well as the database on which this is run, are running 11.2.0.1.0 64-bit Production.
    Any ideas as to what is happening?

    sb92075 wrote:
    WHERE h.data_dt BETWEEN '01-SEP-06' AND '31-OCT-08'With Oracle characters between single quote marks are STRINGS!
    'This is a string, 2009-12-31, not a date'
    When a DATE datatype is desired, then use TO_DATE() function.Actually, usually I do (since there's no guarantee as to what the "default" date format will be - besides, the default tends to be 2-year dates). The one line where I don't is really just something I added to speed up the query when testing for the error.
    However changing that line to:
    WHERE h.data_dt BETWEEN TO_DATE('09/01/2006', 'MM/DD/YYYY') AND TO_DATE('10/31/2008', 'MM/DD/YYYY')causes the same results.

  • Database Link and domain suffix problem

    Hi
    I have two machines in the same workgroup with Oracle Server 8.1.6 and two instances, I don't have domain .When I create Database Link on one of them the name of the link appears with unknown suffix "US.ORACLE.COM" .The parameter DB_DOMAIN in the init file has no value.Is anybody know why Oracle adds this suffix every time when I'm trying to create database link?

    You have to check your SQLNET.ORA file. There is a parameter defined in that file called:
    NAMES.DEFAULT_DOMAIN = <default domain to use>
    You need to change this value according to your network settings.

  • 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.

  • Creation of Database link and access the same plus Snapshot creation

    i want talk between two oracle server. i decided to go for snapshot creation with periodical refresh. For which i am having two oracle server's with different ip address located inside our office setup.
    I have created a database link between two servers.
    first server name global
    userid scott
    password tiger
    second server name asil
    userid scott
    password tiger
    both the user have been given dba rights.
    in both the server the services and listners are all started. i gave the following command to create database link.
    from asil server
    create public database link global connect by scott identified by tiger using 'global'
    the command was successful and the link was created. Now i tried to access a table of the scott user of the global server.
    select * from emp@global;
    now it is giving error. I want to know how the link can be created and how it can be accessed. i refered the 8i online documentation and done the things based on that. i expect valuble solution from all possible persons
    null

    A reason for this problem could be that your database is configured that a database link has to have exactly the same name like the global name of the database instance it should connect to.
    Can you please provide the oracle error code / message ? With this information there might be more hints I can give you.

  • Issue while creating location with database link

    Hi all,
    I am using OWB 10.2.0.4.0 (same Oracle DB version). I am trying to create a location using a database link.
    When I select the location which the database link is located (From location drop-down list), I face the following error.
    >
    ENV0036: The selected location is not valid.
    ENV0036: The selected location is not valid.
         at oracle.wh.service.sdk.integrator.RepositoryUtils.createDBLinkWithLocation(RepositoryUtils.java:156)
         at oracle.wh.ui.environment.wizards.DatabaseLinkComponent.init(DatabaseLinkComponent.java:61)
         at oracle.wh.ui.environment.wizards.DatabaseLinkComponent.reload(DatabaseLinkComponent.java:204)
         at oracle.wh.ui.environment.wizards.FromLocationComponent.itemStateChanged(FromLocationComponent.java:111)
         at javax.swing.JComboBox.fireItemStateChanged(JComboBox.java:1162)
         at javax.swing.JComboBox.selectedItemChanged(JComboBox.java:1219)
         at javax.swing.JComboBox.contentsChanged(JComboBox.java:1266)
         at javax.swing.AbstractListModel.fireContentsChanged(AbstractListModel.java:100)
         at javax.swing.DefaultComboBoxModel.setSelectedItem(DefaultComboBoxModel.java:88)
         at javax.swing.JComboBox.setSelectedItem(JComboBox.java:551)
         at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:597)
         at javax.swing.plaf.basic.BasicComboPopup$ListMouseHandler.mouseReleased(BasicComboPopup.java:749)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:232)
         at java.awt.Component.processMouseEvent(Component.java:5100)
         at javax.swing.plaf.basic.BasicComboPopup$2.processMouseEvent(BasicComboPopup.java:452)
         at java.awt.Component.processEvent(Component.java:4897)
         at java.awt.Container.processEvent(Container.java:1569)
         at java.awt.Component.dispatchEventImpl(Component.java:3615)
         at java.awt.Container.dispatchEventImpl(Container.java:1627)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
         at java.awt.Container.dispatchEventImpl(Container.java:1613)
         at java.awt.Window.dispatchEventImpl(Window.java:1606)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:480)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:141)
         at java.awt.Dialog$1.run(Dialog.java:542)
         at java.awt.Dialog$3.run(Dialog.java:569)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.awt.Dialog.show(Dialog.java:567)
         at java.awt.Component.show(Component.java:1133)
         at java.awt.Component.setVisible(Component.java:1088)
         at oracle.bali.ewt.wizard.WizardDialog.runDialog(Unknown Source)
         at oracle.bali.ewt.wizard.WizardDialog.runDialog(Unknown Source)
         at oracle.wh.ui.owbcommon.OWBWizard.initialize(OWBWizard.java:815)
         at oracle.wh.ui.owbcommon.OWBWizard.<init>(OWBWizard.java:168)
         at oracle.wh.ui.owbcommon.OWBWizard.<init>(OWBWizard.java:147)
         at oracle.wh.ui.owbcommon.IdeUtils._doLaunchDefinition(IdeUtils.java:1188)
         at oracle.wh.ui.owbcommon.IdeUtils.showWizard(IdeUtils.java:471)
         at oracle.wh.ui.owbcommon.IdeUtils.showWizard(IdeUtils.java:427)
         at oracle.wh.ui.jcommon.tree.WBRepositoryObjectTree.launchWizard(WBRepositoryObjectTree.java:502)
         at oracle.wh.ui.console.commands.CreateByWizardCmd.showUI(CreateByWizardCmd.java:33)
         at oracle.wh.ui.console.commands.CreateCmd.performAction(CreateCmd.java:76)
         at oracle.wh.ui.console.commands.TreeMenuHandler$1.run(TreeMenuHandler.java:188)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:189)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:478)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    >
    Could you please let me know how to solve this and how to create such location with OMB*Plus?
    Thanks,
    Sebastian

    Hi David,
    Thanks a lot for the tip. Now I was able to use this and using a registered location.
    OMBCREATE LOCATION 'X' SET PROPERTIES (TYPE,VERSION,CONNECTION_TYPE, SCHEMA) VALUES ('ORACLE_DATABASE','11.1','DATABASE_LINK','MY_SCHEMA')
    OMBCREATE CONNECTOR 'REGISTERED_LOC/X SET PROPERTIES (DATABASE_LINK_NAME) VALUES ('MY_DBLINK') SET REF LOCATION 'X'
    OMBCOMMIT
    OMBCC '/MY_PROJECT'
    OMBCAC 'DEFAULT_CONFIGURATION'
    OMBCONNECT CONTROL_CENTER USE 'owb_user/owb_user'
    OMBREGISTER LOCATION 'X' REUSE
    OMBCOMMITBut now my question is the following.
    I am having problems to import the metadata from X.
    When create a module (source), I am able to make "data location" from location 'X' but when I want to import a table from location 'X' is not possible, because it shows as a plausible metadata location as "REGISTERED_LOC"
    Could you please let me know how to use 'X' as metadata location?
    Thanks!
    Sebastián

Maybe you are looking for

  • Stiff Battery cover for Lumia 520

    Today I configured my first Lumia 520 and it was an 'interesting' experience. I have 2 complaints: 1. Whilst the battery cover adds a nice feel to the phone, it is stiff and very difficult to peel off. 2. The online instructions provided for peeling

  • How to do enable my ipod touch when passcode is unknown?

    My 4yo son had figured out how to set a passcode and disabled his ipod touch since he doesn't know it. How do I get his ipod to enable and unlock without a passcode.I want to set it up so he cannot do this again. I read the ipod manual online that I

  • Screen/movie capture apps for qt movies or flash 8 video player

    was helped with this by J walker. i am trying to view the code in firefox or safari from this video http://www.planetphotoshop.com/videos/flash_depthoffield.html but do not see a url with mov is this downloadable besides snapz pro is there a free app

  • OSS claiming my device has no functionality (possibly incompatible?)

    For some reason, I decided to install OSS even though I had ALSA working. In doing this, I found that it does not seem to like my sound device (realtek HD audio on-board, since that's important), though there are no steps for fixing anything like thi

  • Satellite A200 - Can't find Sleep & Charge option in BIOS

    I have been told that turning "Sleep to Charge" on in the bios of my satellite A200 will help my iPhone connect with iTunes without freezing it. I have downloaded the latest bios (2.50) and cannot find anywhere in it that will allow me to turn on "Sl