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

Tags: Database

Similar Questions

  • 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

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

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

  • 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

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

  • 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

  • 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

  • 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
    
  • Public database link does not work

    Hello

    I want to create a link from public database between 2 server in a different physical location, but in an intranet. Once I created the public database link... I keep having this error



    ORA-12154: TNS: could not resolve service name
    12154 00000 - "TNS: could not resolve the connect identifier specified.


    *(Server 1-German-11gR2) *.
    TNS:

    Server1 =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP) (HOST = 178.44.44.45)(PORT = 15210))
    )
    (CONNECT_DATA =
    (SID = server1)
    (SERVER = DEDICATED)
    )
    )




    * Server (2-Malaysia-9iR2). *
    AMT:

    Server2 =
    (DESCRIPTION =
    (FAILOVER = ON)
    (LOAD_BALANCE = OFF)
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP) (HOST = 178.44.44.35)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP) (HOST = 178.44.44.81)(PORT = 1521))
    )
    (SDU = 32777)
    (CONNECT_DATA =
    (SERVICE_NAME = PROD_server2)
    )
    )



    I just want to create a database link course where Server 2 can enter the data on server 1, so I create my link database to Server 2. However, I always saw the problem. The TNSi under here are sample test, but it is working very well in here when connect you using the sql and sql navigator developer. (I think that nothing wrong with the tns) but is somehow the error message given TNS: could not resolve service name. So I don't really know what has gone wrong... PLEASE HELP ~ ~



    ~ Vincent.

    Hello
    If you create the link db on server 2 so you need a tnsnames.ora entry that points to the server 1.
    You should have an entry in the file tnsnames.ora on server - 2

    Server1 =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP) (HOST = 178.44.44.45)(PORT = 15210))
    )
    (CONNECT_DATA =
    (SID = server1)
    (SERVER = DEDICATED)
    )
    )

    then create the database on server 2 - link

    CREATE DATABASE LINK PUBLIC 'server1_schemaA '.
    CONNECT to schemaA
    IDENTIFIED BY password
    Using "Server1."

    Kind regards
    Mike

  • Drop database link in another scheme that DBA is not working

    How to remove an object for example, database 'MYDB. MYDBLINK"that is present in the SCOTT schema.

    When I try the following options of logged in as DBA , it is in error.

    "DROP DATABASE LINK"SCOTT" MYDB. MYDBLINK1 ';
    ORA-2024: connection to database not found.

    DROP DATABASE LINK SCOTT. MYDB. MYDBLINK1;
    ORA-2024: connection to database not found.

    DROP DATABASE LINK 'SCOTT'.' MYDB. MYDBLINK1';
    ORA-2024: connection to database not found.

    DROP DATABASE LINK SCOTT. MYDB. MYDBLINK1;
    ORA-2024: connection to database not found.

    I always connect like SCOTT to drop the MYDB database link. MYDBLINK1 that is present in the SCOTT schema.

    Please provide the way to drop the database link in another schema, without logging as the schema owner, so that I can connect a DBA (SYSTEM or SYS).

    You cannot remove a database link in the schema of another user. One solution is:

    SQL > CREATE PROCEDURE scott.drop_db_link AS
    BEGIN
    EXECUTE IMMEDIATE 'drop database link LINK1. "
    END drop_db_link; 2 3 4
    7 m

    Created procedure.

    SQL > exec scott.drop_db_link

    PL/SQL procedure successfully completed.

    Source: http://dbaoracletips.blogspot.com/2011/11/how-to-dropcreate-database-link-from.html
    http://laurentschneider.com/wordpress/2012/10/drop-database-link-in-another-schema.html

  • Database link ORACLE to POSTGRESQL.

    Hi all.
    Nice day!
    I want to create the connection from oracle to postgres.
    Here are my configs:
    1 / $oracle_home/hs/admin/initPSQL.ora
    HS_FDS_CONNECT_INFO = PSQL
    HS_FDS_SHAREABLE_NAME = /usr/lib/libodbcpsql.so
    Set ODBCINI=/etc/odbc.ini

    2 / listener.ora
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = dg4odbc)
    (ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
    (PROGRAM = dg4odbc)
    )
    (SID_DESC =
    (SID_NAME = PSQL)
    (ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1/)
    (Program = dg4odbc))
    )

    3 / tnsname.ora
    PSQL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521))
    )
    (CONNECT_DATA =
    (SID = PSQL)
    )
    (HS = OK)
    )

    5 / driver ODBC of POSTGRESQL:
    Description = ODBC for PostgreSQL
    Driver = /usr/lib/libodbcpsql.so


    But when I create the database link:

    MY QUERY:
    |
    |
    L to CREATE public DATABASE LINK test
    CONNECT to 'postgres' IDENTIFIED BY '123456 '.
    WITH THE HELP OF "PSQL";
    SELECT id FROM tb_abc@luanmap_test;


    ERRORS:
    |
    |
    ORA-28500: connection between ORACLE and a non-Oracle system has sent this message:
    ORA-02063: preceding the line of LUANMAP_TEST
    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 9:33

    Please help me or give me some advice. Thank you.
    Luan!

    The ODBC driver you are using is an older ODBC driver and the message error in the gateway trace indicates a problem with the ODBC driver (00:53454 45 4354202 A 4 202244 2046524F [SELECT * "d])
    10: 55414 C 22 [UAL"]
    Out of hgopars, rc = 28500 to 2013/02/23-17: 27:45.y by mistake ptr FILE: hgopars.c LINE: 570 FUNCTION: hgopars() ID: SELECT list of size 0 is not valid)

    We could now generate a trace file ODBC see ODBC function fails in detail, but PostgreSQL ODBC driver you are using is V7 (DriverName:libpsqlodbc.so, DriverVer:07.01.0003), it would be better to update the driver version V9.1.

    -Klaus

Maybe you are looking for

  • AT100 ICS update

    Now that the trhieve (AT100 USA) received the ICS update, when can we expect the same ib Europe? Ty,TDA

  • Qosmio G20-127: after firmware update cannot burn CD or DVD

    I'm updating my firmware from F101 F102 to dvd so I can't copy any CD or DVD in my drive also some CD & DVD cannot be played after this update, I tried toinstall the old firmware F101, but I can't so please help me? Thanx

  • SDRAM

    I have a compaq desktop with infineon 128 MB 100 Hz CL.2 MemoryStick 7AP140 and I want to move to two sticks of memory sdram 256 MB, but don't know what to buy. I'm trying to find out how many pines the one I have has and does it make a difference?

  • Update euro ICS in some markets

    Update page States that ics bagan the deployment in June for select markets, the average UK will not now receive ICS?

  • Is it still useful to install SP2 for Vista on 64-bit system? What are the benefits?

    OK, so I have Windows Vista Premium Home Edition on a laptop HP with Service Pack 1 installed. I have disabled the automatic updates of Windows functionality, because there are so many unnecessary and space-hogging updates that I can't be bothered. I