Db_domain and database links

Hi all

I have some problems and can not get rid of them, so if someone could help me...

Well, I use 10.2.0.5 and try to do a replication of flow between 2 databases (this is not the topic here).
I found my replication could not work due to the source database rename: there is no name domain appended to the end...
SQL> select * from global_name;
GLOBAL_NAME
--------------------------------------------------------------------------------
HARPTEST

SQL> show parameter db_domain;
NAME                                     VALUE
-------------------------------- ------- ------------------------------
db_domain                                .WORLD
I don't know why, it's an old database and I can't change that.

So now, as you can expect, while trying to make a database of my slave to this database link, I encounter errors:
SQL> create database link harptest connect to streamsadmin identified by xxxxx using 'harptest';
SQL> select * from dba_db_links;
OWNER        DB_LINK                  USERNAME     HOST         CREATED
------------ ------------------------ ------------ ------------ ------------
STREAMSADMIN HARPTEST.VOODOO          STREAMSADMIN harptest     30/03/12
This is normal behavior, as I do not give db_name added to my dblink, it adds the local domain. But then, with my setting GLOBAL_NAMES set to TRUE, I run an error:
SQL> select * from dual@harptest;

ERROR at line 1:
ORA-02085: database link HARPTEST.VOODOO connects to HARPTEST
Of course, I could set the GLOBAL_NAMES of FAKE, but this isn't a solution because I'm having the same problem with my capture process.

