How do you guys upgrade the DDL of your apps?

This is to start a brainstorming discussion, just like the one you would have between DBAs and developers around the watercooler...
I am considering revamping the way DDL upgrades are done in-house.  I was wondering how you guys go about doing that, whether you are an Independent Software Vendor or the developer for an in-house application.
if you're an ISV, how do you supply and implement new versions of your DDL to your customers?
if you are responsible for the development/maintenance of an in-house application, how do you carry out your DDL upgrades?
I would like your responses to be around the methods and the tools you use to upgrade the SQL code (mainly the DDL) of your applications.
Looking forward to everyone's input.

In a modern application, a developer should seriously consider Edition Based Redefinition (EBR) - a feature (comes with the database)  every customer has since 11g R2.  With EBR, have the ability to install new versions of your code (plsql, triggers, views, synonyms -etc) in the database without impacting (blocking, locking, overwriting) the existing version.  So you can install version 2 of your application while version 1 is still running.
Additionally - taking it a step further - if you put editioning views in place (a special kind of view that allows you to only select from a single table, no where clause, just a select list - sort of like a synonym with a select list), you can achieve many online DDL upgrades as well.
for example, let's say you wanted to add a new index to a table, change the format of an existing column from number to varchar2 (to allow for alpha-numeric values in the future) and drop an existing column that is no longer needed - you could (assuming the editioning views are in place):
a) create a new edition as a child of an existing edition.  It'll be as if you copied all of your code/synonyms/etc - you haven't, but it will feel like it
b) add a new column of type varchar2. (this column will NOT be visible to version 1 at all in any way)
c) put in place a forward edition trigger that will take any modification of the existing number column and reflect it in the new varchar2 column
d) use dbms_parallel_execute to update the existing number column to itself ,this update can commit every 100 rows or so (no locking issues really) and will cause the new varchar2 column to be populated for all existing rows.  any new rows added by version 1 of the application will automagically be reflected
e) in version 2, create a new editioning view that selects out the right columns from the table (don't select the number, select the varchar2 and alias it as the old column name if you want)
f) put your new plsql/synonyms/grants whatever in place in version2
g) create an invisible index on the table you wanted to index - you can do this online.  the index will be invisible so it won't affect ANY existing query plans (you haven't tested the old sql with it - you just know that version 2 likes having it)
Now version 1 is running and version 2 is ready to go.  Easiest way to roll out would be to schedule a tiny maintenance window - alter the databases default edition to version 2, make the index visible and restart your app servers.  the are now running version 2
a) drop/set unused the old number column
b) get rid of the forward edition trigger
if you'd like to read more about this:
A Closer Look at the New Edition
Ask Tom: Edition-Based Redefinition, Part 2
Ask Tom: Looking at Edition-Based Redefinition, Part 3
and of course
http://docs.oracle.com/database/121/ADFNS/adfns_editions.htm#ADFNS020
tom kyte

