There's two ways - if you're talking about a different schema in the same
database, you can just grant access to the object and then use a synonym.
For example

MyTestDatabase
SchemaA
Table1

MyTestDatabase
SchemaB
Table2

To access table one from SchemaB, SchemaA would need to do the following:
grant select on table1 to [schemab]; <--- Really, you'd probably use a role
here, but you get the idea.

Then, in SchemaB, you can do this:
create synonym table1 for schemab.table1;

Then, you can select * from table1, just as though it's in your schema.

If your'e talking about different databases, then you're looking at a
database link. You'll need your DBA to give you rights to create links, then
you'd do something like this:

CREATE  DATABASE LINK mylink
CONNECT TO otherSchema
IDENTIFIED BY otherSchemaPassword
USING 'connectionString';

Then, you can create views in your schema for the objects in the other
schema like so:
create or replace view myVersionofTable1 AS select * from
[EMAIL PROTECTED];



On 1/3/06, Robert Everland III <[EMAIL PROTECTED]> wrote:
>
> In SQL server there is a USE command to change between different databases
> so that you don't have to name commands with the database.name . How would
> I do this with schemas in Oracle? I want to create a table, but not in my
> default schema.
>
>
>
> Bob
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228201
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to