This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions..

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions..

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions..

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions..

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions..

 

Wednesday, May 28, 2008

Secrets for optimizing Oracle table inserts

When loading large-volumes of data, you have several choices:

1 - Tune INSERTS - Parallelized programs doing concurrent INSERT statements

2 - Tune SQL*Loader - Using sqlldr Direct Load, and adjusting parameters improves INSERT performance.

3 - Tune imports - Use Oracle Data Pump (Formally Oracle import utility) - Here are tips for hypercharging Oracle import.

Optimizing Oracle INSERT performance

When using standard SQL statements to load Oracle data tables, there are several tuning approaches:

a - Manage segment header contention for parallel inserts - Make sure to define multiple freelist (or freelist groups) to remove contention for the table header. Multiple freelists add additional segment header blocks, removing the bottleneck. You can also use Automatic Segment Space Management (bitmap freelists) to support parallel DML, but ASSM has some limitations.

Read more about secrets for optimizing Oracle table inserts here:
http://oracle-tips.c.topica.com/maalfseabGRCBcilq9pb/

Oracle Business Intelligence (BI) Software Benefits and Challenges

Oracle BI Suite EE Plus represents significant opportunities and challenges for Oracle E-Business Suite (EBS) customers. Using automated conversion tools and services, there is now a cost-effective method of migrating that minimizes downtime and maximizes the benefits your organization receives from Oracle's next generation BI platform.

Attend this Webcast to learn about successful strategies for using Oracle BI Suite EE Plus with the E-Business Suite to provide real-time access to transaction data for operational reporting. Explore specific topics, including:

* Benefits of Oracle BI Suite EE Plus.
* Challenges of integrating Oracle BI Suite EE Plus with Oracle EBS.
* Provide an instant self-service reporting environment.
* How to reduce the time, cost, and risks during migration.

Get this white paper at: http://searchoracle.bitpipe.com/data/document.do?res_id=1204913038_975

Utility Computing Made Simple: Automated Provisioning and Patching Solutions for Oracle Grid Computing

Utility computing is all about enabling system resources, including the grid, server farm, and clustering, to be acquired for different types of applications.

Many enterprises are adopting grid and utility computing technologies because of their benefits. This document discusses the growth of enterprise computing.

Oracle Enterprise Manager provides these benefits:

* Centralized control for software lifecycle, from deploying to uninstalling the software
* Out-of-the-box best practices for patching and rolling out software
* Reduction in human error because of minimal human involvement in the patching and provisioning processes
* Incorporation of all the best practices in patching and provisioning procedures from Oracle's experience in the field
* Accelerated service delivery time


Download here: Utility Computing Made Simple: Automated Provisioning and Patching Solutions for Oracle Grid Computing

Master Data Management

If Master data management (MDM) is defined as the processes and tools which centrally and persistently define non-transactional entities of an organization, then its execution requires consideration of many moving parts. There is the data itself, data governance, business rules, data storage and implementation. This white paper provides independent insight and guidance as to which approach might work best for your organization.

Download here: Master Data Managementw

Monitor Oracle Application Health and Performance with Middleware

Organizations are finding limitations in orchestrating processes across ERP, SCM and CRM applications. Business and IT leaders deploy middleware with a sharp eye on the health and performance of key business applications.

Learn how you can narrow your short list significantly with a more strategic approach to IT portfolio management and application synergies. By considering the potential business benefits and teaming middleware with familiar applications, you can move to new levels of performance and response without making huge investments.

Download here: Monitor Oracle Application Health and Performance with Middleware

Sunday, May 25, 2008

Transactional Data Management for Eliminating Database Downtime When Upgrading or Migrating from Oracle 8i or 9i to Oracle 10g

Oracle 8i and 9i database customers are facing more urgency to upgrade to Oracle 10g or higher, particularly where more business-critical applications are supported. In many cases, cross-platform migrations may also need to occur along with the database upgrade. Despite this necessary IT project, users expect uninterrupted availability and/or SLAs (service level agreements) dictate uptime requirements. Therefore any outage, even if scheduled or "planned", has a negative impact on the business.

Learn about a practical, proven solution that tackles the challenge of upgrading or migrating to Oracle database version 10g without taking database downtime. Learn how you can successfully upgrade or migrate to Oracle 10g as well as:

* Achieve rolling upgrade or migration.
* Keep transactions in synch across the databases.
* Manage partial or phased migrations or upgrades.
* Conduct data verification post-upgrade or migration.
* Implement easy and reliable failover strategy.



Get this white paper at: http://searchoracle.bitpipe.com/data/document.do?res_id=1139491378_804

Thursday, May 22, 2008

How to Create Oracle Database Manually

CREATING THE DATABASE MANUALLY

This method involves typing the create database statement within SQL*DBA.
Using this method allows for more flexibility such as specifying
the MAXDATAFILES parameter or specifying multiple SYSTEM tablespace
database files. However by doing this manually there is also a greater
possibility of syntax errors. In addition there is no logfile automatically
created to record the options which have been specified.

Steps for Method I:

1. Set unix environment (SEE SETTING UNIX EVIRONMENT SECTION ABOVE).

2. Create a new init.ora for your new database by copying the default
one provided by Oracle:

% cp $ORACLE_HOME/dbs/init.ora $ORACLE_HOME/dbs/initNEW_NAME.ora

3. Change db_name parameter in the new initNEW_NAME.ora from DEFAULT to
the new database name.

4. Startup sql*dba in line mode:

sqldba lmode=y

5. Connect to the instance, and startup in a 'NOMOUNT' state:

SQLDBA> connect internal
Connected.
SQLDBA> startup nomount
ORACLE instance started.
SQLDBA>

6. Refer to the SQL Language Reference Guide for the 'CREATE DATABASE'
statement syntax - page 4-148.

Here is a sample create database statement:

SQLDBA> create database NEW_NAME
2> logfile group 1 ('oracle_home/dbs/log1NEW_NAME.dbf') size 500K,
3> group 2 ('oracle_home/dbs/log2NEW_NAME.dbf') size 500K
4> datafile 'oracle_home/dbs/dbsNEW_NAME.dbf' size 20M
5> maxdatafiles 50;

7. Once completed run catalog.sql located in the oracle_home/rdbms/admin
directory. This script must be run under the 'SYS' user or connected
'internal'.

NOTE: catproc.sql must also be run if you have the procedural option
installed.

SQLDBA>@oracle_home/rdbms/admin/catalog.sql
SQLDBA>@oracle_home/rdbms/admin/catproc.sql

8. After the database has been created, the SYSTEM tablespace and SYSTEM
rollback segment will exist. However, a second rollback segment in the
SYSTEM tablespace must be created and activated before any other
tablespaces can be created in the database (Refer to SQL Lanuguage
Reference Manual for full syntax).

Creating the rollback segment:

SYNTAX: CREATE ROLLBACK SEGMENT system2
TABLESPACE SYSTEM
STORAGE (...);

Activating the rollback segment:

SYNTAX: ALTER ROLLBACK SEGMENT system2 ONLINE;

9. Modify the /etc/oratab file by adding the new database name. This
is used by dbstart to startup all databases with a 'Y' entry in this
file. (See page 4-17 of Oracle for Unix technical Reference Guide).


Source:http://www.fors.com/orasupp/unix/13481_1.HTM

How to Create Oracle Database Manually

CREATING THE DATABASE MANUALLY

This method involves typing the create database statement within SQL*DBA.
Using this method allows for more flexibility such as specifying
the MAXDATAFILES parameter or specifying multiple SYSTEM tablespace
database files. However by doing this manually there is also a greater
possibility of syntax errors. In addition there is no logfile automatically
created to record the options which have been specified.
Steps for Method I:

1. Set unix environment (SEE SETTING UNIX EVIRONMENT SECTION ABOVE)].
http://sabdarsyed.blogspot.com/2008/09/setting-oracle-environment-variable.html
2. Create a new init.ora for your new database by copying the default
   one provided by Oracle:

   % cp $ORACLE_HOME/dbs/init.ora $ORACLE_HOME/dbs/initNEW_NAME.ora

3. Change db_name parameter in the new initNEW_NAME.ora from DEFAULT to
   the new database name.

4. Startup sql*dba in line mode:

      sqldba lmode=y

5. Connect to the instance, and startup in a 'NOMOUNT' state:

      SQLDBA> connect internal
      Connected.
      SQLDBA> startup nomount
      ORACLE instance started.
      SQLDBA>

6. Refer to the SQL Language Reference Guide for the 'CREATE DATABASE'
   statement syntax - page 4-148.

   Here is a sample create database statement:

      SQLDBA> create database NEW_NAME
           2> logfile group 1 ('oracle_home/dbs/log1NEW_NAME.dbf') size 500K,
           3>         group 2 ('oracle_home/dbs/log2NEW_NAME.dbf') size 500K
           4> datafile 'oracle_home/dbs/dbsNEW_NAME.dbf' size 20M
           5> maxdatafiles 50;

7. Once completed run catalog.sql located in the oracle_home/rdbms/admin
   directory. This script must be run under the 'SYS' user or connected
   'internal'.

   NOTE: catproc.sql must also be run if you have the procedural option
         installed.

      SQLDBA>@oracle_home/rdbms/admin/catalog.sql
      SQLDBA>@oracle_home/rdbms/admin/catproc.sql

8. After the database has been created, the SYSTEM tablespace and SYSTEM
   rollback segment will exist. However, a second rollback segment in the
   SYSTEM tablespace must be created and activated before any other
   tablespaces can be created in the database (Refer to SQL Lanuguage
   Reference Manual for full syntax).

      Creating the rollback segment:

        SYNTAX: CREATE ROLLBACK SEGMENT system2
                TABLESPACE SYSTEM
                STORAGE (...);

      Activating the rollback segment:

        SYNTAX: ALTER ROLLBACK SEGMENT system2 ONLINE;

