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

Similar Messages

  • 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

  • Special characters in password for "create database link"

    It seems that one cannot create a DB link if the password has a special character in it (like '!')?
    create database link MYLINK connect to SOURCE identified by mypwd! using 'MYDB'
    - returns "ORA-00933: Command not properly ended"
    create database link MYLINK connect to SOURCE identified by values 'mypwd!' using 'MYDB'
    - returns "ORA-00988: missing or invalid password(s). This is the syntax that works in "create user".
    Nikolai

    1* create database link MYLINK connect to SOURCE identified by "mypwd!" using 'MYDB'
    SQL> /
    Database link created.
    SQL>
    Joel Pérez

  • To create database link to connect to remote database

    Hi all
    I am using 10g with apex4.
    My apex application is running on our server.
    I need to connect to a remote server to get data from there.for that i need to create a database link from apex.
    When i tried to create a database link from apex sql commands window it is showing insufficient privilages.
    So i created one database link from back end but it is not accessible from apex...
    can some one help me in this...
    its urgent.....
    thanks in advance

    Hi,
    You need create database link to schema that is assigned to your workspace (application parsing schema)
    Schema need have CREATE DATABASE LINK system privilege.
    Regards,
    Jari
    Edited by: jarola on Aug 1, 2011 3:34 PM
    See documentation
    http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10499/advnc.htm#BABBFICH

  • How can i Create Database Link

    Dear Expert,
    I have two servers on that there are two databases then
    how can i create database link.

    CREATE [SHARED][PUBLIC] DATABASE LINK link_name
    [CONNECT TO user IDENTIFIED BY password]
    [AUTHENTICATED BY user IDENTIFIED BY password]
    [USING 'connect_string']

  • How to create database link between 2 servers to exports schemas

    Could any one please give Steps to create database link between 2 servers (linux)  to exports schemas like AR, INV, GL.......etc

    Hi Mouni,
    As i suggest above, please use the REMAP_SCHEMA parameter, so that you can create those objects which are getting created in the Apps Schema in the XBSI schema, I have already provided the syntax above.
    ORA-31684: Object type VIEW:"XBSI"."XBSI_ORDER_LINE_INFO_V" already exists
    ORA-31684: Object type VIEW:"XBSI"."XBSI_SERIAL_NO_V" already exists
    ORA-31684: Object type VIEW:"XBSI"."XBSI_ONHAND_BALANCES" already exists
    ORA-31684: Object type VIEW:"XBSI"."XBSI_PURCHASE_ORDERS" already exists
    ORA-31684: Object type VIEW:"XBSI"."XBSI_ORDER_HEADER_INFO_V" already exists
    ORA-31684: Object type VIEW:"XBSI"."XBSI_ORGANIZATION_ITEMS" already exists
    ORA-31684: Object type VIEW:"XBSI"."XBSI_PE_FIND_RESULT" already exists
    You are facing these errors as you have already done the import, and when you try to re-import it says those objects are already available. If this fresh import, Please drop the the new user you have already created in the Datawarehouse instance, and recreate the User and start a fresh import.
    Hope this help!
    Thanks &
    Best Regards,

  • How to create Database link

    Hi all,
    While trying to create a database link i am getting the following error:
    Create Database Link Failed.
    ORA-01031: insufficient privileges
    Could you please tell me how to create a database link.
    Thanks
    Grishma

    Hi Grishma,
    Login as DBA (SYSTEM or SYS for ex.) in SQL*Plus and run this command:
    SELECT *
    FROM dba_sys_privs
    WHERE grantee = 'USERNAME'
    AND PRIVILEGE = 'CREATE DATABASE LINK'
    Change the USERNAME by the USER you're trying to create the database link from. (CAPITALS!)
    Dimitri

  • How to create database link between oracle and SQL Server

    Hello Everyone,
    Here i have Oracle Database 9i and SQL Server 2005 databases.
    I have some tables in sql server db and i want to access from Oracle.
    How to create a database link between these two servers
    Thanks,

    Thanks for Everyone,
    I was struggle with this almost 10 days....
    I created Database link from Oracle to SQL Server
    Now it is fine.........
    Here i am giving my servers configuration and proceedure how i created the db link...@
    Using Generic Connectivity (HSODBC) we can create db link between Oracle and SQL server.
    Machine (1)
    DB Version : Oracle 9.2.0.7.0
    Operating System : HP-UX Itanuim 64 11.23
    IP : 192.168.0.31
    Host : abcdbt
    Machine (2)
    Version : SQL Server 2005
    Operating System : Windows server 2003 x86
    IP : 192.168.0.175
    Host : SQLDEV1
    User/PW : sa/abc@123! (Connect to database)
    Database : SQLTEST (exsisting)
    Table : T (“ T “ is the table existing in SQLTEST database with 10 rows)
    Prerequisites in Machine (2):
    a)     Oracle 10g software
    b)     User account to access SQL Server database (sa/abc@123!)
    c)     Existing SQL Server Database (SQLTEST)
    d) Tables (testing purpose) (T)
    Steps:
    1)     Install Oracle 10.2.0.1 (Only SW,No need of database) *(Machine 2)*
    2)     Create a DSN where your windows Oracle 10g SW resides *(Machine 2)*
    Control panel >> Administrative Tools >> Data Source (ODBC) >> System DSN ADD
    You can follow this link also.....
    http://www.databasejournal.com/features/oracle/article.php/3442661/Making-a-Connection-from-Oracle-to-SQL-Server.htm
    I created DSN as
    DSN name : SQLTEST
    User : SA/abc@123! (Existing user account)
    Host : 192.168.0.175 (machine 2)
    Already I have 1 database in SQL Server with the name SQLTEST
    You can create DSN with different name also (not same as db name also)
    3)     Create a hsodbc init file in $ORACLE_HOME\hs\admin *(Machine 2)*
    Create init<DSN NAME> file
    Ex: initSQLTEST
    Copy inithsodbc to initSQLTEST
    And edit
    initSQLTEST file
    HS_FDS_CONNECT_INFO = SQLTEST    <DSN NAME>*
    HS_FDS_TRACE_LEVEL = OFF*
    save the file....@
    4)     Configure Listener.ora *(Machine 2)*
    LISTENER_NEW =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.175)(PORT = 1525))
    SID_LIST_LISTENER_NEW =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = SQLTEST) *+< Here SQLTEST is DSN NAME >+*
    (ORACLE_HOME = G:\oracle 10g\oracle\product\10.2.0\db_1)
    (PROGRAM = hsodbc))
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = G:\oracle 10g\oracle\product\10.2.0\db_1)
    (PROGRAM = extproc) )
    :> lsnrctl start LISTENER_NEW
    5)     Configure tnsname.ora *(Machine 2)*
    SQLTEST11 =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.175)(PORT = 1525))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = SQLTEST))
    (HS=OK)
    :> tnsping SQLTEST11
    If No errors then conti….
    6)     Configure a file *(Machine 1)*
    Cd $TNS_ADMIN ($ORACLE_HOME/network/admin)
    Create a file
    $ vi TEST_abcdbt_ifile.ora
    something=
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST =192.168.0.175) (PORT=1525))
    (CONNECT_DATA=
    (SID=SQLTEST))
    (HS=OK)
    $ tnsping something
    $ sqlplus system/manager
    Your connected to Oracle database *(machine 1)*
    create database link xyz connect to “sa” identified by “abc@123!” using ‘SOMETHING’;
    select * from t@xyz;10 rows selected.
    Thanks,
    Edited by: ram5424 on Feb 10, 2010 7:24 PM

  • How to create database link from oracle to sql server

    Please help with how to create database link from oracle to sql server
    Best regards,
    Vishal

    Please help with how to create database link from oracle to sql server
    Best regards,
    Vishal
    Hi Vishal,
    I found a lof of information regarding how to create a database link from Oracle to SQL Server, please see:
    https://www.google.co.in/?gws_rd=cr&ei=vd3XUvGFO8TgkAXqlYCADg#q=how+to+create+database+link+from+oracle+to+sql+server
    We discuss SQL Server related issue in this forum. If you have any more question regarding Oracle, please post it in Oracle communities forum for better support.
    Regards,
    Elvis Long
    TechNet Community Support

  • How to create database link between oracle9i database and oracle10g

    How to create database link between oracle9i database and oracle10g
    oracle9i database name "Prod" windows server 2003 ( 172.x.x.x)
    oracle10g database name "TEST" sun solaris 9 (165.x.x.x.x)
    Please help me on this

    For connections between 10.2 and 9.2 the 9.2 end MUST be at 9.2.0.4 or higher. Connections between 10.2 and 9.2.0.1, 9.2.0.2 or 9.2.0.3 are not supported.
    Connections between 10.2 and 9.0.1 was never been supported.
    Cheers !!!!
    Bhupinder

  • Steps to create database link

    i got these info from my teacher to create database link
    1.     Establish the network connection.
    2.     Shutdown the database. (SQL>shutdown immediate ;)
    3.     Open and modify the pfile and set GLOBAL_NAME = FALSE.
    4.     Create spfile from pfile. (SQL>create spfile from pfile;)
    5.     Startup database. (SQL> startup;)
    6.     Modify tnsnames.ora file, set the destination computer service name and other in formations.
    ASIF.com =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ONE)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = ORCL)
    7.     Crate database link .
    SQL>create public/private database link abc
         Connect to “scott”
         Identified by “tiger”
         Using ‘asif.com’;
    in step 3, which pfile should i modify
    i got a file in F:\oracle\admin\fahmi\pfile named init.ora.31620060327
    but there is no line like GLOBAL_NAME = FALSE
    so watching the sample i add this line in init.ora.31620060327
    global_names = FALSE
    am i right...........??
    can anyone help me...??
    i have some few other questions.....................

    The following is an excerpt from http://www.oracleutilities.com/OSUtil/ping.html
    The tnsping utility is used to determine whether or not an Oracle service can be successfully reached. If a connection can be established from a client to a server (or server to server), tnsping will report the number of milliseconds it took to reach the remote service. If unsuccessful, a network error will be displayed. However, tnsping will only report if the listener process is up and provides no indication of the state of the database.
    $ tnsping <net service name> <count>
    The “net service name” must exist in the tnsnames.ora file. This file is used by clients and database servers to identify server destinations. It stores the service names and database addresses. The “count” parameter is optional and will show the number of times the command should try to connect to the specified service name.
    After this I suggest you to check your $ORACLE_HOME/network/admin/sqlnet.ora.
    Look for what is configure for:
    NAMES.DEFAULT_DOMAIN
    NAME.DEFAULT_ZONE
    This must be compatible to what you are using in your tnsnames.ora.
    By the way, don't forget to check if there is a log file (sqlnet.log) in your $ORACLE_HOME/network/admin directory.
    Regards.
    RK

  • How to refresh a created database link?

    I have created a database link with the command:
    CREATE DATABASE LINK mydb.net CONN TO STRMADM IDENTIFIED BY strmadm_pw USING 'mydb.net'
    and then i changed strmadm_pw at the remote database, which may cause the database link inactive. but how to activiate the link again?

    The best thing is always to try it :
    SQL> show user
    USER is "SCOTT"
    SQL> create database link test connect to test identified by test using 'orcl';
    Database link created.
    SQL> create synonym test_tab for test_tab@test;
    Synonym created.
    SQL> select count(*) from test_tab;
      COUNT(*)
             1
    SQL> create or replace function test_func return number is
      2     counter number;
      3  begin
      4     select count(*) into counter from test_tab@test;
      5     return counter;
      6* end;
    SQL> /
    Function created.
    SQL> select test_func from dual;
    TEST_FUNC
             1
    SQL> conn / as sysdba
    Connected.
    SQL> alter user test identified by test1;
    User altered.
    SQL> conn scott/tiger
    Connected.
    SQL> select count(*) from test_tab;
    select count(*) from test_tab
    ERROR at line 1:
    ORA-01017: invalid username/password; logon denied
    ORA-02063: preceding line from TEST
    SQL> select test_func from dual;
    select test_func from dual
    ERROR at line 1:
    ORA-01017: invalid username/password; logon denied
    ORA-02063: preceding line from TEST
    ORA-06512: at "SCOTT.TEST_FUNC", line 4
    SQL> drop database link test;
    Database link dropped.
    SQL> create database link test connect to test identified by test1 using 'orcl';
    Database link created.
    SQL> select count(*) from test_tab;
      COUNT(*)
             1
    SQL> select test_func from dual;
    TEST_FUNC
             1
    SQL>                                                                                                                                                                                                                

  • Unable to access table even after creating Database link

    Hi
    I have created a data base link.It was created properly.
    The Syantax that I have used is follows:
    create database link X_link connect to User1 identified by User1 using 'Other_Database'
    And on running the query:
    select count(*) from table1@X_link
    I am getting the error as follows:
    TNS could not resolve the connect identifier specified... TNS: could not resolve the connect identifier specified.
    Please tell me where is the problem?
    Thanks in Advance

    Your database link does not work because the entry you used does not exist in the tnsnames.ora in the database $ORACLE_HOME.
    Login to the database server, set the environment, and try to tnsping the entry you used for the database link, then fix the tnsnames.ora file (probably in $ORACLE_HOME/network/admin)
    You can test a database link using :-
    select sysdate from dual@link;

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

  • Create database link not working..

    sir,
    i have created a database link using the following statement.
    create database link orcl.vishnu.com;
    but when i tried to insert the data it i get
    ora-02019 connect description for remote database not found..
    on both the database i have the same logins with the same passwords.. i have even created a serice name called orcl.vishnu.com. and it works well when connect manually.
    when i use the following statement it works..
    create database link link1 connect to vishnu identified by password using 'orcl.vishnu.com';
    and also the insert statement works.
    when i use the below statement then it fails again...
    create database link link1 connect to current_user using orcl.vishnu.com...
    it fails again.. saying that the userid and password is wrond...

    hi,
    You have must first read through the documentation and understand things, then you will understand the difference and you will not get the Issues.
    http://www.psoug.org/reference/db_link.html
    http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_5005.htm
    Wish you Happy New Year 2010...!!
    - Pavan Kumar N
    Oracle 9i/10g - OCP
    http://oracleinternals.blogspot.com/

