Home

Welcome to DBA World!
Best Corporate Real Time Training on Oracle 12C/11G/10G DBA by Expert 10+yrs Exp
Call us for Enquiries : 9550720899

Showing posts with label Oracle 10g DBA. Show all posts
Showing posts with label Oracle 10g DBA. Show all posts

Monitoring "Temporary Tablespace" Usage in Oracle 9iR2 and 10g

Monitoring "Temporary Tablespace" Usage in Oracle 9iR2 and 10g


This is useful for monitoring index builds and large DSS queries. The last thing you want to happen after a query has been running for a few hours is to run out of temporary space. Statspack will give you essentially the same information, but I like to have a simple little query for interactive monitoring.

SQL> select 100*(u.tot/d.tot) "pct_temp_used" FROM
     (select sum(u.blocks) tot from v$tempseg_usage u) u,
     (select sum(d.blocks) tot from dba_temp_files d) d
      /

pct_temp_used
-------------
        7.375

Patch Upgrade from 10.2.0 to 10.2.0.4

PatchSets For 10.1.0.X.0
************************
The BASE release of Oracle 10g Release 1 is 10.1.0.2 .( Click Here to Download)
(The above link takes to Oracle Technology Network and requires OTN username and password)


PatchSet                    Number      Link To Download
*******************************************************************
10.1.0.3.0                      3761843         Patch 3761843
10.1 Patch Set 1         
10.1.0.4.0                      4163362          Patch 4163362
10.1 Patch Set 2
10.1.0.5.0                      4505133     Patch 4505133
10.1 Patch Set 3 (Terminal )

PatchSets For 10.2.0.X.0
************************
The BASE release of Oracle 10g Release 2 is 10.2.0.1.( Click Here to Download)
(The above link takes to Oracle Technology Network and requires OTN username and password)



PatchSet                    Number      Link To Download
*******************************************************************
10.2.0.2.0                     4547817          Patch 4547817
10.2 Patch Set 1
10.2.0.3.0                5337014       Patch 5337014
10.2 Patch Set 2
10.2.0.4.0                 6810189      Patch 6810189
10.2 Patch Set 3

PatchSets For 11.1.0.X.0
************************
PatchSet                    Number      Link To Download
*******************************************************************
11.1.0.7.0                     6890831       Patch 6890831
   



Patch Upgrade from 10.1.0 to 10.2.0.4 for Linux x86
***************************************************

1) Download p6810189_10204_Linux-x86 from Metalink
2) For information about physical standby databases, review document 278641.1.
   For information about logical standby databases, review document 278643.1.
3) $ unzip p6810189_10204_Linux-x86.zip
4) Update Oracle Time Zone Definitions
   SELECT version FROM v$timezone_file;

SQL> SELECT version FROM v$timezone_file;

   VERSION
----------
         4

If lesser or higher than 4 then read NoteID 553812.1 "Actions for the DSTv4 update in the Release 10.2.0.4

patchset".

5) set Env Variables

  $ ORACLE_HOME=Oracle_home
  $ ORACLE_SID=sid
  $ export ORACLE_HOME ORACLE_SID

6) Run interactively

   % cd patchset_directory/Disk1
   % ./runInstaller
 
  When prompted, run the $ORACLE_HOME/root.sh

Deprecated initialization Parameters in 10g

Deprecated Parameters in 10g - View
SELECT name FROM v$parameter WHERE isdeprecated = 'TRUE';
A deprecated parameter behaves the same way as a regular
parameter,except that a warning message is displayed at 
instance startup if a deprecated parameter is specified 
in the parameter file.
In addition,all deprecated parameters are logged to the
alert log at instance startup:
 
Initialization Parameters Deprecated in Release 10.2
The following initialization parameters were deprecated in release 10.2:

LOGMNR_MAX_PERSISTENT_SESSIONS
MAX_COMMIT_PROPAGATION_DELAY
REMOTE_ARCHIVE_ENABLE
SERIAL_REUSE
SQL_TRACE