9. Modify the /etc/oratab file by adding the new database name.  This
   is used by dbstart to startup all databases with a 'Y' entry in this
   file.  (See page 4-17 of Oracle for Unix technical Reference Guide).

Source:http://www.fors.com/orasupp/unix/13481_1.HTM

Wednesday, May 21, 2008

Simple Storage for Oracle Database 10g and 11g

Oracle's launch of its Database 11g marks a major step forward in the relationship between Oracle databases and storage infrastructure. With 11g, Oracle has built Direct NFS (network file services) Client into Oracle, offering users the advantages of NAS for greater simplicity in deploying storage, easier storage management, lower cost, and superior scalability.

Attend this mediacast/podcast with Jeff Day of HP and Stan Gibson of SearchStorage.com to learn how to ease your management burdens while reducing storage expenditures. This webcast/podcast will explore how HP's Scalable NAS solution provides the following benefits for Oracle databases:

* Reduced cost and improved performance for your database
* Simple provisioning of storage for Oracle and Oracle RAC
* Superior value over traditional single-filer NAS and SAN products
* Tiered block and file storage in a single, easy-to-manage storage solution
* Integrated client-transparent NFS failover for robust high availability

Get this white paper at: payerhttp://searchoracle.bitpipe.com/data/document.do?res_id=1197907613_863

Saturday, May 17, 2008

How to change your oracle user password?

There are two SQL command syntaxes that can be used to change Oracle user password:


first thing first log in to oracle database
sqlplus "/ as sysdba" or sqlplus [user_name]@[service_name]

1. Use SQL command "alter user" to change your oracle user password (for every of oracle version).

SQL>ALTER USER [user_name] IDENTIFIED BY [password];

2. Use SQL command "PASSWORD" to change your oracle user password (for Oracle8 and above)

SQL> password;
or
SQL> password [user_name]; (In case of changing other oracle user's password. You would need to have the privileges to change other Oracle user's password).

After pressing Enter, you will be prompted to input the old password and new password which would be something similar to:

SQL> password or password [user_name]
Changing password for [user_name]
Old password:
New password:
Retype new password:

Wednesday, May 14, 2008

EXP-00056: ORACLE error 12541 encountered

EXP-00056: ORACLE error 12541 encountered
ORA-12541: TNS:no listener
EXP-00000: Export terminated unsuccessfully

check your tnsname.ora or your server listener

Sunday, May 11, 2008

Best Practices in Data Management

Financial institutions are forced to collect more data and dig deeper into their databases in order to refine their analyses due to constant performance pressures and changing regulatory demands. A holistic, unified approach to data management, one that ensures a smooth flow of information throughout the organization, enables decision makers to see a complete picture of enterprise risk.

This white paper discusses best practices for data management and various components required for successful enterprise risk management (ERM) and their benefits. Learn how your ERM solution can:

* Provide analytic and data quality capabilities.
* Produce reports for a variety of internal and external constituents.
* Group data from disparate sources to achieve a single view.
* Establish a flexible, unified data model.

Get this white paper at: http://searchoracle.bitpipe.com/data/document.do?res_id=1204657871_301

Simple Storage for Oracle Database 10g and 11g

Oracle's launch of its Database 11g marks a major step forward in the relationship between Oracle databases and storage infrastructure. With 11g, Oracle has built Direct NFS (network file services) Client into Oracle, offering users the advantages of NAS for greater simplicity in deploying storage, easier storage management, lower cost, and superior scalability.

Attend this podcast with Jeff Day of HP and Stan Gibson of SearchStorage.com to learn how to ease your management burdens while reducing storage expenditures. This podcast will explore how HP's Scalable NAS solution provides the following benefits for Oracle databases:

* Reduced cost and improved performance for your database
* Simple provisioning of storage for Oracle and Oracle RAC
* Superior value over traditional single-filer NAS and SAN products
* Tiered block and file storage in a single, easy-to-manage storage solution
* Integrated client-transparent NFS failover for robust high availability

Get this white paper at: http://searchoracle.bitpipe.com/data/document.do?res_id=1198017504_81

How to configure Windows 32 bit to let Oracle use more than 2 GB of memory

The 32-bit operating systems such as Windows 2000 and Windows Server
2003 provide access to 4-gigabyte (GB) of virtual address space. The lower 2 GB of virtual memory is private per process and available for application use. The upper 2 GB is reserved for operating system use.


All operating system editions, starting with Microsoft Windows XP Professional and later, including Windows Server 2003, include a boot.ini switch that can provide applications with access to 3 GB of virtual memory, limiting the operating system to 1 GB.


If you are running oracle on windows 32 bit OS then you are facing the 2GB limit of memory due to the information above there are 3 ways of dealing with that limitation:



  1. Use 64-Bit windows

  2. Apply the /3GB switch in boot.ini to allow 3GB to be made available to
    oracle, with the kernel taking 1GB

  3. Apply the /PAE switch in boot.ini to allow the use of upper memory
    (anything above 4GB). Oracle needs to be configured to use this
    memory, and this memory can only be used for the buffer cache. Shared
    Pool, PGA, all the rest needs to sit in 'base' memory no matter what.



    The /3GB and /PAE switches can be used together, but your
    OS would recognize no more than 16GB of memory