Similar Messages

  • How do you delete all the messages in your search results in Thunderbird 31.2?

    I'm trying to clean out my inbox. When I search for a given term in the global search box and get my results, then I choose "Select All." Then I choose "Move to Trash," and nothing happens.
    How do you delete all the messages in your search results in Thunderbird 31.2?

    I'm trying to clean out my inbox. When I search for a given term in the global search box and get my results, then I choose "Select All." Then I choose "Move to Trash," and nothing happens.
    How do you delete all the messages in your search results in Thunderbird 31.2?

  • How do you create a folder to organize your apps

    How can you create a folder to organize your apps. 
    How can you move an app into a app that was already created.  i.e.  "Newstand" can you put other magazines into this folder.

    actually u cant.
    if u want to create folders,put your finger on an icon until it starts moving,then take an app and put it on another app,then u will create a folder that u can rename it as u want

  • How do you scroll to the next page in apps when it says "1-9 of 20"?

    I am new to using an iPad.  I have been tyring to load some free apps.  When looking for apps, it might say "1-9of 20", then "View all".  When I hit view all, it only shows me 12 apps.  How do you get to the others? 

    'L-R'  you mean right to left, starting the side where it has the little box at the top 'Sort by" - This is for the multi app view (1-9 of 20) you mentioned.
    If already on an individaul Apps page you have to quit back by tapping the box in the top left corner marked 'Search'.  Note that default view is to display both iPad and iphone and selecting one or the other individually may result in less than the original total, dependent on availability for that device.
    Use just one finger place it on the screen then draw it across the screen - avoid tapping as this selects.
    Best regards, Ct

  • How do you keep itunes from re-ordering your apps

    When iTunes syncs with my iPad it re-orders the apps in mostly ABC order. I'm not sure what logic it uses but it's annoying.

    When you select the Apps tab of iTunes (with the iPad connected) you'll see a representation of the home page(s). You can move the apps around in that window in iTunes (which is a bit of a pain when you are trying to move apps between pages) and when you sync the apps will appear in the same locations. If you buy apps in iTunes on the computer, they'll be placed willy nilly in the empty spaces but the arrangement you created won't be disturbed.

  • How do you guys handle the warmth?

    I'm just wondering, how do people use the keyboard over long periods of time when running processor intensive tasks. For example most games seem to increase the temp of my Macbook to over 70C and having my hand over the keyboard/palmrest starts to feel uncomfortable very quicly. Never gets hot, but just warm enough for it to feel clammy. After 15mins I find it's too uncomforatble.
    I keep persisting hoping I get used to the heat, but still feels as bad as ever. Any tips. Am I being too sensitive and is it something you just have to get used to?
    Macbook   Mac OS X (10.4.7)  

    I use a Roadtools Pivot 360 to keep my laptop elevated just a bit so it gets pleanty of airflow under and all over. There are a lot of similar products as well, so be sure to shop around for one you like.
    As for the palm rest. I work all day on my laptop and after work I play games like World of Warcraft. Plenty of time for my laptop to get heated up. But really I don't even notice. I think each person just must have a differant tolerance to heat. You can consider a product like the Marware palmrest sticker that is thin foam that it a little soft too. But then I wonder if it is acting as a slight insalation keeping you slightly cooler at the expense of the laptop.
    Lastly there is the complaint a lot of peopl have about the edges being "sharp". Well, they are a bit. But that is nothing better typing posture won't cure. After all, when typing, you should not have a palm rest. Palms up.

  • How do you print all the photos in your flagged file? I don't want to make these photos into a new event.

    I want to order several photos. I have flagged them and there is no option to select all and order the prints. I don't want to create a new event with these photos, as I want them in their original event files.
    How are multiple photos ordered/exported for printing?

    Go to your Flagged Photos Smrt Album on the Left.
    Command - a will select All
    Then File -> New -> Album
    Regards
    TD

  • How do you find out the answers to your security questions?

    I am having trouble remembering my security questions and I don't think I have a support email what am I supposed to do to get the answers?

    The only way out its to call Apple... they will help you out with your answers, thats the way i did it.

  • How do you find out the answers to your security questions if you forgot them

    How can I find out what the answers to my security questions are?

    1)  Apple ID: All about Apple ID security questions
    If necessary
    2)  See Here... ask to speak with the Account Security Team...
    Apple ID: Contacting Apple for help with Apple ID account security
    3)  Or Email Here  >  Apple  Support  iTunes Store  Contact

  • How do you manually control the speed of your sys2 fan on an MSI K9N2 mobo?

    I've tried the latest version of Speedfan and have managed to adjust the fan speed for the cpu [sys1]  and sys2 with no problems.  I looked in bios and could only find a command line for the sys1 fan; sys2's rpms registers both on bios and speed fan but cannot be controlled.  I know that sys fan 1/2 have both identical connectors [ground, sensor, and +12V], then why isn't sys2 not responding the same to sys1?
    AMD 9950 Black Edition 125W
    MSI K9N2 DIAMOND
    2X 2Gb OCZ 8500 High Performance Ram
    XFX 9800GTX+ Black Edition
    SEAGATE BARRACUDA 250GB SATA300 8MB Cache
    Western Digital Caviar Black 500GB SATA300 32MB Cache
    WINDOWS VISTA HOME PREMIUM EDITION SP1
    Rosewill Stallion Series RD600N-2DB-SL-BK 600W ATX  PSU[40A]

     Just Google for such things as this: http://www.directron.com/12to7.html
     You can also rig things yourself if you're inclined to do so and have the ability. You can finds instuctions by doing a web search.
     I made something a bit different using a +8V 0.5A voltage regulator just because I had the parts and felt like doing it.

  • How do you guys know what production week your MacBook is?

    Is there a software program you all are using to figure out the production week of your MacBooks? If there is, I want it:-P

    Good to know. I'm a week 44. I purchased around November 17. Does that sound right?

  • Broken Fan on 2011 Mac mini / If you are upgrading the hd in your mini please read

    I need help with a broken fan. I broke the plastic plug off the fan and need help making sure i connect the wire to the correct blade. If someone is feeling really nice could you unscrew the fan, flip it over, and with the text on the sticker facing right side up(so that you can read it) tell me where each line connects. the top being number 1, below that being number 2 and so one. The connections on the logic board.... the closest to the ram being 1 the next being 2 and so on. I know this is a lot to ask, but it will be a huge help. Thank you in advance to anyone willing to take the time to do this.

    Does > Cracking Open the Mac Mini 2011: Fan | 16 of 74
    or Fan, Mid 2011 Mac mini 922-9953 (p/n 1009034) help?

  • TS2446 How do you figure out the answers to your security questions?

    I forgot my security question answers and it locked me out, what do i do?

    1)  Apple ID: All about Apple ID security questions
    If necessary
    2)  See Here... ask to speak with the Account Security Team...
    Apple ID: Contacting Apple for help with Apple ID account security
    3)  Or Email Here  >  Apple  Support  iTunes Store  Contact

  • How do you find out the answers to your sequrity questions if you forgot the answers

    Can some one please help me find the answers to my sequrity questions i cant get any music off itunes with out it and i forgot the answers!!!!!!!!!

    Click here and search the article for '2 out of 3'. Follow the instructions.
    (73929)

  • How do you listen to the Radio on your IPOD?

    When i click on it in Itunes on my PC it works awesome. However, I cant find the radio on my Ipod touch at all. Someone help plz.

    [Quote]The iPod touch doesn't have a radio.
    Sorry.[QUOTE]
    Actually it does
    http://www.broadcom.com/products/Bluetooth/Bluetooth-RF-Silicon-and-Software-Sol utions/BCM4325#tab=features-tab
    The ipod has bluetooth, wifi, AND FM.
    Apple just does not express an interest in using the FM feature
    Message was edited by: Mad Maxx

Maybe you are looking for