Initialization Parameters Deprecated in Release 10.1

The following initialization parameters were deprecated in release 10.1:

BUFFER_POOL_KEEP (replaced by DB_KEEP_CACHE_SIZE)
BUFFER_POOL_RECYCLE (replaced by DB_RECYCLE_CACHE_SIZE)
GLOBAL_CONTEXT_POOL_SIZE
LOCK_NAME_SPACE
LOG_ARCHIVE_START
MAX_ENABLED_ROLES
PARALLEL_AUTOMATIC_TUNING
PLSQL_COMPILER_FLAGS (replaced by PLSQL_CODE_TYPE and PLSQL_DEBUG)

Initialization Parameters Deprecated in Release 9.2

The following initialization parameters were deprecated in release 9.2:

DRS_START (replaced by DG_BROKER_START)

Initialization Parameters Deprecated in Release 9.0.1

The following initialization parameters were deprecated in release 9.0.1:

FAST_START_IO_TARGET (replaced by FAST_START_MTTR_TARGET)
MTS_CIRCUITS (replaced by CIRCUITS)
MTS_DISPATCHERS (replaced by DISPATCHERS)
MTS_MAX_DISPATCHERS (replaced by MAX_DISPATCHERS)
MTS_MAX_SERVERS (replaced by MAX_SHARED_SERVERS)
MTS_SERVERS (replaced by SHARED_SERVERS)
MTS_SESSIONS (replaced by SHARED_SERVER_SESSIONS)
PARALLEL_SERVER (replaced by CLUSTER_DATABASE)
PARALLEL_SERVER_INSTANCES (replaced by CLUSTER_DATABASE_INSTANCES)
 
 
 
 

Drop Database on 10g

Drop database in Oraclein10g


Since 10g, It is possible to drop a database in Oracle 10g with the new SQL statement drop database. The command gets rid of datafiles online redo log files, controlfiles and spfile


Requirements
•database must be closed,
•exclusively mounted,
•restricted

startup mount exclusive restrict;

drop database;

exit

Oracle 10g ASM - Automatic Storage Management

What Is Automatic Storage Management?
Administering an ASM Instance
Configuring the Components of Automatic Storage Management
Using Automatic Storage Management in the Database
Viewing Information About Automatic Storage Management

Oracle 10g Tablespace Management

* Default Permanent Tablespace.
* Renaming Tablespaces
* Multiple Temporary Tablespaces.
* Oracle Database 10g introduces a new tablespace called SYSAUX that holds the objects of these schemas.

Oracle 10g Data Pump

Oracle Data Pump is a newer, faster and more flexible alternative to the "exp" and "imp" utilities used in previous Oracle versions.
*Export Monitoring - Example : Export> status
*Import Monitoring
*Monitoring Using View - DBA_DATAPUMP_JOBS,DBA_DATAPUMP_SESSIONS
*SQLFILE -A special parameter called SQLFILE allows the creation of the DDL script file.
*INCLUDE - allows you to define objects to be included or excluded from the dumpfile.
*EXISTS_ACTION=APPEND parameter allows data to be imported into existing tables.
*Data pump performance can be improved by using the PARALLEL parameter.
many more ....
For Practicals and Tutorials Training contact for Mentor..
Flexible Training and Guranteed Jobs....

Oracle 10g DBA New Features

1.Flash back versions query
2.Rollback Monitoring
3.Tablespace Management
4.Oracle DataPump
5.Flashback Table
6.Automatic workload Repository
7.RMAN
8.Auditing
9.Automatic Segment Management
10.Transportable Tablespaces
11.Automatic Shared Memory Management
12.ADDM and SQL Tuning Advisor
13.Scheduler