Maybe you are looking for

  • Display Problem in my Lenvo G450

    hi,                   I own a lenovo G450 laptop,it is almost 2 years old.Yesterday i worked on it and it was  working good .when today i start this the screen started flickring shaking and nothing seen on it.when i contact the service centre in chan

  • Problem in Database EXPDP and IMPDP

    Dear Friends I am using Oracle 11G R2 (11.2.0.1.0) on Windows 7 Ultimate. I have some 50 tables (along with its data) and corresponding 40 VIEWS (based on those 50 tablees) in User "SYSTEM" schema. I want to take Export DUMP file of these 50 tables a

  • Advantage of using Encore DVD vs PremierPro to create DVD

    I'm just learning these products and have a basic question for the gurus out there. If I'm creating a DVD that just has a simple one-button (play) menu screen, what are the advantages and disadvantages to exporting the movie from PremierPro and impor

  • Migrated from MBP with moutain lion to new macbook pro retina display and now I have lion os

    After migrating from a time machine backup and logging in (had problems with that too and had to restart user password) the os version is 10.7.4 when it should be 10.8.2 Went to the app store and I have to pay again to get the upgrade.. Do i have to

  • Client-side Password Changes

    I have a Leopard server setup with user accounts, but no home directories. I plan on using the server for calendaring, dhcp, dns, vpn and some web applications. These web applications are configured to auth against the user's Open Directory account o