The best way I suggest is finding yourself a 64-bit OS to maximize your memory usage. But if that is not the case the you can do here is how you do the modification on you boot.ini.

Configure your boot.ini

To be able to edit your window’s boot.ini you need to go to Control Panel » System » Advanced » Startup and Recovery » Settings » System startup » Edit .
The file should look something similar to the following:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(1)partition(2)\WINNT
[operating systems]
multi(0)disk(0)rdisk(1)partition(2)\WINNT="Microsoft Windows 2003 Server" /fastdetect


As the solution above you need to apply /3GB or /PAE or both in boot.ini file after ”multi(0)disk(0)rdisk(1)partition(2)\WINNT="Microsoft Windows 2003 Server" /fastdetect” line. So after appling it your boot.ini would look like this:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(1)partition(2)\WINNT
[operating systems]
multi(0)disk(0)rdisk(1)partition(2)\WINNT="Microsoft Windows 2003 Server" /fastdetect /3GB /PAE



reboot you windows once before configuring your oracle instance.

Wednesday, May 7, 2008

Real-Time Performance Boost with New Oracle Database Option

Oracle In-Memory Database Cache now offers Oracle Database customers lightning-fast transaction response times by caching frequently used data in the application tier.

Based on the Oracle TimesTen In-Memory Database, the new option delivers a real-time, dynamic, updatable cache for frequently accessed data in the Oracle Database. By caching performance-critical subsets of an Oracle Database in main memory in the application tier, the software dramatically reduces application response times and increases throughput by relying on memory-optimized algorithms and avoiding communication delays between computers and processes.

"This new option is well integrated with the Oracle Database,” says William Hardie, vice president of Database product marketing, Oracle.” It will help Oracle Database customers meet their extreme application performance needs as well as reduce development time."

For performance-critical applications in industries such as communications, financial services, and defense, the Oracle In-Memory Database Cache option delivers application response times in the microseconds by bringing the frequently accessed data closer to the application and by executing SQL requests in the TimesTen In-Memory Database.

The new option is compatible and integrated with Oracle Database Enterprise Edition, including Oracle Real Application Clusters, and also supports Oracle Enterprise Manager, Oracle SQL Developer, and components of Oracle Fusion Middleware such as Oracle Application Server, Oracle Jdeveloper, and Oracle TopLink.

“With the use of the Oracle In-Memory Database Cache, Oracle Database customers can expect to benefit from the increased performance and throughput of real-time application," says Hardie.
>>more information

Sunday, May 4, 2008

ORA-27101: shared memory realm does not exist

ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist

Cause: SGA is not allocated and instance is not started due to use the wrong oracle_sid and or oracle_home.

Action: use the following command on your sqlplus

set ORACLE_SID = grms

sqlplus /nolog

sql>conn system/manager as sysdba

sql>shutdown abort

sql>startup



Oralce Error List

ORA-06512
ORA-09936
ORA-00600
ORA-00904
ORA-00942
ORA-01034
ORA-600
ORA-06550
ORA-12560
ORA-01422
ORA-27101
ORA-20000
ORA-01555
ORA-01722
ORA-12500
ORA-01000
ORA-12514
ORA-01110
ORA-01017
ORA-00001
ORA-01843
ORA-01033
ORA-00054
ORA-07445
ORA-12638
ORA-06508
ORA-01652
ORA-00020
ORA-01113
ORA-12203
ORA-00922
ORA-01658
ORA-00923
ORA-03114
ORA-24324
ORA-01002
ORA-01502
ORA-29283
ORA-01461
ORA-12571
ORA-01151
ORA-01008
ORA-00932
ORA-01401
ORA-12705
ORA-3113
ORA-27102
ORA-01861
ORA-01036
ORA-12547
ORA-12505
ORA-01653
ORA-01041
ORA-01001
ORA-01012
ORA-01013
ORA-00900
ORA-02291
ORA-28000
ORA-04091
TNS-00510
ORA-01858
ORA-01427
ORA-02068
ORA-03106
ORA-24338
ORA-01410
exp-00091
ORA-00972
ORA-00979
ORA-01438
ORA-04098
ORA-3136
TNS-12502
ORA-12170
ORA-00905
ORA-12899
ORA-1403
ORA-12519
ORA-02292
ORA-12518
ORA-00984
ORA-00937
ORA-02049
ORA-00980
ORA-01841
ORA-1031
ORA-08103
ORA-01950
ORA-12162
ORA-30036
ORA-27100
ORA-00913
ORA-03135
TNS-12505
ORA-12540
ORA-02019
EXP-00056
ORA-00936

ORA-01034: ORACLE not available

ORA-01034: ORACLE not available

Cause: oracle database/ instance not started

Action: start oracle oracle database/instance




To start oracle simply just logon using sqlplus on local server

sqlplus "/ as sysdba"

then start the database using the following command

sqplus> startup

ORA-00942 : table or view does not exist

ORA-00942: table or view does not exist

