DBLINK in 8.1.7

Hi,
I create my link like this :
SQL> create database link "REMOTEDB" connect to REMOTEUSER identified by "PASSWORD" using 'REMOTEDB';
Database link created.
But :
SQL> desc TABLE@REMOTEDB
ERROR:
ORA-02085: database link REMOTEDB connects to NMM.WORLD
On this machine I can connect to REMOTEDB from SQLPLUS :
SQL> connect REMOTEUSER/PASSWORD@REMOTEDB
Connected.
SQL> disconnect
What is wrong ?
Many thanks for helps.

ORA-02085:     database link string connects to string
Cause:     a database link connected to a database with a different name. The connection is rejected.
Action:     create a database link with the same name as the database it connects to, or set global_names=false.

Similar Messages

  • Lock-ups while inserting to a remote database using a dblink

    Our application runs across multiple instances of Oracle 8i - 8.1.6.
    Throughout the day we run some batch processes to transfer data across these instances using dblinks. Ocassionally the process locks up and further investigation shows that the server from which we are pushing information out seems to have executed an insert statement on a remote instance (insert into test_table@tst_dblink select * from local_table) and is waiting for a return from the remote server while the remote instance seems to be hanging too. Oracle does not return any error but simply waits forever for the statement to finish.
    If anybody has experienced this before can you please share any information you may have on 1. how to prevent this from happening or 2. How to make oracle give up on the transaction, roll it back and raise an error?
    Thanks a lot....

    Well, certainly we need more info to fix the problem! couple of "system states" on both the machines when the job is hanging would help. couple of "stack trace" of the shadow process will also help. please call local oracle support with the system state and stack trace.
    Sounds like the job is hanging on some resource (lock,enque,latch,io...). oracle doesn't give up for few resources, like waiting on ST,latch, io etc. we have to kill the offending process if we want!!
    just my 2 cents :)
    G

  • ORA-01653 error while executing a select query over DBLINK

    Hi,
    We have a query that is running to extract some data from a remote DB over DBLINK.
    The query is failing by throwing the error "ORA-01653 -- Unable to extend.........".
    Is this a problem with the "temp" tablespace of local database or is this with the "temp" tablespace of remote DB.
    As far as my knowledge goes, I guess any statement , selecting data over dblink where the query is being fired actually in remote db over dblink uses the temp tablespace of that DB only and hence the problem should be with the temp tablespace of remote db only but I am not very sure about this.
    Is there any chance that it can be problem with "temp" tablespace of local DB from where the query is being fired over dblink.
    It would be really helpful if anyone can throw some light on this.
    Thanks

    The error stack will normally tell you if the exception is raised in the remote database.
    You might try using the driving_site hint (see performance guide) to push work to the remote site or pull it local. It all depends on your particular query and explain plan.
    Remember to use { code } (without the embedded spaces) tags to frame your code and explain plan so it remains formatted, if you post it here.

  • Can not insert through dblink in procedure

    I have created one procedure which is selecting,inserting and updating data to another database on same server using dblink. it select and update data successfully but when it is going to insert using dblink it gives following error.
    ORA-02019: connection description FOR remote DATABASE NOT FOUND
    ORA-02063: preceding line FROM PAS
    But when i executed same insert statement on sql prompt it is exeuted successfully.
    insert into tab1@dblink values('blah','blah','blah');
    I have dropped all my dblink and recreate it again i have given priveleges externally means insert any table,select any table,update any table to username.
    but still i have recieved same error. Please guide me.
    Global name of database is same as dblink name.
    Thanks in advance
    dhaval

    1. select * from global_name
    PAS and RATEPAS
    I have created two database on same server.
    named pas and ratepas.
    I can not send procedure's code. but actual logic of procedure is selecting a record from temporary table and check whether it is a valid record on the basis of time_stamp and it is inserting a record to base table and update time_stamp to other two tables. and it is giving error only when
    SELECT * FROM dba_db_links;
    OWNER
    DB_LINK
    USERNAME
    HOST
    CREATED
    PUBLIC
    PAS
    PASUSER
    OWNER
    DB_LINK
    USERNAME
    HOST
    CREATED
    pas125
    13-OCT-05

  • Insert / update data to a table through DBLINK (oracle)

    I try to insert / update a table from one instance of oracle database to another one through oracle dblink, get following error:
    java.sql.SQLException: ORA-01008: not all variables bound
    ORA-02063: preceding line from MYLINK
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2152)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2035)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2876)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609)
    The same code to insert / update the exact same table in local instance works fine.No any binding problem. So i am pretty sure all ? mark in SQL are set with some value before sending to Oracle.
    Someone please advise what is possible problem. Db link is not set correctly? or we can not update remote table by dblink.
    By the way i can do insert / update from TOAD to the remote table through DBLINK. Problem happens only in Java code.
    thanks!
    Gary

    dblink links from one database instance to another.
    So it is certainly a source of possible problems when it works on one database and not another.
    You should start by looking at the dblink and it possible testing it in the database not via java.
    Note as well that that error suggests that it is coming from the Oracle database. I believe if you had a bind parameter problem in your java code that the error would come from the driver. But that is a guess on my part.

  • How can I access a database remote without using dblink, synonyms,aliases?

    My store procedure access a remote tables using dblink, synonyms, alias, but by business company requirenments I nedd to use another data base access method. My PL/SQL statement looks like
    select c.cus_id, c.cus_name, p.bankaccno
    into v_cus_id, v_cus_name, v_bankaccno
    from customer c, payment@finantial p
    where c.cus_id = p.cus_id
    Are any method else to connect to several remote databases concurrently?
    If Yes, plase say me how is it, or tell me where do I obtain some examples, or any documentation.
    Edited by: user518321 on Apr 21, 2009 1:58 PM
    Ok, But I must not use any of these data base access method, metioned: dbliks, aliases, synonyms.
    Edited by: user518321 on Apr 21, 2009 2:05 PM
    Ok, It is enough for now, I am surprised for the response time and for their arguments, thanks a lot.
    Edited by: user518321 on Apr 21, 2009 2:50 PM

    If you want to access a table in a remote database using SQL, you will need a database link. It would be exceptionally odd for the business to require that you access a remote database and to prohibit the use of database links. What is the business reason for that combination?
    If you want to look into rather more esoteric solutions, you could load a JDBC driver for the remote database, write a Java stored procedure that queries the remote table using that JDBC driver, and then cobble together some PL/SQL that joins the two result sets. You won't be able to reference the remote table in SQL and the solution won't scale well as data volumes increase and you'll be writing a whole lot of code to manually join tables together, but it does avoid database links. Of course, whatever concerns lead to the ban on database links would probably apply to loading a JDBC driver into the database and writing Java stored procedures to access the remote database, but since you haven't explained the reasoning behind the restrictions, we're just guessing.
    Justin

  • Oracle VPD on Remote database using DBLINk

    Hi All,
    How can i apply row level security on a table that is available in another database using DBlink
    we have two databases PDSSM and EVTA, and i would like to apply row level security on a table in EVTA from a schema in PDSSM using dblink. MXODSADM IS A SCHEMA IN EVTA AND MXEMBARGO IS A SCHEMA IN PDSSM. there is a dblink(EVTA.GMM.COM) between mxembargo and mxodsadm.
    begin
    dbms_rls.add_policy (
    object_schema => 'MXODSADM',
    object_name => 'vehicle_retail_sale',
    policy_name => ' MXEMBARGO_EVTA_POLICY',
    function_schema =>'MXEMBARGO',
    policy_type => dbms_rls.SHARED_CONTEXT_SENSITIVE,
    --policy_type => dbms_rls.STATIC,
    policy_function => ' MXEMBARGO_EVTA_POLICY.MXEMBARGO_EVTA_PREDICATE',
    statement_types => 'select, insert,update,delete',
    update_check => TRUE,
    enable => TRUE,
    static_policy => TRUE
    end;
    I am a complete Database person and i need to do this in my application, can anyone provide me how can i do this using dblink.

    wojpik wrote:
    hello
    I have one short question to you.
    Is that possible to create view at remote database using dblink? Following syntax returns error
    create view ViewName@DbLinkDame (ColumnName) as
    (select 1 from dual )
    "ORA-00905:missing keyword"
    Is that possible at all?
    And particulary - is that possible when remote database is MSSQL and I am using heterogeneous services?
    I really appreciate your help
    best regards
    Wojtek
    Edited by: wojpik on Oct 21, 2009 3:59 AMI doubt you would be able to fire any ddl through database link. You have to connect to remote database to run any ddl even if it is Oracle or some other database.
    Regards
    Anurag

  • Insert a blob in remote database using dblink

    i have a view (it has a BLOB column) from where i need to select the records. After selecting i need to insert it into a synonym in the remote database through a db link.
    if i execute the procedure i get error; ora-22992--cannot use LOB locators selected from remote table. My code is
    INSERT INTO [email protected]
    SELECT PID,RNO, PTYPE,blob_field
    FROM view;
    I dont wish to creat a temporary table and still wish to perform the above function.
    So is there any method to do this. I tried with DBMS_LOB.APPEND but it didnt work out. Any solution will be greatly appreciated.
    Thanks,
    -Nitin

    i have a view (it has a BLOB column) from where i need to select the records. After selecting i need to insert it into a synonym in the remote database through a db link.
    if i execute the procedure i get error; ora-22992--cannot use LOB locators selected from remote table. My code is
    INSERT INTO [email protected]
    SELECT PID,RNO, PTYPE,blob_field
    FROM view;
    I dont wish to creat a temporary table and still wish to perform the above function.
    So is there any method to do this. I tried with DBMS_LOB.APPEND but it didnt work out. Any solution will be greatly appreciated.
    Thanks,
    -Nitin

  • How to copy a table with LONG and CLOB datatype over a dblink?

    Hi All,
    I need to copy a table from an external database into a local one. Note that this table has both LONG and CLOB datatypes included.
    I have taken 2 approaches to do this:
    1. Use the CREATE TABLE AS....
    SQL> create table XXXX_TEST as select * from XXXX_INDV_DOCS@ext_db;
    create table XXXX_TEST as select * from XXXX_INDV_DOCS@ext_db
    ERROR at line 1:
    ORA-00997: illegal use of LONG datatype
    2. After reading some threads I tried to use the COPY command:
    SQL> COPY FROM xxxx/pass@ext_db TO xxxx/pass@target_db REPLACE XXXX_INDV_DOCS USING SELECT * FROM XXXX_INDV_DOCS;
    Array fetch/bind size is 15. (arraysize is 15)
    Will commit when done. (copycommit is 0)
    Maximum long size is 80. (long is 80)
    CPY-0012: Datatype cannot be copied
    If my understanding is correct the 1st statement fails because there is a LONG datatype in XXXX_INDV_DOCS table and 2nd one fails because there is a CLOB datatype.
    Is there a way to copy the entire table (all columns including both LONG and CLOB) over a dblink?
    Would greatelly appriciate any workaround or ideas!
    Regards,
    Pawel.

    Hi Nicolas,
    There is a reason I am not using export/import:
    - I would like to have a one-script solution for this problem (meaning execute one script on one machine)
    - I am not able to make an SSH connection from the target DB to the local one (although the otherway it works fine) which means I cannot copy the dump file from target server to local one.
    - with export/import I need to have an SSH connection on the target DB in order to issue the exp command...
    Therefore, I am looking for a solution (or a workaround) which will work over a DBLINK.
    Regards,
    Pawel.

  • Error with Bind Variable for dblink

    Good morning,
    I am attempting to implement some code in a pre-page process but having problems with it. I need to query a value from the database using a dblink that points at a different database depending upon the session. I have tried the following two approaches...
    SELECT COALESCE(Attribute20,'PENDING')
    INTO str_Import_Status
    FROM GL_JE_LINES@&P0_INSTANCE.
    WHERE JE_HEADER_ID = :P430_JE_HEADER
    AND JE_LINE_NUM = :P430_JE_LINE;
    as well as...
    str_SQL_Statement := 'SELECT COALESCE(Attribute20,''PENDING'') '||
    'INTO str_Import_Status '||
    'FROM GL_JE_LINES@'||:P0_INSTANCE||' '||
    'WHERE JE_HEADER_ID = '||:P430_JE_HEADER||' '||
    'AND JE_LINE_NUM = '||:P430_JE_LINE||';';
    EXECUTE IMMEDIATE str_SQL_Statement;
    I am boggled because I completely expected the first approach to work. I have a similar statement in a post submit process which works fine. That statement is...
    SELECT COUNT(*)
    INTO num_Collector_Count
    FROM XXMC_GL_TSG2FIMS_CROSSREF@&P0_INSTANCE.
    WHERE Collector_Code = :P915_Collector_Code;
    Any help or pointers on this would be greatly appreciated.
    --Adam Cumming                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Never mind....
    After I posted this I realized I had a bad variable name. Syntax error

  • Unable to parse query when using dblink in forms 4.5

    Hi,
    I have created a query that uses a DBlink because I need to do query on a table located on another dbase. I've used the query on creating my report using Reports 6i. The report needs to be called from a menu on our system, which was developed under Developer 2000 (forms 4.5). The problem is, when I tried to access the report from the menu, it returns the error 'unable to parse query'. What I did after getting error was to create a dummy module using Forms 6i, and call my report from there. It worked fine.
    By the way, the table that I'm accessing using the dblink is under Oracle 9i dbase, and the dbase of the system that I've been working at is Oracle 8i.
    I don't have any idea on what's causing this error. Is there a compatibility issue when using a dblink located in Oracle 9i database with forms 4.5?
    Thanks!

    Hello,
    Not sure if it is the good answer, but I know that Forms does not recognize dblink and owner.object syntax. You have to create a simple synomym that point to the distant object and use this synonym within Forms.
    Francois

  • Table does not exist - DbLink

    Hello, I have 2 instances, into production environment, instance A and instance B. Into instance A I have a dblink to instance B...
    The problem appear when I want to see the indexes of a table of instance B from instance A, to do this I press F4 into TOAD over:
    owner.table@dblink
    and when I click into tab "Indexes", Oracle said me: "The table does not exist", I review the grants, and this is ok, and the table exist in instance B.
    One explanation, I have the same environment into testing, and there work perfectly, I have the same dblinks, the same users and the same grants.
    Any suggestion to help me.

    You may want to contact the folks that make TOAD.
    My guess is that TOAD is querying the local USER_/ ALL_/ DBA_INDEXES table rather than the USER_/ ALL/ DBA_INDEXES table at the remote server. You could run a client-side SQL trace to see what SQL is being generated to see if the problem is that TOAD is generating the incorrect SQL or whether there is some problem with the database. But I'm not sure how productive that would be since it's not like you could fix the SQL TOAD is submitting. If there is an option in TOAD that changes the behavior here, it's certainly possible that someone here will know it. But TOAD support is probably more likely.
    Justin

  • How to transfer DATA from one machine to another using  DBlink

    I want to transfer data from one machine to another both having oracle 8.0.5 with AIX operating system using DB link. CAn any one help me in this task

    Step one - Create and test SQLNet connections between the databases.
    Step two - Create at least on database like from one database to the other:
    CREATE DATABASE LINK linkname
    CONNECT TO user identified by password
    USING 'tnsnamesentry';
    Step three - use the dblink linkname in dml statements eg:
    insert into emp@linkname
    (select * from emp);

  • Downloading an image from a remote table via dblink

    Hi
    I am building an Apex 3.0 app that will access data remotely, via a database link. One of the tables has a BLOB column, that I need to display in the app as an image (in a single-record form page) and allow the user to update it as well, uploading a new image if required.
    As it is not possible to select blobs over a dblink, but it is ok to insert/update them, I was planning to:
    - insert the blob into a local temporary table which would have only one column ("image")
    - select from the local table to get a reference to the blob and do the usual stuff to download it to the client
    Though this might work, it seems a bit inefficient to me. Is there any other way to do this?
    Thanks,
    Luis

    http://developer.apple.com/Documentation/Cocoa/Conceptual/URLLoadingSystem/URLLo adingSystem.html

  • DBLinks Problem in 10g Release 2

    I have many mappings taking data from tables in a remote database asociated with a Source Database module. All was working OK but after some changes in one mapping, when I triyed to deploy that mapping I got a warning in the Control Center's Job Details:
    GNV_MP_B_VENTAS_01_PKG
    Warning
    ORA-06550: line 222, column 7:
    PL/SQL: SQL Statement ignored
    GNV_MP_B_VENTAS_01_PKG
    Warning
    ORA-06550: line 264, column 23:
    PL/SQL: ORA-00942: table or view does not exists
    Checking for errors in the package GNV_MP_B_VENTAS_01_PKG I've found the following message in compilation errors:
    Error(1):
    ORA-04052: se ha producido un error al consultar el objeto remoto [email protected]@SOU_GNVBI_LOCATION1
    ORA-00604: se ha producido un error a nivel 1 de SQL recursivo
    ORA-01882: timezone region not found
    ORA-02063: line....
    Testing the DBLink created by OWB I have the followiong message:
    SQL > select * from dual@"GASN.REGRESS.RDBMS.DEV.US.ORACLE.COM@SOU_GNVBI_LOCATION1"
    Error starting at line 1 in command:
    select * from dual@"GASN.REGRESS.RDBMS.DEV.US.ORACLE.COM@SOU_GNVBI_LOCATION1"
    Error at Command Line:1 Column:19
    Error report:
    SQL Error: ORA-01882: timezone region not found
    ORA-02063: line precediendo a GASN@SOU_GNVBI_LOCATION1
    01882. 00000 - "timezone region %s not found"
    *Cause:    The specified region name was not found.
    *Action:   Please contact Oracle Customer Support.
    Can anyone help me with this issue ? This is my config info:
    Remote DB:
    Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
    PL/SQL Release 9.2.0.4.0 - Production
    "CORE     9.2.0.3.0     Production"
    TNS for Linux: Version 9.2.0.4.0 - Production
    NLSRTL Version 9.2.0.4.0 – Production
    OWB's DB:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    "CORE     10.2.0.3.0     Production"
    TNS for Linux: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 – Production
    OWB 10.2 Release 2
    Client. 10.2.0.3.33
    OWB Repository: 10.2.0.30

    Right Now we are seting up the Timezone patch y the 9i database. I'll tell you later how goes all the process but meanwhile here are some strange things about the ORA-01882 error:
    I've tested the DBLink using Oracle SQL Developer an it doesn't work. But if I test the same DBLink using SQL*Plus (no matter client version or platfom) it works...
    I realize that when I created a new DBLink via SQL*Plus to determine if the problem was related to OWB 10.2. Running OWB 10.2 client from Windows or Linux produces the same error in deploy. Testing the BDLink from SQL*Plus from Windows or Linux produces no errors. Althought I can't recompile the package generated when the mapping was deployed, I get the same ORA-04052 - ORA-00604 - ORA-01882 errors.
    When I completed the patch installation I will tell you the results...

  • Problem by doing a query on MySQL using dblink

    Good Morning,well,the DBLink works perfectly,but if the field in the MySQL DB is type TEXT(CLOB) throw the next error:
    ORA-28500: la conexión de ORACLE a un sistema no Oracle ha devuelto este mensaje:
    [Generic Connectivity Using ODBC]DRV_BlobRead: DB_ODBC_ENGINE (1489): ; [MySQL][ODBC 5.1 Driver][mysqld-5.1.30]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"CUSTOM_VALUES" WHERE "id"=16' at line 1 (SQL State: 37000; SQL Code: 1064)
    ORA-02063: 2 lines precediendo a MYSQLDB
    28500. 00000 - "connection from ORACLE to a non-Oracle system returned this message:"
    *Cause:    The cause is explained in the forwarded message.
    *Action:   See the non-Oracle system's documentation of the forwarded
    message
    Thank you
    Edited by: 812419 on 18-ene-2011 0:41

    Hi,
    You are hitting a known problem with the MySQL ODBC driver and 10g HSODBC which is discussed in this note on My Oracle Support -
    Problems Selecting Mysql Blob Data Using Hsodbc - Error In Your SQL Syntax          (Doc ID 739274.1)
    There are 3 workrounds -
    a) convert the affected column to a char or varchar column in MySQL.
    b) use the Openlink ODBC driver. This is available from -
    http://download.openlinksw.com/
    c) create a view in MySQL which uses the 'CAST' function to convert the affected column to char. As an
    example for a BLOB -
    create view test_blob_v as select col1, cast(col2 as char) as col2 from test_blob ;
    Then select from the view in Oracle -
    select * from test_blob_v@mysql ;
    ========
    If you are using 10g HSODBC you should migrate to 11g Database Gateway for ODBC (DG4ODBC) as 10g HSODBC is now desupported and DG4ODBC is the replacement product.
    Regards,
    Mike

