Download presentation
Presentation is loading. Please wait.
Published byDerrick Washington Modified over 8 years ago
1
Oracle 10g Administration Database Architecture, Creation and Interfaces Copyright ©2006, Custom Training Institute.
2
Oracle's Optimal Flexible Architecture (OFA) OFA is a set of guidelines and recommendations for an Oracle installation. Based on years of UNIX experience Created by Oracle Consulting Most of the guidelines involve making directories and placing files appropriately. Obvious when explained Anarchy reigned before their publication
3
Copyright ©2006, Custom Training Institute. Why Use Optimal Flexible Architecture (OFA) The database's objects are separated by object type and activity type. OFA helps in organizing large amounts of information. The amount of administration, monitoring and tuning, after initial setup, is minimized. The DBA has maximum flexibility in planning the physical layout of the database.
4
Copyright ©2006, Custom Training Institute. Problem: Where can new releases be installed? Solution: Use a location with a unique directory name. This provides an easy method to distinguish old files from new files. Uniform naming also simplifies the creation and reuse of scripts. OFA: Installing New Releases
5
Copyright ©2006, Custom Training Institute. OFA Paths Path: $ORACLE_BASE/product/TYPE_COUNT ER Example: /u01/app/oracle/product/10.1.0/ db_1 $ORACLE_BASE is /u01/app/oracle TYPE is db (for database) COUNTER is 1
6
Copyright ©2006, Custom Training Institute. OFA: Installing Scripts Problem: How can you create scripts that will not break with new releases? Solution: Use variables and wildcards. The instance "demo" might have administrative files: $ORACLE_BASE/admin/demo/pfile/* $ORACLE_BASE/admin/demo/create/* You can create a script using a variable for the SID (demo) that will work on any machine with any Oracle release.
7
Copyright ©2006, Custom Training Institute. OFA: Data File Placement Problem: Where should new data files be placed? Make the following considerations: Drives must be maintained. Scripts must be modified to find the data files. Backups must be executed. Solution: Use a uniform directory name at a uniform depth such as: \oradata\sid\system01.dbf. Create a script that references your data files using variables and wildcards.
8
Copyright ©2006, Custom Training Institute. Characteristics of an OFA-Compliant Installation Distributed, tuned I/O loads Safeguards against drive failures Distribution of Home directories Consistent database file naming Separation of tablespace contents
9
Copyright ©2006, Custom Training Institute. Separating Segments Special tablespaces: SYSAUX, SYSTEM, TEMP, UNDOTS required EXAMPLE and USERS tablespaces are optional
10
Copyright ©2006, Custom Training Institute. Occupants of the SYSAUX Tablespace Enterprise Manager Repository LogMiner Oracle Data Mining Statspack Job Scheduler Workspace Manager
11
Copyright ©2006, Custom Training Institute. ORACLE_HOME All files that relate to an Oracle release are stored in the ORACLE_HOME directory. You must monitor and record patch releases manually. Oracle10g allows you to define multiple ORACLE_HOMEs.
12
Copyright ©2006, Custom Training Institute. Syntax for Naming Oracle Home Directories /pm/h/u/v/type_n: /pm -- standard mount point h -- standard directory name u -- name of owner of directory v -- version of software type -- of installation n -- counter variable
13
Copyright ©2006, Custom Training Institute. Sample Syntax for Naming Oracle Home Directories /u01/app/oracle Oracle base directory created by user oracle /u01/app/applmgr Oracle base directory created by user applmgr
14
Copyright ©2006, Custom Training Institute. Sample OFA Directory Path /u01/app/oracle/10.1.0/db_1 First installation of the Oracle 10.1.0 database software performed by user oracle /u01/app/jdoe/10.1.0/client_2 Second installation of the Oracle 10.1.0 client software performed by user jdoe
15
Copyright ©2006, Custom Training Institute. Syntax for Naming Oracle Database Files under OFA Controlfiles: / /oradata/ /control##.ctl Redo log files: / /oradata/ /redo##.log Data files: / /oradata/ / ##.dbf
16
Copyright ©2006, Custom Training Institute. Sample OFA Data File Names Controlfile: /u01/oradata/ORCL/control01.ctl Redo log file: /u01/oradata/ORCL/redo03.log Data file: /u01/oradata/ORCL/system02.dbf
17
Copyright ©2006, Custom Training Institute. Naming Tablespaces under OFA Use maximum of eight characters for tablespace name. Effect on names of associated data files: Must be able to add two-digit counter and the four characters ". dbf " to end of file name Portable UNIX filenames are limited to 14 characters, so ((14 - 2 ) - 4 ) = 8: ENDUSERS01.DBF NAMERICA04.DBF ACCNTG11.DBF
18
Copyright ©2006, Custom Training Institute. OFA Layout Tips Group tables based on the following considerations and place them appropriately in different tablespaces. Fragmentation: Group tables with similar propensity to fragment. This helps in storage management. Life span: Dropping tables causes fragmentation. Group tables by their life span.
19
Copyright ©2006, Custom Training Institute. Contention: Two segments can be hot at the same time. Place them on different I/O controllers. Avoid placing them in the same tablespace. Operational ease: Group tables by the frequency of their backups or type of use. More OFA Layout Tips
20
Copyright ©2006, Custom Training Institute. Further Reading on OFA Consult the Oracle online documentation: http://download-west.oracle.com/ docs/html/B10811_01/app_ofa.htm
21
Copyright ©2006, Custom Training Institute. Automatic Storage Management High-performance storage management feature. Special Oracle instance (ASM Instance) spreads data across devices in "disk groups." Data may be two-way mirrored or three- way mirrored. Instance balances data to eliminate most manual disk tuning issues.
22
Copyright ©2006, Custom Training Institute. ASM Disk Space Requirements External redundancy: One disk Minimum 1.15 GB for data files Minimum 2.30 GB for recovery files Minimum 3.45 GB for data and recovery files
23
Copyright ©2006, Custom Training Institute. ASM Disk Space Requirements Normal redundancy: Two disks Minimum 2.30 GB for data files Minimum 4.60 GB for recovery files Minimum 6.90 GB for data and recovery files
24
Copyright ©2006, Custom Training Institute. ASM Disk Space Requirements High redundancy: Three disks Minimum 3.45 GB for data files Minimum 6.90 GB for recovery files Minimum 10.35 GB for data and recovery files
25
Copyright ©2006, Custom Training Institute. Verifying ASM File system: more /etc/oratab more /var/opt/etc/oratab Look for line of the form +ASM:oracle_home_path:N Set ORACLE_HOME and ORACLE_SID. Connect to ASM instance as SYS user with SYSDBA privilege. Start instance, if needed.
26
Copyright ©2006, Custom Training Institute. Verifying ASM Connect: sqlplus "SYS/syspassword AS SYSDBA" Start ASM instance, if needed. startup Verify: select name, type, total_mb, free_mb from v$asm_diskgroup
27
Copyright ©2006, Custom Training Institute. Oracle Database Architecture Physical Files: Data files Control files Redo log files Logical Architecture: Tablespaces Extents Segments Blocks
28
Copyright ©2006, Custom Training Institute. Tablespace Types Smallfile tablespace (default): Up to 1022 files in a tablespace Up to 4 million blocks in each file Bigfile tablespace: One file per tablespace Up to 4 billion blocks in the file
29
Copyright ©2006, Custom Training Institute. Oracle Instance Architecture Dedicated server vs. Shared server ASM instances vs. "regular instances"
30
Copyright ©2006, Custom Training Institute. Oracle Dedicated Server Architecture One-to-one mapping between end user processes and server processes. Server process goes idle in between handling end user requests.
31
Copyright ©2006, Custom Training Institute. Oracle Dedicated Server Architecture
32
Copyright ©2006, Custom Training Institute. Oracle Dedicated Server Architecture More information is available online at
33
Copyright ©2006, Custom Training Institute. Oracle Shared Server Architecture Requests come in from many users. Dispatcher directs requests to 'pool' of shared server processes. Once request is handled, process returns to pool. More efficient use of resources. More simultaneous users.
34
Copyright ©2006, Custom Training Institute. Oracle Shared Server Architecture
35
Copyright ©2006, Custom Training Institute. Oracle Shared Server Architecture More information is available in the online documentation at
36
Copyright ©2006, Custom Training Institute. Oracle Database Interfaces SQL Interface Java Interface C++ Interface PL/SQL Interface
37
Copyright ©2006, Custom Training Institute. SQL Interface Ultimate final gateway into an Oracle database. Uses built-in security checks to protect data.
38
Copyright ©2006, Custom Training Institute. Java Interface Direct interaction with Java Virtual Machine (JVM). Ability to call Java stored procedures from PL/SQL, and vice versa. Ability to access SQL data directly from Java.
39
Copyright ©2006, Custom Training Institute. Java Component Structure
40
Copyright ©2006, Custom Training Institute. C++ Interface Oracle Pro*C/C++ Precompiler Embeds SQL statements in C/C++ application code Precompiler generates calls to Oracle Runtime Library (SQLLIB) Compile, link and execute C/C++ program using usual techniques
41
Copyright ©2006, Custom Training Institute. Conceptual Use of the Pro*C/C++ Precompiler Copyright ©2006, Custom Training Institute.
42
PL/SQL Interface Embed PL/SQL calls in Pro*C/C++ code: EXEC SQL EXECUTE DECLARE … BEGIN … END; END-EXEC;
43
Copyright ©2006, Custom Training Institute. Precompiler Options SQLCHECK=SEMANTICS PL/SQL code needs to be parsed at the server USERID Specify user ID (for server connection) Additional precompiler options available at
44
Copyright ©2006, Custom Training Institute. Summary Oracle Database Architecture Oracle Database Creation and Layout Oracle Database Interfaces
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.