Accessing Tables using DB link .

Hello Friends,
I have a development and production env.
I created a public DB link in Development say mylink .
Trying to access the developement table from production using the following command say to access table x
From PROD accessing DEV table x using dblink
select * from x@mylink ;
Got the error as :
ORA-02019: connection description for remote database not found
02019. 00000 - "connection description for remote database not found"
Any idea on this why this error is coming ..
thanks/kumar

I have a development and production env.
I created a public DB link in Development say mylink .
Trying to access the developement table from production using the following command say to access table x
From PROD accessing DEV table x using dblink
select * from x@mylink ;You are trying to execute the query in PROD database. This query uses a DB link which points to the DEV database.
Very simple to understand : Since you are using the DB LINK in PROD database, obviously it should be in PROD area... right?
Just imagine you are using an object (the 'DBLINK') in PROD and it doesn't exist here. Got it?
SELECT * FROM x@mylink;
Here,
x -- table in DEV database
mylink -- DB LINK in PROD database (pointing to DEV)
Please try this.
HTH
Edited by: ranit B on Dec 25, 2012 12:24 AM

Similar Messages

  • Error while trying to access table using DB Link

    Hi All,
    I had to access a table in another instance using a DB link. As there was no DB link, I was asked to create one and then access the table.
    The below query was used to create DB link on my current instance FDEV:
    CREATE PUBLIC DATABASE LINK to_link CONNECT TO apps IDENTIFIED BY appsdev USING 'ABCD';
    The DB link gets created successfully and when I query select * from all_db_links on my current instance FDEV, I see the DB link name.
    However, when I try to access the table, select * from x_stg@to_link on my current instance FDEV, this is resulting in an error as shown below:
    ORA-01017: invalid username/password; logon denied
    ORA-02063: preceding line from TO_LINK
    The TNS entry looks something like this:
    ABCD =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = abc.xx.com)(PORT = 1234))
    (ADDRESS = (PROTOCOL = TCP)(HOST = abc.xyz.com)(PORT = 1234))
    (CONNECT_DATA =
    (SID = ABCD)
    Can someone help me in this regard?
    Thanks in Advance!!
    Regards,
    AB

    You are trying to get 2 databases connected... so, you need to insure that FDEV can find and connect to ABCD.
    So, from your FDEV database server, you can do 2 things (from command prompt):
    1* tnsping ABCD (this will validate that the entry exists in your tnsnames.ora on your FDEV server, and that a valid listener can be found on remote server)
    when above command succeeds:
    2* sqlplus apps/appsdev@ABCD;
    when you have established the connection, then you are SURE that your can connect ABCD database from FDEV database server. It will also validate the username / password combination, create session privilige, account not locked, etc.....
    Please check the above, and post here the results.
    HTH,
    Thierry

  • 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

  • Access table using ABAP program in other database

    Dear SAP Expert,
    We have requirement that related to SAP interface.
    Our SAP system run on Oracle database 11g (Unix).
    Illustration: SAP system = A non SAP system = B
    We need to access a table using ABAP program (from SAP system A) in other database (system B) that are not necessarily SAP database. The non-SAP system using SQL Server 2008 (Windows).
    What is the best practice for this interface
    Do we need database link? If yes, please help to inform me the details step to configure it.
    Thanks and Regards

    Hi Friend,
    You try using an intermediate system..passing your input required to fetch the data..and PI should call the respective query to retrive record..once the full flow is completed you should get the return through some table in the calling program.
    else.
    ask the other system guy to write a function with select query and ask him to expose as RFC and that RFC we have to call it as RFC in our program to get the required values and only thing we need here is a proper connector in place.
    Regards
    S.Janagar

  • Accessing db using DB link

    Hi,
    I am trying to access one remote Oracle database from another using database link. I have created dB link and started TNS listener in both systems as told in forums. Database link is created but on testing I get the following error “ The Database Link is not active.ORA-12541: TNS:no listener”
    Can anyone help me to resolve this? I am new to Oracle. Any pointers to this is appreciated.

    I have a development and production env.
    I created a public DB link in Development say mylink .
    Trying to access the developement table from production using the following command say to access table x
    From PROD accessing DEV table x using dblink
    select * from x@mylink ;You are trying to execute the query in PROD database. This query uses a DB link which points to the DEV database.
    Very simple to understand : Since you are using the DB LINK in PROD database, obviously it should be in PROD area... right?
    Just imagine you are using an object (the 'DBLINK') in PROD and it doesn't exist here. Got it?
    SELECT * FROM x@mylink;
    Here,
    x -- table in DEV database
    mylink -- DB LINK in PROD database (pointing to DEV)
    Please try this.
    HTH
    Edited by: ranit B on Dec 25, 2012 12:24 AM

  • Logical error in creating tables using db link in solaris

    Hi,
    While creating table using the syntax create table newtab...as select * from tab@dblink .. I am facing a problem. The newtab table created is having a structure different (from datalength point of view of varchar2 and char datatypes) from the source. The data length is getting tripled i.e. if a column a is varchar2(20) in tab then it is becoming --- a varchar2(60) in newtab. This is happening in solaris environment when the two databases are in 2 different servers. Please let me know if there are any patches to resolve the problem.
    Thanks
    Arnab

    ORA-02019: connection description for remote database not foundHave you used this database link successfully for some other queries?
    The error posted seems to indicate that the DB Link is not functional at all. Has it worked for any other type of DML operation or is this the first time you ever tried to use the link?

  • Undo Changes in child table (using view link)

    Hello,
    My environment : Jdev 11.1.2.2.0
    I have a master-detail relationship which is linked using View Link. My requirement is to open a popup on double clicking the master row, and the user can add/delete/modify the child rows. Also I need to provide Ok/Cancel buttons. I need to Undo all the changes done for the child when the user clicks 'Cancel'. Can anyone please help to solve this?
    Regards
    Suresh

    First u need to a custom SelectionListener and make sure that RowSelection is set to single row. Add a method in the Managed Bean and make the row as current using the below java code
    public void Master_tableListener(SelectionEvent selectionEvent) {
    // This code is to make the selected row as current programatically
    ADFUtil.invokeEL("#{bindings.*YourViewObjectName*.collectionModel.makeCurrent}",
    new Class[] { SelectionEvent.class },
    new Object[] { selectionEvent });
    Row selectedRow =
    (Row)ADFUtil.evaluateEL("#{bindings.*YourViewObjectIterator*.currentRow}");
    // Tip : U will get the above EL's when u 1st drop the Master table on the page
    // Invoke the pop up programatically
    RichPopup.PopupHints ph = new RichPopup.PopupHints();
    p1.show(ph);
    After writing this code.. All u need to do is Drop the Detail Table on the Dialog of ur popup. This way u will get all the rows of the table. So, filter this table with the foreign key using some code..
    Or u can just drop the region containing the Detail Table with the Rollback and commit
    - Saif
    Edited by: Saif Khan on Sep 11, 2012 5:34 PM

  • Join two table using two link field

    hi all
    i need to left join two table, and to link two table need to match two field
    ex: the link field is store_name and id
    i use below sql statement
    SELECT A1.store_name, A1.id, A1.card, A2.sale, A2.history
    FROM Georgraphy A1, Store_Information A2
    WHERE A1.store_name = A2.store_name(+)
    AND A1.id = A2.id(+)
    but it's wrong
    please tell me how to left join A1 and A2, thx!

    Whats your aim?
    Any error message?
    SQL> select * from geography;
            ID STORE_NAME
             1 a
             1 b
             2 a
             2 b
    SQL> select * from store_information;
            ID STORE_NAME
             1 a
             3 d
    SQL> SELECT *
      2  FROM Geography A1, Store_Information A2
      3  WHERE A1.store_name = A2.store_name(+)
      4  AND A1.id = A2.id(+);
            ID STORE_NAME         ID STORE_NAME
             1 a                   1 a
             2 a
             2 b
             1 b                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Accessing Tables using global index rowid is taking too long.

    I am using Oracle 10.2.0.4.0. I am having tables which are ~100+GB in size which is range partitioned on a date column and hash subpartitioned on primary key column. And accessing these tables using global index row id using idex range scan( size of those indexes are ~7+ GB) taking ~5+ mins which results in ~1000 rows as out put. So is this means there is some structural problem with tables/indexes or its something issue at block level? How to dig more into this issue?

    Hi,
    930254 wrote:
    I am using Oracle 10.2.0.4.0. I am having tables which are ~100+GB in size which is range partitioned on a date column and hash subpartitioned on primary key column. And accessing these tables using global index row id using idex range scan( size of those indexes are ~7+ GB) taking ~5+ mins which results in ~1000 rows as out put. So is this means there is some structural problem with tables/indexes or its something issue at block level? How to dig more into this issue?once you get a chance to run the query and collect some diagnostic info, here are the questions that you should ask yourself:
    1) where is the 5 mins spent? doing index range scan itself, doing table index access by global rowid, waiting for something, doing something else?
    2) how many reads are there and what kind (logical, physical, direct path)? per the entire query and per index range scan
    3) is there any aggregation in the query? if there is, then 1000 rows output doesn't mean anything -- you could have to access millions or billions of rows to produce a 1000 row output in an aggregate query
    The best tool to answer these questions is dbms_xplan.
    Best regards,
    Nikolay

  • 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

  • Select records from MS Access tables using multiple conditions

    Hi,
    I am trying to build s select list of team names for a
    sporting club website. The select list should include teams if the
    currently logged in user is a coach, team manager, assistant coach,
    player or a parent of a player.
    When I have only one group of conditions in the where clause
    it works fine. But that only accounts for one of the above roles.
    As soon as I ad an OR and another set of criteria my CF7 server's
    swsoc.exe goes into an permanent loop (well, at least 10 minutes, I
    reboot after that :-)
    For example, this works fine ...
    <!--- select teams I coach, assistant coach, manage, am a
    parent of a player, or am a player --->
    <cfquery name="teams"
    Datasource="#Application.Datasource#">
    SELECT distinct teams.uid_team, team_name, uid_coach,
    uid_team_manager, uid_coordinator, team_asst
    from teams, player_agegroups, players
    where
    (player_agegroups.uid_team=teams.uid_team and
    players.uid_user=player_agegroups.uid_user
    and teams.uid_season=#session.season# and
    players.uid_invoice_to=#session.userid#)
    Order by team_name
    </cfquery>
    But as soon as I add another condition cf7 goes into a
    loop...
    <!--- select teams I coach, assistant coach, manage, am a
    parent of a player, or am a player --->
    <cfquery name="teams"
    Datasource="#Application.Datasource#">
    SELECT distinct teams.uid_team, team_name, uid_coach,
    uid_team_manager, uid_coordinator, team_asst
    from teams, player_agegroups, players
    where
    (player_agegroups.uid_team=teams.uid_team and
    players.uid_user=player_agegroups.uid_user
    and teams.uid_season=#session.season# and
    players.uid_invoice_to=#session.userid#) or
    (player_agegroups.uid_team=teams.uid_team and
    players.uid_user=player_agegroups.uid_user
    and teams.uid_season=#session.season# and
    players.uid_user=#session.userid#) or
    (player_agegroups.uid_team=teams.uid_team and
    players.uid_user=player_agegroups.uid_user
    and teams.uid_season=#session.season# and
    teams_uid_coach=#session.userid#) or
    (player_agegroups.uid_team=teams.uid_team and
    players.uid_user=player_agegroups.uid_user
    and teams.uid_season=#session.season# and
    teams.team_asst=#session.userid#) or
    (player_agegroups.uid_team=teams.uid_team and
    players.uid_user=player_agegroups.uid_user
    and teams.uid_season=#session.season# and
    teams.uid_team_manager=#session.userid#)
    Order by team_name
    </cfquery>
    Any combination hangs CF7, whether it be two, three or all
    conditions, and any combination of conditions..
    The teams table stores team name, coach, team manager,
    assistant coach and coordinator. Players table stores the player
    records, and the parent (uid_invoice_to), is part of the player
    record. player agegroups has the teams, with a record for each
    player in a team. The whole system is based around seasons, hence
    the #session.season# variable.
    What should happen is I get a very short list of teams. When
    I select a team from the select list I then go and grab all the
    player records from the player_agegroups table joined to the users
    table to get their names, date of birth etc...
    Can anyone see what I am doing wrong?
    thanks
    Tanya

    You might try to change your query using a SQL JOIN command,
    so you can link the appropriate tables independently from the WHERE
    selection criteria. You could use Access to create the query and
    then go to the SQL command view to get the correct synyax.

  • Proc fails with sqlcheck=full accessing tables across a link to non 11g db

    I am trying to compile programs that were upgraded from 9i to 11g and having issues whenever I try to compile code that accesses non 11g databases across a link when sqlcheck is anything other then syntax.
    If I have a select such as
    select distinct a.ID_NUM, b.value1, b.value2, ...
    from table_a a, table_b@external_db b
    where a.ID_NUM = b.ID_NUM and a.process_name='REPORTS';
    This compiler sits and hangs for a few minutes then aborts. This problem occurs in Pro*C, Pro*Cobol as well as Oracle Forms.
    The query works fine under sql*plus. The compiler just can't handle it.
    A work around under Pro*C is to use sqlcheck=syntax when compiling any code that accesses across a link. However this isn't a good workaround since it won't catch errors such as a typo in a column. This also won't work in forms, but a work around is to convert the selects into a view. However that isn't a good workaround due to the number of queries that would need changing.
    Has anyone else seen this issue and found out what needs changed in the Database for this to work. I tried searching Oracle's web site but couldn't find any solution.
    Edited by: user7525803 on Jun 25, 2009 8:10 AM
    Edited by: user7525803 on Jun 25, 2009 8:15 AM

    ittichai wrote:
    Rich,
    I searched metalink for your issue. This may be a bug in 3.1 which will be fixed in 4.0. Please see Doc ID 740581.1 Database Link Tables Do NoT Show Up In Table Drop Down List In Apex. There is a workaround mentioned in the document.
    I'm not sure why I never thought of searching MetaLink, but thanks for the pointer! It doesn't match my circumstances, however. The Bug smells like a view not being queried in the APEX development tool itself -- i.e. the IDE's coding needs changing, not necessarily those apps created with the IDE.
    I'm working on getting you access to my hosted app...
    Thanks,
    Rich

  • Create Materialized View  based on another database table using db link?

    SQL> SELECT sysdate
    2 FROM dual@CBRLINK ;
    SYSDATE
    21-NOV-12
    SQL> CREATE MATERIALIZED VIEW USERCBR.V_T24_COUNTRY1
    2 REFRESH COMPLETE
    3 START WITH SYSDATE NEXT SYSDATE + (5/24)
    4 AS
    5 SELECT sysdate
    6 FROM dual@CBRLINK ;
    CREATE MATERIALIZED VIEW USERCBR.V_T24_COUNTRY1
    ERROR at line 1:
    ORA-04052: error occurred when looking up remote object SYS.DUAL@CBRLINK
    ORA-00600: internal error code, arguments: [ORA-00600: internal error code,
    arguments: [qksfroFXTStatsLoc() - unknown KQFOPT type!], [0], [], [], [], [],
    ORA-02063: preceding line from CBRLINK

    It works for me:orcl>
    orcl> CREATE MATERIALIZED VIEW scott.V_T24_COUNTRY1
      2  REFRESH COMPLETE
      3  START WITH SYSDATE NEXT SYSDATE + (5/24)
      4  AS
      5  SELECT sysdate
      6  FROM dual@l1 ;
    Materialized view created.
    orcl> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for 32-bit Windows: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    orcl>so there is no problem with the code. HTH.

  • Error in reading XML message and inserting data into another DB using DB link

    Hi Experts,
    I am getting error parsed XML message data while  inserting into another DB table using DB link.
    ORA-22804: remote operations not permitted on object tables or user-defined type columns.
    Please help me.
    Thanks.

    ORA-22804: remote operations not permitted on object tables or user-defined type columns.
    Looking at the error message assuming you might be doing the alter table statement on remote table unit_labels which is throwing the ORA-22804 error which is not permitted on remote tables.

  • Linking Access tables, creating a query with using both Access and Oracle

    Hello,
    I am using 3.0.04.34 version Oracle Developer. I am supposed to create a script/procedure to use both Access tables and oracle tables together. There is an option in developer to copy the access tables into oracle. But it doesn't help me. Because when we updated the access tables
    the copied ones are not be updated. How can I created a linked access tables to oracle and create a query with using both access and oracle table together.
    I will appreciate if you guys help me. I look forward to hearing from you guys.
    Thanks,
    Pinar

    Pinar,
    to be able to query MS Access tables in Oracle you need an additional product, the Oracle Database Gateway for ODBC. It allows you to link any foreign database into an Oracle database using a suitable ODBC driver. You can then access the MS Access tables through a database link based on the Database Gateway for ODBC. This will also allow you to join local Oracle and remote MS Access tables from your Oracle database.
    There's a note on My Oracle Support which gives you more details:Document 233876.1 Options for Connecting to Foreign Data Stores and Non-Oracle Databases - For example - DB2, SQL*Server, Sybase, Informix, Teradata, MySQL
    And there's also a dedicated Forum: Heterogeneous Connectivity

Maybe you are looking for

  • Stuttering JPEGs

    I was doing finishing tweaks on this 20-minute video comprised of 150 JPEGS generated in Photoshop CS2. All were scanned prints except for a few scanned negatives. Having gotten everything else where I wanted I was still being plagued with stuttering

  • VersionCue.DLL

    I get this error message when I try to open a file in PS.  I also get it when I try to click on a file.  The the file window closes. "The specified module could not be found. C:\Program Files\Common Files\Adpbe\Adpbe Version Cue CS4\Client\4.0.1\Vers

  • Undo sorting on sales order

    Hi A sales clerk has entered sales order items, in a specific order. They updated it and went back a while later, then they clicked the column header to re-sort it by name then updated it, problem is: is there any way he can get it back to the origin

  • Service interface -PI and ABAP

    HI, The service interface has used objects and when i exeute it the ABAP code is seen.I would like to know the tables and the location of the tables.How do i get this information. Regards, Kk

  • Automator crashes on launch

    The app isn't functioning. THe one time this evening it did launch, the New option resulted in nothing happening. I was able to drag and rop an action on the icon and it did launch but no options appeared in the laft sidebar. Now, despite trashing th