Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2003
    Posts
    3

    Unanswered: how can I change a table's owner?

    thanks in advance!

  2. #2
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    118
    You do that with export import:

    First you export the table (say table demo owner remi)

    c:\> exp system/manager tables="remi.demo" tables="remi.demo" log=expDEMO.log


    Now I want to change owner ship to jxc_hn, I import the table in the schema of jxc_hn

    c:\> imp system/manager tables="demo" tables="remi.demo" fromuser=remi touser=jxc_hn file=expDEMO.log log=impDEMO.log


    I hope this helps

    Remi
    Remi Visser

    Oracle Database Administrator
    (OCP certified 8i)

    Homepage: http://home.remidian.com/

  3. #3
    Join Date
    Apr 2002
    Location
    California, USA
    Posts
    482

    Smile

    Another way is to copy the data into another user schema:

    SQL> CREATE TABLE userB.tbs_name AS SELECT * FROM userA.tbs_name;

    You have to take care for any grants, indexes, sequences or constraints, too.



    Hope that helps,

    clio_usa - OCP - DBA


  4. #4
    Join Date
    Mar 2003
    Posts
    3
    thanks a lot.

    but the table is quite large,it has millons of records,so i want to find some simple ways.may be mofidy the system dictionary?

  5. #5
    Join Date
    Apr 2002
    Location
    California, USA
    Posts
    482

    Exclamation

    Don't even think about it, if you want to have a running database and paying job as Oracle DBA...


    Hope that helps,

    clio_usa
    OCP - DBA

  6. #6
    Join Date
    Mar 2003
    Posts
    3
    But ... really no way?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •