oracle on windows server introduction to oracle10g on microsoft windows server
TRANSCRIPT
Oracle on Windows Oracle on Windows ServerServerIntroduction to Oracle10g on Introduction to Oracle10g on Microsoft Windows Server Microsoft Windows Server
OverviewOverview Introduction to Relational Database Introduction to Relational Database
Management SystemsManagement Systems Introduction to Table StructuresIntroduction to Table Structures Introduction to SQLIntroduction to SQL Windows SpecificsWindows Specifics Oracle Architecture OverviewOracle Architecture Overview Accessing Oracle Data in Accessing Oracle Data in
ApplicationsApplications Oracle10g New FeaturesOracle10g New Features
OracleOracle
Founded in 1977Founded in 1977 Most popular RDBMSMost popular RDBMS Runs on numerous platforms Runs on numerous platforms
From Mainframes to PDAsFrom Mainframes to PDAs One of the largest software One of the largest software
companies in the worldcompanies in the world
Oracle RDBMSOracle RDBMS RDBMSRDBMS
Relational Database Management Relational Database Management SystemSystem
Data is held relationallyData is held relationally Hence the term RDBMSHence the term RDBMS Data stored in one “table” is related to Data stored in one “table” is related to
data stored in other tablesdata stored in other tables The data is the databaseThe data is the database Oracle (the program) is the RDBMSOracle (the program) is the RDBMS
AKA the Oracle ServerAKA the Oracle Server
Oracle Windows SpecificsOracle Windows Specifics Everything is a threadEverything is a thread
Multiple System and User threads run under one Oracle Multiple System and User threads run under one Oracle processprocess
System Global Area (SGA) memory and User Memory System Global Area (SGA) memory and User Memory (Program Global Area) share one common memory (Program Global Area) share one common memory spacespace
Oracle provides MMC plugins for WindowsOracle provides MMC plugins for Windows Administration Assistant for Windows NTAdministration Assistant for Windows NT Oracle for Windows NT Performance MonitorOracle for Windows NT Performance Monitor
64-bit Oracle 10g is available for 64-bit Windows 64-bit Oracle 10g is available for 64-bit Windows Server 2003Server 2003 Greatly increases scalability over 32-bit Oracle on 32-Greatly increases scalability over 32-bit Oracle on 32-
bit Windowsbit Windows Greatly increases connectivity over 32-bit Oracle on 32-Greatly increases connectivity over 32-bit Oracle on 32-
bit Windowsbit Windows
The actual running RDBMSThe actual running RDBMS Made up ofMade up of
Oracle MemoryOracle Memory SGASGA
System Global AreaSystem Global Area Shared among all of the users accessing the instanceShared among all of the users accessing the instance
PGAPGA Program Global AreaProgram Global Area Specific to each userSpecific to each user
User memoryUser memory For sorts, joins, etc.For sorts, joins, etc.
Threads (Threads of the Oracle Process)Threads (Threads of the Oracle Process) User (ServerUser (Server) ) ThreadsThreads
Do work on behalf of the userDo work on behalf of the user AKA User ThreadsAKA User Threads
Background (Oracle) ThreadsBackground (Oracle) Threads Maintenance and functions on behalf of OracleMaintenance and functions on behalf of Oracle Oracle ThreadsOracle Threads
Oracle Instance Architecture (MS Oracle Instance Architecture (MS Windows)Windows)
Oracle MemoryOracle Memory
Oracle InstanceOracle Instance
Oracle Memory(SGA)
Memory Used by OracleMemory Used by Oracle
SGASGA DB_CACHE_SIZEDB_CACHE_SIZE Shared pool, large pool, log buffer, Shared pool, large pool, log buffer,
variable areavariable area Memory per user X number of usersMemory per user X number of users
PGAPGA Sort AreaSort Area Hash AreaHash Area
SGASGASystem Global AreaSystem Global Area
Buffer CacheBuffer Cache Stores database buffers (data)Stores database buffers (data) Usually the largest piece of memoryUsually the largest piece of memory
Shared PoolShared Pool Used internallyUsed internally
Log BufferLog Buffer Used for loggingUsed for logging
Large PoolLarge Pool Variable AreaVariable Area
SGASGA
Background ThreadsBackground Threads
Oracle InstanceOracle Instance
Oracle Memory(SGA)
PMON SMON DBWR LGWR ARCH RECO
Background ThreadsBackground Threads Database Writer (DWRDatabase Writer (DWRnn)) Log Writer (LGWR)Log Writer (LGWR) System Monitor (SMON)System Monitor (SMON) Process Monitor (PMON)Process Monitor (PMON) Recoverer (RECO)Recoverer (RECO) Archiver (ARCArchiver (ARCnn)) Checkpoint (CKPT)Checkpoint (CKPT) Job Queue (CJQJob Queue (CJQnn, J, Jnn)) Queue Monitor (QMNQueue Monitor (QMNnn)) Other Background ThreadsOther Background Threads
Other Background Other Background ThreadsThreads MMONMMON
Issues alerts against system metric thresholdsIssues alerts against system metric thresholds Captures modified SQL and garners statisticsCaptures modified SQL and garners statistics
MMNLMMNL Captures session history and metrics Captures session history and metrics
computationcomputation MMANMMAN
Exclusively for internal database tasksExclusively for internal database tasks RBALRBAL
Used to balance ASM disk activityUsed to balance ASM disk activity OSMBOSMB
Used to communicate between an ASM Used to communicate between an ASM instance and a database instanceinstance and a database instance
User ThreadsUser Threads
Oracle InstanceOracle Instance
Oracle Memory(SGA)
PMON SMON DBWn LGWR ARCn RECO
USERTHREAD
User (Server) ThreadsUser (Server) Threads Shadows the User Thread (for Shadows the User Thread (for
“Dedicated” Server Processes)“Dedicated” Server Processes) Works on behalf of the User ThreadWorks on behalf of the User Thread Reads data from databaseReads data from database
First checks buffer cacheFirst checks buffer cache Reads from datafiles into the buffer Reads from datafiles into the buffer
cachecache Modifies data in the buffer cacheModifies data in the buffer cache
Does not write to datafilesDoes not write to datafiles
Other ThreadsOther Threads Query ServersQuery Servers
Used for Parallel QueryUsed for Parallel Query Can increase multi-processor utilization Can increase multi-processor utilization
percentagepercentage Shared Server ProcessesShared Server Processes
Used with MTS (Multi Threaded Server) to Used with MTS (Multi Threaded Server) to decrease memory usage by using a shared decrease memory usage by using a shared pool of processespool of processes
DispatchersDispatchers Used with MTS to match user connection Used with MTS to match user connection
requests to shared serversrequests to shared servers RAC specific ThreadsRAC specific Threads
Used when Cluster Ready Services are Used when Cluster Ready Services are installed and enabledinstalled and enabled
A working database system involves A working database system involves interaction of the following elements:interaction of the following elements: Oracle Instance – tasks that access data in the Oracle Instance – tasks that access data in the
database and the Oracle memorydatabase and the Oracle memory Oracle data files – stores of data on diskOracle data files – stores of data on disk
Elements of a Database Elements of a Database SystemSystem
Memory
Threads
DataFiles
Oracle Instance
Data StructuresData Structures Data filesData files
Basic Building BlocksBasic Building Blocks File system filesFile system files Raw partitionsRaw partitions
BlocksBlocks The basic storage containerThe basic storage container Configurable size (2048, 4096..16384)Configurable size (2048, 4096..16384) Contains one or more rowsContains one or more rows
ExtentsExtents Chunks that hold schema objectsChunks that hold schema objects Dynamically allocated in data filesDynamically allocated in data files
Data StructuresData Structures SegmentsSegments
Made up of one or more extentsMade up of one or more extents Extents are not necessarily contiguous within a Extents are not necessarily contiguous within a
segmentsegment Blocks within an extent are contiguousBlocks within an extent are contiguous
Tablespaces Tablespaces Container for Schema ObjectsContainer for Schema Objects Made up of one or more data filesMade up of one or more data files Defined with a STORAGE clauseDefined with a STORAGE clause
Schema ObjectsSchema Objects TablesTables ViewsViews ClustersClusters IndexesIndexes SequencesSequences
How does Oracle Work?How does Oracle Work?
Data is stored in two placesData is stored in two places On disk in the data filesOn disk in the data files In memory in the Oracle Memory (SGA)In memory in the Oracle Memory (SGA)
ReadsReads WritesWrites
Oracle ReadsOracle Reads
The user threads (server threads) try The user threads (server threads) try to get data from SGA firstto get data from SGA first
If it is not thereIf it is not there The user thread itself reads it from The user thread itself reads it from
disk and puts it into the SGAdisk and puts it into the SGA
Oracle Reads (Data in Oracle Reads (Data in Cache)Cache)
Memory (Buffer Cache)
UserThreads
DataFiles
Data is read from cache.
Oracle Reads (Data not in Oracle Reads (Data not in Cache)Cache)
Memory (Buffer Cache)
UserThreads
DataFiles
Data is not in cache.
User Thread reads it from disk into cache.
It is then read from cache.
Oracle WritesOracle WritesUser Threads User Threads Writes (changes) are made by the userWrites (changes) are made by the user
Data is changed in the buffer cacheData is changed in the buffer cache The original data is put into the undo The original data is put into the undo
tablespace or rollback segmenttablespace or rollback segment User issues commit statementUser issues commit statement Information is written to the log bufferInformation is written to the log buffer A transaction is not committed until the log A transaction is not committed until the log
write has occurredwrite has occurred User thread only writes/changes the SGA, User thread only writes/changes the SGA,
not the data on disknot the data on disk
Oracle WritesOracle WritesBackground ThreadsBackground Threads The LGWR (Log Writer Thread) takes The LGWR (Log Writer Thread) takes
log information and writes it to the log information and writes it to the redo logredo log
The DBWThe DBWnn (Database Writer Thread) (Database Writer Thread) writes the data changes to disk at a writes the data changes to disk at a later timelater time The DBWThe DBWnn thread is the only thread that thread is the only thread that
writes out to the data fileswrites out to the data files
Logical vs. Physical I/OLogical vs. Physical I/O
Logical read (in memory)Logical read (in memory) Logical write (in memory)Logical write (in memory) Physical read (to disk)Physical read (to disk) Physical write (to disk)Physical write (to disk) Logical reads and writes are thousands of Logical reads and writes are thousands of
times faster than physical reads and times faster than physical reads and writeswrites
The keys to Oracle performance areThe keys to Oracle performance are Performing read and write operations in Performing read and write operations in
memory, where possiblememory, where possible When physical reads and writes must be When physical reads and writes must be
performed, optimizing I/O efficiencyperformed, optimizing I/O efficiency
Accessing Oracle Data in Accessing Oracle Data in ApplicationsApplications
When developing applications, there are When developing applications, there are several options for connecting to Oracle several options for connecting to Oracle data:data: PL/SQLPL/SQL JavaJava Pro*C/ProC++Pro*C/ProC++ Pro*CobolPro*Cobol OCI and OCCIOCI and OCCI Oracle Data Provider for .Net (ODP.NET)Oracle Data Provider for .Net (ODP.NET) Oracle Objects for OLE (OO4O)Oracle Objects for OLE (OO4O)
Oracle10gOracle10g
Released in 2004Released in 2004 Release ~ 1.7 GB with seed databaseRelease ~ 1.7 GB with seed database Introduction of “Grid” conceptIntroduction of “Grid” concept Aggressive pricing for SMBAggressive pricing for SMB
Oracle10g New FeaturesOracle10g New Features
Enhanced Real Application ClustersEnhanced Real Application Clusters Oracle StreamsOracle Streams Cross-platform transportable tablespacesCross-platform transportable tablespaces Automatic Storage Management (ASM)Automatic Storage Management (ASM) Self-Managing DatabaseSelf-Managing Database New Backup and Recovery FeaturesNew Backup and Recovery Features
Full Flashback recoveryFull Flashback recovery Oracle GridOracle Grid
Oracle10g Flashback Oracle10g Flashback RecoveryRecovery Separate Flashback Area created during Separate Flashback Area created during
database creation (optional)database creation (optional) Contains flashback logsContains flashback logs Contains a full RMAN backup to diskContains a full RMAN backup to disk Should be sized at 1X – 3X database size, Should be sized at 1X – 3X database size,
depending on log retention perioddepending on log retention period Can quickly restore to any point in time Can quickly restore to any point in time
covered within the retention periodcovered within the retention period Restore the entire databaseRestore the entire database Restore a single tableRestore a single table
Flashback queryFlashback query Query a table as it existed at a point in time, Query a table as it existed at a point in time,
without restoring the tablewithout restoring the table Backups can be completely automatedBackups can be completely automated
Oracle10g GridOracle10g Grid Grid ConceptGrid Concept
Utility ComputingUtility Computing A network of clients and service providersA network of clients and service providers VirtualizationVirtualization
Storage GridStorage Grid ASMASM
Database Server GridDatabase Server Grid RACRAC
Application Server GridApplication Server Grid Application level clusteringApplication level clustering
Administering Oracle and Monitoring Administering Oracle and Monitoring Performance with Oracle 10g Grid Performance with Oracle 10g Grid ControlControl Oracle Grid Control is the Oracle Grid Control is the
enhanced version of OEM enhanced version of OEM that is installed with that is installed with Oracle 10gOracle 10g Requires a central Requires a central
Management Repository Management Repository and Agents on each and Agents on each database serverdatabase server
Enhancements for Enhancements for managing and deploying managing and deploying RAC nodes and RAC nodes and application grid nodesapplication grid nodes
Significant Significant improvements in improvements in automatic performance automatic performance monitoring and analysismonitoring and analysis
Central interface for Central interface for administering and administering and monitoring Oracle 10gmonitoring Oracle 10g Perform all Perform all
Administration tasksAdministration tasks Contains a variety of Contains a variety of
Advisors for improving Advisors for improving performanceperformance
Oracle10g RACOracle10g RAC
Enhanced Service architectureEnhanced Service architecture Workload integrationWorkload integration Cache FusionCache Fusion Integrated clusterwareIntegrated clusterware Cluster storage optionsCluster storage options
Cluster File SystemCluster File System Automated Storage ManagementAutomated Storage Management
Oracle Real Application Oracle Real Application ClusterCluster
Users
Database
Server Server Server Server
Shared EverythingShared Everything
Oracle10g RAC and Windows Oracle10g RAC and Windows 2003 Server2003 Server
Oracle has supported the Windows platform Oracle has supported the Windows platform since 1993since 1993
Fully optimized for Windows architectureFully optimized for Windows architecture 32-bit32-bit 64-bit Itanium2 and x6464-bit Itanium2 and x64
Leverages key Windows technologiesLeverages key Windows technologies Active DirectoryActive Directory Windows SecurityWindows Security Cluster supportCluster support .NET development platform.NET development platform
Easy to install and administerEasy to install and administer A rapidly growing market segment for OracleA rapidly growing market segment for Oracle
ReviewReview When was Oracle founded?When was Oracle founded? What thread or process reads Oracle data from What thread or process reads Oracle data from
disk?disk? When an Oracle write is performed, which When an Oracle write is performed, which
background thread is more likely to cause user background thread is more likely to cause user waits?waits? A. Database Writer (DBWn)A. Database Writer (DBWn) B. Log Writer (LGWR)B. Log Writer (LGWR)
Name two keys to Oracle performance.Name two keys to Oracle performance. What is the suggested minimum size of the What is the suggested minimum size of the
Flashback Recovery Area relative to Oracle data Flashback Recovery Area relative to Oracle data storage?storage?
Name a new Oracle 10g feature.Name a new Oracle 10g feature.
SummarySummary
Data Access MethodsData Access Methods Oracle10g New FeaturesOracle10g New Features Oracle10g RACOracle10g RAC Windows SpecificsWindows Specifics
© 2005 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.