Oracle recently announced its latest database product, Oracle10g, at this year’s Oracle Open World. Most of the fanfare on this release centers on the grid capabilities of Oracle’s latest offering (hence the “g” on Oracle10g). But as with Oracle9i, Oracle10g contains enhancements in virtually all areas of the database server, resulting in an Oracle database with improvements in scalability, availability, performance, manageability, multimedia datatype support, and functionality.




This article covers just a small subset of Oracle10g features. It is not intended to be an all-inclusive document, but rather a high level overview of some of the more important (and hopefully, interesting) changes contained in this release. Consider this the first of many articles on Oracle10g, so we’ll keep this one at the 30,000-foot level. In future articles we’ll take an in-depth look at each of the features described in this article and new features as they are announced. One of the benefits of being an Oracle instructor is having access to up-to-the-minute information on Oracle’s latest product sets. As Oracle distributes more information on Oracle10g features, I’ll make sure to keep you informed.


Grid Computing


Let’s get started with a brief overview of Oracle Grid Computing. Oracle describes grid computing as “separate groups of users dynamically sharing computer resources across high-speed networks to meet changing computational needs.” Grid environments utilize farms of low-cost computer servers in a shared environment. Oracle uses its Real Application Cluster technology (discussed below) along with the 10g Database and 10g Application Server to create the shared computing infrastructure required to implement grid computing.


The optimal grid environment uses an interconnected server farm with each server containing one to four CPUs. The servers are connected to a shared disk system using network-attached storage (NAS) or a storage area network (SAN) technologies as the connectivity mechanism. High-speed network connections between the hardware servers themselves and from the hardware servers to the shared disk system allow end-users and administrators to view the environment as a single application architecture


Real Application Cluster enhancements in Oracle10g allow hardware servers to be seamlessly added to an application requiring more resources for a particular time period. Conversely, when hardware resource requirements are low, the extra computing horsepower can be easily freed and used by other applications in the grid.




Oracle10g enhances Oracle Enterprise Manager functionality to manage the grid with a single interface. Oracle’s Grid Control is a web-enabled toolset that allows administrators to group hardware platforms, databases, and application server installations and manage them as a single entity. Administrators are able to call other utilities (Data Pump, Transportable Tablespace, Oracle’s new job scheduler) from within Grid Control to modify, monitor and tune databases throughout the grid.



Grid Control also simplifies grid administration by automating the installation, configuration and cloning of Application Server 10g and Database 10g implementations across multiple nodes. Grid Control monitoring views the entire grid as a single unit and provides drill down capabilities to identify problems with individual components.



Automatic Storage Management (ASM)

Oracle10g provides its own disk storage management system. Database administrators are no longer required to use hardware vendor or third-party disk volume managers to provide striping and mirroring functionality. ASM manages the raw disks within the Oracle database architecture. Administrators are able to assign disks to disk groups, which can then be striped and/or mirrored to provide high performance and high availability. During tablespace creation, the administrator assigns the tablespace datafile to a disk group. This differs from previous Oracle releases which required that datafiles be assigned to the individual disks themselves.



Interestingly enough, Oracle’s default stripe size is one megabyte. This differs from most disk storage management systems, which often utilize 32K or 64K stripe sizes. Oracle found that one-megabyte stripes on disks provided a very high level of data transfer and best met the needs of disk intensive applications. One can only assume that advancements in disk storage technology have allowed Oracle to access the data in one-megabyte chunks and not drive disk utilization to unacceptable levels.



Administrators provide disk mirroring by creating failure groups. The DBA creates the appropriate number of failure groups to accommodate the data requiring disk fault tolerance. ASM’s mirroring capability ranges from the mirroring of individual datafiles to entire disk arrays, providing administrators with a high level of flexibility when creating fault-tolerant disk subsystems. The data is duplicated on separate disks in one-megabyte mirror “chunks.”



Administrators can choose from the following mirroring options in ASM:



External – no mirroring

Normal – data is mirrored on two separate disks. This is the default setting.

High Redundancy – data is mirrored on there separate disks providing three-way mirroring capabilities.