Cause: The table or view entered does not exist or you don't have the privilege to that referencestable or view. Or those specified table or view belong to difference schema.

Action: check if you specified the correct table name or check if you have the privilege to the specific object or specified schema and dot in front of those table or view i.e. [schema name].table/view name.




related website
http://www.adp-gmbh.ch/ora/err/ora_00942.html
http://ora-00942.ora-code.com/


.

ORA-00904: invalid identifier

ORA-00904: "string": invalid identifier/invalid column name

Cause: The column name entered is either missing or invalid.

Action: Enter a valid column name.



A valid column name must begin with a letter, be less than or equal to 30 characters, and consist of only alphanumeric characters and the special characters $, _, and #. If it contains other characters, then it must be enclosed in double quotation marks.

A valid column name may not be an oracle reserver word. The following sql command show list all oracle reserved words

select keyword from V_$RESERVED_WORDS'
or to query the reserved word related to your term just use the following one:
select keyword from V_$RESERVED_WORDS where keyword like '%[your column term]%'

ORA-09933 Deletion of old password file failed

ORA-09933: Deletion of old password file failed.

Cause: The removal of the old password file failed or ORACLE was unable to create a password file.

Action: Check the UNIX error number for the specific reason.

Saturday, May 3, 2008

EXP-00056: ORACLE error 19206 encountered during an expor

EXP-00056: ORACLE error 19206 encountered during an export
Cause: missing or invalid of metadata tables or XMLDB schema was dropped or modified
Action: run the "$ORACLE_HOME/rdbms/admin/catmeta.sql" script when connected as sysdba




you might following error during doing an export of an entire schema in Oracle 9i/10g:


EXP-00056: ORACLE error 19206 encountered
ORA-19206: Invalid value for query or REF CURSOR parameter
ORA-06512: at "SYS.DBMS_XMLGEN", line 83
ORA-06512: at "SYS.DBMS_METADATA", line 353
ORA-06512: at "SYS.DBMS_METADATA", line 418
ORA-06512: at "SYS.DBMS_METADATA", line 457
ORA-06512: at "SYS.DBMS_METADATA", line 1181
ORA-06512: at "SYS.DBMS_METADATA", line 1162
ORA-06512: at line 1
EXP-00056: ORACLE error 19206 encountered
ORA-19206: Invalid value for query or REF CURSOR parameter
ORA-06512: at "SYS.DBMS_XMLGEN", line 83
ORA-06512: at "SYS.DBMS_METADATA", line 353
ORA-06512: at "SYS.DBMS_METADATA", line 418
ORA-06512: at "SYS.DBMS_METADATA", line 457
ORA-06512: at "SYS.DBMS_METADATA", line 1181
ORA-06512: at "SYS.DBMS_METADATA", line 1162
ORA-06512: at line 1
EXP-00000: Export terminated unsuccessfully
(END)

if you do a a single table export could do the trick, but exporting an entire user ("schema") failed with the above error.

This cause of this EXP-00056: ORACLE error 19206 might either be the missing or invalid of metadata tables which need for performing an export or you have dropped or modified the XMLDB schema.

The solution is simply run the following script when connected as sysdba:

$ORACLE_HOME/rdbms/admin/catmeta.sql

i.e. login to your oracle database
at the command line prompt enter

sqlplus "/ as sysdba"

at the sqlplus prompt enter

sqlplus>@$ORACLE_HOME/rdbms/admin/catmeta.sql

Friday, May 2, 2008

Grid Computing on Windows

At Solutia, the IT goal is to get information to the people who need it, any time they need it. Solutia's high?volume manufacturing facilities are humming 24 hours a day, so critical database information must be accessible every minute. Downtime translates into lost production time, which ultimately results in lost revenues for the company.

At the core of Solutia's IT strategy is the simple idea that the required information must be easily available at a low cost. In addition, as the company grows, the capacity to manage and access the information must grow along with it. With 6,000 employees scattered across five continents, Solutia needs a scalable, reliable, high?performance database solution that can work with nearly any application in any location.

In addition to addressing its technical requirements, Oracle RAC enables Solutia to meet it business goals of cost and quality leadership, market innovation, and improving profits.

Get this white paper at: http://searchoracle.bitpipe.com/data/document.do?res_id=1207851849_349

Oracle Database Backup with RMAN


Backup related technical terms



    Main category of doing database backup
  • Whole database backups: a backup of every datafile in the database, plus the control file. Whole database backups are the most common type of backup.
  • Partial database backups: backup of either tablespaces ,datafiles, control files or Archived Redo Log but not the whole database.



    Backup Type
  • Full backup : every time the backup has been doing it will create a whole database.
  • Incremental backup : backup only the updated data, there must be an old backup file for comparison purpose.
    Backup Mode
  • Offline backup/consistent backup: doing backup while the database is offline. The files in the backup contain all the data taken from a same point in time. This type of backup does not require recovery after it is restored.
  • Online backup/inconsistent backup/hot backup : doing backup while the database is online.
    Backup Format
  • Image Copies: this type of backup is copying physical file, this kind of format the original file size would be the same as the copy file size. Which would take space.
  • Backup set: this format is the backup default and only used for Oracle database. The difference between Image Copied and Set Backup is Set Backup would do the backup only the block with data and we could configure the set level and the media type to keep the data on i.e. disk or tape

