ORA-01406 error encountered when using database link

I am moving data between two different databases using a database link on Oracle 8.1.5. The database statement looks like:
insert into TABLE@DATABASELINK
(COLUMNS)
select (COLUMNS) from TABLE
One of the database columns is defined as varchar2(4000) on both the source and target database tables. When the data in this column on the source database is greater than 2000 characters, the database query generates the message:
ORA-01406: fetched column value was truncated
I have verified that the target column is defined as varchar2(4000), and have also verified that it is this varchar2(4000) column that is causing the problem. I have also tested out that this error only occurs when the varchar field is more than 2000 characters; if I remove characters so that the source field is less than or equal to 2000 characters, this error is no longer generated and the data is inserted to the target database table.
Is this a limit with database links or some other database parameter that is not set up correctly?
Thanks...Theresa Tucci

Could you change the following entry in your 'sqlnet.ora' file and try?
SQLNET.AUTHENTICATION_SERVICES = (NONE)

Similar Messages

  • TNS-12666 error occures when using database link

    When I am trying to use database link
    defined in my database the following error occures:
    TNS-12666 Dedicated server: outbound transport protocol different from inbound.
    In documentation is stated to resolve such an error to
    specify the same protocol in the SQL*Net connect string or alias for the outbound connection as that used for the inbound connection.
    I have in tnsnames.ora defined network service name
    by which I can connect to such a database by SQL*Plus
    without any problems, why can I not do such a thing
    via database link?
    Thanks a lot for advise, ...

    Could you change the following entry in your 'sqlnet.ora' file and try?
    SQLNET.AUTHENTICATION_SERVICES = (NONE)

  • Error When Using DataBase LINK in pl/sql

    I have cursor fetching some values from remote db and i m trying to store values in local table (see code below) I can run the select query alone succefully but when i use it inside plsql it fails with error.
    DECLARE
    TYPE MY_CURSOR
    IS
         REF
         CURSOR;
              THE_CURSOR MY_CURSOR;
              V_CT          NUMBER(18);
              V_PSN_ID      VARCHAR2(30);
              V_INTERNET_ID VARCHAR2(75);
         BEGIN
              V_CT                                                                           :=0;
              OPEN THE_CURSOR FOR SELECT PSN_ID, 'TEST' FROM TABLE_A@PRO1 WHERE TABLE_A.SEQ_A<=1000;
              LOOP
                   FETCH THE_CURSOR INTO V_PSN_ID, V_INTERNET_ID;
              EXIT
         WHEN THE_CURSOR%NOTFOUND;
               INSERT INTO PSN_EMAIL_SENT_TO@local
                        (PSN_ID, LAST_UPDT_DT
                        ) VALUES
                        (V_PSN_ID, SYSDATE
              V_CT:=V_CT+1;
         END LOOP;
         CLOSE THE_CURSOR;
         DBMS_OUTPUT.PUT_LINE
              TO_CHAR(V_CT)
    END;
    Error report:
    ORA-04052: error occurred when looking up remote object  TABLE_A@PRO1
    ORA-00604: error occurred at recursive SQL level 1
    ORA-04029: error ORA-1775 occurred when querying ORA_KGLR7_DEPENDENCIES
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01775: looping chain of synonyms
    ORA-02063: preceding 3 lines from PRO1
    04052. 00000 -  "error occurred when looking up remote object %s%s%s%s%s"
    *Cause:    An error has occurred when trying to look up a remote object.
    *Action:   Fix the error.  Make sure the remote database system has run
               KGLR.SQL to create necessary views used for querying/looking up
               objects stored in the database.

    You need to create the catalog views that support distributed SQL in your remote database (the database you connect to via db_link).
    To create these views, connect "/ as sysdba" and run:
    $ORACLE_HOME/rdbms/admin/catproc.sql
    which will in turn call several other scripts including: $ORACLE_HOME/rdbms/admin/catrpc.sql (which creates your missing view)
    It is best to run the whole catproc.sql script (and not just the catrpc script).
    You can run and rerun catproc.sql several times quite safely.
    Cheers

  • Broken Pipe Error when using database link

    We are using WebLogic 6.1 sp2 / oracle database 8.1.6. / thin drivers.
    The connection works fine, unit I try to access a view that has a union and db links
    in it.
    We have used one or the other (view or a dblink) and it works, but when used together,
    we get broken pipe error.
    I haven't proven that this is the cause, I will try to setup a test, but I was wondering
    if this is a known issue or what ??
    thanks
    Rich

    You need to create the catalog views that support distributed SQL in your remote database (the database you connect to via db_link).
    To create these views, connect "/ as sysdba" and run:
    $ORACLE_HOME/rdbms/admin/catproc.sql
    which will in turn call several other scripts including: $ORACLE_HOME/rdbms/admin/catrpc.sql (which creates your missing view)
    It is best to run the whole catproc.sql script (and not just the catrpc script).
    You can run and rerun catproc.sql several times quite safely.
    Cheers

  • ORA-12154 when using Database Link

    We're running 11r2 on our servers. I have a primary db and a standby db, using Data Guard. The standby is open for read-only querying. We are not using ASM.
    The primary (and thus the standby) have a PUBLIC database link to a third db server.
    When I run a query against the database link on the primary: select * from test@MyDBlink; Everything works fine.
    When I run the same query against the database link on the standby: select * from test@MyDBlink; I get ORA-12154: TNS:could not resolve the connect identifier.
    I check that the db link exists on the standby. It does.
    I go to command prompt on the standby and run "tnsping MyDBlink". It executes fine. It says "Used TNSNAMES adapater to resolve the alias" and sure enough, MyDBlink is referenced in the TNSNAMES.ORA.
    I also run "tnsping IP-of-MyDBlink" to doublecheck. No issues.
    What is going on that is blocking the db link on the standby? Many reports utilize that standby and I'd hate to deny them the functionality of a db link.
    Thanks

    893968 wrote:
    We're running 11r2 on our servers. I have a primary db and a standby db, using Data Guard. The standby is open for read-only querying. We are not using ASM.
    The primary (and thus the standby) have a PUBLIC database link to a third db server.
    When I run a query against the database link on the primary: select * from test@MyDBlink; Everything works fine.
    When I run the same query against the database link on the standby: select * from test@MyDBlink; I get ORA-12154: TNS:could not resolve the connect identifier.
    I check that the db link exists on the standby. It does.
    I go to command prompt on the standby and run "tnsping MyDBlink". It executes fine. It says "Used TNSNAMES adapater to resolve the alias" and sure enough, MyDBlink is referenced in the TNSNAMES.ORA.
    I also run "tnsping IP-of-MyDBlink" to doublecheck. No issues.
    What is going on that is blocking the db link on the standby? Many reports utilize that standby and I'd hate to deny them the functionality of a db link.
    ThanksMost people with this problem don't understand that the dblink is just another client, no different than sqplus running on the same machine - and therefore the link uses the tnsames in the ORACLE_HOME of the database containing the link. But it seems from the steps you've described that you've grasped that. The only thing I can think of off the top of my head is when you try sqlplus from the standby server you are hitting a different tnsnames than the one the database is using.

  • Timeout when using database link connecting to a remote database

    Hi,
    I have another strange problem. I have two computers A and B. Both have an Oracle database server instance. I manage the one in B (which is my local computer) but not the one in A (which is a computer where I have a user account and an Oracle account but I don't own or manage).
    I tried to establish a database link on the database in B pointing to the one in A. This works.
    When I try the opposite, that is, establish a database link on the database in A pointing to the one in B I cannot get it work. I can create the database link but then when I try to use it (e.g., by submitting a "SELECT") it blocks for a long time and finally returns "ORA-12535: TNS:operation timed out". I tried to execute telnet from A to B using the port of the Oracle database server in B and it seems that the connection is established. I tried something similar with tnsping but this does not work, as I get again the timeout. I tried deactivating the firewall on my computer B, but it does not work either (besides, the telnet passes through even if I have the firewall activated).
    Any idea?
    My TNSPING looks like this:
    tnsping '(DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = <the-target-ip>)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = XE)
    I also tried with:
    tnsping '(ADDRESS = (PROTOCOL = TCP)(HOST = <the-target-ip>)(PORT = 1521))';
    I'm lost... Any ideas are very much appreciated.
    Thanks!

    From A to B and from B to A can you ping ... post the output surrounded by tags for formatting.
    Do the same thing for TNSPING.
    What do these computers have in the way of firewalls and antivirus products installed and how are they configured?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Error occurred when using db link in procedure

    Hi
    I have a problem. As COLL_OWNER, I failed to compile this procedure.
    CREATE OR REPLACE PROCEDURE Arch_Session_Order_Queue
    IS
    -- declarations
    BEGIN
    -- many lines
    SELECT COUNT (1)
    INTO v_wols_count
    FROM [email protected];
    -- many lines
    END;
    The error says "PL/SQL: ORA-00980: synonym translation is no longer valid"
    But when I run it as COLL_OWNER like that,
    SELECT COUNT (1) FROM [email protected]
    I get the result.
    Why that happens? How to resolve the problem?
    Appreciate your advice.
    Kevin

    Hi Jens
    Here is the result
    SELECT * FROM [email protected] WHERE synonym_name='ORDER_QUEUE;
    OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK
    OMDBPP_OWNER ORDER_QUEUE ORDER_QUEUE WOLSPP.WORLD
    SELECT owner, object_name, object_type, status
    FROM [email protected] WHERE object_name='ORDER_QUEUE';
    OWNER OBJECT_NAME OBJECT_TYPE STATUS
    OMDBPP_OWNER ORDER_QUEUE SYNONYM VALID
    The ORDER_QUEUE on O9IPRD.WORLD is a synonym that points to the real table.
    The way that happen is that we have Oracle 10g. The business logic needs to use Oracle 8.1.5 database. Oracle10g cannot talk to Oracle8.1.5. We created an Oracle 9i database having the synonym that points to the real table of Oracle 8.1.5.
    I am wondering why I can get the result in SQL but failed to get procedure work.
    Thanks,
    Kevin

  • Error message when using Dynamic Link

    Have been trying to export video created in Primiere Pro CS4 to Encore.  I keep getting the following error message.  [..\..\src\AMEPresentProber.ccp-258]     I get this message with two different videos I have tried from different camera's/encoding. 

    Just fyi, a google of the meat of your error message (AMEPresentProber.ccp-258) finds only this thread. I wonder if you have other problems on the install.

  • Error Connecting to database URL jdbc:oracle:oci:@rmsdbtst as user rms13 java.lang.Exception:UnsatisfiedLinkError encountered when using the Oracle driver

    Trying to Install RMS application 13.2.2 and I get past the pre-installation checks and when I get to the Data Source details and enter the data source details with the check box checked to validate the schema/Test Data Source I get the following error:
    Error Connecting to database URL jdbc:oracle:oci:@rmsdbtst as user rms13 java.lang.Exception:UnsatisfiedLinkError encountered when using the Oracle driver. Please check that the library path is set up properly or switch to the JDBC thin client oracle/jdbc/driver/T2CConnection.getLibraryVersioNumber()
    Checks performed:
    RMS Application code location and directory contents:
    [oracle@test-rms-app application]$ pwd
    /binary_files/STAGING_DIR/rms/application
    [oracle@test-rms-app application]$ ls -ltr
    total 144
    -rw-r--r-- 1 oracle oinstall   272 Dec 7  2010 version.properties
    -rw-r--r-- 1 oracle oinstall   405 Jan 16 2011 expected-object-counts.properties
    -rw-r--r-- 1 oracle oinstall   892 May 13 2011 ant.install.properties.sample
    -rw-r--r-- 1 oracle oinstall 64004 Jun  6  2011 build.xml
    drwxr-xr-x 9 oracle oinstall  4096 Jun 16 2011 rms13
    drwxr-xr-x 3 oracle oinstall  4096 Jun 16 2011 installer-resources
    drwxr-xr-x 3 oracle oinstall  4096 Jun 16 2011 antinstall
    drwxr-xr-x 2 oracle oinstall  4096 Jun 16 2011 ant-ext
    drwxr-xr-x 5 oracle oinstall  4096 Jun 16 2011 ant
    -rw-r--r-- 1 oracle oinstall 11324 Dec 18 09:18 antinstall-config.xml.ORIG
    -rwxr-xr-x 1 oracle oinstall  4249 Dec 18 10:01 install.sh
    drwxr-xr-x 4 oracle oinstall  4096 Dec 18 10:06 common
    -rw-r--r-- 1 oracle oinstall 16244 Dec 19 10:37 antinstall-config.xml
    -rw-r--r-- 1 oracle oinstall   689 Dec 19 10:37 ant.install.log
    [oracle@test-rms-app application]$
    Application installation:
    [oracle@test-rms-app application]$ ./install.sh
    THIS IS the driver directory
    Verified $ORACLE_SID.
    Verified SQL*Plus exists.
    Verified write permissions.
    Verified formsweb.cfg read permissions.
    Verified Registry.dat read permissions.
    Verified Java version 1.4.2.x or greater. Java version - 1.6.0
    Verified Tk2Motif.rgb settings.
    Verified frmcmp_batch.sh status.
    WARNING: Oracle Enterprise Linux not detected.  Some components may not install properly.
    Verified $DISPLAY - 172.16.129.82:0.0.
    This installer will ask for your "My Oracle Support" credentials.
    Preparing installer. This may take a few moments.
    Your internet connection type is: NONE
    Integrating My Oracle Support into the product installer workflow...
         [move] Moving 1 file to /binary_files/STAGING_DIR/rms/application
    Installer preparation complete.
    MW_HOME=/u01/app/oracle/Middleware/NewMiddleware1034
    ORACLE_HOME=/u01/app/oracle/Middleware/NewMiddleware1034/as_1
    ORACLE_INSTANCE=/u01/app/oracle/Middleware/NewMiddleware1034/asinst_1
    DOMAIN_HOME=/u01/app/oracle/Middleware/NewMiddleware1034/user_projects/domains/rmsClassDomain
    WLS_INSTANCE=WLS_FORMS
    ORACLE_SID=rmsdbtst
    JAVA_HOME=/u01/app/oracle/jrockit-jdk1.6.0_45-R28.2.7-4.1.0
    Launching installer...
    To make sure I have connectivity from the app server to the database (on a database server) here are the steps followed:
    [oracle@test-rms-app application]$ tnsping rmsdbtst
    TNS Ping Utility for Linux: Version 11.1.0.7.0 - Production on 19-DEC-2013 10:41:40
    Copyright (c) 1997, 2008, Oracle.  All rights reserved.
    Used parameter files:
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = test-rms-db.vonmaur.vmc)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = rmsdbtst)))
    OK (0 msec)
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ sqlplus rms13@rmsdbtst
    SQL*Plus: Release 11.1.0.7.0 - Production on Thu Dec 19 10:46:18 2013
    Copyright (c) 1982, 2008, Oracle.  All rights reserved.
    Enter password:
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ ping test-rms-db
    PING test-rms-db.vonmaur.vmc (192.168.1.140) 56(84) bytes of data.
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=1 ttl=64 time=0.599 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=2 ttl=64 time=0.168 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=3 ttl=64 time=0.132 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=4 ttl=64 time=0.158 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=5 ttl=64 time=0.135 ms
    --- test-rms-db.vonmaur.vmc ping statistics ---
    5 packets transmitted, 5 received, 0% packet loss, time 4001ms
    rtt min/avg/max/mdev = 0.132/0.238/0.599/0.181 ms
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ uname -a
    Linux test-rms-app.vonmaur.vmc 2.6.18-128.el5 #1 SMP Wed Jan 21 08:45:05 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ cat /etc/*-release
    Enterprise Linux Enterprise Linux Server release 5.3 (Carthage)
    Red Hat Enterprise Linux Server release 5.3 (Tikanga)
    [oracle@test-rms-app application]$
    The database is created and all the batch file scripts have been successfully deployed.  Now working on the application server.  The  Weblogic server is installed and 11g forms and reports are installed successfully.
    Any help would be helpful.
    Thanks,
    Ram.

    Please check MOS Notes:
    FAQ: RWMS 13.2 Installation and Configuration (Doc ID 1307639.1)

  • ORA-04052: error occurred when looking up remote object SYS.DBMS_SNAPSHOT

    Hello everyone,
    When I tried to create a materialized view with refresh fast mode, I encountered following error message.
    The MV log has been created on my_table like this:
    create materialized view log on my_table
    tablespace data3
    with rowid, sequence
    including new values;
    The database link has been created like this:
    CREATE PUBLIC DATABASE LINK my_db
    CONNECT TO myname
    IDENTIFIED BY mypassword
    USING 'my_db';
    Could anybody please let me know why I can not create MV with refresh fast? What I did wrong?
    Thanks in advance!!!
    MYDB>select count(*) from my_table@my_db;
    COUNT(*)
    5
    Elapsed: 00:00:00.01
    MYDB>create materialized view my_mv
    2 tablespace data4
    3 build immediate
    4 refresh fast with rowid
    5 as
    6 select * from my_table@my_db
    select * from my_table@my_db
    ERROR at line 6:
    ORA-04052: error occurred when looking up remote object SYS.DBMS_SNAPSHOT@my_db
    ORA-00604: error occurred at recursive SQL level 2
    ORA-06544: PL/SQL: internal error, arguments: [55916], [], [], [], [], [], [], []
    ORA-06553: PLS-801: internal error [55916]
    ORA-02063: preceding 2 lines from my_db
    Elapsed: 00:00:00.29
    MYDB>create materialized view my_mv
    2 tablespace data4
    3 build immediate
    4 as
    5 select * from my_table@my_db;
    Materialized view created.
    Elapsed: 00:00:00.20

    No, you cannot apply a patch to XE. Basically the XE internal code is the same as for any other edition. That means is there a bug, you have it in XE,too. To get patches you need a licence for metalink/My Oracle Support. But even you would have one, it wouldn't help you, because Oracle does not provide patches for XE.
    That's the 'price' you have to pay for this free edition.
    Werner

  • PL/SQL: ORA-04052: error occurred when looking up remote object.

    Hi All,
    I'm getting the following error message while executing a PL/SQL Block.
    PL/SQL: ORA-04052: error occurred when looking up remote object UPLDUSER.filestatushistory@FTS
    ORA-00604: error occurred at recursive SQL level 1
    ORA-03106: fatal two-task communication protocol error
    ORA-02063: preceding line from FTSStatement
    declare
    v_coun number;
    begin
    select count(*) into v_coun
    from updluser.filestatushistory@fts;
    end;Back ground of the situation as follows,
    My DataBase version 10.2.0.3 DB Name :DB1
    Table Owner : UPLDUSER
    Table Name : FILESTATUSHISTORY
    I have a report user on the same database and I have grant all on the above table to report user
    Report User : RPT_FTS
    SQL> GRANT ALL ON FILESTATUSHISTORY_V TO RPT_FTS;Now Please find the below database details where I'm getting subjected error.
    Database version : 9.2.0.8
    DB Name : DB2
    User Name : RPT_REPORTS
    I Have create a dblink from RPT_REPORTS to RPT_FTS on DB1 and the dblink works fine. But getting the above error while running it.
    but When I do the same other 10.2.0.3 db , the above PL/SQL block works fine without any problem.
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Now the strange about this is that I have Created a new table on DB1 db like below;
    SQL> CREATE TABLE UPLDUSER.ABC AS SELECT * FROM FILESTATUSHISTORY;and retry my code on DB2 (9.2.0.8) after changing the table to ABC and it worked. Now I don't know whats wrong with a original table(FILESTATUSHISTORY).
    To over come the problem and a work-a-round method I create a view on the DB1 (RPT_FTS) like the below
    SQL> CREATE VIEW FILESTATUSHISTORY AS SELECT * FROM UPLDUSER.FILESTATUSHISTORY;and was able to run the PL/SQL block Remotely.
    Just wants To know what whould have been the cause for this .
    Cheers
    Kanchana

    Hi Kanchana,
    Perhaps following link of google search has answer to your query
    ORA-04052. The search result contains some useful articles whose URLs I shan't post in the forums.
    HTH!
    *009*

  • How to Execute a Remote Procedure in Portal using Database Link

    Hi,
    I followed the instructions to create a Portal form for a remote procedure. But I am encountering the following error. Can someone advise what may be the cause?
    Failed to execute - Missing string(create_package_body) language(us) domain (wwv) sub_domain (wwv_builder) (WWV-04300)
    ORA-04020: deadlock detected while trying to lock object PUBLIC.PORTLET_SCHEMA (WWV-11230)
    Failed to parse as PORTAL - (WWV-08300)
    PURPOSE
    How to execute a remote procedure in Portal using Database Link.
    DESCRIPTION
    This procedure assumes that you have two databases, one of which is remote, and Portal is configured in the other.
    Remote Database A:
    ==================
    1) Create a procedure as follows: Create or Replace PROCEDURE SCOTT.ADD_TWO_VALUES ( v_one IN NUMBER, v_two IN NUMBER, v_result OUT NUMBER) as begin v_result :=v_one+v_two; end; 2) Grant execute privileges to PUBLIC on the procedure.
    Database B (where Portal is configured): ========================================
    1) Create a public database link and choose to connect as a specific user (say SYSTEM). By default, in an Oracle 8i database, the "global_names" parameter in initSID.ora (or init.ora) file is set to "true". This Global Naming parameter enforces that a dblink has the same name as the database it connects to. Therefore, if the remote global database (A) name is "ora8.acme.com" then the database link should also be named as "ora8.acme.com".
    2) Create a synonym for the procedure in Database A. Make sure you fully qualify the procedure name in the remote database (like SCOTT.ADD_TWO_VALUES).
    3) Create a dynamic page to execute the procedure. The ORACLE tags in the dynamic page will look similar to the following: <ORACLE> DECLARE v_total NUMBER; BEGIN ADD_TWO_VALUES(:v_one,:v_two, v_total); htp.p('The total is => '); htp.p('<input type="TEXT" VALUE='||v_total||'>'); htp.para; htp.anchor('http://<machine.domain:port#>/pls/portal30/SCOTT.DYN_ADD_TWO_VALUES.show_parms', 'Re-Execute Procedure'); END; </ORACLE>
    4) Portal does not have an option to create a form based on a synonym. Therefore, if you want to create a form instead of a dynamic page, create a wrapper procedure and then create a form based on this procedure. For example: Create or Replace PROCEDURE PORTAL30.ADD_TWO_VALUES_PR ( v_one IN NUMBER, v_two IN NUMBER, v_total OUT NUMBER) as begin add_two_values(v_one, v_two, v_total); end;
    5) Grant execute privileges to PUBLIC on the procedure.

    hello...
    any input will welcomed... Thanks..

  • Using database links in a plsql page process

    I am trying to use a database link in a pl/sql page process.
    It works fine when I use the link name in the plsql like this:
    BEGIN
    SELECT 
    CARD_ID
    into  
    :P12_HDR_CARD_NUMBER 
    from     [email protected];
    But the link name will be coming from a page item (P12_DBLINK) populated as follows:
    select db_link d, db_link r from user_db_links; 
    I have tried the following and it's not working:
    DECLARE
    l_link VARCHAR2(30);
    BEGIN
    l_link :=  :P12_DBLINK;
    SELECT 
    CARD_ID
    into  
    :P12_HDR_CARD_NUMBER 
    from     fusion.EXM_CC_COMPANY_ACCOUNTS@l_link;
    this gives me:
    ORA-04052: error occurred when looking up remote object FUSION.EXM_CC_COMPANY_ACCOUNTS@L_LINK.WORLD ORA-00604: error occurred at recursive SQL level 3 ORA-02019: connection description for remote database not found
    I thought that maybe the link name was getting appended with .WORLD automatically but the link name already has .WORLD at the end. I tried stripping that off first but the error is the same.
    Is there some synatx for this that will work for this? Will I need to use dynamic sql?
    Any suggestions are most appreciated.
    thanks,
    john

    Hi John,
    check the following example to use the execute immediate statement for your purpose
    sql - Variable for Database Link Name - Stack Overflow
    let me know if this answers your query in the current thread

  • Using Database link to go from one database to another

    Hi all,
    I am trying to create a SQL-query which connects to two
    different databases.
    I have created a Database link, which points from on database to
    the other, and have supplied the database name, username and
    password.
    when I try to run following query I get error ORA:02085, MY_LINK
    is connecting to SIEBN1S.(domain).com
    SELECT COUNT(*) FROM MY_TABLE@MYLINK;
    additional info:
    2 databases are exact copies on different servers (SIEBN1S and
    N1SSIEB)
    the MY_TABLE exists in both databases and I have rights on it in
    both, I can separately connect to both databases and look into
    MY_TABLE
    I have created the database link using following statement (in
    the N1SSIEB db):
    create database link MYLINK connect to <usr> identified by <pwd>
    using 'SIEBN1S'
    any help is welcome

    You have set GLOBAL_NAMES to TRUE in your init.ora file. This
    means your database link must have the same name as the database
    you want to connect to ie SIEBN1S.(domain).com.
    alternatively you can change GLOBAL_NAMES. to test this try
    'ALTER SESSION SET GLOBAL_NAMES=FALSE'.
    hth, APC

  • Error message when using FM 'BAPI_BUPA_ADDRESS_CHANGE'.

    I'm continually getting an error message when using FM 'BAPI_BUPA_ADDRESS_CHANGE'. The message being 'Table BAPIADTEL entry to be changed not found in target system'.
    I have looked up this message but all links seem to refer to FM 'BAPI_BUPA_CENTRAL_CHANGE', which I'm not using, and has different parameter settings.
    I'm simply trying to update the telephone number and I'm updating strcuture BAPIADTEL and BAPIADTELX but still the message appears. I know that there is a really simple reason for this, but I have been double-checking everything and experimenting with lots of different areas, but with no effect.
    Has anyone encountered this problem using the specific FM ''BAPI_BUPA_ADDRESS_CHANGE' ?.
    Jason

    Hi Jason,
    In case your database tables had already value for field telephone number, then only the flag should be "U".
    If the telephone number field was empty, and we will try to change it by using the flag as U, it wont work. In this case, we should be using "I".
    I even wrote that before in this post, but somehow I guess the post was locked, and a lot of comments from you and me were not visible apart from the first two. So, I couldnt get any update from you.
    Anyway, its good that its working for you. Thank you for the update.
    Regards,
    Susanta

Maybe you are looking for

  • I've lost the Market and can't get it back

    I connected my phone to a new router and when I went to go to the Market, it was empty.  I've tried downloading it, but then I found it in my phone and I can't it  activated.  I tried taking the battery out, but that didn't work either.  Any suggesti

  • Internet only works on the windows side of my bootcamped mac

    I have a bootcamped 2012 macbook pro running os x 10.8.5. My issue is it says that I'm connected to the internet but everything that requires internet will not load. Web pages go about 20% of the way before it stops. This is occurring on any wifi I t

  • JS RegExp Bug in CS5

    var text = "aXbY"; var re = /^(.*?)(?:X(.+)Y)?$/; alert(text.match(re)); Returns "aXbY,,b" in Photoshop instead of "aXbY,a,b". The non-capturing parentheses seems to be the problem.

  • How can I enable java on Firefox

    when I am try to login in my account an error shows that java is not enable please enable your java from browser settings but I am not getting any option in browser setting to enable java. I am using Samsung galaxy s3 mini and I have already enabled

  • Where can i get a 8BI file for a raw update to 8.3?

    I have tried update on cs5 and just get errors blaming firewall, which i disabled. i dont need the full dng download just the 8bi file to inport to cs5 files