Negative effects by using DBMS_REDEFINITION package

Hello everybody,
I am looking for all 'bad' side effects of using the package.
I am in project where the definition of tables changes.
Sometimes a column needs to be placed in the middle of the table.
Up to now there are scripts which doing a lot of drops of columns, updates, add adds again.
My idea was to use the package, which I could test successfully.
Now I learned, that the grants to the table are lost.
What else should be concerned by using the package?
Thanks

Hi,
Sometimes a column needs to be placed in the middle of the table.hmm and why do you need some redefinition/reorg for the table - just put the columns on the right place in the select statement?
Now I learned, that the grants to the table are lost.hmm not "really"... have a look at the procedure "COPY_TABLE_DEPENDENTS".
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_redefi.htm#sthref5656
-> This subprogram is used to clone the dependent objects like grants, triggers, constraints and privileges from the table being redefined to the interim table (which represents the post-redefinition table).
Side effects:
You need to create/rebuild the indexes.. because of the rowids change.
Btw. your scenario seems a little bit "strange" to me...
Regards
Stefan

Similar Messages

  • Error using dbms_redefinition package

    Hi,
    I am trying to use dbms_redefinition package to add a column to a table using primary key method
    SQL> conn / as sysdba
    Connected.
    SQL> grant execute on sys.dbms_redefinition to hr;
    Grant succeeded.
    SQL> grant dba to hr;
    Grant succeeded.
    SQL> conn hr/<password>
    Connected.
    SQL> create table tab1(roll_no number constraint roll_pk primary key,last_name varchar2(30));
    Table created.
    SQL> insert into tab1 values (1,'Hall');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> insert into tab1 values (2,'Mall');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> insert into tab1 values (3,'Roll');
    1 row created.
    SQL> commit;
    Commit complete.
    Adding required column
    SQL>
    SQL> alter table tab1 add(first_name varchar2(30));
    Table altered.
    Checking if table can be redefined
    SQL> exec dbms_redefinition.can_redef_table('HR','TAB1',DBMS_REDEFINITION.CONS_USE_PK);
    PL/SQL procedure successfully completed.
    Creating interim table
    SQL> create table tab2 as select roll_no,first_name,last_name from tab1 where 1=2;
    Table created.
    Adding primary key to interim table
    SQL> alter table tab2 add constraint roll_pk_1 primary key (roll_no);
    Table altered.
    Starting redefinition :
    SQL> exec dbms_redefinition.start_redef_table('HR','TAB1','TAB2','ROLL_NO,FIRST_NAME,LAST_NAME');
    BEGIN dbms_redefinition.start_redef_table('HR','TAB1','TAB2','ROLL_NO,FIRST_NAME,LAST_NAME'); END;
    ERROR at line 1:
    ORA-00439: feature not enabled: Advanced replication
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 52
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 1646
    ORA-06512: at line 1
    SQL>
    Could you please help.
    Thanks,
    Haider

    You can, yes. That's why CAN_REDEF_TABLE and START_REDEF_TABLE both have an OPTIONS_FLAG argument that lets you specify whether you want to use the primary key or the ROWID to redefine the table.
    SQL> drop table foo;
    Table dropped.
    SQL> create table foo( col1 number, col2 number );
    Table created.I can't redefine the table using the primary key since there is no primary key
    SQL> ed
    Wrote file afiedt.buf
      1  begin
      2    sys.DBMS_REDEFINITION.CAN_REDEF_TABLE ( 'SCOTT', 'FOO' );
      3* end;
    SQL> /
    begin
    ERROR at line 1:
    ORA-12089: cannot online redefine table "SCOTT"."FOO" with no primary key
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 139
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 1782
    ORA-06512: at line 2But I can use the ROWID
    SQL> ed
    Wrote file afiedt.buf
      1  begin
      2    sys.DBMS_REDEFINITION.CAN_REDEF_TABLE ( 'SCOTT', 'FOO', dbms_redefinition.cons_use_rowid );
      3* end;
    SQL> /
    PL/SQL procedure successfully completed. Justin

  • Use of DBMS_REDEFINITION Package with Goldengate

    All,
    I am currently using OGG 11.2.1.0.4 in an active-passive configuration and have an opportunity where I need to re-partition a table due to performance reasons. Given my up-time requirements, using the DBMS_REDEFINITION package seems to be a really good option. I am concerned as to how this would work with Goldengate. I do not currently use DDL replication with this extract/pump/replicat, but would this be the way to use this package and do the REDEFINITION simultaneously on both sides? Is there a better way?
    I haven't found anything online pertaining to the use of this package and Goldengate so I am hoping this forum can help out.
    Thanks!

    From the 11.2 admin guide:
    Create an empty interim table (in the same schema as the table to be redefined) with all of the desired logical and physical attributes. If columns are to be dropped, do not include them in the definition of the interim table. If a column is to be added, then add the column definition to the interim table. If a column is to be modified, create it in the interim table with the properties that you want.The table being redefined remains available for queries and DML during the entire process.
    Execute the FINISH_REDEF_TABLE procedure to complete the redefinition of the table. During this procedure, the original table is locked in exclusive mode for a very short time, independent of the amount of data in the original table. However, FINISH_REDEF_TABLE will wait for all pending DML to commit before completing the redefinition.>
    If you did not want to create an interim table, then this approach is not going to work for you. There is no requirement for you to create anything other than the interim table, and any dependent objects can be done automatically, including materialized views. Where did you see that you have to create mview logs?

  • Which effects were used in this video?

    In the link below does any one know which effects were used. I am creating a video but I would like to recreate some of these effects, specifically the two videos over lapping with transparency, the fast reverse clips, and any other you can see from the video would be helpful.  Thanks!
    KNITZ Fall 2014 - For Love & Lemons | Facebook

    Overlapping with transparency is simple enough. Just put on video on track one and the other on track two. Then set the track two video to 50% opacity and adjust to taste.You will probably spend some time changing the position of one or both of the videos.
    Shooting on green screen makes it easier to overlap videos though. Or, if not a chroma key color, at least a solid color.
    Reversing a video is a simple matter of changing the speed to a negative number.
    There really isn't anything too complicated in that video as far as I can tell. A lot of cropping and masking and transparency.  Not much else.

  • Move index to a different tablespace using dbms_redefinition?

    Hi all, I am trying to move indexes to new tablespaces. Can I use oracle built-in package DBMS_REDEFINITION for this? As far as I know dbms_redefinitoin only works for tables rebuilt online? I am running 10.2.0.5 on linux red hat, and the index sizes from 100MB to 10gb. Thank you in advance all.

    Since one can seamlessly move an index from one tablespace to another by simply doing:
    SQL>  alter index <index_name> rebuild tablespace <tablespace_name>;even considering DBMS_REDEFINITION for this makes no sense at all.
    If your boss has any further questions, show him the Oracle documentation:
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_redefi.htm
    Quote from that page:
    "The DBMS_REDEFINITION package provides an interface to perform an *online redefinition of tables*."
    (Emphasis added by me.)
    Hope that helps,
    -Mark

  • Negative Effects of Turning off Spotlight on Time Machine Drive

    My external WD HD used exclusively for TM was going into what seemed to be an infinite spotlight reindexing loop after I upgraded to 10.6.8.  The only way I have been able to ge it to stop was to select that drive under spotlight privacy settings.  Does anyone know of any negative effects of doing this, other than the obvious negative of not being able to use spotlight on my TM backups?
    Many thanks!

    @sanjampet; What does a link to Xsan servers have to do with Time Machine?
    PJGNC wrote:
    My external WD HD used exclusively for TM was going into what seemed to be an infinite spotlight reindexing loop after I upgraded to 10.6.8.  The only way I have been able to ge it to stop was to select that drive under spotlight privacy settings.  Does anyone know of any negative effects of doing this, other than the obvious negative of not being able to use spotlight on my TM backups?
    Many thanks!
    Read Pondini's excellent TM articles; http://pondini.org/TM/Home.html
    Spotlight can't read the TM volume; it should be excluded as you have done.

  • SMC FanControl Negative Effects!!!!!!....

    I understand that a lot of people are using SMC fancontrol, a population which also includes myself...
    however, I came to wonder....does it have any negative effects on the Macbook?
    for instance, I set my default rpm at 2800 rpm....compared to the apple's default, 1500 rpm......
    i'm not really concerned about the battery...but I must say..i'm worried about the fans getting weared out.....
    does anyone know if it actually is bad to use smc fancontrol??
    tnk u!~~~

    From a purely physics point of view... increasing the minimum fan speed will reduce the life of your fan. As a general rule, the fan in the MacBook will not crank up until it gets to the mid 60s or a bit higher. Under average use (or just idling and not being used at all) the fan in your MacBook will be at idle speed (whatever speed to set it to using the utility). The speed at which the fan runs and the duration it runs at the speed increases friction and causes additional heat in the bearings. Having said that, yes, increasing the minimum fan speed will reduce the life of the fan. The question is will it reduce it to a point of failure during the life of the notebook. As the MacBooks are still very new, this is hard to determine. Computer fans have a very high mean-time-between failure rate. The fans on desktop systems and servers run at fairly high RPMs 24/7 and very seldom fail, even over quite a few years. It is unlikely that increasing the minimum fan speed on your MacBook will impact the fan within the lifetime of your computer. The only exception being that if there is a problem / fault with your fan to start with. An increase in the fans rotational speed may cause this flaw to appear sooner.

  • Error while sending a mail using UTP_MAIL package in Oracle 10g

    Hi,
    We are using UTP_MAIL package to send a mail from Oracle 10g.We have follwed the following steps ...
    SQL> connect sys/password as sysdba
    Connected.
    SQL> @$ORACLE_HOME/rdbms/admin/utlmail.sql
    Package created.
    Synonym created.
    SQL> @$ORACLE_HOME /rdbms/admin/prvtmail.plb
    Package body created.
    SQL > alter system set smtp_out_server = '<mail_server_ip:25>' scope =spfile;
    System altered..
    Now we try the code
    begin
    utl_mail.send(
    sender => 'sender's mail',
    recipients => 'receiver mail',
    CC => 'optional',
    subject => 'Testing utl_mail',
    message => 'Test Mail'
    end;
    But we get the following error...
    ERROR at line 1:
    ORA-29278: SMTP transient error: 421 Service not available
    ORA-06512: at "SYS.UTL_SMTP", line 21
    ORA-06512: at "SYS.UTL_SMTP", line 97
    ORA-06512: at "SYS.UTL_SMTP", line 139
    ORA-06512: at "SYS.UTL_MAIL", line 405
    ORA-06512: at "SYS.UTL_MAIL", line 594
    ORA-06512: at line 2
    We also tried connecting to the mail server through telnet .But it is not getting connected..
    Please help us to solve the issue.

    From your own posting you may have the clue, if you try to access your mail server through telnet and it is not successful, it means the service is down or there are networking issues.
    On pre 10gR2 versions there was a bug 4083461.8. It could affect you if you are on 10gR1
    "Bug 4083461 - UTL_SMTP.OPEN_CONNECTION in shared server fails with ORA-29278 Doc ID:      Note:4083461.8"
    This was fixed on 10gR2 base and on 9.2.0.8.0
    ~ Madrid

  • How to delete data from a file using IO package

    Hi All,
    i am trying to remove some content of the file.
    this content is not at starting of file not even at end of file.
    can anybody tell me how can i delete number of lines from file using IO package.

    iam having some data in text file .ex:in flowrist.txt
    12/5/07,500,300,6000 like many set of datas are
    there.In these if i want to delete the data based on
    the date which i specified.How to do this specific
    deletion?You need to open a stream to read in the file and then use the indexOf method provided in the Sting class to check if the line contains the date or whatever String you are looking for, if so then skip that line and store or re-write the lines you wish to keep, as well as some extra lines you may wish to add.
    Take a look below at this example found on Google.
    http://www.java-tips.org/java-se-tips/java.io/how-to-read-file-in-java.html
    The above read a file line by line and prints it to console. You should be able to modify this, instead of using System.out to print the line you should use index of to check the lines for a date/String. Index of return -1 if the String you specify is not in the line you parse.

  • Help finding and using a package

    hi guyz,
    Iam new to this forum and i need this info urgently. so plz try to help me.
    I want to use the package below in an applet to convert my TemporaryRegistrationPermit to create a PNG file and then print it.
    how can i get the above package. I searched a lot on net and even on IBM website but never found it. How can i get it and include the class file in an applet and use the methods in it.Is there any other way to include this package in my applet, i mean a URL pointing to this class file.
    package com.ibm.gs.houston.saz.trp.utils.TemporaryRegistrationPermit
    I would really appreciate an early reply
    thank you
    tarun

    How do you know you need this package ? You know the path to it, so you must have seen it referenced somewhere.
    Some background please, but it sounds like it's an IBM internal class of some sort, so I wouldn't get your hopes up unless you have legitimate access to this or know it to be freely available.
    D.

  • Submitting Oracle job via OCCI using dbms_job package

    I am using 10g client to connect to a 9i Database on Redhat Linux AS 3.0.
    I am trying to submit a job via OCCI. I get back a jobId, but don't see the job in the user_jobs table or the result of the job being executed.
    I am using occi::Statement in the following way :
    stmt = connection->createStatement("begin dbms_job.submit(:v1, 'submitJobTest;', sysdate,'sysdate+1'); end;");
    // where submitJobTest is a stored procedure
    stmt->registerOutParam(1, OCCIINT);
    stmt->executeUpdate();
    int jobId = stmt->getInt(1);
    I get back a job id, but can't find it in the user_jobs. The first time I executed the program, i got back jobId 0, then 1 and so on..
    Any ideas? Do I need to use dbms_scheduler package?
    Thanks, Nilofer

    Good catch!
    Had a bug, in that my autocommit was not being set!
    Works now.
    Thanks,
    Nilofer

  • Does anyone know how the cutout filter works and is there a way of achieving the same effect without using filters to get more control over final look?

    does anyone know how the cutout filter works and is there a way of achieving the same effect without using filters to get more control over final look?

    Several ways to get similar results.  Image > Adjustments > Posturize with low values similar to what you'd use n Cutout.  This is the most flexible way I can think of as you keep the image in RGB mode with layers intact.  A more radical approach would be to reduce bit depth using Indexed Colour.  You'll need to experiment with settings, try changing Forced to Primaries, and Matte to Foreground Color.  There's no going back from this route, although you can change the mode back to RGB to re-enable layers, adjustment layers etc.
    A nice thing about the Filter gallery filters is that you can change the layer to a Smart object with all the control that gives you.
    Now if only this forum could filter out bizarre content.

  • How to print new line using DBMS_OUTPUT package

    Hi,
    I am trying to print a new line using DBMS_OUTPUT package. but it do not print the new line.
    set serveroutput on size 200000
    set feedback on
    BEGIN
    DBMS_OUTPUT.PUT_LINE('First Line');
    DBMS_OUTPUT.PUT_LINE('');
    DBMS_OUTPUT.PUT_LINE('Second Line');
    END;
    I expect following output ...
    First Line
    Second Line
    but i got following output....
    First Line
    Second Line
    why DBMS_OUTPUT.PUT_LINE( '); is not printing a new line ?

    You can try the following:
    SQL> ED
    Wrote file afiedt.buf
      1  BEGIN
      2  DBMS_OUTPUT.PUT('ONE LINE...');
      3  DBMS_OUTPUT.PUT('SECOND LINE...');
      4  DBMS_OUTPUT.NEW_LINE;
      5  DBMS_OUTPUT.PUT_LINE('THIRD LINE WITH NEW LINE...');
      6  DBMS_OUTPUT.PUT('TEST');
      7  DBMS_OUTPUT.NEW_LINE;
      8  DBMS_OUTPUT.PUT_LINE('FOURTH LINE'||CHR(10)||'EXAMPLE');
      9  DBMS_OUTPUT.PUT_LINE(CHR(10));
    10  DBMS_OUTPUT.PUT_LINE('FIFTH LINE');
    11* END;
    SQL> /
    ONE LINE...SECOND LINE...
    THIRD LINE WITH NEW LINE...
    TEST
    FOURTH LINE
    EXAMPLE
    FIFTH LINE
    PL/SQL procedure successfully completed.Documentation:
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_output.htm#i1000062

  • I'm wanting to use the "Actions" in Photoshop Elements 11.  But when I get the Actions box up, it is only showing a small list of effects to use.  And no side bar to go any further.  When I click on the little arrow at top and then click on "load actions"

    I'm wanting to use the "Actions" in Photoshop Elements 11. But when I get the actions box up, it is only showing a small list of effects to use. And no side bar. So I can't go any further.  When I click on the little arrow at top and click on "load actions", I am only getting a box with empty space saying "No items match your search".  The folder at the top does say "Actions".  How do I get more effects?  The tutorials that I've checked into all show a long list of effects in their box.  Can anyone help? 

    To use the existing actions, try the following:
    1. Open one of the Action Sets, in this example Special Effects is the Action Set, by pressing the small arrow beside the set name.
    2. Then click on the name of the Action, in this example Faded Ink is the Action name.
    3. Then press the Play button to run the action.

  • How do I find where an effect was used?

    Hi -
    I'm running AE CS6 (on MBPro OS X 10.7.5) and I just re-opened a file made with AE CS4 that uses some BCC plug-ins which I haven't re-installed in CS6. I got an alert that some effects were missing from the project.  I'd like to find out where the effects are used in the project so I can delete them and end the alert message's reign of terror.  Is there a shortcut way of doing that or must I hunt through every layer manually?
    TIA your advice,
    JL

    Removing an effect from a composition will not cause AE to be unable to launch entirely.
    Can you open AE and create a new project?
    Do you happen to know the exact version number of AE? It should be 11.0.2 (although, if you're a cloud subscription member, it shouldn't start with an 11 at all )

Maybe you are looking for

  • Magic Trackpad won't work with Magic Mouse on brand new 2011 27" i5 iMac

    I have a brand new 2011 27" i5 iMac which I bought with Snow Leopard pre-loaded. Naturally, I included the new Magic Trackpad in my purchase, and though there were some problems with the device in SL - such as it going haywire without explanation - i

  • How to find what are  the  support-teams map with particular componant type

    hi experts, i am new in solution manager.. My requirement is when creating the support message in crmd_order t-code i have to give the componant type in transaction data after that in fast entry screen i have to assign support team for that componant

  • R3AS Equipment download not working with filter

    Hi, all I set filter equipment in r3ac1 and then I executed initial download Load Object EQUIPMENT in r3as. but occur abort EQUIPMENT in r3am1 and outbound queue MASS_CRM_CS_EQU_* and R3AD_CS_EQU_* are stop in R/3 there are entries 1. I apply Note 83

  • Exported file sizes - why so big

    I'm not sure if this question is truly answerable or not. As some of you may have noticed I was looking into maybe changing over to Lightroom, well after some in-depth analysis I've all but decided to stick with Aperture. The things it does very well

  • Batch Import Files

    We have a need to post hundreds of documents to one of our content areas. I dread the thought of having to upload those documents one-by-one. Is there a batch import application that we can use to get all those documents into the content area?