Database Link for Entire DB

Hi Friends,
I can create database link from DEV instance to PROD instance using:
===
create database link db_link1 connect to HR identified by HR using 'prod';
===
Question 1
My problem is that when HR changes it password my link gets disabled.
Is there a solution for this?
Question 2
How do I create a database link that is global from DEV to PROD.
What I mean is, I can access all tables of any schema from DEV to PROD.
Is this possible?
Thanks you very much in advance.

You shouldn't be creating a database link connecting to the 'HR' account itself. That is dangerous.
On PROD, create a shadow account -- eg called "QUERY_HR_FROM_DEV". Then GRANT SELECT on all HR tables to QUERY_HR_FROM_DEV.
In DEV, create your Database Link as "CREATE DATABASE LINK HR_PROD CONNECT TO QUERY_HR_FROM_DEV IDENTIFIED BY password using 'PROD' "
Question 2 is a worse idea.
You want any schema in DEV to be able to update any schema in PROD.

Similar Messages

  • Creating a Database link for a user

    Hello All,
    I am trying to create a database link for one of my users.
    When I create it as sysdba the link gets created in the SYS schema which tells me that my syntax is working/fine.
    But when I ALTER my SESSION and set my CURRENT_SCHEMA = <USER_NAME> I get ORA-00990: missing or invalid privilege
    So I tried granting the user CREATE DATABASE LINK, CREATE PUBLIC DATABASE LINK, and DROP PUBLIC DATABASE LINK.
    Same error.
    Any ideas what I am missing?
    Thanks,
    Craig

    CraigBoyd wrote:
    Hello All,
    I am trying to create a database link for one of my users.
    When I create it as sysdba the link gets created in the SYS schema which tells me that my syntax is working/fine.
    But when I ALTER my SESSION and set my CURRENT_SCHEMA = <USER_NAME> I get ORA-00990: missing or invalid privilege
    So I tried granting the user CREATE DATABASE LINK, CREATE PUBLIC DATABASE LINK, and DROP PUBLIC DATABASE LINK.
    Same error.
    Any ideas what I am missing?
    Thanks,
    Craigyou need to create a new session after the GRANT was issued.

  • OWB 10g -- Can't Create Database Links for Data Source and Target

    We installed OWB 10g server components on a Unix box running Oracle 10g (R2) database. The Designer Repository is in one instance. The Runtime Repository and the Target are in another instance. The OWB client component was installed on Windows XP. We create a data source module and a target module in OWB. The data source is on another Unix box running Oracle 9i (R2) database. We try to create database links for data source module and target module, respective. But when we created and tested the DB links, the DB links were failed.
    For the database link of data source, we got the following error message:
    Testing...
    Failed.
    SQL Exception
    Repository Error:SQL Exception..
    Class Name: CacheMediator.
    Method Name: getDDEntryFromDB.
    Repository Error Message: ORA-12170: TNS:Connect timeout occurred
    For the database link of target , we got the following error message:
    Testing...
    Failed.
    API2215: Cannot create database link. Please contact Oracle Support with the stack trace and the details on how to reproduce it.
    Repository Error:SQL Exception..
    Class Name: oracle.wh.ui.integrator.common.RepositoryUtils.
    Method Name: createDBLink(String, String, String, String).
    Method Name: -1.
    Repository Error Message: java.sql.SQLException: ORA-00933: SQL command not properly ended.
    However, we could connect to the two databases (data source and target) using the OWB’s utility SQL Plus.
    Please help us to solve this problem. Thank you.

    As I said prior the database link creation should work from within the OWB client (also in 10).
    Regarding your issue when deploying, have you registered your target locations in the deployment manager and did you first deployed your target location's connector which points out to your source?
    I myself had some problems with database link creations in the past and I can't remember exactly what they were but it had something to do with
    - the use of abnormal characters in the database link name
    - long domain name used in as names.default_domain in my sqlnet.ora file
    What you can do is check the actual script created when deploying the database link so see if there's something strange and check if executing the created script manually works or not.

  • Oracle Database link for AS400

    Hi
    i have two (2) database servers
    1) Oracle 9i server
    2) AS400 server
    I want to create Oracle DataBase Link for AS400.
    means i just want to connect AS400 system from oracle prompt by using
    oracle database link.
    please anybody help me in detail
    Nasir,

    There is two method.
    One of that
    (1) Buy Oracle Transparent Gateway for AS400/DB2 and install it to AS400.
    (2) Set tnsnames.ora for connecting to AS400/DB2.
    (3) Create database link
    http://download-west.oracle.com/docs/html/A97615_01/toc.htm
    Another of that
    (1) Get odbc driver for AS400/DB2 (on your OS executing Oracle)
    (2) Set listener.ora, inithsodbc.ora and tnsnames.ora.
    (3) Create database link
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96544/gencon.htm#1004729

  • External directory database link for CME 4.0

    Is it possible to link CME 4.0 with external phone directory database?
    Thanks
    AD

    Yes, you can use an external database for your Corporate Directory on the ip phones, such as an enterprise LDAP directory. See the below link for more info:
    http://www.cisco.com/univercd/cc/td/doc/product/voice/c_callmg/4_0/sys_ad/4_0_1/ccmsys/a04ldap.htm
    Please rate helpful posts!

  • Problem in database link for value set table

    Hi All,
    We are using a table from a different database in our valuset. This database we are refering via a DBLINK. But the DBLINK name is again stored in a table and will change from instance to instance i.e (development and production).
    Please let us know if there is a way to make use of the above table with out hardcoding DB link.
    Eg: MRP_AP_APPS_INSTANCES - This table has the DBLINK name
    Vauset uses - tablename@dblinkname
    if we give
    select * from tablename@(select A2M_DBLINK from MRP_AP_APPS_INSTANCES),
    it gives the error database link name expected.
    Is there any other way how we can avoid hardcoding the dblink name.
    Please help.
    Regards,
    Shruti

    Hi,
    Please see if (Note: 427588.1 - Error When Using a Database Link in the Definition of a Value-Set) is applicable.
    Thanks,
    Hussein

  • Database link for BLob

    Hi,
    I currently using oracle9i(9.2). Can I create database link to copy "blob" data?
    Ken

    you have to consider that Binary LOBS are not inside the database. In the database is only the pointer to that external file.
    Conclusion : you can not do that. You have to copy it with OS commands and after to insert it in the database.
    Joel P�rez

  • DATABASE LINK FOR SQL SERVER

    Hi all,
    We are running SAP 4.7C with oracle database.  For other oracle (non-sap) we are using DBCO to get/put data.  Now we have to do the same in SQL server also. In addition to SAP standard table we are sending data of customer table (Z & Y series).  Can anybody guide me how to send / receive data using bapi/rfc or some other method.
    regards
    balakumar

    Hi!
    For using native-SQL with MSSQL database you have to make your database requests from application server resides on windows platform. So, your basis people have to set up one more windows-based application server instance. There is no impact on backend R/3 database.
    Regards,
    Maxim.

  • Failed to create Database Link in OWB 9.2 for remote SQL Server

    Hi,
    I have to create Database link for connecting to SQL server in a different machine.I am using OWB 9.2 and XP.
    Dataserver is the machine name which is running SQL Server
    I included follwing lines in TNSNAMES.ORA file
    hsodbc.world =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dataserver)(PORT = 1433)
    (CONNECT_DATA = (SID=hsodbc.world)
    (HS =OK)
    I included follwing lines in Listener.ORA file
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dataserver)(PORT = 1433)
    (SID_DESC=
    (SID_NAME=hsodbc.world)
    (ORACLE_HOME=C:\ora92)
    (PROGRAM=hsodbc)
    I included follwing lines in inithsodbc.ORA file
    HS_FDS_CONNECT_INFO = testdsn
    HS_FDS_TRACE_LEVEL = 0
    While creating new database link I gave the follwing values
    DB Link Name : Mylink
    SQL * Net Connect String: hsodbc
    User Name: sa
    password:<my password>
    Then clicked "Create and Test" button to get the follwing error message
    Testing...
    Failed.
    ORA-12154 TNS:could not resolve service name
    *Cause: The service name specified is not defined correctly in the TNSNAMES.ORA file
    *Action: Make the following checks and correct the error:
    - Verify that a TNSNAMES.ORA file exists on your repository server
    in the proper place and is accessible. See the operating
    system specific manual for details on the required name and location.
    - Check to see that the service name exists in one of the
    TNSNAMES.ORA files and add it if necessary.
    - Make sure there are no syntax errors in the file.
    Particularly look for unmatched parentheses or stray characters.
    Any error in a TNSNAMES.ORA file makes it unusable. See
    Chapter 4 in the SQL*Net V2 Administrator's Guide. If possible,
    regenerate the configuration files using the Oracle Network Manager.
    Is there anything wrong in my configuration. Please help me in getting out of this problem.
    Thanks in advance
    Andy

    Hi Mark,
    Thanks Mark.I did the changes in the specified .ora file but now it shows a different error message.
    The error is
    Testing...
    Failed.
    Cwm Error Message: SQL Exception
    Cwm Error: SQL Exception
    Class Name: CacheMediator
    Method Name: getDDEntryFromDB
    Repository Error Message: ORA-28545: error diagnosed by Net8 when connecting to an agent
    NCRO: Failed to make RSLV connection
    ORA-02063: preceding 2 lines from MYLINK
    Query: select 1 from dual@MyLink
    I got the same error when i tried manually in sql plus.
    Please help me in getting out of thid problem
    Thanks in advance
    Andy

  • 20 Index Restriction on Remote Tables (i.e. using Database Links)

    The Oracle Database Administrator's Guides for 10g and 11g document a performance restriction that "No more than 20 indexes are considered for a remote table." If I go back to the 8i documentation it says "In cost-based optimization, no more than 20 indexes per remote table are considered when generating query plans. The order of the indexes varies; if the 20-index limitation is exceeded, random variation in query plans may result."
    Does anyone have more details on this performance restriction? In particular I am trying to answer these questions:
    1) Are the 20 indexes which are considered by the CBO still random in 10g?
    2) Can I influence which indexes are considered with index hints or will my hints only be considered if they are for one of the "random" 20 indexes which are being considered by the CBO?
    3) Are there any other approaches or work-arounds to this restriction assuming you need to select from a large remote table with more than 20 indexes (and need to perform the selection using 1 of those indexes to get adequate performance) or do we need to abandon database links for this table?
    Thanks in advance for your input.

    So, here's my simple test.
    SQL>
    SQL> create table gurnish.indexes20plus ( n1 number, n2 number, n3 number, n4 number, n5 number, n6 number, n7 number,
    2 n8 number, n9 number, n10 number, n11 number, n12 number, n13 number, n14 number, n15 number, n16 number,
    3 n17 number, n18 number, n19 number, n20 number, n21 number, n22 number, n23 number, n24 number,
    4 n25 number, n26 number, n28 number);
    create index xin1 on indexes20plus (n1);
    Table created.
    SQL> SQL> create index xin2 on indexes20plus (n2);
    create index xin3 on indexes20plus (n3);
    Index created.
    SQL> SQL>
    Index created.
    SQL> SQL> create index xin4 on indexes20plus (n4);
    Index created.
    SQL> SQL>
    Index created.
    SQL> SQL> create index xin5 on indexes20plus (n5);
    create index xin6 on indexes20plus (n6);
    Index created.
    SQL> SQL>
    Index created.
    SQL> SQL> create index xin7 on indexes20plus (n7);
    Index created.
    SQL> SQL> create index xin8 on indexes20plus (n8);
    Index created.
    SQL> SQL> create index xin9 on indexes20plus (n9);
    Index created.
    SQL>
    SQL> create index xin10 on indexes20plus (n10);
    Index created.
    SQL> SQL> create index xin11 on indexes20plus (n11);
    create index xin12 on indexes20plus (n12);
    create index xin13 on indexes20plus (n13);
    Index created.
    SQL> SQL>
    Index created.
    SQL> SQL>
    Index created.
    SQL> SQL> create index xin14 on indexes20plus (n14);
    Index created.
    SQL> SQL> create index xin15 on indexes20plus (n15);
    Index created.
    SQL>
    SQL> create index xin16 on indexes20plus (n16);
    Index created.
    SQL>
    SQL> create index xin17 on indexes20plus (n17);
    Index created.
    SQL> SQL> create index xin18 on indexes20plus (n18);
    Index created.
    SQL> SQL> create index xin19 on indexes20plus (n19);
    Index created.
    SQL> SQL> create index xin20 on indexes20plus (n20);
    Index created.
    SQL> SQL> create index xin21 on indexes20plus (n21);
    Index created.
    declare
    i number;
    begin
    for i in 1..100
    loop
    dbms_random.seed(i+100);
    insert into indexes20plus values (dbms_random.value(1,5),dbms_random.value(1,21),dbms_random.RANDOM, dbms_random.RANDOM,dbms_random.value(1,20),
    dbms_random.value(1,4),dbms_random.value(1,6), dbms_random.value(1,7),dbms_random.value(1,9),dbms_random.value(1,10),
    dbms_random.value(1,11),dbms_random.value(1,12),dbms_random.value(1,13),dbms_random.value(1,14),dbms_random.value(1,1),
    dbms_random.value(1,1),dbms_random.value(1,19),dbms_random.value(1,122),dbms_random.value(1,20),dbms_random.value(1,20)
    ,dbms_random.value(4,20),dbms_random.value(1,20),dbms_random.value(1,20),dbms_random.value(1,20),dbms_random.value(1,20)
    ,dbms_random.value(4,20),dbms_random.value(4,20));
    end loop;
    commit;
    end;
    SQL> set autotrace traceonly
    SQL> l
    1* select * from gurnish.indexes20plus@lvoprds where n1 = 4
    SQL> /
    no rows selected
    Execution Plan
    Plan hash value: 441368878
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU
    )| Time | Inst |
    | 0 | SELECT STATEMENT REMOTE | | 1 | 351 | 1 (0
    )| 00:00:01 | |
    | 1 | TABLE ACCESS BY INDEX ROWID| INDEXES20PLUS | 1 | 351 | 1 (0
    )| 00:00:01 | LVPRD |
    |* 2 | INDEX RANGE SCAN | XIN1 | 1 | | 1 (0
    )| 00:00:01 | LVPRD |
    Predicate Information (identified by operation id):
    2 - access("A1"."N1"=4)
    Note
    - fully remote statement
    - dynamic sampling used for this statement
    Statistics
    0 recursive calls
    0 db block gets
    0 consistent gets
    0 physical reads
    0 redo size
    1897 bytes sent via SQL*Net to client
    481 bytes received via SQL*Net from client
    1 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    0 rows processed
    SQL> select * from gurnish.indexes20plus@lvoprds where n21 = 4;
    no rows selected
    Execution Plan
    Plan hash value: 2929530649
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU
    )| Time | Inst |
    | 0 | SELECT STATEMENT REMOTE | | 1 | 351 | 1 (0
    )| 00:00:01 | |
    | 1 | TABLE ACCESS BY INDEX ROWID| INDEXES20PLUS | 1 | 351 | 1 (0
    )| 00:00:01 | LVPRD |
    |* 2 | INDEX RANGE SCAN | XIN21 | 1 | | 1 (0
    )| 00:00:01 | LVPRD |
    Predicate Information (identified by operation id):
    2 - access("A1"."N21"=4)
    Note
    - fully remote statement
    - dynamic sampling used for this statement
    Statistics
    1 recursive calls
    0 db block gets
    0 consistent gets
    0 physical reads
    0 redo size
    1897 bytes sent via SQL*Net to client
    481 bytes received via SQL*Net from client
    1 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    0 rows processed
    SQL>

  • Question about using database links in Forms 10g

    I have a form that uses a database link for the "Query Data Source Name," i.e. it is set to some_view@some_db_link
    For some reason when I run a query using the DB link the query takes approximately 30 seconds. When I remove the link and go local the query takes about one second. Has anybody observed and addressed this issue before (without going local of course)?
    Thanks,
    Thomas

    Let me first say that it is never a good idea to use a db link in the data source. It is better to create a synonym in the database and use this as the data source. If the db link changes, you only have to do this in the database, without recompiling forms.
    create synonym some_view for some_view@some_db_link
    This may already solve your problem. If not, than see if the query is also slow in sqlplus. You may have a problem in your connection between the two databases.

  • Using database link to connect to two databases

    Hi guys,
    Here's my question. I need to give a contractor Select rights on tables located in two schemas located on two different servers. One server is dev and one is prod. Let's say we have schema user: EMPLOYEE on dev and schema user: DEPARTMENT on prod. The outside contractor needs select rights on all tables in DEPARTMENT schema but only needs select on a few tables ( 4 to be exact) from EMPLOYEE schema.
    My initial train of thougth is: CREATE a user named: TEST (random name of course, just used for an example) for contractor on prod. Give user TEST select rights on all tables in DEPARTMENT schema.
    Create database link to dev server so user TEST can access EMPLOYEE schema.
    How do i go about limiting the user TEST via the database link to only view the 4 tables from EMPLOYEE instead of all teh tables?
    Should I also consider doing this scenario in reverse? Creating user TEST on dev, giving TEST rights to the 4 tables in EMPLOYEE, then creating the database link to connect to department schema on prod database??
    Any help will be appreciated. Thanks in advance.

    zephyr223 wrote:
    Hi guys,
    Here's my question. I need to give a contractor Select rights on tables located in two schemas located on two different servers. One server is dev and one is prod. Let's say we have schema user: EMPLOYEE on dev and schema user: DEPARTMENT on prod. The outside contractor needs select rights on all tables in DEPARTMENT schema but only needs select on a few tables ( 4 to be exact) from EMPLOYEE schema.
    My initial train of thougth is: CREATE a user named: TEST (random name of course, just used for an example) for contractor on prod. Give user TEST select rights on all tables in DEPARTMENT schema.
    Create database link to dev server so user TEST can access EMPLOYEE schema.
    How do i go about limiting the user TEST via the database link to only view the 4 tables from EMPLOYEE instead of all teh tables? Only grant them access to those four tables from EMPLOYEE. You have to explicitly grant privileges anyways, and since there is no GRANT SELECT ON <SCHEMA> ability it should not be that difficult.
    Should I also consider doing this scenario in reverse? Creating user TEST on dev, giving TEST rights to the 4 tables in EMPLOYEE, then creating the database link to connect to department schema on prod database?? Are you creating database links as the EMPLOYEE and DEPARTMENT users? If so, I would caution against that. Create a "current user" database link for TEST. I think you can manage privileges better that way.
    HTH!
    HTH!

  • Creation of database link from oracle to sql server 2000

    Hi
    I need to create a database link from oracle to sql server 2000.

    Assuming your Oracle database is running on Windows, you can set up a database link using ODBC using Heterogeneous Services and Generic Connectivity, but there are some functional limitations (i.e. no two-phase commits). If you can live with those limitations but aren't on Windows, you can generally purchase an ODBC driver for your operating system that will connect to SQL Server through someone like DataDirect and still use Generic Connectivity. If you cannot live with those limitations, you can purchase one of Oracle's Transparent Gateway products (though this can get somewhat pricey).
    What version of Oracle are you on?
    What operating system(s) are you using?
    What are you going to use the database link for?
    Justin

  • Database link from Oracle DBMS 1g to MS SQL Server

    Hi,
    I would need to know, if there is some out of the box functionality from the Oracle DBMS 11g where I can connect to MS SQL Server (2005/2008)? If there is good tutorial on how to do it, I would very much appreciate it.
    Thanks!
    Dejan

    Hi,
    I have created following:
    1. Oracle DBMS 11g Enterprise installe (guessing that also the ODBC drivers for Oracle should)
    2. Using MS SQL 2009 Native Client for ODBC connectivity
    3. global_names set to false by
    alter system set global_names=false;
    4. Configures Oracle Heterogeneous services in initHS_ORCL.ora under \hs\admin to
    HS_FDS_CONNECT_INFO = HS_ORCL
    HS_FDS_TRACE_LEVEL = off
    5. Modified listerner.ora to
    SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = ORCL) (ORACLE_HOME = C:\oracle\product\11.1.0\db_1) (SID_NAME = ORCL) ) )
    LISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = nt-topobase)(PORT = 1521)) )
    # Connecting to MS SQL Server via ODBC
    SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = HS_ORCL) (ORACLE_HOME = C:\oracle\product\11.1.0\db_1) (PROGRAM = hsodbc) ) )
    6. Modified TNSnames.ora to
    ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = nt-topobase.cgs-lj.si)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORCL) ) )
    # Connecting to MS SQL Server via ODBC (added newly)
    HS_ORCL = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS= (PROTOCOL = TCP) (HOST = nt-topobase) (PORT = 1521)) (CONNECT_DATA = (SID=HS_ORCL)) (HS=OK))
    7.Restarted Oracle service
    8. Created Database link for an existing user sz that is sysdba in the ORCL instance:
    create database link hs_orcl connect to sz identified by admin using 'HS_ORCL';
    Database link created.
    9. Tried logging:
    C:\>sqlplus sz/admin@hs_orcl
    SQL*Plus: Release 11.1.0.7.0 - Production on Pon Mar 1 14:58:40 2010
    Copyright (c) 1982, 2008, Oracle. All rights reserved.
    ERROR:
    ORA-12154: TNS:could not resolve the connect identifier specified
    11. Tried logging (successful)
    C:\>sqlplus sz/admin@orcl
    SQL*Plus: Release 11.1.0.7.0 - Production on Pon Mar 1 14:58:52 2010
    Copyright (c) 1982, 2008, Oracle. All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select * from ges@hs_orcl;
    select * from ges@hs_orcl
    ERROR at line 1:
    ORA-02019: connection description for remote database not found
    SQL> select * from ges@hs_orcl;
    select * from ges@hs_orcl
    ERROR at line 1:
    ORA-02019: connection description for remote database not found
    Cannot get the select from the MS SQL Server 2005 on the table 'GES'.

  • Create database link

    hi guys.
    I need help to create database link with this scenario
    i want to create database link between database A ,database B i want to access something inside B i have problems with command and i need help to create database link .
    also does i need owner on both database to create DBlink.
    Regards.

    there is no scenario for creating database link except the prerequisite for having privlileges create database link for private link while for public is create public database link.
    You can create database link in database A for the database B using its string and its username and password
    Khurram

