What are the restrictions &pitfalls of renaming a table vs select * into...

Hello all,
I've got a situation coming up possibly, that I'm looking at where I may need to rename a table that has about 3 TB of data in it.
I'd looked at doing the oracle RENAME command, and it mentions that some restrictions that would error out would be:
views, synonyms, and stored procedures and functions that reference the table.
I'd been looking around on different sites researching more, and found some saying that tables with foreign keys, check constraints would also error out on this....but in the Oracle docs I see it saying:
"Oracle Database automatically transfers integrity constraints, indexes, and grants on the old object to the new object."
Were the other non-Oracle site references maybe to older versions? I'm using 11Gr2.
The other part of this is that the app designers really want to recreate the original table. Essentially this is doing
TABLENAME1 -> TABLENAME1_OLD
Then recreating TABLENAME1 anew empty for new use.
My original thoughts were to do select * from TABLENAME1 into TABLENAME1_OLD, and then truncate TABLENAME1....but with the size of the data (and this will eventually be done in PROD), I"m trying to say that doing the RENAME and recreating the empty table would be less resource intensive.
Would the rename and recreate table be the way to go?
If so, then I need to make sure I know all the restrictions and pitfalls on rename would have....
Thanks in advance!!
cayenne

rp0428 wrote:
>
I've got a situation coming up possibly, that I'm looking at where I may need to rename a table that has about 3 TB of data in it.
I'd looked at doing the oracle RENAME command, and it mentions that some restrictions that would error out would be:
views, synonyms, and stored procedures and functions that reference the table.
I'd been looking around on different sites researching more, and found some saying that tables with foreign keys, check constraints would also error out on this....but in the Oracle docs I see it saying:
"Oracle Database automatically transfers integrity constraints, indexes, and grants on the old object to the new object."
Were the other non-Oracle site references maybe to older versions? I'm using 11Gr2.
The other part of this is that the app designers really want to recreate the original table. Essentially this is doing
TABLENAME1 -> TABLENAME1_OLD
Then recreating TABLENAME1 anew empty for new use.
My original thoughts were to do select * from TABLENAME1 into TABLENAME1_OLD, and then truncate TABLENAME1....but with the size of the data (and this will eventually be done in PROD), I"m trying to say that doing the RENAME and recreating the empty table would be less resource intensive.
Would the rename and recreate table be the way to go?
{quote}
You are missing a key piece of the requirements
What is the intended use of the OLD and the NEW tables?
Why do you need a new table with exactly the same name unless you intend to use it exactly the same way you were using the old table? And if that is the case it seems to me that other tables with foreign keys need to be truncated also and point to the new table and not the old one.Unfortunately, I don't know. This is just a request the devs have, and I'm not sure of their reasoning, but this is what they're asking for, so, I'm trying to research the best way to do what they request.
Thanks,
C

