Host unlimited blogs, sites, forums for $4.95 only with this host

Oracle Hosting : How to access the tables from others user

Finding a good web host for your database sites is a big problem. Check our recommended host for database hosting or the datacenters with the most powerful and reliable dedicated servers suited for large databases.

This databases discussion was started by jp7234 on 03 July 2009

best database hosting

Here I have written a Package in Oracle 10g as follow:
①HEAD:
CREAT OR REPLACE PACKAGE cm.com
IS
PROCEDURE IsOK(name OUT VARCHAR2);
END cm.com;

①BODY:
CREAT OR REPLACE PACKAGE BODY cm.com
IS
PROCEDURE IsOK(name OUT VARCHAR2)
IS
w_person_name VARCHAR2(50);
w_sys_name VARCHAR2(50);

BEGIN
SELECT person_name INTO w_person_name from person_t;
SELECT sys_name INTO w_sys_name from system_t;
name := w_person_name||w_sys_name;
END IsOK;

END cm.com;

Here:
①person_t is belonged to the user [cm]
②system_t  is belonged to the user [dm]. However the user [cm] have the only previlage [select] to the dm.system_t.

The problem is:
When I compiled the package, there was a error : the table or view system_t not exist…. But, in PL/SQL DEVELOPER, I logged in with the user cm, I could get the data form system_t with the statement:
①select * from system_t.

I can use the following way to get data in the package:
①SELECT sys_name INTO w_sys_name from dm.system_t;
BUt I do not want to use the shema in front of the table [system_t] or synonyms. Are there other ways for this?

Learn more Oracle databases here. Should you need to go for trustworthy hosting services for all database related sites, we suggest this host for virtual database hosting and this one for dedicated databases hosting

This entry was posted in Databases Bookmark this post and come back later for the best web hosting coupons.

This web hosting blog is proudly hosted with reliable Hostgator webhosting for only one cents through this hostgator coupon. If you're new here, you may want to subscribe to this web hosting RSS feed

-->