Recovery Manager (RMAN)

RMAN is an Oracle utility which come with Oracle Database from installation process. The main functionality of this utility is backup, restoring and recovering database.
You can also use operating system commands for backups and SQL*Plus for recovery. This method, also called user-managed backup and recovery, is fully supported by Oracle, although use of RMAN is highly recommended because it is more robust and greatly simplifies administration.

    RMAN related technical terms
  • Target Database: the database server we want to do the backup.
  • Channel Process: the channel which RMAN would access the target database.
  • RMAN Repository: Path that keep RMAN’s information, which will hold backup information of each instance. The default path is configured in control file of each instance. We could create a new database for the use of this purpose. With this new database we could keep the backup’ information of every instances we would do the backup
  • Flash Recovery Area: The flash recovery area is an Oracle-managed directory, file system, or Automatic Storage Management disk group that provides a centralized disk location for backup and recovery files. Oracle creates archived logs in the flash recovery area. RMAN can store its backups in the flash recovery area, and it uses it when restoring files during media recovery. The flash recovery area also acts as a disk cache for tape
  • Recovery catalog: The database the store recovery catalog schema, which contain metadata that RMAN use for backup and recovery


    RMAN Configuration Parameters
  • DB_RECOVERY_FILE_DEST_SIZE: set how much flash_recovery size could go.
  • DB_RECOVERY_FILE_DEST: set the path that keep backup set.


    RMAN Related View List
  • V$RECOVERY_FILE_DEST: This view shows the position of flash recovery.
  • V$FLASH_RECOVERY_AREA_USAGE : this view shows how much the space had been taken for each file.


    Physical File which RMAN could do the backup
  • Database file = { data file, control file, spfile }
  • Archived log file

Note: password file, network configure file (tnsname.ora, listener.ora, sqlnet.ora) we need to do manual backup.

Basic RMAN command

Start & Exit RMAN
# RMAN target /[@] [nocatalog | catalogname]
# RMAN
RMAN> EXIT


run script RMAN from file
# RMAN target / @file1
RMAN> @file1

command to validate RMAN syntax
# RMAN CHECKSYNTAX
# RMAN CHECKSYNTAX @file1


command to display parameters
RMAN> show ;
RMAN> SHOW ALL;
RMAN> CONFIGURE CLEAR;


Media management command

Specify the media
RMAN> CONFIGURE DEFAULT DEVICE TYPE TO ;

Specify to compress the backup
RMAN> CONFIGURE DEVICE TYPE BACKUP TYPE TO ;
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT ‘/backup/ora_df%t_s%s_s%p’;
some of media managers need to configure through parameter.
RMAN> CONFIGURE CHANNEL DEVICE TYPE SBT PARMS=’ENV=mml_env_settings’;


backup data file command
RMAN> BACKUP DATABASE;

backup tablespaces
RMAN> BACKUP TABLESPACE system, users, tools;
RMAN> BACKUP DEVICE TYPE sbt MAXSIZE=10M TABLESPACE user, tool;


Backup data file
RMAN> BACKUP DEVICE TYPE sbt DATAFILE 1,2,3,4 DATAFILECOPY ‘/tmp/system.dbf’;
RMAN> BACKUP DEVICE TYPE sbt TABLESPACE user INCLUDE CURRENT CONTROLFILE;
RMAN> BACKUP AS BACKUPSET DATAFILE
’ORACLE_HOME/oradata/trgt/users01.dbf’,
’ORACLE_HOME/oradata/trgt/tools01.dbf’;


to be able to set the incremental backup, which is level 1 we need to do level 0 first. In other word, we need to do the first backup with level 0. There is one caution to be made, that is when we do the incremental backup, the backup file level 0 และ 1 need to be together so we could completely do the restoration and recovery.
RMAN> BACKUP INCREMENTAL LEVEL [0 | 1] CUMULATIVE DATABASE;

backup control file
Set the configuration so that it could do the auto backup control file and parameter file when there were some changes and when there is some disasters RMAN would recover for that particular instance.
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ;

change the autobackup default name
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE to ‘?/oradata/cf_%F’;
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE clear;


to override autobackup value for any particular session (use run block on RMAN prompt)
RMAN> SET CONFIGURE AUTOBACKUP FORMAT
Backup current control file
RMAN> BACKUP CURRENT CONTROLFILE;
RMAN> BACKUP CURRENT CONTROLFILE TO ’/backup/curr_cf.copy’;


Backup control file
RMAN> BACKUP AS COPY CURRENT CONTROLFILE FORMAT ‘/tmp/control01.ctl’;
RMAN> BACKUP DEVICE TYPE sbt CONTROLFILECOPY ‘/tmp/control01.ctl’;

backup parameter file
RMAN> BACKUP SPFILE;
RMAN> BACKUP DEVICE TYPE sbt SPFILE;