Similar Messages

  • How to use Smart cut and what are the restrictions to use this

    Hello,
    How to use Smartcut and what are the restrictions to use this.
    is it possible in version 9.
    and is it safer to use it in real iproject mplementation?
    Thanks in advance

    Hi
    read more about smartcuts here http://download.oracle.com/docs/cd/E12825_01/epm.111/bpmui_admin.pdf
    read "Managing smartcuts"
    Regards
    alexander

  • I'd to lengthen my USB cable with Cat5e or Cat6.  What are the restrictions?

    I'd to lengthen my USB cable with Cat5e or Cat6.  What are the restrictions?  My iPad will live in my office upstairs and my computer is in a rack down stairs (about 50 feet away).  Will the iPad and computer connect at this distance?  If I use a powered balun will it help?

    USB has a maximum limit of about 5 meters. To go longer than that, you will need multiple intervening self-powered hubs, though that can be problematical. Using the simple Cat-5/6 "baluns" may not work because they can cause signal timing problems. There are some USB extender products that can successfully use Cat-5 cabling over significant distances, but they're not cheap.
    Regards.

  • How can L identify what are the not null fields of a table in a stored procedure ?

    How can L identify what are the not null fields of a table in a stored procedure ?

    You could query the data dictionary:
    SELECT column_name
    FROM all_tab_columns
    WHERE owner = '...'
    AND table_name = '...'
    AND nullable = 'N'

  • What are the methods to modify SAP standard tables?

    hi
    what are the methods to modify SAP standard tables?

    .APPEND structures AND CUSTOMIZING INCLUDES.
    these are the two methods.. but customizing includes we, as a developers do not use.
    generally we use .APPEND structures to modify standard tables.
    note that we need an access key to modify atandard tables.
    we can create an apend structure and add that structure to the standard table at the end.
    note that .append structures should only be added only at the end.
    that is the reason we use .append structures to modify standard tables.as we should not include a field in the middle and disturb the original order of the standard table fields as it may effect many objects depending on the standard table.
    but Some standard tables for which there is a LONG datatype field can never be modified.
    the reason is the LONG datatype field should always be there at the end and also .APPEND strutures should always be there at the end. there will be a conflict. so, some standard tables can not be appended.

  • What are the advantages of using an internal table with workarea

    Hi,
    can anyone tell me
    What are the advantages of using an internal table with workarea
    over an internal table with header line?
    thnks in adv
    regards
    nagi

    HI,
    Internal tables are a standard data type object which exists only during the runtime of the program. They are used to perform table calculations on subsets of database tables and for re-organising the contents of database tables according to users need.
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm
    <b>Difference between Work Area and Header Line</b>
    While adding or retrieving records to / from internal table we have to keep the record temporarily.
    The area where this record is kept is called as work area for the internal table. The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line.
    Header line is a implicit work area for the internal table. It depends on how the internal table is declared that the itab will have the header line or not.
    e.g.
    data: begin of itab occurs 10,
    ab type c,
    cd type i,
    end of itab. " this table will have the header line.
    data: wa_itab like itab. " explicit work area for itab
    data: itab1 like itab occurs 10. " table is without header line.
    The header line is a field string with the same structure as a row of the body, but it can only hold a single row.
    It is a buffer used to hold each record before it is added or each record as it is retrieved from the internal table. It is the default work area for the internal table
    1) The difference between
    whih header line and with out heater line of internal table.
    ex:-
    a) Data : itab like mara occurs 0 with header line.
    b) Data: itab like mara occurs 0.
    -While adding or retrieving records to / from internal table we have to keep the record temporarily.
    -The area where this record is kept is called as work area for the internal table.
    -The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line.
    -Header line is a implicit work area for the internal table. It depends on how the internal table is declared that the itab will have the header line or not.
    a) Data : itab like mara occurs 0 with header line.
    table is with header line
    b) Data: itab like mara occurs 0.
    table is without header line
    2)work area / field string and internal table
    which one is prefarable for good performance any why ?
    -The header line is a field string with the same structure as a row of the body, but it can only hold a single row , whereas internal table can have more than one record.
    In short u can define a workarea of an internal table which means that area must have the same structure as that of internal table and can have one record only.
    Example code:
    data: begin of itab occurs 10,
    ab type c,
    cd type i,
    end of itab. " this table will have the header line.
    data: wa_itab like itab. " explicit work area for itab
    data: itab1 like itab occurs 10. " table is without header line.
    Regards,
    Padmam.

  • What are the largest sized memory cards that can be swapped into a macmini 2.6GHz i7 quadcore

    What are the largest sized replacement memory cards that can be used in a new macmini 2.6MHz i7 quad core? I see samsung has some 16GB cards and was wondering if the macmini can be jacked up to 32GB instead of the apple store configuration of 2x8GB or 16GB total.

    I called Apple Support cause I just purchased my Macmini and found out that it is a memory stick slot issue of some sort. If there were 4 slots instead of two, then you could have 32GB of memory. So it appears to be a board layout issue when apple layed out the processor board they did not allow for enough address bus width for the memory slots cause the intel processor chip will support up to 32GB of memory. Apparently others have tried to put 2x16GB into macminis and have all been unsuccessful thus far. I guess someone could go in and whitewire their processor board but that would be insanely over the top. :-)

  • What are the restrictions of the bulkloader?

    We want to use BulkLoader for Personalization server 3.5.
    How many files can BulkLoader index? We have files for
    different 17 portals. Shall I put all files in one directory
    and make the difference by using meta-tags or put files per
    portal in different directories.
    Can somebody tell me the restrictions of bulkloader?
    Thanx,
    Levent

    Alex,
    Both examples you mention are possible with JHeadstart by customizing the Generator Templates. Add a control item in the formGroupButtons or tableGroupButtons template for example, or customize the groupContent template for a specific group and replace it with references to your own bindings, which you then prevent from being overwritten by unchecking "Clear Page Definition before generating".
    Hope this helps,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • What are the steps to upload zipped LMS output from UPK into iLearning?

    Please would someone be kind enough to detail the steps to import zipped LMS output from UPK into iLearning or point me to where I can find this information?
    Many thanks.

    The zipped output from UPK contains a few folders within the zip file itself before you get to the area within the zip where the imsmanifest.xml file is. You need to repackage the zip so that the imsmanifest.xml and related .xsd files are at the "root" of the zip file, rather than in a directory within the zip.
    So basic steps are as follows:
    1. Extract the zip file locally to your hard drive.
    2. Navigate down the newly created folder structure until you see the imsmanifest.xml file.
    3. Add/replace the .xsd files in this location with the iLearning specific XSD files that you can get on metalink
    4. Select all the files in this directory (including the folders in this directory like "audio", "certificate", "help", "images" etc), then right click and add to a new zip file. This will ensure that the new zip file contains the imsmanifest.xml and related xsd files at the root of the zip file rather than buried in a folder.
    5. Import as SCORM 1.2 in iLearning and off you go.
    Hope that helps.
    Scott
    http://www.seertechsolutions.com

  • SWF_WORKPLACE - can we use it? And what are the restrictions?

    Hello,
    I'm in the middle of specifying a new ESS/MSS role out and one of the points that has come up is the need to use the UWL, and specifically substituting approvals/task during absences. There is a desire that we should be able to allow/disallow certain users for being used for substitution. (This is something that I do not believe exists as standard functionality)
    With the portal based UWL being in Java we are reluctant to enhance it, however, I can see that a WDA app SWF_WORKPLACE exists which seems to do the same thing. And WDA is much easier to enhance (and support that enhancement after a support pack update).
    It seems that this functionality is only released for NWBC [Note 1149144 - SWF_WORKPLACE:Composite SAP Note Business Workflow Workplace|https://service.sap.com/sap/support/notes/1149144]
    >You can call the Business Workflow Workplace in SAP NetWeaver Business Client (with PFCG connection). The integration in the Enterprise Portal is currently not supported.
    >In addition, you cannot use the Business Workflow Workplace directly in the backend system since certain functions * require SAP NetWeaver Business Client.
    - my emphasis
    Does anyone know what these certain functions are? (possibly OBN?) And what bit of portal integration is not supported?
    As far as I can see, although it only allows tasks to be launched using object based navigation and reads table swfvgt with a key of NWBC cl_swf_powl_launch_services=>c_wlc_nwbc , it still uses the standard portal integration interface to launch the OBN. I can't see what functions wouldn't be supported in the portal.
    Thomas Jung mentioned this app in this thread Transaction SBWP - although I think he confused what looks like a WDA view of the absence approval application for the substitution logic - which is built into the SWF_WORKPLACE application.
    Other than that - no-one seems to have discussed/used this app anywhere - could you tell me why?
    Thanks!
    Chris

    Thanks Harshit,
    the BAdI, although allows us some control, doesn't really meet the requirement (although it might just have to do), for example I'd like to be able to allow different users for different profiles - so leave (profile1)  has one logic and financial approvals (profile2) another - although this can be done, it seems to be after the user has made the choice rather than restricting the search results in the first place.
    I had a search for new notes regarding SWF_WORKPLACE and couldn't find any, so I doubt it is even enhanced in 7.02. As it stands the lack of functionality that it presents - plus the SAP disclaimer about using it with anything other than NWBC makes me think were probably just going to have to go with the Java based app and the BAdI.
    Thanks for your help - and good to see you on SCN!
    Cheers,
    Chris

  • What are the restrictions/limitation in lookout with the use of graphs created in third party software? When we use these kind of graphs we normally loose resolution, shadows or 3D effects.

    We don't know exactly how does lookout handle .bmp or .wmf files created in third party programs like CorelDraw, since we have a different response from lookout to those graphs. We loose the shadows effects, we don't have a transparect effect, etc.
    Thanks in advance, any help is welcome.

    It shows Peter's doing its jobs properly.
    Anyway there is no more communication from Sony since awihle. If you can have any news.
    Anyway good job Zero!

  • What are the Pros and Cons while joining tables at DF and Universe level

    Hi Experts,
    I am new to Data federator designer. I need help on the below.
    Could you please let me know the Pros and Cons while joining the source tables in data federator
    And While joining the DF target tables in universe designer.
    Regards,
    Gana

    Hi,
    1. I have created target tables based on source tables with one to one mapping and then join all target tables in universe.
    Ex: Source tables: Infocube text tables, fact tables and 3rd party data base table
    Target tables:Target tables are same as source tables
    --- Yes this is the way to create target Tables  and join them in the universe.These target Tables gives you the flexibility  like in future your requirement is to add one more object based on some calculation which is not possible in the universe so that time you can create  one more column in the target table and do the calculation. at the same time if you are using source table you can not do anything.
    2. Created single target table with all objects of source tables and merged all sources tables data.
    Ex: Source tables: Infocube text tables, fact tables and 3rd party data base table
    Target table: Single table.
    --- This is bit complex structure to merge all tables data in the one target table.in this situation you have to put more efforts and it is more complex.basically this type of target table is useful when you are merging data by multiple source into single  or  creating one target table based on the  union of tables by adding two mapping rules or more and you can not join tables in universe.
    Better approach is first 1. create target tables based on the source tables and join them in the universe.
    Thanks,
    Amit

  • What are the ways to integrate PayPal (or other monetizing service) into an Adobe AIR desktop app?

    Hey all
    I just finished publishing my AIR mobile app for iOS and Android, both featuring freemium style in-app purchasing/billing, for a single purpose only - opening the app to be full featured.
    Now the client wants a desktop version of the app. I need a way to monetize the same way: the user wants all the features - they click a button in the app, pay the 2 dollars, and now all the features are accessible.
    I think going out to PayPal, paying there and returning to the app would be best, but I cannot get the files I found here to work.
    Do you have any suggestions of a workflow with examples, or a service with AS3 support?
    thanx

    http://www.as3gamegears.com/monetization/as3-paypal-api/

  • What are the different licences?

    I'm thinking about getting the Production Premium suite, but I'm slightly confused about the different licences... As far as I can tell, there's a student licence, and a "normal" one... Is that all of them?  Also, what are the restrictions for each?
    At the moment, I just want to build up my portfolio.. I don't have any plans to publish anything commercially - however, I don't want to be restricted from that option, should I wish to do so in future.  Which is the best license for me?
    p.s. sorry if this is the wrong forum to post this in!

    From what I've learned of the iPhone 5 I got 3 days ago, I can identify the following:
    Off, phone completely de-energized. Press the power switch for 3 sec, flick the slide onscreen.
    Sleep, phone is on but screen dar. Briefly press the power switch.
    Normal, phone on the home screens
    Airplane mode, fully on but with all radios off.
    Do not disturb, cellphone dark but only receives calls from selected sources.
    I'm sure there's more to discover.

  • What are the optimal values for mac and arp timeout values

    Hi Guys.
    What are the best values for "mac address-table aging-time" and "arp timeout" by following scenarios?:
    - single sg300-10 as layer3-switch with a maximum of 10 local (direct connected) hosts
    - and a 3750x-stack with 100 local hosts + hsrp with a other stack of the same sort
    or for asa 5520 as internet gateway for 500 clients?
    I use at the moment a mac aging-time from 300 seconds and a arp timeout from 3600 seconds.
    Is this o.k.?
    Thanks.

    Marvel.
    As far as enhancing the CLI, it will of course be enhanced when new firmware releases provide new features. As far as making it more IOS-like, best to my knowledge, no.  The only other supported CLI on the SB switches are on the SX500 series and SX200E series which the CLI are all consistent. If you bought a SX500 series the commands are nearly identical minus the different feature sets.
    -Tom
    Please mark answered for helpful posts

Maybe you are looking for