I try to disassemble the db_name of my line (put in a string of length zero), bounced back to the database, but the local db_domain is always attached to my name db_link. I also tried to rename the global_name of my line (quite wildly with an "global_name update" or "accessories$ '), but still the same.

Do you know how I could connect to a database without domain name in its global_name?

Thanks for any help!

Hello;

If you specify only the name of the database, then the field of the database to the Oracle connection string to create a full service name.

This note of Oracle should give the options available:

Create the link of database without end domain name [ID 462024.1]

Best regards

mseberg

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

  • How to create the database link between the production and the test server

    You will need to create a link between Test and prod DB access. We need only select access from user@prod to user1@test.

    Could someone please answer for example?




    Thank you
    sRII

    You will need to create a link between Test and prod DB access. We need only select access from user@prod to user1@test.

    Could someone please answer for example?

    If test for prod

    create public database link to_prod connect to the user identified by password using 'to_prod ';

    Check that to_prod is directed to your production database.

  • ORA-01017: name of user and password invalid. connection refused - Database Link

    Hi guys,.

    Could you help me, I have a problem connecting to a different database using the database link:

    * 1. I have added in the database 'customer' DEV2 tnsnanes.ora *.

    DEV =
    + (DESCRIPTION = +
    + (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.100.85)(PORT = 1521)) +.
    + (CONNECT_DATA = +
    + (SID = DEVDB) +.
    +)+
    +)+

    * 2. I tested my connection using tnsping *.

    Oracle@dev > tnsping dev

    AMT Ping utility for Linux: Version 10.2.0.1.0 - Production on July 10, 2010 14:35:35

    Copyright (c) 1997, 2005, Oracle.  All rights reserved.

    Use settings files:
    +/opt/Oracle/product/10.2/Db_1/network/admin/SQLNET.ora+


    TNSNAMES adapter used to resolve the alias
    Try to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.100.85)(PORT = 1521)) (CONNECT_DATA = (SID = DEVDB)))
    OK (0 msec)
    Oracle@dev >

    * 3. In SQLPLUS of DEV2 I connect to my database using the tnsnames entry *.

    SQL > conn devuser/pwd001@dev
    Connected.

    * 4. I then create a database of link.*

    SQL > Create Database Link dev_Link
    + 2 Connect devuser +.
    + 3 identified by pwd001 +.
    + 4 using "DEV"; +

    Database link created.

    SQL >

    * 5. When I try to connect to the database using the database link, I get an error, but I'm sure that the password and user name are ok.*

    SQL > select * from global_name@dev_link;
    Select * from global_name@dev_link
    *+
    ERROR on line 1:
    ORA-01017: name of user and password invalid. connection refused
    ORA-02063: preceding the line of DEV_LINK


    SQL >


    What could be wrong...?

    Try to connect to the database via SQLPlus target using the tnsnames.ora entry: sqlplus bob@remote.

    If the target db is 11g, then breaking the password may be the matter. Try placiing the password in quotes when you create the database link.

    HTH - Mark D Powell.

  • A question about the CREATE DATABASE LINK PUBLIC and ORA-12154 error

    Hi all


    I have a problem on the public database link creation and I would be grateful if you could kindly give me a helping hand. I have the following connection settings in my
    tnsnames.ora file:
    ...
    DGPAPROD.WORLD = 
         (DESCRIPTION = 
           (ADDRESS_LIST = 
            (ADDRESS = (COMMUNITY=tcp.world)
              (PROTOCOL=TCP)(HOST=ORASR001)(PORT=1521)
             ) 
           )
           (CONNECT_DATA = (SID = DGPAPROD))
        )
    ...
    Having the above mentioned parameters, I can connect to this remote database directly in a SQL * more shell:
    $ sqlplus username/[email protected]
    It works pretty well and the connection is established without any problem.

    Now, what I want to do is to create a public database of this remote database link to avoid the user/connection of switch for the visualization of the
    the content of this database. I proceeded in line with the syntax indicated in the Oracle online documentation:

    http://download.Oracle.com/docs/CD/B28359_01/server.111/b28286/statements_5005.htm#SQLRF01205

    This is why I run the following to create a public database link
    CREATE PUBLIC DATABASE LINK SR001_dblink CONNECT TO user IDENTIFIED BY password USING 'DGPAPROD.WORLD';
    Apparently there is no error and the link is created successfully. However, it cannot resolve the remote host and every time I run this query
    (myenterprise is the name of a table in the remote database)
    SELECT *
    FROM myenterprise@SR001_dblink
    
    ERROR at line 1:
    ORA-12154: TNS:could not resolve the connect identifier specified
    What causes this problem?

    Thanks in advance,


    Kind regards
    Dariyoosh

    You must have defined DGPAPROD. WORLD in tnsnames.oar on the server where DB is runnig.

  • Error creating database link!

    Dear all,

    I'm in a strange problem to connect to the database between the RAC and single Instance database. The two databases are 11 GR 2 and on Linux platform.

    On a database that is CARS, my settings are as follows:

    view the global_names parameter.
    Value = TRUE

    Select Rename global_name;
    RACDB. DOMAIN.COM

    Although I ran the race:
    ALTER DATABASE RENAME GLOBAL_NAME to RACDB and bounce the database after this command, but still it shows RACDB. DOMAIN.COM

    When I see the db_domain parameter
    Value = (NULL)

    tnsnames.ora is

    GGBKP =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.20.182)(PORT = 1521))
    (CONNECT_DATA = (SERVICE_NAME = GGBKP))
    )


    On the other server, my settings are as follows:

    view the global_names parameter.
    Value = TRUE

    Select Rename global_name;
    GGBKP

    When I see the db_domain parameter
    Value = (NULL)

    tnsnames.ora is
    RACDB =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.20.29)(PORT = 1521))
    (CONNECT_DATA = (SERVICE_NAME = RACDB))
    )


    OK, now when I create the link DB from one server to another by using the command:

    Server a

    create database GGBKP link to connect to streamadmin identified by streamadmin using 'GGBKP ';

    and run this query

    Select sysdate dual@GGBKP it gives an error:
    ORA-02085: database link GGBKP. DOMAIN.COM will connect to GGBKP


    the second server

    SQL > create database RACDB link to connect to streamadmin identified by streamadmin
    2 using "RACDB;

    Database link created.

    SQL > select sysdate dual@RACDB;
    Select sysdate from dual@RACDB
    *
    ERROR on line 1:
    ORA-02085: database RACDB link connects to the RACDB. DOMAIN.COM

    Where is the problem in the settings and how to get rid of this problem. I have to keep the overall name of TRUE because replication streams.

    Kind regards
    Imran

    Probably that does not help.
    The problem is on the server 1, Server 2 is OK and works as expected.
    For some strange reason, server 1 still picks up "domain.com".

    At this point, I would probably question sys.props$ (where it is stored) or consult the global_names view definition.
    I would not immediately update sys.props$ with the correct value.

    I would also like to run lsnrctl services: if properly configured global_name and service_name in lsnrctl match.

    ------
    Sybrand Bakker
    Senior Oracle DBA

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

  • How the installation program an Oracle 12 c and database instance without using DBCA, or YES?

    Hello

    I was in charge of the implementation of an Oracle 12 c instance and a database on Redhat 6.4. The caveat is that I can't use the DBCA or YES GUI to do this, I can only use the command line...

    The other issue is there is already the default ORCL instance and the database. So I need to get up a second instance and database, to the sides of it.

    Which is fine, but it is almost impossible to find tutorials on how to do this way.

    So if someone can tell me a good doc on how to do this it would be much appreciated.

    Thank you

    Sam

    It would be at this point that I would like to inform my boss that the way he wants me to approach my work will make me very unproductive. I could no longer made in a short period of time, if I could use the tools Oracle provides for me.

    Maybe I got lucky, but I've never worked for a manager who gave me details like this in the way of my job. Generally said "here's the requirements, now get on with the job." His place for me to decide how to do the task at hand. That being said, I could definitely see a Manager saying something like "we don't have the budget by Exceed for your XWindows environment' (or other 3rd party software X), but that doesn't stop me using X if I could find a way to do it within budget.

    You can certainly install the software silently without X. Google for Oracle Silent Install and you should get a lot of success. You will need to create a response file, and then run the YES program with her. This gives you the software installed with only the command line.

    Regards to the manual creation of the database, you can do it too. Here is a link to the Oracle documentation: http://docs.oracle.com/cd/B28359_01/server.111/b28310/create003.htm#ADMIN11073

    Have fun! It is so much easier with the DBCA Wizard now.

    Finally, if it were me, I would give my post to the company a serious reflection. I prefer to work for a boss who gives me rather than a solely responsible for micro me. I do not say your in a bad position. I don't know all the details. You can be perfectly happy with this work, that would be great! But the comments of the kind that a Manager always give me pause.

    See you soon,.
    Brian

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

  • 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

Maybe you are looking for