Database Link Performance

Hey Geeks,

My project needs to extract information from a remote database with huge data through the local database (for the most part having given fixed). I've implemented it with the following approach:

1 > create the local user account

2 > created views for all tables with fixed data in the remote database using the links in the database.

for example, CREATE or REPLACE of VIEWS REMOTE_TABLE_NAME AS SELECT * FROM REMOTE_TABLE_NAME@DATABASELINK;

3 > this way, I am able to implement abstraction, the developer will not be able to know if the Remote_table_name object is a view of local user account or the table in the remote database. Application behaves as if all the data are present locally. Here, all good.

The real problem begins when performance comes in the picture. During the execution of data mining that uses tables on the remote db (now through with dblink views in the local data base), I found that some of the jobs take 4 to 5 times as long to perform the same task when the same test is run directly on the remote database.

I tried several things like:

1 > use indicators of performance in creating views for the: for example remote tables in the local account for example

CREATE the "REMOTE_TABLE_NAME" AS SOME VIEW / * + DRIVING_SITE (REMOTE_TABLE_NAME) * / * FROM REMOTE_TABLE_NAME@DBLINK;

2 > performance using tips that querying the tables of remote database through views in the local account for example

/ * + DRIVING_SITE (REMOTE_TABLE_NAME) SELECT * / * FROM REMOTE_TABLE_NAME; "REMOTE_TABLE_NAME" is HERE the local view in the database account

3 > performance using tips that questioning the tables of remote database by dblink hadcoding with the namee.g of the table.

/ * + DRIVING_SITE (REMOTE_TABLE_NAME) SELECT * / * FROM REMOTE_TABLE_NAME@DBLINK; "REMOTE_TABLE_NAME" is the name of the table in the remote account

I tried many other things, but could not see improved performance.

Any suggestions?

Thank you

Amrit Pandey

In the original script when the remote table has been in the different database I tried with several possible optimization techniques but could not seen a substantial improvement in performance. Later as an experience (as I mentioned in my previous post) I tried to recover a local table to the other schema using the link of database to cut the network aspects and focus on the effect of the database link.

To be precise, above queries are just to observe the charge of link database as part of an experiement in real time scenario, the tables will be at the remote database when the network latency will also play its part to hit performance.

Tags: Database

