Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Beginner: am I out of my depth?

Re: Beginner: am I out of my depth?

From: Ed Prochak <ed.prochak_at_magicinterface.com>
Date: Fri, 02 Apr 2004 01:35:28 -0500
Message-ID: <lr7bc.13648$Hs1.9890@fe03.usenetserver.com>


AnaCDent wrote:

> Duncan wrote:
> 

>> I am a direct markting manager and I rely on the integrity of the
>> customer contact data in our Oracle database. In order to ensure this
>> integrity, I need to carry out mass updates, e.g. to update
>> postcodes/zip codes. For the forseeable future my IT department
>> doesn't have anyone availble to do this work for me, therefore I have
>> suggested I do it myself by learning to use SQL*Plus. I have a good
>> understanding of the fundamentals of relational databases and have
>> used MS Access to an advanced level, including extracting information
>> from the Oracle database using very complex queries, and then running
>> the kind of queries on that extracted data that I would be running on
>> the live tables. I am very confident that I can do this work safely as
>> I know the database inside out, however they are understandably very
>> reluctant to let me do this for danger of damaging the data. Does
>> anyone have an opinion as to whether I'm going about this the right
>> way and, if so, any steps I could take to safeguard against potential
>> problems?
>>
>> N.B. I would only have access to update information in 2 tables,
>> neither of which affect anything else in our system, also these tables
>> are regularly backed up and it wouldn't be a major problem if we had
>> to revert to a table a week or so old if something went wrong with the
>> live version.
> 
> 
> Just remember ROLLBACK is your firend.
> 

But if you have any uncertainty, OR if the DBA has any uncertainty, plan your initial test on the live data right AFTER the database is backed up. In steps:
  1. Verify backup is complete and successful.
  2. run your update.
  3. Test your update (How would you know if it worked or not, make a test case for this.) 4.A the test passed, you are done. 4.B the test failed, so something's wrong with the update.
  4. attempt a ROLLBACK WORK; command. ii. oops, somehwere you already issued a COMMIT WORK; so ROLLBACK WORK didn't do anything. then restore from the backup.

The restore from backup might be quick quick if you restore only the tables affected.

The plus side to this is making the real IT guys (especially the DBA) relatively confident they can clean up any possible mess. The big down side to this is the backup is likely scheduled for something like 2AM. Hope you like being awake that late!

-- 
Ed Prochak
running    http://www.faqs.org/faqs/running-faq/
netiquette http://www.psg.com/emily.html
--
"Two roads diverged in a wood and I
I took the one less travelled by
and that has made all the difference."
robert frost
Received on Fri Apr 02 2004 - 00:35:28 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US