DBMS_REDEFINITION error...
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: DBMS_REDEFINITION error...

  1. #1
    Join Date
    Sep 2001
    Location
    Düsseldorf, Germany.
    Posts
    588

    Question

    Hi,

    I am getting error while redefining simple table...
    User has execute privilege on DBMS_REDEFINITION package, but
    still I get privilege error..

    CONNECT SCOTT/tiger@ORCL

    CREATE TABLE jobs(
    Id NUMBER NOT NULL PRIMARY KEY,
    description VARCHAR2(100));

    INSERT INTO jobs VALUES (1,'Teacher');
    INSERT INTO jobs VALUES (2,'Supervisor');

    CREATE TABLE jobstemp(jobid NUMBER NOT NULL PRIMARY KEY,
    description VARCHAR2(200));

    EXEC DBMS_REDEFINITION.CAN_REDEF_TABLE('SCOTT','JOBS');
    EXEC DBMS_REDEFINITION.START_REDEF_TABLE('SCOTT','JOBS',-
    'JOBSTEMP',-
    'ID JOBID,-
    DESCRIPTION DESCRIPTION');

    Table created.

    1 row created.

    1 row created.

    Table created.

    PL/SQL procedure successfully completed.


    BEGIN DBMS_REDEFINITION.START_REDEF_TABLE('SCOTT','JOBS', 'JOBSTEMP', 'ID JOBID,DESCRIPTION DESCRIPTION'); END;
    *
    ERROR at line 1:
    ORA-01031: insufficient privileges
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 8
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 146
    ORA-06512: at line 1


    Please help!!!

    Thanks

    Sameer

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,448
    execute privs through role? if so do

    grant execute on DBMS_REDEFINITION to scott

  3. #3
    Join Date
    Sep 2001
    Location
    Düsseldorf, Germany.
    Posts
    588
    Yes... priviledge is already granted directly... and not through role...


  4. #4
    Join Date
    Sep 2001
    Location
    Düsseldorf, Germany.
    Posts
    588

    Smile

    Got the answer....

    USER also needs

    ALTER ANY TABLE,
    CREATE ANY TABLE,
    DROP ANY TABLE,
    LOCK ANY TABLE,
    SELECT ANY TABLE

    these privileges....


    Sameer

Posting Permissions

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



Click Here to Expand Forum to Full Width