Solved

linking different user/schema

Posted on 2010-11-30
8
322 Views
Last Modified: 2012-05-10
Hi,
I want to know is a way to linking different user/schema on same database other than dblink?
e.g. abc/abc007@samedb , def/def007@samedb
Will it must using dblink?
or any other way to do linking?
Thank  you!
Francis SZE
0
Comment
Question by:fsze88
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
8 Comments
 
LVL 12

Accepted Solution

by:
enachemc earned 200 total points
ID: 34237562
you can use schemas directly, no need to use DB Links if you're on the same DB

you just say:

select * from a,schema.b b
where a.id = b.f_id
0
 
LVL 1

Assisted Solution

by:sunny25
sunny25 earned 200 total points
ID: 34237844
First you need to grant privileges on the objects of abc/abc007 to def/def007 and then can access those objects in def/def007 schema just the way enachemc explained
0
 
LVL 15

Author Comment

by:fsze88
ID: 34237853
what's that grant statement?
Thank YOU!

Francis SZE
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Assisted Solution

by:sunny25
sunny25 earned 200 total points
ID: 34237868
grant privileges like select,insert or excute etc. to other schema
eg:
abc has a table A and you want to access this table in user schema def,
then run below statement in abc schema
grant select on A to def;
and in user schema def you can query: select * from abc.A;
0
 
LVL 12

Assisted Solution

by:enachemc
enachemc earned 200 total points
ID: 34237869
grant select any table to &user;
grant delete any table to &user;
grant update any table to &user;
grant insert any table to &user;
0
 
LVL 15

Author Comment

by:fsze88
ID: 34238417
wait,,
select * from a,schema.b b
where a.id = b.f_id

schema.b is meaning username.b?

select * from a,def.b b
where a.id = b.f_id
0
 
LVL 5

Assisted Solution

by:manzoor_dba
manzoor_dba earned 100 total points
ID: 34238893
Hi,

You need to grant privilges to other schema (user) , so that the other user can
do the
Hope the below examples clears your doubt.

username :  abc
his object  : emp

username : def
his object : employ.

as abc user execute below.
> grant select,insert, update,delete on emp to def;

as def user execute below.
> grant select, insert, update,delete on employ to abc.

Once the privileges are granted you can do the above said dml operation on the tables of the other schema..

Thanks..
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question