ASM requires its own instance, which identifies the various disk groups and files during instance startup. The ASM instance then mounts the disks under its control and creates an extent map, which is passed to the database instances. ASM does not perform the I/O for the database instances; it is only used to manage the various disk groups under its control. ASM is only activated when individual datafiles are created or dropped or disks are added and removed from the disk groups. When new disks are added or removed from the disk group, ASM automatically rebalances the files contained in the disk group while the database is open and functioning.



ASM is able to balance the I/O for multiple databases across all managed devices providing load balancing for multiple applications. In Oracle10g Grid implementations, ASM is able to reassign disks from one node to another providing additional load balancing capabilities.



Oracle Enterprise Manager (OEM) for Oracle10g and the Database Configuration Assisstant (DBCA) have been updated to allow administrators to configure and manage databases using ASM.



Real Application Clusters (RAC)

One of RAC’s requirements is that clustering software (sometimes called clusterware) be used to connect the hardware platforms together. This underlying clustering software was purchased either from the hardware vendor or a third-party clustering software provider. RAC is installed on top of the cluster environment and works in conjunction with the underlying clustering software to allow the application programs to view the multiple instances as a single entity.



One of the problems using previous release of RAC was identifying exactly whose software it was causing the problem in the first place. Was it the RAC software or was it the clustering software provided by the hardware or third party vendor? Oracle10g solves this problem by providing its own clustering software called Portable Clusterware. Portable Clusterware can now be used in place of the hardware or third-party vendor’s clustering software.



Flashback Database

How many times have database recoveries been performed because of incorrect changes made to database data? A user deletes or updates “one too many rows” by mistake and the result is a time-consuming and error prone process to restore and recover the database to a point-in-time before the error occurred. Oracle Education states that point-in-time recoveries are responsible for the majority of DBA errors and the resulting unrecoverable databases.



A common question in the Oracle DBA2 backup and recovery class is “Why can’t I just roll the database back to remove unwanted changes instead of restoring the database from a backup and applying the redo logs to roll forward to a point in time before the error occurred?” The question was invariably followed by “Don’t you think that would be easier?” The answer was always the same “Yes, it would be easier, but the Oracle database doesn’t have that capability.”



Until Oracle10g that is… Oracle10g’s Flashback Database feature provides a new tool in the DBA’s recovery toolbox. Flashback Database allows the DBA to “roll back” a table, set of tables or the entire database to a previous point-in-time.



A flashback log is used to capture old versions of changed data blocks. During Flashback execution, the Oracle database restores the old versions of the data blocks to their original locations which allows the database to be rolled back to a previous point-in-time. Oracle provides the following example in its sales collateral to highlight how simple this new Flashback Database Feature is:



SQL> flashback database to ‘2:05 PM’;

Compare that to previous point-in-time recovery procedures, which required the entire database to be restored to a previous backup and then rolled forward using archived and online redo log files to replay the changes to a point-in-time before the error occurred.



Flashback Backup

Oracle10g also uses the flashback logs to provide the mechanism for its Flashback Backup feature. Flashback Backup allows administrators to take a base level backup and then perform nightly incremental backups to roll the backup database forward to the current point-in-time. Since the changed blocks are recorded by the database, a full scan of all of the database blocks is no longer required to keep the backup database synchronized with its production counterpart.



Automatic SGA Management

Oracle has simplified the management of the Oracle SGA. In previous releases, database administrators allocated chunks of memory to the different caches (data buffer, shared pool, large pool, java pool etc.) by setting their associated parameters in the database’s parameter file.



Oracle10g has reduced the number of memory allocation parameters to two, one for the SGA and one for the PGA. Oracle10g will divide the memory resources among the different SGA memory areas and modify these allocations dynamically based on application workload changes.



Automatic Workload Repository (AWR)