backup archived log file
RMAN> BACKUP ARCHIVELOG …;
RMAN> BACKUP DATABASE PLUS ARCHIVELOG;
RMAN> BACKUP DATABASE PLUS ARCHIVELOG DELETE INPUT;
RMAN> BACKUP ARCHIVELOG COMPLETION TIME BETWEEN ’SYSDATE-31’ AND ’SYSDATE-7’;


restore command
RMAN> RESTORE DATABASE;
RMAN> RESTORE TABLESPACE users;
RMAN> RESTORE DATAFILE <ชื่อ datafile>;
RMAN> RESTORE DATAFILE 7;


recovery command
RMAN> RECOVER DATABASE;
RMAN> RECOVER TABLESPACE users;
RMAN> RECOVER DATAFILE ;
RMAN> RECOVER DATAFILE 7;


backup sample
Backup Database including Archivelog file plus delete archive log file from backup
# RMAN TARGET backup_admin/backup_admin NOCATALOG
RMAN> BACKUP DATABASE PLUS ARCHIVELOG DELETE INPUT;


Backup Database including Control file plus delete un-updated backup.

RMAN> backup incremental level 0 cumulative device type disk tag '%TAG' database include current controlfile;
RMAN> allocate channel for maintenance type disk;
RMAN> delete noprompt obsolete device type disk;
RMAN> release channel;

restore & recovery sample
Recovering whole database
RMAN> STARTUP FORCE MOUNT;
RMAN> RESTORE DATABASE;
RMAN> RECOVER DATABASE;
RMAN> ALTER DATABASE OPEN;


Recovering tablespace
RMAN> SQL 'ALTER TABLESPACE users OFFLINE';
RMAN> RESTORE TABLESPACE users;
RMAN> RECOVER TABLESPACE users;
RMAN> SQL 'ALTER TABLESPACE users ONLINE';

Recovering Datafiles 7
RMAN> SQL 'ALTER DATABASE DATAFILE 7 OFFLINE';
RMAN> RESTORE DATAFILE 7;
RMAN> RECOVER DATAFILE 7;
RMAN> SQL 'ALTER DATABASE DATAFILE 7 ONLINE';


Backup Control File to Trace
To do trace backup control file for recovery when control file is corrupted
for OEM go to “Controlfiles” menu then “Backup To Trace”;
or you could use command line as below.

SQL> ALTER DATABASE BACKUP CONTROLFILE TO TRACE;

The result would be kept as configured parameter USER_DUMP_DEST
the default name is _ora_pid.trc
and default path is /admin//udump
the trace file would contain the sql command that could recreate the control file .

ORA-01422: exact fetch returns more than requested number of rows

ORA-01422: exact fetch returns more than requested number of rows

Cause: The number specified in exact fetch is less than the rows returned.

Action: Rewrite the query or change number of rows requested



With Oralce ORA-01422 error the cause would be you tried to execute a SELECT INTO statement and more than one row was returned. This error is on oracle PL/SQL lanugauge.

Here are the option that you could do.
1. rewrite your sql statement so it return only one record.
2. use an exception in case of unexpected scenario.
The exception syntax would look like this
Syntax:
BEGIN

your sql statement here
ie. select a, b, c into d, e, f from i;
EXCEPTION
WHEN exception1 [OR exception2...]] THEN
...
[WHEN exception3 [OR exception4...] THEN
...]
[WHEN OTHERS THEN
...]

your code need to be something like

BEGIN

your sql statement here
ie. select a, b, c into d, e, f from i;
EXCEPTION
WHEN TOO_MANY_ROWS THEN
do something ie. raise error
WHEN OTHERS THEN
do something
END;

3. use cursor for more information on cursor take a look at
http://www.oracle-base.com/articles/8i/UsingRefCursorsToReturnRecordsets.php.
http://www.psoug.org/reference/ref_cursors.html

ORA-00001: unique constraint (string.string) violated

ORA-00001: unique constraint (string.string) violated

Cause: An UPDATE or INSERT statement attempted to insert a duplicate key. For Trusted Oracle configured in DBMS MAC mode, you may see this message if a duplicate entry exists at a different level.

Action: Either remove the unique restriction or do not insert the key.



the sample message might be as below

insert into student(pk_id, fieldname) values(1, '')
*
ERROR at line 1:
ORA-00001: unique constraint (PROMIS.SYS_C0012876) violated


With the example above we knew that it must be at table student. But if the query is more complex it might be hard to locate the problem constraint. If you already know where the prob is go to step 2 otherwise go to step 1

Step 1.> Locate the problem
To locate where might be the problem you may need to use the following query to find which table is your problem.
select distinct table_name
from all_indexes
where index_name = 'CONSTRAINT_NAME';