Maybe you are looking for

  • Photoshop CS3 "Save for web" doesn't work

    Hi everybody. I noticed one weird thing. When I want to use "Save for web" function on my Photoshop CS3 to save some jpg file and reduce size, the dialog window just doesn't appear. I clicked Save for web and nothing happen. The window of the file a

  • Image incomplete

    Hi, Thanks in advance for any help. This is the first time I have any problems with iDVD burning discs. I have an 86 minute, 2.6 gb iDVD movie made in iMovie, all 06 versions. It ejects disc and says "current operation", "image incomplete", after nor

  • IPod shows 3 copies of songs-doesn't show up that way when connect to PC

    Can anyone help me with this? I think there might be 2 and 3 copies of some songs either because I changed the genre on them when the iPod was hooked up to my computer, or because they are in several playlists. However, there are other songs that onl

  • ICal Sync- Not showing location of event

    Hello, my first ipod is becoming a nuisance. I want to be able to see more detail of the calendar events sent from ical or entourage for that matter. On the ipod each event shows up with the summary, date and time. No other information is shown. I ne

  • Can't access Firefox it says Your Firefox profile cannot be loaded. It may be missing or inaccessible.

    I was in the middle of restoring the default settings on Firefox and it was in the process of cleaning up when my pc crashed. When I restarted I got the above problem. I first tried upgrading Firefox then I uninstalled it and reinstalled it and the p