Oracle
  Home arrow Oracle arrow Page 2 - Oracle and Availability: Illustrated D...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Moblin 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ORACLE

Oracle and Availability: Illustrated Downtime Scenarios
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 6
    2004-07-20

    Table of Contents:
  • Oracle and Availability: Illustrated Downtime Scenarios
  • Horatio's Woodscrews
  • User-Defined Availability
  • Cyclical Database Resource Requirements
  • Out of Space in the Woodscrew Tablespace
  • Restarting Long-Running Transactions
  • Waiting for the File to Restore from Tape
  • The Dropped Table
  • Complete and Total Disaster

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Oracle and Availability: Illustrated Downtime Scenarios - Horatio's Woodscrews


    (Page 2 of 9 )

    For the situations in this chapter, and for the workshops and examples throughout the book, we will use the database from the company Horatio's Woodscrews, Inc. This is a fictitious company that sells…well…woodscrews. This company has a primary database that holds millions of records concerning woodscrews, woodscrew inventory, and woodscrew orders. The following is the code to create the application owner in the oracle database, along with the three primary tables: Woodscrew, woodscrew_inventory, and woodscrew_orders. These tables will be used throughout the book for all examples, so you might want to make note of this information. After building the tables, a few rows are added so we can manipulate them for labs, like this:

    create tablespace ws_app_data datafile
    '/u01/product/oracle/oradata/orcl/ws_app_data01.dbf' size 100m;
    create tablespace ws_app_idx datafile
    '/u01/product/oracle/oradata/orcl/ws_app_idx01.dbf' size 100m;

    create user ws_app identified by ws_app
    default tablespace ws_app_data
    temporary tablespace temp;

    grant connect, resource to ws_app;
    connect ws_app/ws_app;

     create table woodscrew (
     scr_id           number not null,
     manufactr_id     varchar2(20) not null,
     scr_type         varchar2(20),
     thread_cnt       number,
     length           number,
     head_config      varchar2(20),
     constraint pk_woodscrew primary key (scr_id, manufactr_id)
     using index tablespace ws_app_idx);

     create index woodscrew_identity
       on woodscrew(scr_type, thread_cnt, length, head_config)
     tablespace ws_app_idx;

     create table woodscrew_inventory (
     scr_id           number not null,
     manufactr_id     varchar2(20) not null,
     warehouse_id     number not null,
     region           varchar2(20),
     count            number,
     lot_price number);

    create table woodscrew_orders (
    ord_id            number not null,
    ord_date          date,
    cust_id           number not null,
    scr_id            number not null,
    ord_cnt           number,
    warehouse_id      number not null,
    region            varchar2(20),
    constraint pk_wdscr_orders primary key (ord_id, ord_date)
    using index tablespace ws_app_idx);

    ---- Now, add rows to the tables.

    insert into woodscrew values (
    1000, 'Tommy Hardware', 'Finish', 30, 1.5, 'Phillips');
    insert into woodscrew values (
    1000, 'Balaji Parts, Inc.', 'Finish', 30, 1.5, 'Phillips');
    insert into woodscrew values (
    1001, 'Tommy Hardware', 'Finish', 30, 1, 'Phillips');
    insert into woodscrew values (
    1001, 'Balaji Parts, Inc.', 'Finish', 30, 1, 'Phillips');
    insert into woodscrew values (
    1002, 'Tommy Hardware', 'Finish', 20, 1.5, 'Phillips');
    insert into woodscrew values (
    1002, 'Balaji Parts, Inc.', 'Finish', 20, 1.5, 'Phillips');
    insert into woodscrew values (
    1003, 'Tommy Hardware', 'Finish', 20, 1, 'Phillips');
    insert into woodscrew values (
    1003, 'Balaji Parts, Inc.', 'Finish', 20, 1, 'Phillips');
    insert into woodscrew values (
    1004, 'Tommy Hardware', 'Finish', 30, 2, 'Phillips');
    insert into woodscrew values (
    1004, 'Balaji Parts, Inc.', 'Finish', 30, 2, 'Phillips');
    insert into woodscrew values (
    1005, 'Tommy Hardware', 'Finish', 20, 2, 'Phillips');
    insert into woodscrew values (
    1005, 'Balaji Parts, Inc.', 'Finish', 20, 2, 'Phillips');

    insert into woodscrew_inventory values (
    1000, 'Tommy Hardware', 200, 'NORTHEAST', 3000000, .01);
    insert into woodscrew_inventory values (
    1000, 'Tommy Hardware', 350, 'SOUTHWEST', 1000000, .01);
    insert into woodscrew_inventory values (
    1000, 'Balaji Parts, Inc.', 450, 'NORTHWEST', 1500000, .015);
    insert into woodscrew_inventory values (
    1005, 'Balaji Parts, Inc.', 450, 'NORTHWEST', 1700000, .017);

    insert into woodscrew_orders values (
    20202, '2003-09-22 00:02:02', 2001, 1000, 20000, 64114, 'NORTHEAST');
    insert into woodscrew_orders values (
    20203, '2003-09-22 00:02:04', 2001, 1001, 10000, 64114, 'NORTHEAST');
    insert into woodscrew_orders values (
    20204, '2003-09-22 00:02:06', 2002, 1002, 10000, 64114, 'NORTHWEST');
    insert into woodscrew_orders values (
    20205, '2003-09-22 00:02:08', 2002, 1003, 30000, 64114, 'NORTHWEST');
    insert into woodscrew_orders values (
    20206, '2003-10-04 00:02:12', 2002, 1004, 10000, 80903, 'SOUTHWEST');
    insert into woodscrew_orders values (
    20207, '2003-10-04 00:02:14', 2001, 1003, 20000, 80903, 'SOUTHWEST');
    insert into woodscrew_orders values (
    20208, '2003-10-04 00:02:16', 2002, 1002, 30000, 64114, 'SOUTHWEST');
    insert into woodscrew_orders values (
    20209, '2003-10-04 00:02:18', 2003, 1001, 40000, 90210, 'NORTHWEST');
    insert into woodscrew_orders values (
    20210, '2003-11-04 00:02:20', 2005, 1000, 10000, 83401, 'SOUTHEAST');
    insert into woodscrew_orders values (
    20211, '2003-11-04 00:02:22', 2002, 1005, 10000, 83401, 'SOUTHEAST');
    insert into woodscrew_orders values (
    20212, '2003-11-04 00:02:24', 2001, 1004, 10000, 64114, 'NORTHEAST');
    insert into woodscrew_orders values (
    20213, '2003-11-04 00:02:26', 2003, 1003, 10000, 64114, 'NORTHEAST');
    insert into woodscrew_orders values (
    20214, '2003-12-04 00:02:28', 2002, 1001, 20000, 64114, 'SOUTHEAST');
    insert into woodscrew_orders values (
    20215, '2003-12-04 00:02:30', 2001, 1000, 10000, 80903, 'NORTHWEST');
    insert into woodscrew_orders values (
    20216, '2003-12-04 00:02:32', 2005, 1001, 50000, 80903, 'SOUTHWEST');
    insert into woodscrew_orders values (
    20217, '2003-12-04 00:02:34', 2003, 1003, 70000, 90210, 'SOUTHWEST');
    commit;

    This chapter is from Oracle Database 10g High Availability with RAC, Flashback & Data Guard, by Hart and Jesse. (McGraw-Hill/Osborne, 2004, ISBN: 0072254289). Check it out at your favorite bookstore today. Buy this book now.

    More Oracle Articles
    More By McGraw-Hill/Osborne


     

       

    ORACLE ARTICLES

    - Implementing and Using Oracle`s Restore Poin...
    - Tuning PL/SQL Code
    - Debugging PL/SQL Code
    - Testing PL/SQL Code
    - Working With PL/SQL Code
    - Conditional Compilation for Oracle Database ...
    - Compile-Time Warnings for Oracle DB 10g
    - Compiling PL/SQL Code for an Oracle Database
    - Troubleshooting PL/SQL Code
    - Managing PL/SQL Code
    - Data Manipulation and More for HTML DB Appli...
    - Oracle Database Fundamentals
    - Adding Processes to HTML DB Applications
    - Adding Computations, Processes, and Validati...
    - Sub-templates and More with Oracle HTML DB





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
    Stay green...Green IT