How to create a database link in someone else's schema?

I have access to Sys, but I don't have the passwords to all personal accounts. generally if you have a create any privilege you just do
create <object> <schema>.object_name ....
if i try this with a database link, the link gets created in my schema with the first part as part of its name.
so
create database link <user>.<db link> does not put the link in the other schema.
what do I do?

I assume Sybrand's suggestion works, but it is common not to know the schema passwords (who wants to remember them anyway?).
We use the time tested "db_su.sql" script:
-- db_su.sql: connect as another user
set term off
store set sqlplus_env rep
set pages 0 feed off ver off echo off term off
DEF user=&1
spo temp.sql
conn / as sysdba
select 'alter user &user identified by values '''||password||''';'
  from dba_users where username = UPPER('&user')
spo off
alter user &user identified by temp;
connect &user/temp
START temp.sql
@sqlplus_env
set term on:p

Similar Messages

  • How to create a database link on an ms acces data source

    Hello every body
    Is it possible to create a database link on an MS access data source under
    oracle 10 g and Apex ?
    If yes how to do it ?
    Thanks in advace

    I don't know what Apex is!!! But try to follow these instructions.
    It works for Oracle 9i.
    As far as I know, you are supposed to have installed other than ORACLE Client to complete these instructions.
    1. Control Panel / Administrative Tools / Data Sources (ODBC)
    Folder: System DSN /
    click add
    Choose : Microsoft Access Driver
    Data Source Name : my_test
    Description : any_description_you_want
    click Database/Select... : full pathname for <your_file.mdb>
    click OK
    Click OK
    2. Goto OH\hs\admin:
    2.1) Create a copy of "inithsodbc.ora" file giving it this name:
    initmy_test.ora
    2.2) Edit "initmy_test.ora" and change as below.
    # HS init parameters
    HS_FDS_CONNECT_INFO = my_test
    HS_FDS_TRACE_LEVEL = OFF
    3. Add this entry to listener ( Don't forget to stop/start the listener )
    (SID_DESC =
    (SID_NAME = my_teste)
    (ORACLE_HOME = <Path to OH> ) ### Ex: D:\ORANT901
    (PROGRAM = hsolesql)
    4. Now you need to add entries to point to the HS in the tnsnames.ora :
    access =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=<your_host>)(PORT=1521))
    (CONNECT_DATA=(SID=my_test))
    (HS=my_test)
    5. Now you need to go into the database and create the database link:
    CREATE PUBLIC DATABASE LINK "ACCESS_DB" USING 'access';
    6. select * from your_table@ACCESS_DB;
    HTH
    RK
    Message was edited by:
    RKravcenko

  • How to create a database link between an 8i (apps) database and APEX

    Want to link my Oracle APPS databse on 8i with Oracle XE and APEX. Any idea how to achieve this ?

    I don't know what Apex is!!! But try to follow these instructions.
    It works for Oracle 9i.
    As far as I know, you are supposed to have installed other than ORACLE Client to complete these instructions.
    1. Control Panel / Administrative Tools / Data Sources (ODBC)
    Folder: System DSN /
    click add
    Choose : Microsoft Access Driver
    Data Source Name : my_test
    Description : any_description_you_want
    click Database/Select... : full pathname for <your_file.mdb>
    click OK
    Click OK
    2. Goto OH\hs\admin:
    2.1) Create a copy of "inithsodbc.ora" file giving it this name:
    initmy_test.ora
    2.2) Edit "initmy_test.ora" and change as below.
    # HS init parameters
    HS_FDS_CONNECT_INFO = my_test
    HS_FDS_TRACE_LEVEL = OFF
    3. Add this entry to listener ( Don't forget to stop/start the listener )
    (SID_DESC =
    (SID_NAME = my_teste)
    (ORACLE_HOME = <Path to OH> ) ### Ex: D:\ORANT901
    (PROGRAM = hsolesql)
    4. Now you need to add entries to point to the HS in the tnsnames.ora :
    access =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=<your_host>)(PORT=1521))
    (CONNECT_DATA=(SID=my_test))
    (HS=my_test)
    5. Now you need to go into the database and create the database link:
    CREATE PUBLIC DATABASE LINK "ACCESS_DB" USING 'access';
    6. select * from your_table@ACCESS_DB;
    HTH
    RK
    Message was edited by:
    RKravcenko

  • How to Create Public database link in oracle 9i?

    Friends,
    OS: RHEL AS 3
    DB: 9iR2
    database name 1 = nubul
    database name 2 = test
    in the 'nubul' database server using system user.
    i created a database link to connect the 'test' database
    sql> create public database link test using 'test';
    database link created.
    then i logged in as normal user....
    sql> select count(*) from employee@test
    Error at line 1:
    ORA-12154: TNS: could not resolve service name
    where i am making mistake?
    i gave the linkname as my remote database name.
    am i have to make any entry in the tnsnames.ora?
    thanks & regards

    You have to remember that when you access a dblink, the database where the link is defined is acting as a client to the database to which the link points ... exactly the same as if you you were using sqlplus on the machine hosting the db where the link is defined. In other words, given:
    Host 'Host-src', with database 'db-src', with a dblink 'lk_target'
    Host 'host-trgt', with database 'db-trgt'
    When you connect to db-src and access lk-target, db-src is now acting as a client to db-trgt. Exactly as if you had opened sqlplus on host-src and connected directly to db-trgt. So, given the above scenario
    host-src$> sqlplus scott/tiger@db-src
    sql> select * from emp@lk_target;when you execute that SELECT to the link, the same tns considerations are in effect as if you had
    host-src$> sqlplus scott/tiger@db-trgtThe same tnsnames.ora entry, on the source machine, is required for both.

  • How to create a database link ?

    i want to create a database link.please give mesteps

    There is a chapter in the DBA Administration manual for versions 8.1, 9.2, and 10g on this topic which provide all the information you need.
    You will need to choose the type of database link: global, current user, or imbedded user and if you need a public or private link.
    Basically all you do is create a tnsnames.ora entry for the remote db and then create a database link (See SQL manual entry CREATE DATABASE LINK) that references the tnsnames.ora entry.
    The manuals or the entire manual set can be downloaded from technet.
    HTH -- Mark D Powell --

  • How to create & use database links

    i have 2 databases (oracle 8.1.6) and (oracle8.1.5)
    i want to call a function of one d/b from another
    i think this is possible via databse links.
    how do i go about creating and using them
    can someone guide me to a site or post an example .
    what all changes do i need to make in my configuration settings of the databases
    null

    Yes, you can do this with database links.
    Please see: http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/server.817/a76960/ds_admin.htm#22393
    null

  • How to create a database link to SQL Server from a RAC environment

    We have a 4 node RAC running 11.2.0.3 binaries on 64-bit linux.
    Grid owns the listener named listener.
    Oracle owns the database.

    Thanks all! But I tried to configure and I am getting
    TNS-01201: Listener cannot find executable /u01/app/oracle/product/11.2.0.3/dbhome_1/bin/InfoEdb10 for SID InfoEdb10
    Listener failed to start. See the error message(s) above...
    So! What I did was
    1. Configure the odbc from the OS (only one node) and create the DSN and its odbc files.  connectivity works from Operating Systems.
    2. Create the listener entry (under GRID) user.
    3. Create the remotedb.ora file under $ORACLE_HOME/hs/admin
    --- Here is listener.ora file
    LISTENER_NODE1_TG =
       (DESCRIPTION_LIST =
        (DESCRIPTION =
           (ADDRESS = (PROTOCOL = TCP)(HOST = devrac-a-01-vip.cssd.pitt.edu)(PORT = 1549)(IP = FIRST))
           (ADDRESS = (PROTOCOL = TCP)(HOST = devrac-a-01.cssd.pitt.edu)(PORT = 1549)(IP = FIRST))
    SID_LIST_LISTENER_NODE1_TG =
       (SID_LIST =
           (SID_DESC =
             (SID_NAME = InfoEdb10)
             (ORACLE_HOME = /u01/app/oracle/product/11.2.0.3/dbhome_1)
             (ENVS = "LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0.3/dbhome_1/lib")
             (PROGRAM = InfoEdb10)
    any  help is appreciated

  • How to create a database link to connect to Progress

    I using 10g (10.2.0.4) and want to connect to progress 9.x using a databaselink.
    Which are the steps, examples to acomplish this?.

    You have to use the 11g Database Gateway for ODBC (DG4ODBC) to connect from Oracle 10.2.0.4 to Postgres.There's a note on My Oracle Support how to configure the gateway - please have a look at:
    How to Configure DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX Itanium) to Connect to Non-Oracle Databases Post Install (Doc ID 561033.1)
    I would recommend you to use the latest gateway release (11.2.0.3) which can be downloaded from My Oracle Support portal as well. Just click on Patches and Updates and look for the 11.2.0.3 patch set:
    Patch 10404530: 11.2.0.3.0 PATCH SET FOR ORACLE DATABASE SERVER
    Although it is a patch set this software can also be used to install the gateway from scratch.
    Check out the readme as it lists which ZIP file contains the gateway software you have to download.
    The DG4ODBC gateway is for free and its license is included in the Oracle database license. You only need to make sure you have a suitable ODBC driver which is able to connect to your Postgres database.
    Best regards,
    Klaus

  • How do you create a database link in Forms9i

    I am writting and application that is to connect to multiple databases and do given task, but the triggers I assign to items only work in the database that you connect to for forms to run.
    How do you create a database link in Forms9i?
    Thank you in advance for your reply.
    Travis

    It seems like you will have to have database links set up in all your databases to point to all other remote databases and have a common global naming scheme for all your objects so that no matter what database you log into you will have access to all objects in the universe.

  • How to create citadel database and link it to an existing project library programatically?

    hi,
    does anyone knows how to create citadel database progarmatically and linking it with my project library programatically?
    samriddh sarbalhi
    [email protected]

    hi,
    i have designed an application having four security levels like administrators, engineers, operators & guests.
    now i want that whenever the guest logins in my application, windows components on the desktop will not be accessible to him means he can only view my application but he will not be able to view start menu on the task bar of the windows page or any icon on the desktop.
    please tell me how to accomplish it progarmatically using labview.
    the appropriate response will be highly appriciable.
    thanks
    samriddh sarbalhi
    [email protected]

  • How to create a database for sample code from Tutorial/Book?

    I want to try out the sample code from [http://shop.oreilly.com/product/0636920013471.do] for the book SQL Pocket Guide 3rd Ed.
    I have downloaded the oracle vm/appliance for oracle 11g2 and I have started sqlplus as sysdba.
    I'm feeling overwhelmed with these links describing how to create a database:
    [http://www.adp-gmbh.ch/ora/admin/creatingdbmanually.html]
    [http://tldp.org/HOWTO/Oracle-7-HOWTO-3.html]
    [http://www.adp-gmbh.ch/ora/admin/creatingdbmanually.html]
    (1) What is the command to list the existing databases?
    (2) What is the command to delete an existing database?
    (3) When creating a new database with the create database command, is it necessary to specify the logfile, character set, national character set, datafile, sysaux datafile, undo tablespace, temp table space? Do these have reasonable defaults? I'm not sure what proper directories are to specify for Linux and the examples are for windows.
    Can someone give me a simplified create database command to create a database called 3rdEdPocketGuide? Should I follow the example at [http://tldp.org/HOWTO/Oracle-7-HOWTO-3.html] and instead of orcl use 3rdEdPocketGuide?
    (4) What command do I use to execute the script that comes with the book SQL Pocket Guide 3rd Ed? This is the script that has all the drop table, create table and insert commands in it.
    (5) What command do I use in sqlplus to set the current default database prior to running this script? Perhaps this is the connect command? I don't want my script to create tables in the system database.
    (6) I tried the command "connect 3rdEdPocketGuide" and it prompted for a password! Yikes! What password? Do I need to specify a password when I create a database? I cannot tell if I have successfully created such a database or it is just prompting me for a password to thwart malicious users. Is it is possible to create databases which don't require a password or maybe a zero length password?
    Thanks
    Siegfried
    Edited by: user8816970 on Sep 26, 2012 12:01 PM
    Edited by: user8816970 on Sep 26, 2012 12:18 PM

    user8816970 wrote:
    Paul,
    Thanks! I tried changing my profile name to siegfried but I'm not seeing the change...
    Anyway, I'm trying your suggestion to use SQL Developer which was already installed in the virtual box appliance and I cannot figure out how to get a connection.
    When I use the defaults of sid=xe, port=1521, hostname=localhost and specify
    username=sysdba
    password=
    I get status: failure - test failed: listener refursed connection with the following error: ORA 12505, TNS: listener does not current know of sid given.
    So I try sid=orcl and that works better: status: failure - test failed: ORA-01017: invalid username/passowrd; login denied
    OK, sqlplus let me in with out a password, why does not this work?
    So I try checking the box for "OS Authentication" and I get the same error!
    Hoek: I tried searching the documentation and found "3 Exploring Oracle Database with SQL Developer" at http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/toc.htm but following those directions did not help. Can you be more specific? The directions were for a tutorial and I need to know what the passwords are for the database set up with [http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html|http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html] . I also found [http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG|http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG] but that did not help either.
    Everyone:
    Do I need to create a user using SQL*Plus first so I can login with "Oracle SQL Developer" so I create my database called? What would be the "create user" command I would execute?
    OK, so I run sqlplus and issue these commands
    create user siegfried identified by abc ;
    grant connect to siegfried ;
    connect siegfried/abc;
    Now, how do I create a database? In Microsoft SQL Server one has to create a database first and if you just start creating tables without creating a database first, the tables will be created in the system database and this is usually undesirable.
    Sometimes a database is known in the java connection string as the catalog. Is there any such analog in oracle SQL plus?
    So now what do I do? I want to create a bunch of tables using my script I downloaded from 3rd Ed SQL Pocket Guide. Does my new user "siegfried" have the right to create tables? I guess I could try but I don't want to create tables in the system database.
    I noticed I can also use "Oracle SQL Developer" to connect with my new "siegfried" account. It seems that I should have been able to connect with sysdba... strange.
    So now I am connected in the "Oracle SQL Developer" and I see no list of databases.
    Thanks!
    Siegfried
    >Paul,
    Thanks! I tried changing my profile name to siegfried but I'm not seeing the change...
    Anyway, I'm trying your suggestion to use SQL Developer which was already installed in the virtual box appliance and I cannot figure out how to get a connection.
    When I use the defaults of sid=xe, port=1521, hostname=localhost and specify
    username=sysdba
    password=
    I get status: failure - test failed: listener refursed connection with the following error: ORA 12505, TNS: listener does not current know of sid given.
    So I try sid=orcl and that works better: status: failure - test failed: ORA-01017: invalid username/passowrd; login denied
    OK, sqlplus let me in with out a password, why does not this work?
    So I try checking the box for "OS Authentication" and I get the same error!
    Hoek: I tried searching the documentation and found "3 Exploring Oracle Database with SQL Developer" at http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/toc.htm but following those directions did not help. Can you be more specific? The directions were for a tutorial and I need to know what the passwords are for the database set up with [http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html|http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html] . I also found [http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG|http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG] but that did not help either.
    Everyone:
    Do I need to create a user using SQL*Plus first so I can login with "Oracle SQL Developer" so I create my database called? What would be the "create user" command I would execute?
    OK, so I run sqlplus and issue these commands
    create user siegfried identified by abc ;
    grant connect to siegfried ;
    connect siegfried/abc;
    above does NOT use SQL*Net to connect to the instance
    >
    Now, how do I create a database? In Microsoft SQL Server one has to create a database first and if you just start creating tables without creating a database first, the tables will be created in the system database and this is usually undesirable.
    Sometimes a database is known in the java connection string as the catalog. Is there any such analog in oracle SQL plus?
    So now what do I do? I want to create a bunch of tables using my script I downloaded from 3rd Ed SQL Pocket Guide. Does my new user "siegfried" have the right to create tables? I guess I could try but I don't want to create tables in the system database.
    I noticed I can also use "Oracle SQL Developer" to connect with my new "siegfried" account. It seems that I should have been able to connect with sysdba... strange.
    So now I am connected in the "Oracle SQL Developer" and I see no list of databases.SQL Developer can only connect to the instance via SQL*Net
    >
    Thanks!
    Siegfrieda database in SQL Server is same as schema/user in Oracle

  • ERROR WHILE CREATING A DATABASE LINK USING HETEROGENEOUS SERVICES

    I'm creating a database link with the Oracle Dataware Builder, and i get the following error:
    Probando...
    Fallo.
    SQL Exception
    Error del repositorio: Excepción SQL.
    Nombre de la Clase: CacheMediator.
    Nombre del Método: getDDEntryFromDB.
    Mensaje de Error del Repositorio: ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC][Informix][Informix ODBC Driver][Informix]Incorrect password or user [email protected] is not known on the database server. (SQL State: 28000; SQL Code: -951)
    ORA-02063: preceding 2 lines from PRUEBA_SEH
    As you can see i'm using heterogeneus services to connect to a informix database. ALTIADM is a valid user for that database, i don't send my ip address 192.168.0.62, but the error says "[email protected] is not known in the database server". how can i solve it?????

    Right places to ask this question are
    Heterogeneous Connectivity
    Warehouse Builder

  • ERROR WHILE CREATING A DATABASE LINK TO INFORMIX

    I'm creating a database link with the Oracle Dataware Builder, and i get the following error:
    Probando...
    Fallo.
    SQL Exception
    Error del repositorio: Excepción SQL.
    Nombre de la Clase: CacheMediator.
    Nombre del Método: getDDEntryFromDB.
    Mensaje de Error del Repositorio: ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC][Informix][Informix ODBC Driver][Informix]Incorrect password or user [email protected] is not known on the database server. (SQL State: 28000; SQL Code: -951)
    ORA-02063: preceding 2 lines from PRUEBA_SEH
    As you can see i'm using heterogeneus services to connect to a informix database. ALTIADM is a valid user for that database, i don't send my ip address 192.168.0.62, but the error says "[email protected] is not known in the database server". how can i solve it?????

    Right places to ask this question are
    Heterogeneous Connectivity
    Warehouse Builder

  • How to create a dynamic link in a Form to link to a specific FOLDER

    Hello,
    I have created a reports of all employees of my department.
    This reports shows me the empno and ename
    When I clicked on a empno ( for example empno = 1 ) then then I got a MASTER DETAIL FORM about that employee(empno = 1) .
    Who he or she is and which course he or she had followed.
    I want create a dynamic link in the MASTER DETAIL FORM which shows me directly the folder of that employee ( in this example folder 1 ).
    If I clickt on the report with all employees of my department on an other number ( for example empno = 3333333) then if I click on the dynamic link in the MASTER DETAIL FORM I want to see the folder of employee 3333333 !!! You know what I mean ?
    What I want to know is, how to create a dynamic link that shows me directly a folder which is dependent on which empno I had clicked on in the report ( report with employee numbers and ename )
    Is there any way to pass some parameters into a link to a Folder ? Is this possible in Portal ? Does anyone know how to do this, or do you have a suggestion how to solve this problem ?
    Thanks a lot !!!
    Chu Lam

    Hi Chetan,
    I am glad that someone had replied on my question.
    I will explain it to you again.
    I have created a report that shows me all employees. If I click on a employee number then I get an MASTER DETAIL FORM on my screen with all the information(where he works now and which number I have to dial ifhow can I reach him by telephone) of that employee on which number I clicked on.
    I really like this mechanism. (You click on a number and the information that you see in the next screen is dependent of the number you clicked on ! )I have created all this. It works fine.
    What I want is to expand this example.
    Every employee has a FOLDER (yes, those ones in Content Area ) which they can insert text or image into that folder. The folder name is just the employee number. ( employee with employee number 3303, he owns a folder which is named 3303 and an employee with empno 9999, he or she owns a folder with the name 9999. )
    Every employee can tell more about himself in that FOLDER by iserting text and images. For example : What he likes, pictures of his vacation, something like this.
    What I want is this :
    If I click on the first report,which provides me all employees on screen, on a employee number 3303 then I get a Master Detail Form on my screen with all information about that employee with employee number 3303. And I want in this MASTER DETAIL FORM to create a link that shows me directly the FOLDER of that employee ( 3303), so I can learn more about employee with employee number 3303. But I don't know how to create this link.
    That link had to be dependent on the employee number. The difficult thing about this link is that this link had to be dynamic.
    I hope this will make it clear to you :
    (report all employees:)
    empno ename
    3301 john smith
    3302 peter clark
    3303 wilson jones
    If I click on a empno ( for example 3303) then I get a MASTER DETAIL FORM which provides me information.
    (MASTER DETAIL FORM )
    EMPNO 3303
    ENAME wilson jones
    department New York
    mobile number 98908763
    Company tel. no day
    AOL 097485838 monday till wednesday
    Oracle 04848584333 thursday and friday
    LINK
    (what I want is to create a link here )
    If I click on LINK in this MASTER DETAIL FORM then I want to link to the FOLDER of this employee ! ( In this example it is FOLDER 3303.
    BUT IF I CLICKED ON THE FIRST REPORT ON A DIFFERENT NUMBER ( FOR EXAMPLE 3301) THEN IF I CLICK ON LINK IN THE MASTER DETAIL FORM THEN I HAVE TO LINKED TO FOLDER 3301.
    I just want to know how to make a link like this ( create a dynamic link to a specific folder ).
    Thanks in Advance.
    Chu

  • Creating a database link to SQL server

    Hi All,
    How can I create a database link from Oracle9i Enterprise Edition Release 9.2.0.1.0 DB to MS SQL Server database.
    Thanking You
    Regards Lakmal

    It depends on your requirements.
    You can use either Generic Connectivity or Transparent Gateways.
    More information can be found here:
    http://www.oracle.com/technology/products/gateways/index.html

Maybe you are looking for