Similar Questions

  • How s/n know when and what account perform a function using the database link?

    Dear,

    My application of the CIM team asked DBA to create new function and run it. Function must use the database link for remote database data. So I need to create a new database to their licensing link. Cause we guess we'll experience the performance issue after the user performs this function, or another question and errors may occur. So we want to know when and who use this feature that connects to a remote database through the new database connection in advance. And I also need to know when and which connect to the remote database using this new database link. We have no idea to get this information?  Can anyone recommend how do? Thank you very much.

    Best reqards, Otis.

    Check what business purpose, it will solve.  If the function is so safe, why everyone will use. Only admin people should access.

    All of these additional controls of this kind must be avoided as much as possible to improve the overall performance of the application.

    Still if you need, see the database audit mechanism, specifically designed for this type of activity.

    Kind regards

    Harman

  • ONLY INSERT OR DELETE THE PRIVILEGE TO THE DATABASE LINK

    Hi all

    Version of DB 11.2.0.1

    RedHat 5.5 operating system

    I created a link to private database by following the path

    create database link test_link

    connect to Scott identified by tiger

    using

    '(DESCRIPTION =)

    (ADDRESS = (PROTOCOL = TCP) (HOST = 10.194.180.45)(PORT = 1521))

    (CONNECT_DATA =

    (SERVER = DEDICATED)

    (SERVICE_NAME = prod)

    )

    )'

    The link is created successfully and I am able to perform all the DML operations on it.

    The Question is there a way by which we can give only insert or delete or privilege is not to remove from the table at this link.

    For operations select only, I know that by creating a view I can restrict the remote user, but is there a way by which I can give only insert or remove remove link of database.

    You can not grant any privilege to a link. Can you and your team identify a location in the documentation, if required?

    By default, a remote session will get the same privilege as the user to which it connects.

    BTW:

    • do not use a database link tnsnames.ora makes your hard to maintain link
    • using addresses IP hard in a database link makes your link even more difficult to maintain
    • by specifying a hardcoded password in a database link is a breach of security.

    -------------

    Sybrand Bakker

    Senior Oracle DBA

  • 1Z0-054: Oracle Database 11g Performance Tuning Expert

    I intend to give the exam 1z0-054 for the certification, "Oracle Database 11g Performance Tuning Expert".

    The path to Certification indicates that, if you are 'OCP DBA 11 g' then you can directly take this article and there is no requirement for training instructor. Therefore, I decided to prepare my own. Can someone guide me on study material and landfills?

    Kind regards

    Ahmer Mansoor

    Therefore, I decided to prepare my own. Can someone guide me on study material and landfills?

    First of all, the word "shock" has a precise meaning. It is short for "landfills of brain", which are illegal and can cost you this certification and all others you have taken.

    http://blogs.Oracle.com/certification/entry/0477

    Second - there is currently no study guide or a specific book to this certification at the moment. I write the study guides and this one is actually next on my list when I finished the current book to * 1Z0-117: Oracle Database 11 g Release 2: SQL Tuning *. I have a guide for 1Z0 - 054 before sometime in may more likely. That said, I have a few links for legal study on the companion Web site material for my series of guide to the subjects for this exam. It also has links to the Oracle documentation that contains the information you need. Once I have started writing the book review, links will develop quickly because I research for her themes and links to the documentation could extend as well.

    http://www.oraclecertificationprep.com/Apex/f?p=OCPSG:EXAM_DETAILS:0:no:P2_EXAM:1Z0 - 054

  • Apex 4 - dynamic database link

    Gurus,

    Need help with a task relatively simple for others, but unfortunately not for me :-(

    I have an interactive report using a database link. I have 3 dblinks to the three environments (ENV_1, ENV_2, ENV_3). I want the user to select the environment, which will then trigger the query refresh.

    So far, my approach is using a list of static values (drop-down list) with 3 values.

    The SQL query in the interactive report is something like that
    SELECT A, B FROM EMPLOYEE@ENV_1

    Help, please.

    Thank you
    Rice

    POOR performance by using the links in the database

    You can change the dropdown to "Select the list with Submit" to refresh the page when a link selected changes. Otherwise just add a button to send (more intuative user experience).

    -ONE

  • Import the database link

    I try to import tables from one database to another via a database link. But faced with a weird error. Help, please.

    Operating system:  Server Linux Oracle release 6.4

    Database of the source: Oracle 12.1.0.2

    Target databases: Oracle 12.1.0.2


    Measures

    1. Created a TNS entry for the source on the target server database.
    2. Create a link from public database to the schema of the source by using the tns name.
    3. Created a database in the target database directory and the permissions granted to the user target.

    Run the command below

    Impdp directory with name of user and password = dirname tables = network_link = linkname schema.tablename

    Get the below output

    Import: Release 12.1.0.2.0 - Production on Fri 9 Oct 14:51:32 2015

    Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

    Connected to: Oracle 12 c Enterprise Edition Release 12.1.0.2.0 - 64 bit Production database

    With the options of partitioning, OLAP, advanced analytics and Real Application Testing

    ORA-39004: invalid state

    ORA-39091: unable to determine the State of standby and logical flow

    ORA-06550: line 1, column 47:

    PLS-00103: encountered the symbol "IN" when the expected in the following way:

    < an ID > < a between double quote delimited identifiers of >


    Hello

    Run the command below

    Impdp directory with name of user and password = dirname tables = network_link = linkname schema.tablename

    can you show real impdp statement executed...

    I guss here is the problem network_link 'name '.

    Rajesh

  • Database links

    Hi all

    I have much dblinks on my database, how can I determine what private dblinks and what audience?

    views dba_db_links and all_db_links is have any information about this.

    A quick Google search gave the following link,.

    http://docs.Oracle.com/CD/B28359_01/server.111/b28310/ds_admin005.htm#ADMIN12173

    He, citing

    OWNER All exceptUSER_* The user who created the database link. If the link is public, the user is listed as PUBLIC .

    HTH

    Aman...

  • Cannot connect through the ORA-01017 Invalid Username/Password database link

    Hello

    I have two virtual machines with Oracle 11 g 2 and one with Oracle 12 c installed on RHEL 6

    I wanted to install a dblink between the 2, but after you have created the dblink I get error: ORA - 01017 Invalid username/password

    Now, I know, the error is clear enough but when I try to connect using netmgr it works

    So just to summarize, Oracle 12 c, I'm trying to connect to Oracle 11 g using a DBLINK but I get ORA-01017

    Since Oracle 12 c, I created a new service so that I have the remote db alias in tnsname.ora and at the end of the process, when they ask for test connection, I can connect successfully to remote db

    Then I created a dblink according to the following:

    SQL > CREATE PUBLIC DBLINK LINK DATABASE to CONNECT to

    "hr""" IDENTIFIED BY ' password ' with the HELP of 'REMOTEDB ';

    If I then select * from employees@dblink, I get the error

    What I've noticed, it is that in the 11g (the target machine) I can not connect with OS authentication, don't know if its related

    If i: sqlplus / as sysdba I get ORA-01031 insufficient become

    I have to connect to the Linux box as user 'oracle', who is a member of the groups oinstall dba

    Am I missing something?

    Thank you!

    CHRI$ says:

    SQL > CREATE PUBLIC DATABASE LINK DBLINK TO CONNECT TO

    'hr' IDENTIFIED BY 'password' with the HELP of "REMOTEDB";

    You will probably have to create the link without containing the user name and the word in double quotes.

  • can I use "Oracle Database 12 c: performance management and Tuning" training for the certification "Oracle Database 11g: Performance Tuning 1Z0-054 '"»

    I took "Oracle Database 12 c: new performance management and Tuning" the oracle University training. Now I would like to get certified on "Oracle Database 11g: Performance Tuning 1Z0-054 ' exam. Is this possible?

    I guess you ask if you can use the course 12 c as long as the condition of course for the review of 11g.  Over 12 c is not listed as one of the options for the 11 g certification and course requirements are normally specific version - at least with DBA certifications.  If you are already an Oracle OCP DBA, of course, there is no requirement of course for the review of performance tuning.  From what I know the training requirements for other certifications, I do not that you will be able to use it. However, Brandye will provide a definitive answer to whether the course 12 c would be acceptable for 11g certification.

    That said, I'm with John - 12 c review is about a community of 85 to 90% in the review of the 11g and is currently about 20% of the price while it is in beta.  What is the point of trying to cross the releases?

  • ALTER USER on read-only database link db

    Oracle 11.2.0.3.6

    Solaris 10

    I have a primary database and one Active Data Guard standby database physical.  My read-only database users must be able to change their password for read-only standby.  I tried to create a stored procedure with an ALTER USER inside statement and then to have my user call the stored procedure of the unalterable standby by: MIMI EXEC. CHGPWD@PRIM ();

    This translates into:

    ERROR on line 1:

    ORA-16000: database opened for read-only access

    ORA-06512: at "MIMI. CHGPWD', line 27

    ORA-06512: at line 1

    How can I allow a user who cannot access the read-only database to change their password for read-only standby?

    Here my stored procedure:

    CREATE OR REPLACE PROCEDURE MIMI. CHGPWD IS

    -CREATE OR REPLACE PROCEDURE CHGPWD IS

    sql_stmt VARCHAR2 (200);

    BEGIN

    sql_stmt: = 'ALTER USER MIMITEST IDENTIFIED BY 111111';

    EXECUTE IMMEDIATE sql_stmt;

    END CHGPWD;

    /

    Ah, I got it!  I had to create a public synonym for my stored procedure, and then create another stored procedure and use the synonym.  This is explained in the documentation of Oracle packages and PL/SQL procedures coding under the section 'referring to remote objects.  Here is what I have from the beginning to the end (My SID is MIMI and the unique name on the primary is MIMI_A):

    Read-only mode ensures:

    ALTER SYSTEM SET GLOBAL_NAMES IS FALSE SCOPE = BOTH;.

    Elementary school:

    ALTER SYSTEM SET GLOBAL_NAMES IS FALSE SCOPE = BOTH;.

    CREATE THE PUBLIC DATABASE LINK MIMI_A.WORLD WITH THE HELP OF "MIMI_A";

    ALTER SYSTEM SET GLOBAL_NAMES IS TRUE SCOPE = BOTH;.  (I need to have this true on my primary game)

    CREATE OR REPLACE PROCEDURE MIMI. CHGPWD IS

    Working directory;

    BEGIN

    dbms_job. Submit (job,' BEGIN EXECUTE IMMEDIATE "ALTER USER MIMITEST IDENTIFIED BY 666666";) END ;') ;

    END;

    /

    CREATE CHGPASS SYNONYM PUBLIC FOR MIMI. CHGPWD@MIMI_A.WORLD;

    CREATE OR REPLACE PROCEDURE MIMI. LOCAL_PROCEDURE IS

    BEGIN

    CHGPASS;

    END;

    /

    GRANT EXECUTE MIMI. CHGPWD TO MIMITEST;

    GRANT EXECUTE MIMI. LOCAL_PROCEDURE TO MIMITEST;

    Read-only mode ensures:

    Mimi/oracle/1120308 > sqlplus mimitest

    SQL * more: Production of the 11.2.0.3.0 version Fri Sep 19 15:55:56 2014

    Copyright (c) 1982, 2011, Oracle.  All rights reserved.

    Enter the password:

    Connected to:

    Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    With partitioning, OLAP, Data Mining and Real Application Testing options

    SQL > exec MIMI. LOCAL_PROCEDURE;

    PL/SQL procedure successfully completed.

  • Oracle 10g of MSSQL 2005 database link

    Hello

    We are configuration link database to oracle 10g of mssql 2005

    Thanks to the heterogeneous connectivity. We get the following error when testing database link.

    ORA-28500: connection between ORACLE and a non-Oracle system has sent this message:

    ORA-28541: error in the HS on line 1 init file.

    ORA-02063: preceding 2 lines of < SID >

    28500 00000 - "connection between ORACLE and a non-Oracle system has sent this message:

    * Cause: The cause is explained in the forwarded message.

    * Action: See documentation for the non-Oracle of the transmission system

    Message.

    Error on line: column 4:19

    Can someone guide correct configeration of Hetrogeneous Service and why the error arises.

    Thank you

    Basu,

    Dg4ODBC gateway can be used with the 10.2.0.5 database. It is certified and no additional license is required for the database to ODBC gateway - the license is included in the license database (even when the Oracle database is still version 10.2) AND you can also install Dg4ODBC on another machine, then the Oracle database. There is no need to have Dg4ODBC installed on the same computer as the Oracle database.

    -When you install DG4ODBC on the same machine as your Oracle 10.2 database, then install in its own, separate OH - otherwise you will corrupt your existing installation of the database.

    -Klaus

    Post edited by: kgronau

  • Using the database links in a process of page plsql

    I try to use a database link in a process of pl/sql page.

    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 name of the link will come an element of page (P12_DBLINK) filled as follows:

    select db_link d, db_link r from user_db_links;  
    

    I tried the following and it doesn't work:

    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; 
    

    It gives me:

    • ORA-04052: error occurred when searching to the top of the remote object MERGER. EXM_CC_COMPANY_ACCOUNTS@L_LINK. WORLD ORA-00604: error occurred at recursive SQL level 3 ORA-02019: description of the connection to the remote database not found

    I thought that perhaps the name of the link was joined with. WORLD automatically but already has the name of the link. WORLD at the end I tried stripping first but the error is the same.

    Is there some synatx for what will work? Can I use dynamic sql statements?

    Any suggestions are most appreciated.

    Thank you

    John

    Hi John,.

    see the following example to use the execute immediate for your purpose

    SQL - Variable for the name of the database link - Stack Overflow

    Let me know if that answers your query in the active thread

  • Authentication of database through the database link

    Is it posible to use database authentication in the APEX by link of database and how?

    Also is it posible to reading user roles through the database link?

    Database links to establish the connection, so you lose the context regarding which is recorded in a single user.

    Custom authentication can do some PL/SQL you need, but I would say that replicate your tables locally through something as materialized views.

    You could also potentially be used dba_role_privs, but do not forget roles can be turned on/off.

  • Public connected user database link creation

    Hello, DBA

    I tried to create the user database link connected audience.
    I have two databases (orcl, orcltest)

    Orcltest database, I created dblink

    SQL > grant create public database to u1 link;
    Grant succeeded.

    SQL > conn u1
    Enter the password:
    Connected.

    SQL > create sequoia link of public database using "orcl".
    Database link created.


    In orcl, I tried to access

    SQL > select * from u1.tab1@redwood;
    Select * from u1.tab1@redwood
    *
    ERROR on line 1:
    ORA-02019: description of the connection to the remote database not found

    QUESTION: what is the error?
    Note: tns, earphone works very well. No problems.
    Prod: 1 0.2.0.4.0
    OS: rhel 5.1

    Thanks in adnvance...

    Hello

    Orcltest database, I created dblink

    SQL > grant create public database to u1 link;
    Grant succeeded.

    SQL > conn u1
    Enter the password:
    Connected.

    SQL > create sequoia link of public database using "orcl".
    Database link created.

    Here, you create a DBLINK on the ORCLTEST to the ORCL database, sort of source database is ORCLTEST and target is ORCL.

    In orcl, I tried to access

    SQL > select * from u1.tab1@redwood;
    Select * from u1.tab1@redwood
    *
    ERROR on line 1:
    ORA-02019: description of the connection to the remote database not found

    It will not work because you created the dblink on the source database, which is ORCLTEST.

    DBLINKS give you a way to access resources (tables, indexes, packages, etc.) in a remote database.

    What you do is:

    1. create a dblink on ORCLTEST. This dblink will provide access to ORCL via the ORCLTEST.

    2 instead of this, you you connect directly to ORCL. That won't work, your DBLINK is not here, you can create another one here pointing to the ORCLTEST.

    DBLINKS act as a bridge, a connection between two databases. They are only available in the source database to create a link to a database remotely (target).

  • How to run DBMS_HS_PASSTHROUGH with the name of the variable database link?

    Hello

    I want to run some native sql through DBMS_HS_PASSTHROUGH of oracle to sybase.
    but the name of the database link is variable, from things as below:
    BEGIN DBMS_HS_PASSTHROUGH. OPEN_CURSOR@db_link_name;

    where db_link_name is a local variable and pl/sql still communicate compile error.

    Have experience with this?

    Thank you.

    Rock
    INTO l_cursor
    

    I think you mean...

    USING OUT l_cursor
    

Maybe you are looking for

  • L.H.S heat exhaust vent Thinkpad T400 is broken

    Hello world I happened to be in a hurry to do something really important, and I wore my laptop too. When I was almost a corner of a table, I accidentally hit the Thinkpad on its cutting edge. (oops). Then the result was that on the left side, vertica

  • is there an icon DOWNLOADS

    y at - it an icon that I can put on my desk that would allow me to see my downloads?  I can't figure out how to find them.  Thank you.

  • Is computer crash a driver

    Hello My PC crashes from time to time, and that without any model of time, When you open the windbg he write something about Igdkmd32.sys. attach a link to the dump file: https://onedrive.live.com/redir?resid=5AAE7E12109C058A%21114 you will appreciat

  • Installation HP Photosmart Premium C309g-m

    At the end of the installation received the Fatal Message: Digital Imaging monitor had a problem. hpzsetup.exe"'-f'"C:\program files\hp\{181AC4C7-B83C-4B5F-B566-E19BF2472429}\gup\autorun.inf""-No...» I've been thru' methods sggested to re-install, bu

  • BPEL 2.0: Normally answer the synchronization process, but the rollback transaction statement

    Did not know where to place the questionBPEL 2.0: Normally answer the synchronization process, but the rollback transaction statementthen post a link here as well.TIA,A.