Maybe you are looking for

  • My iPhoto won't let me export my photos from my iPhone. Please help?

    It takes ages as it is to upload from my iPhone, but exporting it crashes after 15 or so photos. Happens when the phone is connected and not connected. But uploading and exporting from my camera seems to work fine. I have a MacBook 13inch, it's almos

  • Updated to 10.9.5-Now have Numbers issue

    Just updated to OS 10.9.5, and using Numbers 3.2.2 (previously updated, and working with no problems).  After OS update, cannot open Numbers passworded doc.  Other Numbers docs open, no problem.  The passworded one does not even open the box to enter

  • A question about editing ALV fields

    Hello Expert, In my project, we need to read data from DB and display in the ALV. In the ALV output, we should be able to edit the records, and after user clicks the "Save" button in the applicaiton toolbar, the program should be able to save the cha

  • What Film-formats are accepted by iTunes ???

    Next Question : what formats does the film section accept ??? Im trying some different tv-shows i have downloaded and not all seem to work ??? Quicktime and MPEG4 seem to work while Matroska Media File and AVI Video dont - is there no standard or is

  • Two free copies of Mobile Media API (MMAPI) book available

    Hello everybody, My book on Mobile Media API has now been released by Apress. This book is called Pro Java ME MMAPI and you can buy it of Amazon (http://www.amazon.com/gp/product/1590596390/ref=sr_11_1/103-6578893-2197420?%5Fencoding=UTF8) or Apress'