The Automatic Workload Repository collects performance statistics (and the SQL text itself) for all SQL statements executed in the database. It is a historical performance datawarehouse that stores SQL statement CPU, memory and I/O resource consumption. AWR runs by default and Oracle states that it does not add a noticeable level of overhead. The information in this repository is used as input for the toolsets discussed later in this article. This historical information will help administrators finally answer questions like “my program ran long two days ago, can you fix it?”



A new background server process (MMON) takes snapshots of the in-memory database statistics (much like STATSPACK) and stores this information in the repository. MMON also provides Oracle10g with a server initiated alert feature, which notifies database administrators of potential problems (out of space, max extents reached, performance thresholds, etc.).



Automatic Database Diagnostic Monitor (ADDM)

The Automatic Database Diagnostic Monitor analyzes the information contained in the Automatic Workload Repository every 30 minutes to pinpoint problems and provide automated recommendations to DBAs. If ADDM requires additional information to make a decision, it will activate other advisories to gather more information. ADDM’s output includes a plethora of reports, charts, graphs, heartbeats and related visual aids.



ADDM can also be manually activated from OEM or the command line to provide users with a top-down analysis of performance bottlenecks and their associated resolutions.



SQL Tuning Advisor

Oracle’s latest advisor will help Oracle DBAs with the “fine art” of SQL tuning. In the past SQL tuning could be defined as more of an art than as a science. Administrators required extensive tuning experience before they could be described as “expert SQL tuners.” Oracle claims to have embedded hundreds of year’s worth of tuning experience into the SQL Tuning Advisor. Hopefully, this new advisor will help put the science back into the SQL tuning process.



The SQL Tuning Advisor uses the Automated Workload Repository to capture and identify high resource consuming SQL statements. An intelligent analyzer is then used to assist administrators in tuning the offending SQL statements.



The tuning advisor sends the SQL statement being analyzed to the Automatic Tuning Optimizer to perform the following in-depth analyses:



Statistics Analysis – the utility checks for stale or missing statistics, which may have a detrimental effect on the query’s optimization.

SQL Profiling – reviews past executions of the SQL statement to provide further information for recommendations.

Access Path Analysis – determines if additional objects (indexes, materialized views) can be created to improve the statement’s performance.

SQL Structure Analysis – reviews the SQL statement’s coding structure to determine if it can be altered to increase performance.

The Automatic Tuning Advisor uses the Oracle optimizer to make its recommendations. Unlike run-time optimization, which focuses on quick optimization, Automatic Tuning Advisor calls to the optimizer are not limited by time constraints. As a result, queries tuned by the advisor have a much better chance of having a finely tuned optimization plan created.



The SQL Tuning Advisor will be very beneficial to administrators who support third-party applications. In previous releases, once the administrator identified the canned application’s poorly performing SQL, the third-party vendor was contacted to change the SQL code and the changed code implemented in test and finally in production to implement the tuning change. Anyone who has experience with third-party application vendors knows that this is often a time consuming (if not impossible) process.



The SQL Tuning Advisor uses the Oracle10g cost-based optimizer to rewrite the poorly performing SQL and create a SQL profile, which is stored in the data dictionary. Each time the poorly performing SQL statement executes, the rewritten statement stored in the data dictionary is used in its place. No vendor assistance required!



Transportable Tablespace

In previous releases, the transportable tablespace feature could only be used to transfer data to databases running on the same operating system. In Oracle10g, Oracle has enhanced the transportable tablespace feature to allow the tablespace to be transferred to databases running on different operating systems.



Data Pump

Describing the Oracle Export and Import utilities as slow is like saying the Titanic sprung a small leak. Stories of Export and Import executions running for hours (and sometime days) are commonplace. Oracle has finally created a new data movement utility, called Data Pump, to increase the performance of data transfers. Oracle states that Data Pump’s performance on data retrieval is 60% faster than Export and 15 to 20 times faster on data input than Import. In addition, Oracle states that Data Pump is able to take advantage of parallel processing to increase performance. Hopefully, this will alleviate the performance issues related to transferring data between Oracle databases.