Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: add table to hr user

Re: add table to hr user

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: Fri, 26 Oct 2007 16:40:49 -0700
Message-ID: <1193442049.537156.104470@z9g2000hsf.googlegroups.com>


On Oct 26, 5:03 pm, "fitzjarr..._at_cox.net" <fitzjarr..._at_cox.net> wrote:
> On Oct 26, 3:11 pm, Grzesiek <grzesiek.wilanow..._at_gmail.com> wrote:
>
> > Hi
>
> > I have created (in JDeveloper) a table "myTable". Now i want that
> > table to become hr user's table, i.e i want to have access to that
> > table after creating jdbc connection (hr schema) to it. How can i do
> > it?
>
> > Thanx
> > :-)
>
> It's all well documented in the ... ahem ... documentation found here:
>
> http://tahiti.oracle.com
>
> You'll need to grant hr access (select, insert, update, delete or any
> combination of those) to the table then connect as hr and create a
> synonym if you want hr to be able to access the table without using
> the owner.table_name syntax. Basically as the current table owner you
> would:
>
> SQL> grant select on mytable to hr;
>
> SQL> connect hr/hr
>
> SQL> create synonym mytable for someotherowner.mytable;
>
> SQL> select * from mytable;
>
> Again this is in the documentation and also in the newsgroup
> archives. A simple search would have answered your question before
> you asked it. And now it's been answered again.
>
> David Fitzjarrell

Grzesiek, other options include

create table hr.mytable select * from mytable (assuming you were not logged in as HR in which case HR would be the owner already)

Or you can use either traditional export and import utilities (see utilities manual)
exp file=mytable table=mytable userid=u/p imp file=mytable,dmp fromuser=me touser=hr

Or the new expdp and impdp versions with 10g+

If you are a developer you will find it well worth your time to read the Application Developers Guide - Fundamentals manual.

HTH -- Mark D Powell -- Received on Fri Oct 26 2007 - 18:40:49 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US