replace the CONSTRAINT_NAME with your constraint code (as the example above it is the text with the underline, SYS_C0012876. So the query would be:

select distinct table_name
from all_indexes
where index_name = 'SYS_C0012876';

and you will get the table name which cause the problem.

Step 2.> solve the problem
The options to resolve this Oracle ORA-00001 error are:

1. Modify your SQL so that a duplicate value is not created.
2. Change the constraint to allow duplicate values.
3. Diable the unique constraint.
4. Drop the unique constraint.

from 1-4 I would say it is likely that the first one is quite the right solution for me, as the constraint itself had the reason to be there from the first place. I suggest stick to number 1 to be on the save side, unless you know what you are doing.

ORA-00936: missing expression

ORA-00936: missing expression

Cause: A required part of a clause or expression has been omitted. For example, a SELECT statement may have been entered without a list of columns or expressions or with an incomplete expression. This message is also issued in cases where a reserved word is misused, as in SELECT TABLE (see case 2 below).

Action: Check the statement syntax and specify the missing component.


1. if you are using prepare statement to connect to oracle with vb or asp you might as get this error as using named parameters. The reason is that OLEDB doesn't support named parameters. e.g.


here i have the example of how to do it

Dim objCmd

Set objCmd = Server.CreateObject("ADODB.Command")
Set objCmd.ActiveConnection = objConn

objCmd.CommandType = adCmdText


objCmd.CommandText = "{CALL procedurename(?,?,?,?,?,?)}"

objCmd.Parameters.Append objCmd.CreateParameter("@a", adVarChar, adParamInput,16)
objCmd.Parameters.Append objCmd.CreateParameter("@b", adVarChar, adParamInput,32)
objCmd.Parameters.Append objCmd.CreateParameter("@c", adDouble, adParamOutput)
objCmd.Parameters.Append objCmd.CreateParameter("@d", adVarChar, adParamOutput,255)
objCmd.Parameters.Append objCmd.CreateParameter("@e", adDouble, adParamOutput)
objCmd.Parameters.Append objCmd.CreateParameter("@f", adDouble, adParamOutput)

objCmd("@a") = sString
objCmd("@b") = sString2

objCmd.Execute

If ERR = 0 Then

o_errnum = objCmd("@c")
o_errStr = objCmd("@d")
o_usertype = objCmd("@e")
o_userid = objCmd("@f")

isValidLogin = True

End If
Set objCmd = Nothing

with this example you can use procedure to pass the paremeter to oracle and at the same time get the output parameters. The keyword is adParamOutput and adParamInput plus you need to specified parameter type make sure they are the same with your oracle procedure. Otherwise you will get an error.

2. If you are not running procedure. The other possibly cause of the error "ORA-00936: missing expression" might be that you tried to execute a SELECT statement and forget to the list of the columns in the SELECT statement.
i.e.

select
from tablename;


this also would raise you the same error

So the solution would be "Check the statement syntax and specify the missing component". If you are calling procedure using ? in your preparestatement not @ as I had already said "OLEDB doesn't support named parameters"

EXP-00056: ORACLE error 6550 encountered


EXP-00056: ORACLE error 6550 encountered
ORA-06550: line 1, column 41:
PLS-00302: component 'SET_NO_OUTLINES' must be declared
ORA-06550: line 1, column 15:
PL/SQL: Statement ignored
EXP-00000: Export terminated unsuccessfully


You would get this error when you are trying to export your database with exp binary that is not compatible with your database
The cause of this error is, as the above message had already mentioned, that you are tring to export your database from client with oracle version higher
than the server version ie. using oracle 10g to export from oracle database 9i.



The solution are
- first option: you need exp program with the same version (or lower one) as your database, which mean
you need to find the client machine that have the same oracle version or lower installed
or
you may need to reinstall your oracle client.

- second option: if you have an access to your server, physically or remotely, simply just logon and use the exp command from the command line.

Step by Step Installing Red Hat Linux on VmWare

Installing Red Hat over VmWare - part 1




Installing Red Hat over VmWare - part 2





Installing Red Hat over VmWare - part 3




Installing Red Hat over VmWare - part 4

Thursday, May 1, 2008

SUN'S REFERENCE ARCHITECTURE FOR ORACLE 11g GRID

Sun's Reference Architecture for Oracle 11g Grid is a portfolio of Sun and third-party products designed to reduce the risks, uncertainty, and costs associated with implementing an Oracle database within a grid computing environment. Designed, tested, implemented, and tuned at the Sun Competency Center for Oracle in Menlo Park, California, the reference architecture consists of recommended, integrated hardware and software stacks for a proven grid database solution. Along with this architecture, Sun provides a best practices framework for obtaining optimal performance, availability, and resiliency.

The most compelling benefits of Sun's Reference Architecture for Oracle 11g Grid come not from the individual components, but from the ability to integrate complementary elements - whether they come from Sun or another vendor. The combination of Sun Fire x64 servers with AMD Opteron processors and Cisco InfiniBand technology ensures higher database throughput, while the adoption of Solaris Cluster Advanced Edition for RAC enhances the reliability and availability of Oracle RAC 11g. The result is a solution that can help deliver the highest service levels and satisfy the most demanding business requirements of a database grid.

Get this white paper at:
http://searchoracle.bitpipe.com/data/document.do?res_id=1200499879_537