While the author makes every effort to ensure that the information presented in this white paper is accurate and error-free, Rampant TechPress, its authors, and its affiliates assume no responsibility for the use of information, advice, techniques, or technologies provided by contained in this white paper. The user of this white paper is solely responsible for the consequences of using the information, advice, techniques or technologies contained therein.
Introduction
System Planning
Resource and Capacity Planning
In general, the database block buffer areas of a database SGA will be sized between 1/20 and 1/100 of the physical sum of the total number of database file sizes. Based on the size of the disks and the speed of the backup solution, the maximum recovery time should be developed.
Optimal Flexible Architecture (OFA)
Share tablespaces whose data will participate in disk resource contention across different physical disk resources. FIELD2: Data data files, a control file, tool data files, redo logs FIELD 3: Index data files, a control file, redo logs.
Oracle Structures and How They Affect Installation
It is wise to have at least two copies of your control file on different disks, three for OFA compliance. This ensures that the loss of a single control file will not crash your database.
Disk Striping, Shadowing, RAID, and Other Topics
RAID-2—Data is distributed in extremely small increments across all disks, adding one or more disks that contain a Hamming code for redundancy. RAID-4 - To overcome the lower transfer performance of RAID-3, RAID-4 uses large chunks of data spread across multiple drives and one parity drive.
New Technologies
It offers almost all the reliability of RAID5 and delivers much better write performance. Their relative immunity to crashes and long shelf life provide an ideal solution for storing the immense amount of data that proper use of archive logs and output produces.
Backup & recovery
New disk arrays such as those developed by EMC Technology offer a hybrid between disk and RAM technology with their high-reliability multi-gigabyte arrays and multi-gigabyte RAM memories.
Backups
Imports/Exports
Under Oracle7, the user must be assigned the EXP_FULL_DATABASE role to perform full export. If the only role assigned to the user is CREATE_SESSION and EXP_FULL_DATABASE, even if the user's password is compromised, they won't be able to do much damage.
Archive Logs
LOG_ARCHIVE_DEST_1 Tertiary site archive 1 LOG_ARCHIVE_DEST_2 Tertiary site archive 2 LOG_ARCHIVE_DEST_3 Tertiary site archive 3 LOG_ARCHIVE_DEST_4 Tertiary site archive 4 LOG_ARCHIVE_DEST_5 Tertiary site archive 5 LOG_ARCHIVE_FORMAT Specifies the format for. Proper use of these backup/restore tools allows the DBA to recover from any failures.
Backup Methodologies
Some sites turn archive logging on during a hot backup and then turn it off; however, this means that they can only restore up to the time of the last archive log. Using Oracle INIT.ORA parameters, the destination and frequency of the archive logging can be controlled, although the size of the redo log plays more of a role in the frequency of archive logging than any initialization parameter.
Recovery Types
Therefore, even though the redo logs are backed up, they should not be restored unless the online redo logs have been lost. Always recover using an online redo log and the most current control file if possible. If you must use a control file restored from backup, use the USING BACKUP CONTROLFILE option of the recovery command.
If recovery is required, the system will ask for the archive logs it needs and perform recovery from them. Most internal errors are automatically corrected by Oracle using the REDO and rollback logs and data buffers. Since each site will have different file placement and each recovery will most likely be unique, it is suggested that the Oracle7, Oracle8 or Oracle8i Server Recovery or Backup and Recovery Manual (Oracle, Corporation, 1999) be consulted for the appropriate recovery methodology applicable to the situation(s) in which the DBA may find himself or herself.
It cannot be emphasized enough that backup and recovery operations must be completely procedural and that these procedures must be tested regularly, especially after major changes to the database or equipment.
Oracle7 Enterprise Backup Utility
A database must be registered in the EBU catalog before it can be backed up with the EBU; an example of a registration sequence would be Once the database is registered, it can be backed up using commands similar to the following. The control file and tablespace can be backed up together, as well as databases and control files.
An example shell script for UNIX backup is included with the EBU structure in the directory. The EBU facility also allows restoring the database either to its original locations or to another host. The EBU facility also provides catalog maintenance and backup report generation services.
Oracle8 RECOVERY MANAGER FACILITY
It is a good idea to maintain a small database solely for the recovery catalog and perhaps the Enterprise Manager catalog files. Backup sets can be written to disk or secondary storage, can include a backup control file, and can span multiple OS files (parts). Each security string can be associated with a tag that can be used for identification in subsequent operations.
However, if the database is not in archivelog mode, the entire database can only be backed up if it is cleanly shut down. The following are some example scenarios that show how the commands can be scripted. RMAN-06005: connected to target database: ORTEST1 RMAN-06008: connected to recovery catalog database RMAN> register database;.
The following script recovers and restores the database to the time immediately before the user error occurred.
DB_VERIFY UTILITY
The widget is called differently on different platforms; for example, it may be called dbv (on SUN/Sequent) or something else on your system. START Start block (first block of file) END End block (last block of file) BLOCKSIZE Logical block size (2048).
The DBMS_REPAIR Utility
Now, instead of having to go through a complicated recovery process if a single block gets corrupted, the DBA has the option of attempting to repair it using the DBMS_REPAIR utility. All DBMS_REPAIR self-declared exceptions are in the number range 24000 and are shown in Table 3. 24125 The target object has been dropped or truncated since DBMS_REPAIR.CHECK_OBJECT was last run.
The DBMS_REPAIR package contains six procedures (as of this writing) that are usable and no user callable functions. ADMIN_TABLES Allows for the administrative functions for the DBMS_REPAIR repair and orphan key tables such as create, clear and drop. SQL> execute dbms_repair.admin_tables (.. table_type=>dbms_repair.orphan_table,action=>dbms_repair.cr eate_action); .. table_type=>dbms_repair.orphan_table,action=>dbms_repair.dr op_action);.
Listing 8 Example of execution of the CHECK_OBJECT procedure Can we go without specifying an output value.
Oracle RDBMS Architecture
DBWR—Database Writer --This process handles data transfer from the buffers in the SGA to the database files. LGWR—Log Writer -- This process transfers data from the redo-log buffers to the redo-log database files. SMON—System Monitor – This process performs instance recovery on instance startup and is responsible for cleaning up temporary segments.
PMON—Process Monitor - This process recovers failed user processes and clears the cache. LCKn—Lock Process - This process is used for inter-instance locking in an Oracle7 parallel server environment. Snnn—Servers -- This Oracle7 process makes all the required calls to the database to resolve a user's requests.
The placement of data files has become obscure over the past few years with the addition of RAID to the system administrator's toolkit.
Datafile Sizing
The table sizing spreadsheet shown in Figure 3 only requires you to enter the table column sizes in the appropriate column. character, date, and number) and entering table-specific items that deal with size, such as initial transactions, percent free in a block, and number of rows. When using the index sizing spreadsheet shown above, the only required inputs are the size of the columns to be included in the index, the initial transactions, the free percentage, the block size, and the expected number of rows. In general, you won't know the average transaction size, the average large transaction, or the number of concurrent DML users until the application has been running for a while.
LOG_BUFFER_SIZE should be set to reduce the number of writes required to the redo log, but not so large that it results in excessive IO wait time. The size of the control file is determined by a number of initialization parameters and really shouldn't bother you. Note that your platform may have more or less than this number of parameters.
Oracle 8i expanded the number of initialization parameters that can be modified using ALTER SESSION, ALTER SYSTEM SET, and ALTER SYSTEM SET.
HASH_MULTIBLOCK_IO_
NLS_ISO_CURRENCY X
OPTIMIZER_PERCENT_
13 minimum number of rough range granules to generate per slave _px_no_stealing FALSE occurs in parallel.
System Global Area
NOTE: In 8i, a new column has been added to v$sgastat called POOL, which can now be used to determine the size of the shared pool. So how can we determine what is in the shared pool and whether it is being properly reused or not. The first report we will examine shows how individual users use the shared pool.
This shows the distribution of SQL areas and can show you that some users are occupying a disproportionately large area of the shared pool. Typically, a user using a large pool size does not use good SQL coding techniques, which creates a large number of non-reusable SQL areas. Frequent reloading of statements is a sign that the shared pool may be too small.
Without running a report in source 12 for each of perhaps hundreds of users, how can we tell if we have garbage SQL in the shared pool.
Putting it All In Perspective
Determine usage patterns of packages, procedures, functions and cursors and pin those that are frequently used