<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-44767529375815035</atom:id><lastBuildDate>Sun, 08 Sep 2024 14:50:20 +0000</lastBuildDate><category>Normalization Process</category><category>Oracle FAQ</category><category>Oracle Database Architecture</category><category>Installing Oracle DB</category><category>Oracle 10g</category><category>Oracle Products</category><title>ORACLE SQL Tutorials</title><description></description><link>http://oracle-sliit.blogspot.com/</link><managingEditor>noreply@blogger.com (Unknown)</managingEditor><generator>Blogger</generator><openSearch:totalResults>44</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-915766146699906995</guid><pubDate>Tue, 23 Dec 2008 06:58:00 +0000</pubDate><atom:updated>2008-12-22T23:02:03.498-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Installing Oracle DB</category><title>Optimal Flexible Architecture (OFA)</title><description>&lt;span style=&quot;font-weight: bold;&quot;&gt;OFA is designed to:&lt;/span&gt;&lt;br /&gt;                                -Organize large amounts of software&lt;br /&gt;                                -Facilitate routine administrative tasks&lt;br /&gt;                                -Facilitate switching between multiple Oracle databases&lt;br /&gt;                                -Manage and administer database growth adequately&lt;br /&gt;                                -Help eliminate fragmentation of free space&lt;br /&gt;&lt;br /&gt;OFA is a method for configuring the &lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle database &lt;/span&gt;and other databases. OFA takes advantage of the capabilities of the OS and disk subsystems to create an easy-to-administer configuration that allows maximum flexibility for growing and high-performance databases. The methods described here are the basics of OFA.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;OFA is designed to:&lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Organize large amounts of complicated software and data on the disk to avoid device bottlenecks and poor performance&lt;br /&gt;Facilitate routine administrative tasks, such as software and data backup, which are often vulnerable to data corruption&lt;br /&gt;Facilitate switching between multiple Oracle databases&lt;br /&gt;Adequately manage and administer database growth&lt;br /&gt;Help eliminate fragmentation of free space in the data dictionary, isolate other fragmentation, and minimize resource contention&lt;br /&gt;For details about the goals and implementation of OFA, refer to the Oracle Installation Guide for UNIX Systems.&lt;br /&gt;&lt;/div&gt;&lt;img src=&quot;file:///C:/DOCUME%7E1/DPSAMA%7E1/LOCALS%7E1/Temp/moz-screenshot.jpg&quot; alt=&quot;&quot; /&gt;&lt;img src=&quot;file:///C:/DOCUME%7E1/DPSAMA%7E1/LOCALS%7E1/Temp/moz-screenshot-1.jpg&quot; alt=&quot;&quot; /&gt;&lt;img src=&quot;file:///C:/DOCUME%7E1/DPSAMA%7E1/LOCALS%7E1/Temp/moz-screenshot-2.jpg&quot; alt=&quot;&quot; /&gt;&lt;img src=&quot;file:///C:/DOCUME%7E1/DPSAMA%7E1/LOCALS%7E1/Temp/moz-screenshot-3.jpg&quot; alt=&quot;&quot; /&gt;</description><link>http://oracle-sliit.blogspot.com/2008/12/optimal-flexible-architecture-ofa.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-6949422524492468933</guid><pubDate>Mon, 22 Dec 2008 06:48:00 +0000</pubDate><atom:updated>2008-12-21T22:51:08.659-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Installing Oracle DB</category><title>Checking the System Requirements</title><description>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilf4be33cdV7jfWfAp39uVKE64UPFfEPvye_s7NvkV7iA3-2lEv0vd1TVB5jTIJU3Bas3z70Jyiq5JHBm_V0mGejIyO3W_PH4RJolB0mqKOFfDpKqDsdgHiKOpbt_EgHadMj8w756kaA/s1600-h/chk_system_requirement.JPG&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 361px; height: 165px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilf4be33cdV7jfWfAp39uVKE64UPFfEPvye_s7NvkV7iA3-2lEv0vd1TVB5jTIJU3Bas3z70Jyiq5JHBm_V0mGejIyO3W_PH4RJolB0mqKOFfDpKqDsdgHiKOpbt_EgHadMj8w756kaA/s320/chk_system_requirement.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5282502987177478770&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Adequate&lt;br /&gt;temporary space&lt;br /&gt;64-bit versus  32-bit issues&lt;br /&gt;Checks for the correct operating system (OS) &lt;br /&gt;OS patch level&lt;br /&gt;System packages&lt;br /&gt;System and kernel parameters&lt;br /&gt;X Server permissions&lt;br /&gt;Sufficient swapping&lt;br /&gt;Nonempty ORACLE_HOME&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;The Oracle Database 10g installation automates most of the prerequisite checks:&lt;br /&gt; &lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Adequate temporary space is checked for. It is determined what the minimum temporary space requirements are for installation and configuration, and those requirements are validated during the installation process.&lt;br /&gt;64-bit installations are prevented from being installed into Oracle homes with 32-bit software already installed (and vice versa).&lt;br /&gt;On the Linux platform, RedHat-3.0, 4.0, Asianux 1.0, 2.0, and SUSE Linux E.S. 9.0 are certified.&lt;br /&gt;The installation process checks whether all the required OS patches are installed.&lt;br /&gt;The installation process checks whether all the required system and kernel parameters are set correctly.&lt;br /&gt;The installation process verifies that the DISPLAY environment variable is set and that the user has sufficient permissions to display to the specified DISPLAY.&lt;br /&gt;The installation process verifies that the system has sufficient swapping set.&lt;br /&gt;The installation process verifies that the Oracle home into which the new installation is being performed is either empty or is one of a handful of supported releases on top of which Oracle Database 10g can be installed, and that they are registered in the Oracle inventory.&lt;br /&gt;&lt;/div&gt;</description><link>http://oracle-sliit.blogspot.com/2008/12/checking-system-requirements.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilf4be33cdV7jfWfAp39uVKE64UPFfEPvye_s7NvkV7iA3-2lEv0vd1TVB5jTIJU3Bas3z70Jyiq5JHBm_V0mGejIyO3W_PH4RJolB0mqKOFfDpKqDsdgHiKOpbt_EgHadMj8w756kaA/s72-c/chk_system_requirement.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-5400835835275231455</guid><pubDate>Mon, 22 Dec 2008 06:42:00 +0000</pubDate><atom:updated>2008-12-21T22:45:57.876-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Installing Oracle DB</category><title>Installation: System Requirements</title><description>&lt;span style=&quot;font-weight: bold;&quot;&gt;Memory requirements:&lt;/span&gt;&lt;br /&gt;1 GB for the instance with Database Control&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Disk space requirements:&lt;/span&gt;&lt;br /&gt;1.5 GB of swap space&lt;br /&gt;400 MB of disk space in the /tmp directory&lt;br /&gt;Between 1.5 GB and 3.5 GB for the Oracle software&lt;br /&gt;1.2 GB for the preconfigured database (optional)&lt;br /&gt;2.4 GB for the flash recovery area (optional)&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Operating system:&lt;/span&gt; See documentation.&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;A standard installation can be completed on a computer with 1 GB of RAM and 1.5 GB of swap space or larger.&lt;br /&gt;Depending on the activity level of the machine on which you are installing the &lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle database&lt;/span&gt; software, the standard installation can complete in 20 minutes or less.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Some installation details:&lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Oracle Database 10g ships only one seed database template. Duplicated files are removed.&lt;br /&gt;Many other products and demonstrations are installable from additional CDs.&lt;br /&gt;The hardware requirements listed in the slide are minimal requirements across all platforms. Your installation may have additional requirements (especially disk space).&lt;br /&gt;Note: An Enterprise Edition installation type that includes a standard seed database is referred to as a “standard installation.”&lt;br /&gt;&lt;/div&gt;</description><link>http://oracle-sliit.blogspot.com/2008/12/installation-system-requirements.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-7561901884658046848</guid><pubDate>Fri, 05 Dec 2008 06:00:00 +0000</pubDate><atom:updated>2008-12-04T22:07:54.669-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Installing Oracle DB</category><title>Tools Used to Administer  an Oracle Database</title><description>&lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle &lt;/span&gt;Universal Installer&lt;br /&gt;Database Configuration Assistant&lt;br /&gt;Database Upgrade Assistant&lt;br /&gt;Oracle Net Manager&lt;br /&gt;Oracle Enterprise Manager&lt;br /&gt;SQL*Plus and iSQL*Plus&lt;br /&gt;Recovery Manager&lt;br /&gt;Oracle Secure Backup&lt;br /&gt;Data Pump&lt;br /&gt;SQL*Loader&lt;br /&gt;Command-line tools&lt;br /&gt;&lt;br /&gt;You can use the following tools for installation and upgrade:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle Universal Installer (OUI):&lt;/span&gt; Oracle Universal Installer installs your &lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle &lt;/span&gt;software and options. It can automatically launch the Database Configuration Assistant (DBCA) to create a database.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Database Configuration Assistant (DBCA):&lt;/span&gt; It creates a database from Oracle-supplied templates. It enables you to copy a preconfigured seed database. Alternatively, you can create your own database and templates.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Database Upgrade Assistant (DBUA):&lt;/span&gt; This tool guides you through the upgrade of your existing database to a new Oracle release.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle Net Manager:&lt;/span&gt; This is used to configure network connectivity for your &lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle&lt;/span&gt; databases and applications.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;The following tools are used to manage your Oracle &lt;a href=&quot;http://oracle-sliit.blogspot.com/2008/11/oracle-instance-management.html&quot;&gt;instance &lt;/a&gt;and database:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle Enterprise Manager (EM):&lt;/span&gt; EM combines a graphical console, agents, common services, and tools to provide an integrated and comprehensive system management platform for managing Oracle products. After you have installed the Oracle software, created or upgraded a database, and configured the network, you can use Enterprise Manager as the single interface for managing your database. In addition to providing a Web-based user interface for executing SQL commands, it seamlessly interfaces with other Oracle components that are used to administer your database (for example, Recovery Manager and Scheduler).&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;The three main Enterprise Manager tools that are used to administer an Oracle database are:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Enterprise Manager Database Console:&lt;/span&gt; Used to administer one database&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Enterprise Manager Grid Control:&lt;/span&gt; Used to administer many databases at the same time&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Enterprise Manager Java Console:&lt;/span&gt; Used to access tools that are not Web enabled&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;SQL*Plus:&lt;/span&gt; SQL*Plus is the standard command-line interface for managing your database.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;iSQL*Plus:&lt;/span&gt; iSQL*Plus is a browser-based interface to an Oracle database.&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Recovery Manager (RMAN):&lt;/span&gt; RMAN is an Oracle tool that provides a complete solution for the backup, restoration, and recovery needs of the entire database or of specific database files.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle Secure Backup provides tape backup management for the Oracle ecosystem, which includes:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;Oracle database protection to tape through integration with Recovery Manager&lt;br /&gt;Seamless support of Oracle Real Application Clusters (RAC)&lt;br /&gt;Central administration of distributed clients and media servers including Oracle Application Servers, Oracle Collaboration Suites, Oracle home, and binaries&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Data Pump:&lt;/span&gt; Data Pump enables the high-speed transfer of data from one database to another. For example, you may want to export a table and import it into another database.&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;SQL*Loader: &lt;/span&gt;The SQL*Loader utility enables the loading of data from an external file into an Oracle database. It is one of several Oracle utilities that you can use to load data into database tables.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Command-line tools:&lt;/span&gt;&lt;br /&gt;To administer Enterprise Manager, use:&lt;br /&gt;                   emctl start | status | set | stop&lt;br /&gt;&lt;br /&gt;To stop and start iSQL*Plus, use:&lt;br /&gt;                  isqlplusctl start | stop&lt;br /&gt;&lt;br /&gt;To administer the listener, use:&lt;br /&gt;                  lsnrctl help | start | status | stop</description><link>http://oracle-sliit.blogspot.com/2008/12/tools-used-to-administer-oracle.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-1474150861325645022</guid><pubDate>Fri, 05 Dec 2008 05:55:00 +0000</pubDate><atom:updated>2008-12-04T21:59:35.772-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Installing Oracle DB</category><title>Tasks of an Oracle Database Administrator</title><description>A prioritized approach for designing, implementing, and maintaining an &lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle database &lt;/span&gt;involves the following tasks:&lt;br /&gt;1.    Evaluating the database server hardware&lt;br /&gt;2.    Installing the Oracle software&lt;br /&gt;3.    Planning the database and security strategy&lt;br /&gt;4.    Creating, migrating, and opening the database&lt;br /&gt;5.    Backing up the database&lt;br /&gt;6.    Enrolling system users and planning for their Oracle Network access&lt;br /&gt;7.    Implementing the database design&lt;br /&gt;8.    Recovering from database failure&lt;br /&gt;9.    Monitoring database performance&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;A DBA is typically responsible for installing the &lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle software &lt;/span&gt;and creating the database. As a DBA, you may be responsible for creating database &lt;a href=&quot;http://oracle-sliit.blogspot.com/2008/11/oracle-memory-structure.html&quot;&gt;storage structures&lt;/a&gt;, such as &lt;a href=&quot;http://oracle-sliit.blogspot.com/2008/11/tablespaces-and-data-files.html&quot;&gt;tablespaces&lt;/a&gt;. In addition, you may create the schema or set of objects to hold application data.&lt;br /&gt;&lt;br /&gt;You must ensure that the database is available for users. You can accomplish this by starting up the database, backing up the database on a regular basis, and monitoring the performance of the database. These tasks should be performed within the framework of a security strategy.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://oracle-sliit.blogspot.com/2008/12/tasks-of-oracle-database-administrator.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-2767449547474966115</guid><pubDate>Wed, 03 Dec 2008 08:32:00 +0000</pubDate><atom:updated>2008-12-03T00:46:02.339-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Oracle Database Architecture</category><title>Logical and Physical Database Structure</title><description>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw1dD138bfYMwtU22eHvUYYy_Kp_frauGlPlXthAqP1s3STUhsjHFu6vqE8qphvX4jsvyHCAiaj7n6ihBJ74Tyb6jMfGbgeFcvkRwsRtDMnjmyz0j2445nEwUh8o9yzKHFcW9RahxkHQ/s1600-h/logical_phisical_structure.JPG&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 320px; height: 250px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw1dD138bfYMwtU22eHvUYYy_Kp_frauGlPlXthAqP1s3STUhsjHFu6vqE8qphvX4jsvyHCAiaj7n6ihBJ74Tyb6jMfGbgeFcvkRwsRtDMnjmyz0j2445nEwUh8o9yzKHFcW9RahxkHQ/s320/logical_phisical_structure.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5275479284984248322&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;An &lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle database &lt;/span&gt;is a collection of data that is treated as a unit. The general purpose of a database is to store and retrieve related information. The database has &lt;span style=&quot;font-weight: bold;&quot;&gt;logical structures&lt;/span&gt; and &lt;span style=&quot;font-weight: bold;&quot;&gt;physical structures&lt;/span&gt;.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;a href=&quot;http://oracle-sliit.blogspot.com/2008/11/tablespaces-and-data-files.html&quot;&gt;Tablespaces&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;A database is divided into logical storage units called &lt;a href=&quot;http://oracle-sliit.blogspot.com/2008/11/tablespaces-and-data-files.html&quot;&gt;tablespaces&lt;/a&gt;, which group related logical structures together. For example, tablespaces commonly group all of an application’s objects to simplify some administrative operations. You may have a tablespace for application data and an additional one for application indexes.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Databases, Tablespaces, and Data Files&lt;/span&gt;&lt;br /&gt;The relationship among databases, tablespaces, and &lt;a href=&quot;http://oracle-sliit.blogspot.com/2008/11/tablespaces-and-data-files.html&quot;&gt;data files&lt;/a&gt; is illustrated in the slide. Each database is logically divided into one or more tablespaces. One or more data files are explicitly created for each tablespace to physically store the data of all logical structures in a tablespace. If it is a TEMPORARY tablespace, instead of a data file, then the tablespace has a temporary file.&lt;br /&gt;&lt;br /&gt;A schema is a collection of database objects that are owned by a database user. Schema objects are the logical structures that directly refer to the database’s data. Schema objects include such structures as tables, views, sequences, stored procedures, synonyms, indexes, clusters, and database links. In general, schema objects include everything that your application creates in the database.&lt;br /&gt;&lt;br /&gt;&lt;a style=&quot;font-weight: bold;&quot; href=&quot;http://oracle-sliit.blogspot.com/2008/11/segmentsextents-and-blocks.html&quot;&gt;Data Blocks&lt;/a&gt;&lt;br /&gt;At the finest level of granularity, an Oracle database’s data is stored in data &lt;a href=&quot;http://oracle-sliit.blogspot.com/2008/11/segmentsextents-and-blocks.html&quot;&gt;blocks&lt;/a&gt;. One data block corresponds to a specific number of bytes of physical database space on the disk. A data block size is specified for each tablespace when it is created. A database uses and allocates free database space in Oracle data blocks.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://oracle-sliit.blogspot.com/2008/11/segmentsextents-and-blocks.html&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Extents &lt;/span&gt;&lt;/a&gt;&lt;br /&gt;The next level of logical database space is called an extent. An &lt;a href=&quot;http://oracle-sliit.blogspot.com/2008/11/segmentsextents-and-blocks.html&quot;&gt;extent &lt;/a&gt;is a specific number of contiguous data blocks (obtained in a single allocation) that are used to store a specific type of information.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://oracle-sliit.blogspot.com/2008/11/segmentsextents-and-blocks.html&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Segments &lt;/span&gt;&lt;/a&gt;&lt;br /&gt;The level of logical database storage above an extent is called a &lt;a href=&quot;http://oracle-sliit.blogspot.com/2008/11/segmentsextents-and-blocks.html&quot;&gt;segment&lt;/a&gt;. A segment is a set of extents allocated for a certain logical structure. For example, the different types of segments include:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Data segments:&lt;/span&gt; Each nonclustered, non-indexed-organized table has a data segment. All of the table’s data is stored in the extents of its data segment. For a partitioned table, each partition has a data segment. Each cluster has a data segment. The data of every table in the cluster is stored in the cluster’s data segment.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Index segments:&lt;/span&gt; Each index has an index segment that stores all of its data. For a partitioned index, each partition has an index segment.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Undo segments:&lt;/span&gt; One UNDO tablespace is created by the database administrator to temporarily store undo information. The information in an undo segment is used to generate read-consistent database information and, during database recovery, to roll back uncommitted transactions for users.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Temporary segments:&lt;/span&gt; Temporary segments are created by the Oracle database when a SQL statement needs a temporary work area to complete execution. When the statement finishes execution, the temporary segment’s extents are returned to the instance for future use. Specify a default temporary tablespace for every user or a default temporary tablespace, which is used databasewide.&lt;br /&gt;&lt;br /&gt;The Oracle database dynamically allocates space. When the existing extents of a segment are full, additional extents are added. Because extents are allocated as needed, the extents of a segment may or may not be contiguous on the disk.&lt;br /&gt;&lt;/div&gt;</description><link>http://oracle-sliit.blogspot.com/2008/12/logical-and-physical-database-structure.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw1dD138bfYMwtU22eHvUYYy_Kp_frauGlPlXthAqP1s3STUhsjHFu6vqE8qphvX4jsvyHCAiaj7n6ihBJ74Tyb6jMfGbgeFcvkRwsRtDMnjmyz0j2445nEwUh8o9yzKHFcW9RahxkHQ/s72-c/logical_phisical_structure.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-3719834757985281896</guid><pubDate>Mon, 01 Dec 2008 05:56:00 +0000</pubDate><atom:updated>2008-11-30T22:00:33.973-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Oracle Database Architecture</category><title>Segments,Extents and Blocks</title><description>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3ngKCkRHdPNgVfC7iARyQZvmeYbsPcL3Jx3uw9U7KwtKwhtipe6praPfJyLS4PkIDvMJWhmlQlAlCcaTFa5C3_V7tla5uDDAkRADvDEZeTc6ch4ON8V-Us2Rna0YIyxCp2u9EZjCx_A/s1600-h/segment_extent_block.JPG&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 320px; height: 176px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3ngKCkRHdPNgVfC7iARyQZvmeYbsPcL3Jx3uw9U7KwtKwhtipe6praPfJyLS4PkIDvMJWhmlQlAlCcaTFa5C3_V7tla5uDDAkRADvDEZeTc6ch4ON8V-Us2Rna0YIyxCp2u9EZjCx_A/s320/segment_extent_block.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5274696866746877490&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Database &lt;/span&gt;objects, such as tables and indexes, are stored as segments in tablespaces. Each segment contains one or more extents. An extent consists of contiguous data blocks, which means that each extent can exist only in one data file. Data blocks are the smallest unit of I/O in the database.&lt;br /&gt;When the database requests a set of data blocks from the operating system (OS), the OS maps this to an actual file system or disk block on the storage device. Because of this, you need not know the physical address of any of the data in your database. This also means that a data file can be striped or mirrored on several disks.&lt;br /&gt;The size of the data block can be set at the time of the creation of the database. The default size of 8 KB is adequate for most databases. If your database supports a data warehouse application that has large tables and indexes, then a larger block size may be beneficial.&lt;br /&gt;If your database supports a transactional application where reads and writes are random, then specifying a smaller block size may be beneficial. The maximum block size depends on your OS. The minimum Oracle block size is 2 KB and should rarely (if ever) be used.&lt;br /&gt;You can have tablespaces with different block sizes. However, this should be used only for transportable tablespaces. For details, see the Database Administrator’s Guide.&lt;br /&gt;&lt;/div&gt;</description><link>http://oracle-sliit.blogspot.com/2008/11/segmentsextents-and-blocks.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3ngKCkRHdPNgVfC7iARyQZvmeYbsPcL3Jx3uw9U7KwtKwhtipe6praPfJyLS4PkIDvMJWhmlQlAlCcaTFa5C3_V7tla5uDDAkRADvDEZeTc6ch4ON8V-Us2Rna0YIyxCp2u9EZjCx_A/s72-c/segment_extent_block.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-1473471297406126059</guid><pubDate>Fri, 28 Nov 2008 06:58:00 +0000</pubDate><atom:updated>2008-11-27T23:00:10.583-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Oracle Database Architecture</category><title>SYSTEM and SYSAUX Tablespaces</title><description>The &lt;span style=&quot;font-weight: bold;&quot;&gt;SYSTEM &lt;/span&gt;and &lt;span style=&quot;font-weight: bold;&quot;&gt;SYSAUX &lt;/span&gt;tablespaces are mandatory tablespaces.&lt;br /&gt;They are created at the time of database creation.&lt;br /&gt;They must be online.&lt;br /&gt;The &lt;span style=&quot;font-weight: bold;&quot;&gt;SYSTEM &lt;/span&gt;tablespace is used for core functionality (for example, data dictionary tables).&lt;br /&gt;The auxiliary &lt;span style=&quot;font-weight: bold;&quot;&gt;SYSAUX &lt;/span&gt;tablespace is used for additional database components (such as the Enterprise Manager Repository).&lt;br /&gt;&lt;br /&gt;Each &lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle database &lt;/span&gt;contains a SYSTEM tablespace and a SYSAUX tablespace. They are automatically created when the database is created. The system default is to create a smallfile tablespace. You can also create bigfile tablespaces, which enable the Oracle database to manage ultralarge files (up to 8 exabytes).&lt;br /&gt;A tablespace can be online (accessible) or offline (not accessible). The SYSTEM tablespace is always online when the database is open. It stores tables that support the core functionality of the database, such as the data dictionary tables.&lt;br /&gt;The SYSAUX tablespace is an auxiliary tablespace to the SYSTEM tablespace. The SYSAUX tablespace stores many database components, and it must be online for the correct functioning of all database components.</description><link>http://oracle-sliit.blogspot.com/2008/11/system-and-sysaux-tablespaces.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-6867582229596228225</guid><pubDate>Thu, 27 Nov 2008 06:42:00 +0000</pubDate><atom:updated>2008-11-26T22:44:28.950-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Oracle Database Architecture</category><title>Tablespaces and Data Files</title><description>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4Tlwydfy4I1eDarqXf4OXLEhubPL6oarHQw5jUbiB5hfQUZghZ7ObZ1A2ZGUX3fQkjGyxPQQzRekaJdpKTo940v1zsmXtbK3rxD4h74ASw-mh_rX-8RM-eazUwljtZpNjcsMFLzORcA/s1600-h/tablespace_and_datafiles.JPG&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 320px; height: 173px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4Tlwydfy4I1eDarqXf4OXLEhubPL6oarHQw5jUbiB5hfQUZghZ7ObZ1A2ZGUX3fQkjGyxPQQzRekaJdpKTo940v1zsmXtbK3rxD4h74ASw-mh_rX-8RM-eazUwljtZpNjcsMFLzORcA/s320/tablespace_and_datafiles.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5273224166527660034&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;A &lt;span style=&quot;font-weight: bold;&quot;&gt;database &lt;/span&gt;is divided into logical storage units called tablespaces, which can be used to group related logical structures together. Each database is logically divided into one or more tablespaces. One or more data files are explicitly created for each tablespace to physically store the data of all logical structures in a tablespace.&lt;br /&gt;&lt;br /&gt;Note: You can also create the bigfile tablespaces, which are tablespaces with a single but very large (up to 4 billion data blocks) data file. The traditional smallfile tablespaces (which are the default) can contain multiple data files, but the files cannot be as large. For more information about the bigfile tablespaces, see the Database Administrator’s Guide.&lt;br /&gt;&lt;/div&gt;</description><link>http://oracle-sliit.blogspot.com/2008/11/tablespaces-and-data-files.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4Tlwydfy4I1eDarqXf4OXLEhubPL6oarHQw5jUbiB5hfQUZghZ7ObZ1A2ZGUX3fQkjGyxPQQzRekaJdpKTo940v1zsmXtbK3rxD4h74ASw-mh_rX-8RM-eazUwljtZpNjcsMFLzORcA/s72-c/tablespace_and_datafiles.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-8773426138903247210</guid><pubDate>Thu, 27 Nov 2008 05:42:00 +0000</pubDate><atom:updated>2008-11-26T21:46:51.484-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Oracle Database Architecture</category><title>Physical DB Structure</title><description>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJwHsXumPC2EP5T-CNAe7g6NhkrwB1t2z5rPkUC5e9yU3Myvkjbue-VetYgOb6Jw99Yc52zlldLR6pf0XXWA9LLq9A2ZCfu4UUnnrXkhFzcoz7VEToPsu4oVos732DRZEMWUzW0AQ_xQ/s1600-h/physical_db_structure.JPG&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 320px; height: 175px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJwHsXumPC2EP5T-CNAe7g6NhkrwB1t2z5rPkUC5e9yU3Myvkjbue-VetYgOb6Jw99Yc52zlldLR6pf0XXWA9LLq9A2ZCfu4UUnnrXkhFzcoz7VEToPsu4oVos732DRZEMWUzW0AQ_xQ/s320/physical_db_structure.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5273208683933116962&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The files that constitute an Oracle database are organized into the following:&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;Control files:&lt;/span&gt; Contain data about the database itself (that is, physical database structure information). These files are critical to the database. Without them, you cannot open data files to access the data within the database.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Data files:&lt;/span&gt; Contain the user or application data of the database.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Online redo log files:&lt;/span&gt; Allow for instance recovery of the database. If the database crashes and does not lose any data files, then the instance can recover the database with the information in these files.&lt;br /&gt;&lt;br /&gt;The following additional files are important to the successful running of the database:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Parameter file&lt;/span&gt;: Is used to define how the instance is configured when it starts up.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Password file:&lt;/span&gt; Allows users to connect remotely to the database and perform administrative tasks.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Backup files:&lt;/span&gt; Are used for database recovery. You typically restore a backup file when a media failure or user error has damaged or deleted the original file.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Archive log files:&lt;/span&gt; Contain an ongoing history of the data changes (redo) that are generated by the instance. Using these files and a backup of the database, you can recover a lost data file. That is, archive logs enable the recovery of restored data files.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Trace files:&lt;/span&gt; Each server and background process can write to an associated trace file. When an internal error is detected by a process, the process dumps information about the error to its trace file. Some of the information written to a trace file is intended for the database administrator, whereas other information is for Oracle Support Services.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Alert log files:&lt;/span&gt; These are special trace files. They are also known as alert logs. The alert log of a database is a chronological log of messages and errors. Oracle recommends that you review these files.&lt;br /&gt;&lt;/div&gt;</description><link>http://oracle-sliit.blogspot.com/2008/11/physical-db-structure.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJwHsXumPC2EP5T-CNAe7g6NhkrwB1t2z5rPkUC5e9yU3Myvkjbue-VetYgOb6Jw99Yc52zlldLR6pf0XXWA9LLq9A2ZCfu4UUnnrXkhFzcoz7VEToPsu4oVos732DRZEMWUzW0AQ_xQ/s72-c/physical_db_structure.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-1723570955203266472</guid><pubDate>Wed, 26 Nov 2008 08:23:00 +0000</pubDate><atom:updated>2008-11-26T03:43:04.444-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Oracle Database Architecture</category><title>Server Process and DB Buffer Cache</title><description>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaw8_BtniHRXXHo1sF_u305EMqO9NjfIHXYHYdzz3DnITEjYs1aV44TN-OgYZBKeq2fhRSenC90Bcnupnokb5sCDY6xvPCxe5s5AsXLpkf-NZVCU3qVuwBmEsTBn8RPZ7xYNbiu-9R-Q/s1600-h/server_process_db_buffer_cash.JPG&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 320px; height: 157px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaw8_BtniHRXXHo1sF_u305EMqO9NjfIHXYHYdzz3DnITEjYs1aV44TN-OgYZBKeq2fhRSenC90Bcnupnokb5sCDY6xvPCxe5s5AsXLpkf-NZVCU3qVuwBmEsTBn8RPZ7xYNbiu-9R-Q/s320/server_process_db_buffer_cash.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5272879163899600994&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;When a query is processed, the &lt;a href=&quot;http://oracle-sliit.blogspot.com/2008/11/process-structure.html&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle &lt;/span&gt;server process&lt;/a&gt; looks in the &lt;span style=&quot;font-weight: bold;&quot;&gt;database &lt;/span&gt;buffer cache for any blocks that it needs. If the block is not found in the database buffer cache, the server process reads the block from the data file and places a copy in the database buffer cache. Because subsequent requests for the same block may find the block in memory, the requests may not require physical reads. The Oracle server uses the least recently used algorithm to age out buffers that have not been accessed recently to make room for new blocks in the database buffer cache.&lt;br /&gt;Buffers in the buffer cache can be in one of the following four states:&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Pinned:&lt;/span&gt; Multiple sessions are kept from writing to the same block at the same time. Other sessions wait to access the block.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Clean:&lt;/span&gt; The buffer is now unpinned and is a candidate for immediate aging out, if the current contents (data block) are not referenced again. Either the contents are in sync with the block contents stored on the disk or the buffer contains a consistent read (CR) snapshot of a block.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Free or unused:&lt;/span&gt; The buffer is empty because the instance has just started. This state is very similar to the clean state, except that the buffer has not been used.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Dirty: &lt;/span&gt;The buffer is no longer pinned but the contents (data block) have changed and must be flushed to the disk by DBWn before it can be aged out.&lt;br /&gt;&lt;/div&gt;</description><link>http://oracle-sliit.blogspot.com/2008/11/server-process-and-db-buffer-cache.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaw8_BtniHRXXHo1sF_u305EMqO9NjfIHXYHYdzz3DnITEjYs1aV44TN-OgYZBKeq2fhRSenC90Bcnupnokb5sCDY6xvPCxe5s5AsXLpkf-NZVCU3qVuwBmEsTBn8RPZ7xYNbiu-9R-Q/s72-c/server_process_db_buffer_cash.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-5408492164827551472</guid><pubDate>Tue, 25 Nov 2008 08:56:00 +0000</pubDate><atom:updated>2008-11-26T03:41:17.518-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Oracle Database Architecture</category><title>Oracle Instance Management</title><description>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcVm7RuL4THYccVqLrwE_Im4nsEhUFyAZtWO9rK_gmxPV-QOTN7S-PdyRqImu8-cRV-k5KdIVgXCXb4TaSLyO3zr-2E0H1MTnf3VM8xegVSCStX-keBdTdqWgsevSNmjFDxjqWEwh8Cg/s1600-h/oracle_instance_management.JPG&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 320px; height: 252px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcVm7RuL4THYccVqLrwE_Im4nsEhUFyAZtWO9rK_gmxPV-QOTN7S-PdyRqImu8-cRV-k5KdIVgXCXb4TaSLyO3zr-2E0H1MTnf3VM8xegVSCStX-keBdTdqWgsevSNmjFDxjqWEwh8Cg/s320/oracle_instance_management.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5272516567868701938&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;An &lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle database &lt;/span&gt;server consists of an Oracle database and an &lt;a href=&quot;http://oracle-sliit.blogspot.com/2008/11/oracle-instance-management.html&quot;&gt;Oracle instance&lt;/a&gt;. An Oracle instance is made up of &lt;a href=&quot;http://oracle-sliit.blogspot.com/2008/11/oracle-memory-structure.html&quot;&gt;memory structures&lt;/a&gt;, known as the System Global Area (SGA), and background processes that handle much of the behind-the-scenes work involved in running an instance. The most common background processes are the following:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;System Monitor (SMON):&lt;/span&gt; Performs crash recovery when the instance is started following a failure&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;Process Monitor (PMON):&lt;/span&gt; Performs process cleanup when a user process fails&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;Database Writer (DBWn):&lt;/span&gt; Writes modified blocks from the database buffer cache to the data files on the disk&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;Checkpoint (CKPT):&lt;/span&gt; Updates all the data files and control files of the database to indicate the most recent checkpoint&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;LogWriter (LGWR):&lt;/span&gt; Writes redo log entries to the disk&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;Archiver (ARCn):&lt;/span&gt; Copies redo log files to the archival storage when a log switch occurs&lt;br /&gt;&lt;/div&gt;</description><link>http://oracle-sliit.blogspot.com/2008/11/oracle-instance-management.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcVm7RuL4THYccVqLrwE_Im4nsEhUFyAZtWO9rK_gmxPV-QOTN7S-PdyRqImu8-cRV-k5KdIVgXCXb4TaSLyO3zr-2E0H1MTnf3VM8xegVSCStX-keBdTdqWgsevSNmjFDxjqWEwh8Cg/s72-c/oracle_instance_management.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-5623585906095238799</guid><pubDate>Fri, 21 Nov 2008 05:53:00 +0000</pubDate><atom:updated>2008-11-26T03:40:00.444-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Oracle Database Architecture</category><title>Process Structure</title><description>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyImG8bVoljV0t409oDbEIJDs_nwsm6q9JAeGivdYgIXHEDzteTV02aQ9f8vWsMV2aU77BsI0LSlRvnL6JTpXT1ho8fqDmlnkrSlCwFeIy60uF8EfkRvVi3XCbf5YAm6TI94OMbiBTdA/s1600-h/oracle_process_structure.JPG&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 320px; height: 93px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyImG8bVoljV0t409oDbEIJDs_nwsm6q9JAeGivdYgIXHEDzteTV02aQ9f8vWsMV2aU77BsI0LSlRvnL6JTpXT1ho8fqDmlnkrSlCwFeIy60uF8EfkRvVi3XCbf5YAm6TI94OMbiBTdA/s320/oracle_process_structure.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5270985028444919570&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;When you invoke an application program or an &lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle &lt;/span&gt;tool, such as Enterprise Manager, the Oracle server creates a &lt;a href=&quot;http://oracle-sliit.blogspot.com/2008/11/server-process-and-db-buffer-cache.html&quot;&gt;server process&lt;/a&gt; to execute the commands issued by the application. The Oracle server also creates a set of background processes for an &lt;a href=&quot;http://oracle-sliit.blogspot.com/2008/11/oracle-instance-management.html&quot;&gt;instance &lt;/a&gt;that interact with each other and with the operating system to manage the &lt;a href=&quot;http://oracle-sliit.blogspot.com/2008/11/oracle-memory-structure.html&quot;&gt;memory structures&lt;/a&gt;, asynchronously perform I/O to write data to disk, and perform other required tasks. Which background processes are present depends on the features that are being used in the database.&lt;br /&gt;&lt;/div&gt;</description><link>http://oracle-sliit.blogspot.com/2008/11/process-structure.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyImG8bVoljV0t409oDbEIJDs_nwsm6q9JAeGivdYgIXHEDzteTV02aQ9f8vWsMV2aU77BsI0LSlRvnL6JTpXT1ho8fqDmlnkrSlCwFeIy60uF8EfkRvVi3XCbf5YAm6TI94OMbiBTdA/s72-c/oracle_process_structure.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-8292994226966473165</guid><pubDate>Thu, 20 Nov 2008 07:59:00 +0000</pubDate><atom:updated>2008-11-26T03:38:19.055-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Oracle Database Architecture</category><title>Oracle Memory Structure</title><description>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnUbyK5cAy4de5w_CAWmzMffwKd5Nzhk4ZKZGtTQ7WIo8WvV5hi2YRJ2xeNvaXesdOaTIN7ivftgVDe2rc_94nzlRLiI-TW9_9RUxVUbWrx3VhHjZ0y3HtZXVNyzy2QKBqtv2Kdleg4A/s1600-h/oracle_memory_struc.JPG&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 320px; height: 167px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnUbyK5cAy4de5w_CAWmzMffwKd5Nzhk4ZKZGtTQ7WIo8WvV5hi2YRJ2xeNvaXesdOaTIN7ivftgVDe2rc_94nzlRLiI-TW9_9RUxVUbWrx3VhHjZ0y3HtZXVNyzy2QKBqtv2Kdleg4A/s320/oracle_memory_struc.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5270646402076120754&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The basic memory structures associated with an &lt;a href=&quot;http://oracle-sliit.blogspot.com/2008/11/oracle-instance-management.html&quot;&gt;Oracle instance&lt;/a&gt; include the following:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;System Global Area (SGA):&lt;/span&gt; Shared by all server and background processes&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Program Global Area (PGA):&lt;/span&gt; Private to each server and background process. There is one PGA for each process.&lt;br /&gt;&lt;br /&gt;The SGA is a memory area that contains data and control information for the instance.&lt;br /&gt;The SGA includes the following data structures:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;a href=&quot;http://oracle-sliit.blogspot.com/2008/11/server-process-and-db-buffer-cache.html&quot;&gt;Database buffer cache&lt;/a&gt;:&lt;/span&gt; Caches blocks of data retrieved from the database&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;Redo log buffer:&lt;/span&gt; Caches redo information (used for instance recovery) until it can be written to the physical redo log files stored on the disk&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;Shared pool:&lt;/span&gt; Caches various constructs that can be shared among users&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;Large pool:&lt;/span&gt; Is an optional area that provides large memory allocations for certain large processes, such as Oracle backup and recovery operations, and I/O server processes&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;Java pool:&lt;/span&gt; Is used for all session-specific Java code and data within the Java Virtual Machine (JVM)&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;Streams pool:&lt;/span&gt; Is used by Oracle Streams&lt;br /&gt;When you start the instance by using Enterprise Manager or SQL*Plus, the amount of memory allocated for the SGA is displayed.&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;A Program Global Area (PGA) is a memory region that contains data and control information for each server process. An Oracle server process services a client’s requests. Each server process has its own private PGA that is created when the server process is started. Access to the PGA is exclusive to that server process, and the PGA is read and written only by the Oracle code acting on its behalf.&lt;br /&gt;With the dynamic SGA infrastructure, the size of the database buffer cache, the shared pool, the large pool, the Java pool, and the Streams pool changes without shutting down the instance.&lt;br /&gt;The Oracle database uses initialization parameters to create and configure memory structures. For example, the SGA_TARGET parameter specifies the total amount of space available to the SGA. If you set SGA_TARGET to 0, Automatic Shared Memory Management is disabled.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://oracle-sliit.blogspot.com/2008/11/oracle-memory-structure.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnUbyK5cAy4de5w_CAWmzMffwKd5Nzhk4ZKZGtTQ7WIo8WvV5hi2YRJ2xeNvaXesdOaTIN7ivftgVDe2rc_94nzlRLiI-TW9_9RUxVUbWrx3VhHjZ0y3HtZXVNyzy2QKBqtv2Kdleg4A/s72-c/oracle_memory_struc.JPG" height="72" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-2991917109021321617</guid><pubDate>Wed, 19 Nov 2008 08:47:00 +0000</pubDate><atom:updated>2008-11-26T03:34:15.547-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Oracle Database Architecture</category><title>Oracle Database Architecture</title><description>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQewPcR_IVH0BzIShCE98d7Woy9oP_QtNj4aqZYCbddILhpiBYuR5uMtrPDIcIqq_lPbXNMqjZP0tf2KPkocWHtH35cfxXExPzE0AFVfe11gB15zx8wVuN1jRrrjdK9Clb3IDVU3cdaQ/s1600-h/oracle_db_architec.JPG&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 212px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQewPcR_IVH0BzIShCE98d7Woy9oP_QtNj4aqZYCbddILhpiBYuR5uMtrPDIcIqq_lPbXNMqjZP0tf2KPkocWHtH35cfxXExPzE0AFVfe11gB15zx8wVuN1jRrrjdK9Clb3IDVU3cdaQ/s320/oracle_db_architec.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5270287932544746594&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Database Structures&lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Each running Oracle database is associated with an Oracle instance. When a database is started on a database server, the Oracle software allocates a shared memory area called the System Global Area (SGA) and starts several &lt;a href=&quot;http://oracle-sliit.blogspot.com/2008/11/process-structure.html&quot;&gt;Oracle background processes&lt;/a&gt;. This combination of the SGA and the Oracle processes is called an &lt;a href=&quot;http://oracle-sliit.blogspot.com/2008/11/oracle-instance-management.html&quot;&gt;Oracle instance&lt;/a&gt;.&lt;br /&gt;After starting an instance, the Oracle software associates the instance with a specific database. This is called mounting the database. The database is then ready to be opened, which makes it accessible to authorized users. Multiple instances can execute concurrently on the same computer, each accessing its own physical database.&lt;br /&gt;You can look at the Oracle database architecture as various interrelated structural components.&lt;br /&gt;An Oracle database uses &lt;a href=&quot;http://oracle-sliit.blogspot.com/2008/11/oracle-memory-structure.html&quot;&gt;memory structures&lt;/a&gt; and processes to manage and access the database. All memory structures exist in the main memory of the computers that constitute the database server. Processes are jobs that work in the memory of these computers. A process is defined as a “thread of control” or a mechanism in an operating system that can run a series of steps.&lt;br /&gt;&lt;/div&gt;</description><link>http://oracle-sliit.blogspot.com/2008/11/oracle-database-architecture.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQewPcR_IVH0BzIShCE98d7Woy9oP_QtNj4aqZYCbddILhpiBYuR5uMtrPDIcIqq_lPbXNMqjZP0tf2KPkocWHtH35cfxXExPzE0AFVfe11gB15zx8wVuN1jRrrjdK9Clb3IDVU3cdaQ/s72-c/oracle_db_architec.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-8175515778479654567</guid><pubDate>Tue, 18 Nov 2008 06:59:00 +0000</pubDate><atom:updated>2008-11-26T03:27:08.931-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Oracle 10g</category><title>Oracle 10g</title><description>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMvAZNf7CLnBN0x-ciH1nz48EWCnI117HxgbntLIwMDrDXxwxY6O_3wn64vzIm8GLg66E7Qc5iJgIBYjPfwvPmD3g_WcENPyFpwB_ovz-7D-WlNpaxS0VVizJzLNqQ-xoPJZ6wRVyq6w/s1600-h/oracle_10g.JPG&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 123px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMvAZNf7CLnBN0x-ciH1nz48EWCnI117HxgbntLIwMDrDXxwxY6O_3wn64vzIm8GLg66E7Qc5iJgIBYjPfwvPmD3g_WcENPyFpwB_ovz-7D-WlNpaxS0VVizJzLNqQ-xoPJZ6wRVyq6w/s320/oracle_10g.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5269889707910948978&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;-Global Grid Forum (GGF)&lt;br /&gt;-Oracle’s grid infrastructure:&lt;br /&gt;-Low cost&lt;br /&gt;-High quality of service&lt;br /&gt;-Easy to manage&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle Database 10g: “g” Stands for Grid&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Global Grid Forum (GGF) is a standards body that develops standards for grid computing. It comprises a set of committees and working groups that focus on various aspects of grid computing. The committees and working groups are composed of participants from academia, the research community, and (increasingly) commercial companies. You can see the Web site of GGF at http://www.gridforum.org.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle &lt;/span&gt;has created the grid computing infrastructure software that balances all types of workloads across servers and enables all those servers to be managed as one complete system. Grid computing can achieve the same very high level of reliability as mainframe computing because all components are clustered. But unlike mainframes and large UNIX symmetric multiprocessing (SMP) servers, a grid can be built with open system technologies, such as Intel processors and the Linux operating system, at a very low cost.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle’s grid computing technology includes:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Automatic Storage Management (ASM)&lt;br /&gt;Real Application Clusters (RAC)&lt;br /&gt;Oracle Streams&lt;br /&gt;Enterprise Manager Grid Control&lt;br /&gt;&lt;br /&gt;Automatic Storage Management spreads database data across all disks, creates and maintains a storage grid, and provides the highest input/output (I/O) throughput with minimal management costs. As disks are added or dropped, ASM redistributes the data automatically. (There is no need for a logical volume manager to manage the file system.) Data availability increases with optional mirroring, and you can add or drop disks online. For more information, see the lesson titled “Managing Database Storage Structures.”&lt;br /&gt;Oracle’s Real Application Clusters runs and scales all application workloads on a cluster of servers and offers the following features:&lt;br /&gt;Integrated clusterware: This includes functionality for cluster connectivity, messaging and locking, cluster control, and recovery. It is available on all platforms that are supported by Oracle Database 10g.&lt;br /&gt;Automatic workload management: Rules can be defined to automatically allocate processing resources to each service both during normal operations and in response to failures. These rules can be dynamically modified to meet the changing business needs. This dynamic resource allocation within a database grid is unique to Oracle RAC.&lt;br /&gt;Automatic event notification to the mid-tier: When a cluster configuration changes, the mid-tier can immediately adapt to instance failover or availability of a new &lt;a href=&quot;http://oracle-sliit.blogspot.com/2008/11/oracle-instance-management.html&quot;&gt;instance&lt;/a&gt;. This enables end users to continue working in the event of instance failover without the delays typically caused by network timeouts. In the event of new instance availability, the mid-tier can immediately start load balancing connections to that instance. Oracle Database 10g Java Database Connectivity (JDBC) drivers have the “fast connection failover” functionality that can be automatically enabled to handle these events.&lt;br /&gt;Oracle Streams provides a unified framework for information sharing, combining message queuing, data replication, event notification, data warehouse loading, and publishing and subscribing functionality into a single technology. Oracle Streams can keep two or more data source copies synchronized when updates are applied at either site. It can automatically capture database changes, propagate the changes to subscribing nodes, apply changes, and detect and resolve data update conflicts. Oracle Streams can be used directly by applications as a message-queuing or workflow feature, enabling communications between applications in the grid.&lt;br /&gt;Enterprise Manager Grid Control manages gridwide operations that include managing the entire stack of software, provisioning users, cloning databases, and managing patches. It can monitor the performance of all applications from the point of view of your end users. Grid Control views the performance and availability of the grid infrastructure as a unified whole rather than as isolated storage units, databases, and application servers. You can group hardware nodes, databases, and application servers into single logical entities and manage a group of targets as one unit.&lt;br /&gt;&lt;/div&gt;</description><link>http://oracle-sliit.blogspot.com/2008/11/oracle-10g.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMvAZNf7CLnBN0x-ciH1nz48EWCnI117HxgbntLIwMDrDXxwxY6O_3wn64vzIm8GLg66E7Qc5iJgIBYjPfwvPmD3g_WcENPyFpwB_ovz-7D-WlNpaxS0VVizJzLNqQ-xoPJZ6wRVyq6w/s72-c/oracle_10g.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-7087444474564954450</guid><pubDate>Mon, 17 Nov 2008 10:33:00 +0000</pubDate><atom:updated>2008-11-17T02:35:31.876-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Oracle Products</category><title>Oracle Products</title><description>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle databases:&lt;/span&gt; The Oracle database is the first database that is designed for enterprise grid computing (the most flexible and cost-effective way to manage information and applications).&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle Application Server:&lt;/span&gt; Oracle’s Java 2 Platform, Enterprise Edition (J2EE)–certified server integrates everything that is needed to develop and deploy Web-based applications. The application server deploys e-business portals, Web services, and transactional applications, including PL/SQL, Oracle Forms, and J2EE-based applications.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle applications:&lt;/span&gt; Oracle E-Business Suite is a complete set of business applications for managing and automating processes across your organization.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;Oracle Collaboration Suite:&lt;/span&gt; Oracle Collaboration Suite is a single, integrated system for all your organization’s communications data: voice, e-mail, fax, wireless, calendar information, and files.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle Developer Suite:&lt;/span&gt; Oracle Developer Suite is a complete, integrated environment that combines application development and business intelligence tools.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Oracle services:&lt;/span&gt; Services such as Oracle Consulting and Oracle University provide you with the necessary expertise for your Oracle projects. For useful links to a variety of resources, see the appendix titled “Next Steps, Continuing Your Education.”&lt;/div&gt;</description><link>http://oracle-sliit.blogspot.com/2008/11/oracle-products.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-5091656983355250387</guid><pubDate>Fri, 14 Nov 2008 06:11:00 +0000</pubDate><atom:updated>2008-11-19T22:55:05.900-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Oracle FAQ</category><title>Difference between VARCHAR, VARCHAR2 and CHAR data types?</title><description>&lt;p&gt;Both &lt;span style=&quot;font-weight: bold;&quot;&gt;CHAR &lt;/span&gt;and &lt;span style=&quot;font-weight: bold;&quot;&gt;VARCHAR2 &lt;/span&gt;types are used to store character string values, however, they behave very differently. The &lt;span style=&quot;font-weight: bold;&quot;&gt;VARCHAR &lt;/span&gt;type should not be used: &lt;/p&gt;&lt;p&gt;&lt;b&gt;CHAR&lt;/b&gt; &lt;/p&gt;&lt;p&gt;CHAR should be used for storing fix length character strings. String values will be space/blank padded before stored on disk. If this type is used to store variable length strings, it will waste a lot of disk space. &lt;/p&gt; &lt;pre&gt;SQL&gt; CREATE TABLE char_test (col1 CHAR(10));&lt;br /&gt;Table created.&lt;br /&gt;&lt;br /&gt;SQL&gt; INSERT INTO char_test VALUES (&#39;qwerty&#39;);&lt;br /&gt;1 row created.&lt;br /&gt;&lt;br /&gt;SQL&gt; SELECT col1, length(col1), dump(col1) &quot;ASCII Dump&quot; FROM char_test;&lt;br /&gt;COL1       LENGTH(COL1) ASCII Dump&lt;br /&gt;---------- ------------ ------------------------------------------------------------&lt;br /&gt;qwerty               10 Typ=96 Len=10: 113,119,101,114,116,121,32,32,32,32&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;Note: ASCII character 32 is a blank space. &lt;/p&gt;&lt;p&gt;&lt;b&gt;VARCHAR&lt;/b&gt; &lt;/p&gt;&lt;p&gt;Currently VARCHAR behaves exactly the same as VARCHAR2. However, this type should not be used as it is reserved for future usage. &lt;/p&gt; &lt;pre&gt;SQL&gt; CREATE TABLE varchar_test (col1 VARCHAR2(10));&lt;br /&gt;Table created.&lt;br /&gt;&lt;br /&gt;SQL&gt; INSERT INTO varchar_test VALUES (&#39;qwerty&#39;);&lt;br /&gt;1 row created.&lt;br /&gt;&lt;br /&gt;SQL&gt; SELECT col1, length(col1), dump(col1) &quot;ASCII Dump&quot; FROM varchar_test;&lt;br /&gt;COL1       LENGTH(COL1) ASCII Dump&lt;br /&gt;---------- ------------ ------------------------------------------------------------&lt;br /&gt;qwerty                6 Typ=1 Len=6: 113,119,101,114,116,121&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;&lt;b&gt;VARCHAR2&lt;/b&gt; &lt;/p&gt;&lt;p&gt;VARCHAR2 is used to store variable length character strings. The string value&#39;s length will be stored on disk with the value itself. &lt;/p&gt; &lt;pre&gt;SQL&gt; CREATE TABLE varchar2_test (col1 VARCHAR2(10));&lt;br /&gt;Table created.&lt;br /&gt;&lt;br /&gt;SQL&gt; INSERT INTO varchar2_test VALUES (&#39;qwerty&#39;);&lt;br /&gt;1 row created.&lt;br /&gt;&lt;br /&gt;SQL&gt; SELECT col1, length(col1), dump(col1) &quot;ASCII Dump&quot; FROM varchar2_test;&lt;br /&gt;COL1       LENGTH(COL1) ASCII Dump&lt;br /&gt;---------- ------------ ------------------------------------------------------------&lt;br /&gt;qwerty                6 Typ=1 Len=6: 113,119,101,114,116,121&lt;br /&gt;&lt;/pre&gt;</description><link>http://oracle-sliit.blogspot.com/2008/11/difference-between-varchar-varchar2-and.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-2955941544396935270</guid><pubDate>Tue, 04 Nov 2008 11:04:00 +0000</pubDate><atom:updated>2008-11-19T22:59:05.889-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Oracle FAQ</category><title>How does one count/sum data values in a column?</title><description>&lt;p&gt;&lt;b&gt;Count/sum FIX values:&lt;/b&gt; &lt;/p&gt;&lt;p&gt;Use this simple query to count the number of data values in a column: &lt;/p&gt; &lt;pre&gt;select my_table_column, count(*)&lt;br /&gt;from   my_table&lt;br /&gt;group  by my_table_column;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;A more sophisticated example... &lt;/p&gt; &lt;pre&gt;select dept, sum(  decode(sex,&#39;M&#39;,1,0)) MALE,&lt;br /&gt;          sum(  decode(sex,&#39;F&#39;,1,0)) FEMALE,&lt;br /&gt;          count(decode(sex,&#39;M&#39;,1,&#39;F&#39;,1)) TOTAL&lt;br /&gt;from my_emp_table&lt;br /&gt;group by dept;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;&lt;b&gt;Count/sum RANGES of data values in a column:&lt;/b&gt; &lt;/p&gt;&lt;p&gt;A value x will be between values y and z if GREATEST(x, y) = LEAST(x, z). Look at this example: &lt;/p&gt; &lt;pre&gt;select f2,&lt;br /&gt;    sum(decode(greatest(f1,59), least(f1,100), 1, 0)) &quot;Range 60-100&quot;,&lt;br /&gt;    sum(decode(greatest(f1,30), least(f1, 59), 1, 0)) &quot;Range 30-59&quot;,&lt;br /&gt;    sum(decode(greatest(f1, 0), least(f1, 29), 1, 0)) &quot;Range 00-29&quot;&lt;br /&gt;from   my_table&lt;br /&gt;group  by f2;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;For equal size ranges it might be easier to calculate it with DECODE(TRUNC(value/range), 0, rate_0, 1, rate_1, ...).  Eg. &lt;/p&gt; &lt;pre&gt;select ename &quot;Name&quot;, sal &quot;Salary&quot;,&lt;br /&gt;    decode( trunc(f2/1000, 0), 0, 0.0,&lt;br /&gt;                               1, 0.1,&lt;br /&gt;                               2, 0.2,&lt;br /&gt;                               3, 0.31) &quot;Tax rate&quot;&lt;br /&gt;from   my_table;&lt;br /&gt;&lt;/pre&gt;</description><link>http://oracle-sliit.blogspot.com/2008/11/how-does-one-countsum-data-values-in.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-3238598254711999096</guid><pubDate>Fri, 31 Oct 2008 10:25:00 +0000</pubDate><atom:updated>2008-11-19T22:59:33.787-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Oracle FAQ</category><title>How does one code a hierarchical tree-structured query?</title><description>&lt;p&gt;The SCOTT/TIGER database schema contains a table EMP with a self-referencing relation (EMPNO and MGR columns). This table is perfect for testing and demonstrating tree-structured queries as the MGR column contains the employee number of the &quot;current&quot; employee&#39;s boss. &lt;/p&gt;&lt;p&gt;The LEVEL pseudo-column is an indication of how deep in the tree one is. Oracle can handle queries with a depth of up to 255 levels. Look at this example: &lt;/p&gt; &lt;pre&gt;SQL&gt; SELECT     level, empno, ename, mgr&lt;br /&gt;2    FROM     emp&lt;br /&gt;3  CONNECT BY PRIOR empno = mgr&lt;br /&gt;4    START WITH mgr IS NULL&lt;br /&gt;5  /&lt;br /&gt;   LEVEL      EMPNO ENAME             MGR&lt;br /&gt;---------- ---------- ---------- ----------&lt;br /&gt;       1       7839 KING&lt;br /&gt;       2       7566 JONES            7839&lt;br /&gt;       3       7788 SCOTT            7566&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;One can produce an indented report by using the level number to substring or lpad() a series of spaces, and concatenate that to the string. Look at this example: &lt;/p&gt; &lt;pre&gt;SQL&gt; SELECT     LPAD(&#39; &#39;, LEVEL * 2) || ename&lt;br /&gt;2    FROM     emp&lt;br /&gt;3  CONNECT BY PRIOR empno = mgr&lt;br /&gt;4    START WITH mgr IS NULL;&lt;br /&gt;LPAD(&lt;i&gt;,LEVEL*2)||ENAME&lt;/i&gt;&lt;br /&gt;------------------------------------------------------&lt;br /&gt;KING&lt;br /&gt;  JONES&lt;br /&gt;    SCOTT&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;Use the &quot;start with&quot; clause to specify the start of the tree. More than one record can match the starting condition. One disadvantage of having a &quot;connect by prior&quot; clause is that you cannot perform a join to other tables. The &quot;connect by prior&quot; clause is rarely implemented in the other database offerings. Trying to do this programmatically is difficult as one has to do the top level query first, then, for each of the records open a cursor to look for child nodes. &lt;/p&gt;&lt;p&gt;One way of working around this is to use PL/SQL, open the driving cursor with the &quot;connect by prior&quot; statement, and the select matching records from other tables on a row-by-row basis, inserting the results into a temporary table for later retrieval. &lt;/p&gt;&lt;p&gt;NOTE: Tree-structured queries are definitely non-relational (enough to kill Codd and make him roll in his grave). Also, this feature is not often found in other database offerings. &lt;/p&gt;</description><link>http://oracle-sliit.blogspot.com/2008/10/how-does-one-code-hierarchical-tree.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-436635337960574753</guid><pubDate>Wed, 29 Oct 2008 09:33:00 +0000</pubDate><atom:updated>2008-11-19T23:00:06.698-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Oracle FAQ</category><title>How does one add a column to the middle of a table?</title><description>&lt;p&gt;Oracle only allows columns to be added to the end of an existing table. Example: &lt;/p&gt; &lt;pre&gt;SQL&gt; CREATE TABLE tab1 ( col1 NUMBER );&lt;br /&gt;Table created.&lt;br /&gt;&lt;br /&gt;SQL&gt; ALTER TABLE tab1 ADD (col2 DATE);&lt;br /&gt;Table altered.&lt;br /&gt;&lt;br /&gt;SQL&gt; DESC tab1&lt;br /&gt;Name                                      Null?    Type&lt;br /&gt;----------------------------------------- -------- ----------------------------&lt;br /&gt;COL1                                               NUMBER&lt;br /&gt;COL2                                               DATE&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;Nevertheless, some databases also allow columns to be added to an existing table after a particular column (i.e. in the middle of the table). For example, in MySQL the following syntax is valid: &lt;/p&gt; &lt;pre&gt;ALTER TABLE tablename ADD columnname AFTER columnname;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;Oracle does not support this syntax. However, it doesn&#39;t mean that it cannot be done. &lt;/p&gt;&lt;p&gt;&lt;b&gt;Workarounds:&lt;/b&gt; &lt;/p&gt;&lt;p&gt;1. Create a new table and copy the data across. &lt;/p&gt; &lt;pre&gt;SQL&gt; RENAME tab1 TO tab1_old;&lt;br /&gt;Table renamed.&lt;br /&gt;&lt;br /&gt;SQL&gt; CREATE TABLE tab1 AS SELECT 0 AS col1, col1 AS col2 FROM tab1_old;&lt;br /&gt;Table created.&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;2. Use the DBMS_REDEFINITION package to change the structure on-line while users are working. &lt;/p&gt;</description><link>http://oracle-sliit.blogspot.com/2008/10/how-does-one-add-column-to-middle-of.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-6958902544776207182</guid><pubDate>Tue, 28 Oct 2008 09:20:00 +0000</pubDate><atom:updated>2008-11-19T23:04:29.764-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Oracle FAQ</category><title>Can one retrieve only the Nth row from a table?</title><description>&lt;div class=&quot;post-body entry-content&quot;&gt; provided this solution to select the Nth row from a table:  &lt;pre&gt;SELECT * FROM t1 a&lt;br /&gt;WHERE  n = (SELECT COUNT(rowid)&lt;br /&gt;            FROM t1 b&lt;br /&gt;           WHERE a.rowid &gt;= b.rowid);&lt;br /&gt;&lt;br /&gt;provided this solution:&lt;br /&gt;&lt;br /&gt;SELECT * FROM (&lt;br /&gt; SELECT ENAME,ROWNUM RN FROM EMP WHERE ROWNUM &lt; 101 )&lt;br /&gt;WHERE  RN = 100;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;Note: In this first query we select one more than the required row number, then we select the required one. Its far better than using a MINUS operation. &lt;/p&gt;&lt;pre&gt;provided these solutions:&lt;br /&gt;&lt;br /&gt;SELECT f1 FROM t1&lt;br /&gt;WHERE  rowid = (&lt;br /&gt;      SELECT rowid FROM t1&lt;br /&gt;      WHERE  rownum &lt;= 10&lt;br /&gt;      MINUS&lt;br /&gt;      SELECT rowid FROM t1&lt;br /&gt;      WHERE  rownum &lt; 10);&lt;br /&gt;&lt;br /&gt;SELECT rownum,empno FROM scott.emp a&lt;br /&gt;GROUP BY rownum,empno HAVING rownum = 4;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;Alternatively... &lt;/p&gt; SELECT * FROM emp WHERE rownum=1 AND rowid NOT IN (SELECT rowid FROM emp WHERE rownum &lt;&gt;Please note, there is no explicit row order in a relational database. However, this query is quite fun and may even help in the odd situation.  &lt;/div&gt;  &lt;div class=&quot;post-footer-line post-footer-line-1&quot;&gt;&lt;span class=&quot;post-author vcard&quot;&gt; Posted by &lt;span class=&quot;fn&quot;&gt;Blog&lt;/span&gt; &lt;/span&gt; &lt;span class=&quot;post-timestamp&quot;&gt; &lt;/span&gt; &lt;span class=&quot;post-comment-link&quot;&gt; &lt;/span&gt; &lt;span class=&quot;post-icons&quot;&gt; &lt;/span&gt; &lt;/div&gt; &lt;div class=&quot;post-footer-line post-footer-line-2&quot;&gt;&lt;span class=&quot;post-labels&quot;&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;</description><link>http://oracle-sliit.blogspot.com/2008/10/can-one-retrieve-only-nth-row-from.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-7095432576863034849</guid><pubDate>Tue, 28 Oct 2008 09:13:00 +0000</pubDate><atom:updated>2008-11-19T23:45:43.059-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Oracle FAQ</category><title>Can one retrieve only rows X to Y from a table?</title><description>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;pre&gt;SELECT * FROM (&lt;br /&gt; SELECT ename, rownum rn&lt;br /&gt;          FROM emp WHERE rownum &lt; 101&lt;br /&gt;) WHERE  RN between 91 and 100 ;&lt;br /&gt;&lt;/pre&gt; &lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Note: the 101 is just one greater than the maximum row of the required rows (means x= 90, y=100, so the inner values is  y+1).&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;pre&gt;SELECT rownum, f1 FROM t1&lt;br /&gt;GROUP BY rownum, f1 HAVING rownum BETWEEN 2 AND 4;&lt;br /&gt;&lt;/pre&gt; &lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Another solution is to use the MINUS operation. For example, to display rows 5 to 7, construct a query like this: &lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; &lt;pre&gt;SELECT *&lt;br /&gt;FROM   tableX&lt;br /&gt;WHERE  rowid in (&lt;br /&gt; SELECT rowid FROM tableX&lt;br /&gt;  WHERE rownum &lt;= 7&lt;br /&gt;MINUS&lt;br /&gt; SELECT rowid FROM tableX&lt;br /&gt; WHERE rownum &lt; 5);&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;The generic solution to get full information of rows between x and y &lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; &lt;/div&gt;&lt;hr style=&quot;margin-left: 0px; margin-right: 0px;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; &lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;SELECT * FROM emp WHERE empno in (SELECT empno  FROM emp GROUP BY rownum,empno HAVING rownum BETWEEN &amp;amp;x AND &amp;amp;y); &lt;/p&gt;</description><link>http://oracle-sliit.blogspot.com/2008/10/can-one-retrieve-only-rows-x-to-y-from.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-5833870044947001969</guid><pubDate>Mon, 20 Oct 2008 08:34:00 +0000</pubDate><atom:updated>2008-11-19T23:48:54.700-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Oracle FAQ</category><title>How does one add a day/hour/minute/second to a date value?</title><description>he SYSDATE pseudo-column shows the current system date and time. Adding 1 to SYSDATE will advance the date by 1 day. Use fractions to add hours, minutes or seconds to the date. Look at these examples:  &lt;pre&gt;SQL&gt; select sysdate, sysdate+1/24, sysdate +1/1440, sysdate + 1/86400 from dual;&lt;br /&gt;SYSDATE              SYSDATE+1/24         SYSDATE+1/1440       SYSDATE+1/86400&lt;br /&gt;-------------------- -------------------- -------------------- --------------------&lt;br /&gt;03-Jul-2002 08:32:12 03-Jul-2002 09:32:12 03-Jul-2002 08:33:12 03-Jul-2002 08:32:13&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;The following format is frequently used with Oracle Replication: &lt;/p&gt; &lt;pre&gt;select sysdate NOW, sysdate+30/(24*60*60) NOW_PLUS_30_SECS from dual;&lt;br /&gt;NOW                  NOW_PLUS_30_SECS&lt;br /&gt;-------------------- --------------------&lt;br /&gt;03-JUL-2005 16:47:23 03-JUL-2005 16:47:53&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;&lt;b&gt;Here are a couple of examples:&lt;/b&gt; &lt;/p&gt;  &lt;table style=&quot;font-size: 8pt;&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th&gt;Description&lt;/th&gt;&lt;th&gt;Date Expression&lt;/th&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Now&lt;/td&gt;&lt;td&gt;SYSDATE&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Tomorow/ next day&lt;/td&gt;&lt;td&gt;SYSDATE + 1&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Seven days from now&lt;/td&gt;&lt;td&gt;SYSDATE + 7&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;One hour from now&lt;/td&gt;&lt;td&gt;SYSDATE + 1/24&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Three hours from now&lt;/td&gt;&lt;td&gt;SYSDATE + 3/24&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;An half hour from now&lt;/td&gt;&lt;td&gt;SYSDATE + 1/48&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;10 minutes from now&lt;/td&gt;&lt;td&gt;SYSDATE + 10/1440&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;30 seconds from now&lt;/td&gt;&lt;td&gt;SYSDATE + 30/86400&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Tomorrow at 12 midnight&lt;/td&gt;&lt;td&gt;TRUNC(SYSDATE + 1)&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Tomorrow at 8 AM&lt;/td&gt;&lt;td&gt;TRUNC(SYSDATE + 1) + 8/24&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Next Monday at 12:00 noon&lt;/td&gt;&lt;td&gt;NEXT_DAY(TRUNC(SYSDATE), &#39;MONDAY&#39;) + 12/24&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;First day of the month at 12 midnight&lt;/td&gt;&lt;td&gt;TRUNC(LAST_DAY(SYSDATE ) + 1)&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;The next Monday, Wednesday or Friday at 9 a.m&lt;/td&gt;&lt;td&gt;TRUNC(LEAST(NEXT_DAY(sysdate,&lt;i&gt;MONDAY&#39; &#39; ),NEXT_DAY(sysdate,&lt;/i&gt;WEDNESDAY&lt;i&gt;), NEXT_DAY(sysdate,&lt;/i&gt;FRIDAY&lt;i&gt; ))) + (9/24)&lt;/i&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;</description><link>http://oracle-sliit.blogspot.com/2008/10/how-does-one-add-dayhourminutesecond-to.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-44767529375815035.post-8099927719877898850</guid><pubDate>Mon, 20 Oct 2008 08:31:00 +0000</pubDate><atom:updated>2008-11-19T23:49:22.251-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Oracle FAQ</category><title>How does one get the time difference between two date columns?</title><description>&lt;p style=&quot;text-align: justify;&quot;&gt;Oracle allows two date values to be subtracted from each other returning a numeric value indicating the number of days between the two dates (may be a fraction). This example will show how to relate it back to a time value. &lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Let&#39;s investigate some solutions. Test data: &lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; &lt;pre&gt;SQL&gt; CREATE TABLE dates (date1 DATE, date2 DATE);&lt;br /&gt;Table created.&lt;br /&gt;SQL&gt;&lt;br /&gt;SQL&gt; INSERT INTO dates VALUES (SYSDATE, SYSDATE-1);&lt;br /&gt;1 row created.&lt;br /&gt;SQL&gt; INSERT INTO dates VALUES (SYSDATE, SYSDATE-1/24);&lt;br /&gt;1 row created.&lt;br /&gt;SQL&gt; INSERT INTO dates VALUES (SYSDATE, SYSDATE-1/60/24);&lt;br /&gt;1 row created.&lt;br /&gt;SQL&gt; SELECT (date1 - date2) FROM dates;&lt;br /&gt;DATE1-DATE2&lt;br /&gt;-----------&lt;br /&gt;        1&lt;br /&gt;.041666667&lt;br /&gt;.000694444&lt;br /&gt;&lt;/pre&gt; &lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Solution 1&lt;/b&gt; &lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; &lt;pre&gt;SQL&gt; SELECT floor(((date1-date2)*24*60*60)/3600)&lt;br /&gt;2         || &#39; HOURS &#39; ||&lt;br /&gt;3         floor((((date1-date2)*24*60*60) -&lt;br /&gt;4         floor(((date1-date2)*24*60*60)/3600)*3600)/60)&lt;br /&gt;5         || &#39; MINUTES &#39; ||&lt;br /&gt;6         round((((date1-date2)*24*60*60) -&lt;br /&gt;7         floor(((date1-date2)*24*60*60)/3600)*3600 -&lt;br /&gt;8         (floor((((date1-date2)*24*60*60) -&lt;br /&gt;9         floor(((date1-date2)*24*60*60)/3600)*3600)/60)*60) ))&lt;br /&gt;10         || &#39; SECS &#39; time_difference&lt;br /&gt;11    FROM dates;&lt;br /&gt;TIME_DIFFERENCE&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;24 HOURS 0 MINUTES 0 SECS&lt;br /&gt;1 HOURS 0 MINUTES 0 SECS&lt;br /&gt;0 HOURS 1 MINUTES 0 SECS&lt;br /&gt;&lt;/pre&gt; &lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Solution 2&lt;/b&gt; &lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; &lt;pre&gt;SQL&gt; SELECT to_number( to_char(to_date(&#39;1&#39;,&#39;J&#39;) +&lt;br /&gt;2         (date1 - date2), &#39;J&#39;) - 1)  days,&lt;br /&gt;3         to_char(to_date(&#39;00:00:00&#39;,&#39;HH24:MI:SS&#39;) +&lt;br /&gt;4         (date1 - date2), &#39;HH24:MI:SS&#39;) time&lt;br /&gt;5   FROM dates;&lt;br /&gt;    DAYS TIME&lt;br /&gt;---------- --------&lt;br /&gt;       1 00:00:00&lt;br /&gt;       0 01:00:00&lt;br /&gt;       0 00:01:00&lt;br /&gt;&lt;/pre&gt; &lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Solution 3&lt;/b&gt; &lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; &lt;pre&gt;SQL&gt; SELECT trunc(date1-date2) days,&lt;br /&gt;2         trunc(sysdate) + (date1 - date2), &#39;HH24 &quot;Hours&quot; MI &quot;Minutes&quot; SS &quot;Seconds&quot;&#39;) time&lt;br /&gt;3   FROM dates;&lt;br /&gt;    DAYS TIME&lt;br /&gt;---------- ------------------------------&lt;br /&gt;       1 00 Hours 00 Minutes 00 Seconds&lt;br /&gt;       0 01 Hours 00 Minutes 00 Seconds&lt;br /&gt;       0 00 Hours 01 Minutes 00 Seconds&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;</description><link>http://oracle-sliit.blogspot.com/2008/10/how-does-one-get-time-difference.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item></channel></rss>