Monday, January 25, 2010

Managing Schema Objects

Create and Modify tables:
TBD



Manage Constraints: An integrity constraint defined on the table can be in one of the following states
  • enable, validate (validate is default if constraint is enabled)
  • enable, novalidate
  • disable, validate
  • disable novalidate (novalidate is default if constrant is disabled)
Create Indexes:
TBD


Create and use temporary tables
The definition of a temporary table is visible to all sessions, but the data in a temporary table is visible only to the session that inserts data into the table. There are two types of temporary tables:
  • Session specific
    • The db truncates the table when you terminate the session
    • Specified by ON COMMIT PRESERVE ROWS clause
  • Transaction specific
    • The db truncates the table after each commit.
    • Specified by ON COMMIT DELETE ROWS clause.
By default temporary tables are stored in the default temporary tablespace of the user who created it. You can alternatively create a temporary tablespace and create the temporary table on that tablespace. Eg: create global temporary table test_temp (startdate date, ......) on commit DELETE ROWS [tablespace some_temp_tbsp]

Performing Database Recovery

Overview of Data recovery advisor:

Data recovery manager is a tool to help reduce MTTS (Mean time to recover). The GUI of data recovery manager is available in database control and grid control by selecting Perform Recovery in Availability tab. Data recovery manager has following commands:
  • LIST FAILURE
    • To list all the failures
  • ADVISE FAILURE
    • View repair options which typically include both automated and manual options.
  • REPAIR FAILURE
    • To repair failure automatically. Once the failure is repaired, the repair failure command closes the relevant repaired failure.
  • CHANGE FAILURE
    • Used to alter the status and priority of failure. You can change the status of the failure to closed when you manually repair it. You can also change the priority to high or to prioritu low. You cannot set the status to open nor can you set the priority to critical by issuing this command.
Some examples:
  • To list all failures:
    • rman > list failure
  • To list details of a particular failure
    • rman > list failure detail
  • List a subset of failure
    • rman > list failure low ( low is the failure priority; high and critical are the other two failure priority values)
    • rman > list failure close
    • rman > list failure exclude failure
  • To determine repair options for a subset of failure
    • rman > advice failure <failure id>
  • To see what will be repaired if repair failure command is invoked
    • rman > repair failure preview 
  • After you list failures with list failure command, you should execute advise failure command before invoking repair failure command. Calling repair failure command before advise failure command results in error. 
  • Repair failure command repairs High and Critical failures in ADR and then closes them if they are fixed
  • DRA can be used to detect and analyze data failures in single instance database but not in RAC.
  • All failures can be automatically repaired by DRA except network I/O failures, which usually needs human intervention.

    Monday, January 11, 2010

    Announcing free workshop and AOL course in San Leandro

    Experience the power of breath and lead a life full of energy and happiness. Art of Living is pleased to announce the following two courses in San Leandro,CA. Free Science of Breath workshop
    • When : Jan 17th at 12pm
    • Where : All Saints Episcopal Church 911 Dowling Blvd, San Leandro, CA
    • Contact : Meera at 510-825-7462
    • Course fee : FREE
    • More Information: http://us.artofliving.org/sanleandro
    Art of Living Basic Course:
    • When : Jan 28 to Jan 31
    • Where : All Saints Episcopal Church. 911 Dowling Blvd, San Leandro, CA
    • Contact : Meera at 510-825-7462
    • Course fee : $175 (Offered at discounted price only this month)
    • More Information: http://us.artofliving.org/sanleandro