P. 1
Database Administrator an Introduction

Database Administrator an Introduction

|Views: 6|Likes:

More info:

Published by: Kothasudarshan Kumar on Jun 10, 2013
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less





Database Administrator An Introduction


DBA Introduction



The information contained herein focuses on what would be considered an introduction to being an Oracle DataBase Administrator (DBA). It is not in any way a replacement for hands-on-training at an education center like Learning Tree International or Oracle Education. It is however to be used as a starting point of reference for people starting a career as an Oracle DBA. This manual is a hodgepodge of information gathered from manuals, books, internet articles and personal experience, nothing is intentionally plagiarized.


Table 1-1. Abbreviations Abbreviation RMAN PRIM SECD CATA Description Oracle’s Recovery Manager product used to backup restore databases. The primary instance database The failover instance database The RMAN catalog instance database


Typographic Conventions
Table 1-2. Typographic Conventions Convention Courier Italics UPPERCASE <cr> Arial Description Courier type indicates UNIX commands, directory names, usernames, pathnames, and filenames Italic type indicates a variable, including variable portions of filenames Uppercase letters indicate Structured Query Language (SQL) reserved words, initialization parameters, and environment variables This string indicates a newline character Arial type indicates response to commands by operating system (OS) or current program in use

The following table provides the typographic conventions used in this guide:

• • •

Command Syntax
All command syntax appears in courier font. “$” character at the beginning of UNIX command examples is the default UNIX command prompt. Do not enter it as part of the command. The UNIX command assumes the use of the POSIX shell. SQL> indicates a command example given at the default SQLPLUS command prompt. Do not enter it as part of the command.
Table 1-3. Command Syntax Conventions Convention backslash \ braces {} brackets [] Italics Description A backslash indicates a command that was too long to fit on a single line Braces indicated required items: export DISPLAY={YOUR_TERMINAL} Brackets indicate optional items: stop_mon.sh {db} [service] Italic type indicates a variable. Substitute a value for the variable: database_name

Command prompts will vary depending on the shell or program you are current using.

DBA Introduction


File Locations and Descriptions

Every system has sets of standards that to which they adhere. This document uses the following standards to for file locations. It is not to be taken as a recommendation of standards, only as an example.
Table 1-4. General File Locations Type of File RMAN scripts RMAN logs SQL scripts Shell Scripts Initialization files Password files Oratab files Location /opt/oracle/workspace/bin /opt/oracle/workspace/logs/rman /home/oracle/sql and /opt/oracle/workspace/sql /opt/oracle/workspace/bin $ORACLE_HOME/dbs/spfiledbname.o ra $ORACLE_HOME/dbs/orapwdbname /etc/oratab Short Name $RMAN_DIR Description POSIX shell scripts (.sh) calling rman commands to backup and restore the database. These are located on the segment controller server. Log files created by the RMAN scripts and located on the segment controller server. General sql scripts used in monitoring the database. General shell scripts the help in the over administration and monitoring of the database. Initialization parameter file for starting up database. Password file for accessing database as SYSDBA Listing of current databases on machine with their current home directory and if they should startup when server is rebooted.


Works in concurrence with Security System Administrators (SSA) to implement and maintain database security including monitoring of auditing logs and database usage by users. clusters. system administrators. They must communicate and work with practically all groups that participate in the life cycle of a project/system. The DBA should work closely with system engineers and software developers to create and implement the physical database design. users. and CM to plan and integrate new releases of Oracle and its tools as well as any other third party products that have been integrated into the database administration or usage. indexes. Performs use maintenance Plan and implements backup and recovery strategy of Oracle databases. The DBA works closely with the software developers because the highest yielding adjustments are often in the sql code used within the application. Work with software developers. network administrators. Evaluates and works with SA. SD. database changes. enforces and maintains oracle database constraints to ensure integrity of the database. This includes using oracle metalink to research questions and open trouble tickets at http://metalink. This would include management. Controls migration of programs. The process can often depend on the type of disk storage system and how it is integrated into the over system architecture.com Works with Change Management Team (CM) and Software Developers (SDs) to develop and maintain standards in application design and code. They also work with CM and SD to ensure that system / site standards are being adhered to. test teams. and system configuration management teams. They work reactively to system and database problems with the O&M team. Acts as the principal Oracle support contact. The DBA works closely with the system administrators because they often have applications or tools to use in monitoring system usage and can help pin point system bottle necks. testing. vendors. education and production. • • • • • • • • • • • • 2. . Modify database structures as required by system/problem change requests (PCR). including tables. network administrators and system administrators to monitor and perform tuning of the database. views. Works closely with software developers to provide technical support for database related issues as well as feedback on possible impact changes to the database objects may cause. system architects. software development.2 The DBA in an Organization The database administrator is more than just an Operations and Maintenance role. service providers. It is the database administrators that perform all administration tasks related to database objects. packages and procedures. They work proactively with all teams to plan and improve the system.1 • • • Role of a Database Administrator Oracle DBA Responsibilities Install and upgrade Oracle products Creates and maintains all databases required for development.DBA Introduction 2 2. Creates. security system administrators. and reference data changes through the development life cycle.oracle. Works in conjunction with System Administrators (SAs) to plan and allocate disk storage for each system. sequences.

3 The Skills of a DBA The roles outlined above show that the DBA is more than just a monitor/creator of the database instances. oracle recommended file structures. A DBA should always be looking at their skill sets and striving to improve them. Knowledge of Oracle and system performance tools for monitoring the system. . system commands and shell scripting. An understanding of the system life cycle that is implemented within the organization to which they belong. A growing knowledge and practice in tools and methods to perform database and program code performance tuning. NA) Orac le Vendor s Service Provider s DBA Developers Test Team Configuratio n Manageme nt User s Figure 1: DBA Relation to Organization 2. and the normal forms (particularly 3rd normal form). Knowledge of physical database design including STAR schema. At least a generally knowledge of the applications that access the database and specific knowledge of they interact with the database. Sound communication skills. SSA. A good understanding of the business rules that govern the system and how they relate to the information within the database. An understanding and practice in Oracle backup and recovery scenarios within the environment which they maintain. clustering. A growing knowledge of Oracle features and the future vision of oracle to be able to provide input into future system architecture. The DBA must have many skills and areas of knowledge to make certain the database is integrated into the system with maximum efficiency. It is a role that works closely with many other groups to ensure that the best system is built and maintained. The DBA should have: • • • • • • • • • • Knowledge of operating system their databases reside on including areas of job scheduling.DBA Introduction Manage ment Requiremen ts Engineers System Architects System Administra tors (SA.

Log into each instance and run daily reports or test scripts.4. 2.4. Make sure that all databases under your supervision are available.1. http://dba-village.1.1 Daily Procedures Many of these procedures can be automated using shell scripts and a scheduler like cron or even using tools such as Oracle Enterprise Manager (OEM).5 Verify enough resources for acceptable performance Look for segments in the database that are running out of resources (e.4.3 Verify success of database backup Keep a schedule of database backups and review logs to assure backups occurred successfully.4. but rather a spring board for you to create your own task lists. It is also important to check to make sure that the next_extent for each table is smaller than the largest extent that the tablespace can offer. extents) or growing at an excessive rate.log) is in this location and should be checked for errors each day.4 Verify enough resources for acceptable performance Keep a record of acceptable minimum amount / percentage free in tablespaces and compare it daily to reports.2 Look for any new alert log entries Each Oracle Instance has a background dump destination.4. 2. Inform appropriate parties if there is a discrepancy.4. Often it is best to find a topic you are interested in learning more about and do research on the web about the topic. 2.1 Verify all instances are up. allow you see real world questions being answered by other experienced DBA’s.4. The DBA manuals and trade journals help you stay abreast of new trends and technologies. In many environments it is beneficial to keep track of backup times and sizes for capacity planning. The “Lazy DBA” is the concept that you are working smarter using tools to do the grunt work and then you checking the results. trade journals.main. The alert log file (alert_ORACLE_SID.7 Check status of standby database if applicable.1.4. usually in $ORACLE_BASE /ORACLE_SID/bdump. 2. network or disk resources Work with system administrators to develop methods to review contention for these resources.DBA Introduction 2.6 Review contention for CPU.4 DBA Example Checklist Each system differs on what types of checks that need to be performed.com/village/dvp_base.1.g. 2. it also gives you a chance to ask questions and verify answers. 2.1. 2.1.8 Read DBA manuals/reference materials for one hour It is extremely important to continue to read DBA manuals. The storage parameters for these segments may need to be adjusted. if not the space may need to be coalesced or a datafile added. The following lists are not to be used as definitive checks. . memory. newgroups and/or mailing lists. You should as well gather sizing information as well and compare it to past trends. 2. The newsgroups like. Check to determine if latest archive logs have been applied to the database by looking at the alert log file for the standby database.

backup and restore. but you need to sit down with Oracle and play with it.2 2. Version specific articles.htm . see sample codes and tutorials. shutdown/startup. It is impossible to be an expert on every single area of Oracle but there are resources that can definitely help you nurture your knowledge. http://www. Using CBT courses are all well and good. You may want to take a class at a university in basic database administration. Training is very helpful.All the original documents from Oracle and a great reference library.1 Procedures for Reviewing New Builds Review object creation scripts Each system should be adhering to object-creation policies (naming conventions. participate in forums. http://www.oracle. http://docs. http://www.com – Another good source from DBA Scripts.com/index. You should create scripts that check these policies out to assure they are being enforced.com/oracle_links. it is possible that system changes occur in the manner which an application connects to the system.Site for Toadsoft by Quest Software.). forums. You must have an account which is based on your Customer Support Identifier (CSI).html . . 2. The concept is that an object should be created with the least amount of individual access right to allow software to work. storage parameters.com – The knowledge base and trouble ticket submission utility for Oracle. This is a good tool for database developers and DBAs. Access rights should be by group. create a few tables. examiniation guides. They are not exhaustive but are only meant to be used as a spring board for you to find your own sources of knowledge. read articles.htm . The SQL*Net logs should be reviewed to catch any such errors. http://metalink. 2.3 Look in SQL*Net logs for errors or issues Although unlikely.2. http://www.4. One of the best practices is that of Least Needed Privileges.oracle. review documentation.The Oracle Technology Network where you can download software.2.com/home_content.toadsoft. 2.4 Review Tuning Opportunities Review common Oracle tuning points. learn basic SQL.oracle.html-Oracle .5 DBA Resources Like with any other technical field the functionality and options that you can implement with Oracle continue to grow. etc. not individuals. but I suggest that you take the hands-on approach. and industry news.4.2. Project Performance into the Future by comparing with past reports for both Oracle and the OS.2 Look for security policy violations Every system has security policies.2.Site sponsored by Burleson Consulting with links to other sites of interest. and never by public.4.DBA Introduction 2.oracle-base.4.com/technology/index. 2. The following links were current as off February 7.4. 2007. a few users.dba-oracle. • • • • • • Cache hit ratio Latch contention Disk i/o contention Data Fragmentation Compare with past reports to identify impact of recent changes to system.

com/village/dvp_base. http://www.DBA Introduction http://blogs.com – Oracle blogging community where you can read blogs from Oracle executives. .A good source of information for tips. forums and links.dba-village. papers.main .oracle. scripts. employees and non-employees that exchange views about requirements and best practices for Oracle.

an Oracle Instance refers to the background processes and memory structures. 3.DBA Introduction 3 Oracle Architecture The following section outlines the Oracle Architecture.1. System Global Area Dedicated Server Process Database Writer System Monitor Database buffer cache Redo Log Buffer Shared Pool Java Pool ……… ……… Log Writer Archiver CKPT Process Monitor ……… ……… Oracle Instance – Memory Oracle Database . It is always connected to one and only one database. .1 Oracle Instance An Oracle Instance is the means to access an Oracle database. It consists of an Oracle Instance and an Oracle database (see Figure 2). In general. integrated approach to information management. It provides an open comprehensive. It is uniquely defined as ORACLE_SID.Physical Database Redo log file n Redo log file 3 Redo log file 2 Redo log file 1 Undo Tablespace (Rollback segments) Data Segments Control Files Figure 2 : Oracle Instance and Oracle Database 3. where as the Oracle Database refers to the actual physical storage structures.1 Oracle Server An Oracle Server is a relational database management system (RDBMS). An Oracle Instance consists of Memory structures and background processes (see Figure 2). There however may be more than one instance that connects to a database (DB_NAME) (this is either a parallel configuration or a Real Application Cluster (RAC) configuration (see Figure 3).

PL/SQL) The Data Dictionary Cache includes the most recently used data definitions. Redo entries contain information to reconstruct or redo changes.1. Changes recorded within are called redo entries.1. I/O server processes. Is managed by a LRU algorithm. Primary purpose is recovery. Dispatcher (Dnnn) When the Oracle Instance is setup with the Multi-Threaded-server the dispatcher routes client . The processes are owned by the Oracle user and can generally be seen by using the following command. Stores copies of data blocks that have been retrieved from the datafiles. It writes out data from the buffer cache in the SGA to the database. privileges and other database objects. Optional area of memory in the SGA used to relieve the burden placed on the shared pool by session memory. Required only if installing and using Java because it services parsing requirements for Java commands. 3. in Windows they run as threads. users. 3. tables. The Library Cache includes the most recently executed SQL statements. This is a dynamic memory area where size is controlled by the initialization parameter SGA_MAX_SIZE.2 System Global Area (SGA) The SGA consists of the memory structures that perform the database management.4 Oracle Processes In a Unix/Linux environment the Oracle Instance has processes run as individual processes. backup and restore operations by RMAN and parallel execution message buffers. Shared Pool Library Cache Data Dictionary Cache Database Buffer Cache Java Pool Redo Log Buffer Larger Pool Includes areas such as Library Cache and Data Dictionary Cache. Most of them will be covered in detail later. $ps –ef | grep oracle The following list is not exhaustive but is to give a general overview of some of the processes that may be running in the background for an Oracle instance. Oracle 10g does require it for normal working. Caching improves response time on queries and DML. Enables great performance when you obtain and then update data.3 Program Global Area This is memory reserved for each server process connecting to an Oracle database. The processes that are running will differ depending on the features that have been enabled for an Oracle Instance. Checkpoint (CKPT) Updates the headers of all datafiles when a checkpoint occurs. The following list is only a few of the memory structures within an instance. It is allocated when a server process is created and deallocated when the server process is terminated. Is managed by a least recently used (LRU) algorithm and has two areas (SQL. indexes.1. Enables the sharing of commonly used statements across sessions. columns. Records all changes made to the database data blocks. It can only be used by one server process.DBA Introduction ORACLE_SID= PROD1 ORACLE_SID= PROD2 ORACLE_SID= PROD3 DB_NAME= OE_PROD Figure 3 : Parallel / RAC Configuration 3. Database Writer In most systems on database writer is adequate by for systems that modifies data heavily more (DBW0 or DBWn) than one may be needed. Including information about database files. Archiver (ARCn) Copies online redo log files to disk/tape after each log switch for databases in ARCHIVELOG mode.

Oracle creates a datafile for a tablespace by allocating the specified amount of disk space plus the overhead required for the file header. Performs system wide housekeeping tasks such as crash recover. This is basically a cleanup system for processes that fail. The redo log can consist of two parts: the online redo log and the archived redo log. Password directory Monthly and before each change ORACLE_BASE\ORACLE_HOME\DATABASE and are named PWDsid. then the database cannot function properly. cleaning up temporary segments. With a distributed database configuration this process automatically resolves failures for the distributed transactions. daily. Control Files Redo Log files There are three additional types of files that should be part of any backup policy of an Oracle database. at instance startup. It is advisable to have multiple copies of the control file being used by the database. There are three basic file types that make up the Oracle Database.2 Oracle Database An Oracle Database is just basically a set of files treated as a unit. creating an archived redo log. files are located in Archived Log Files . if necessary. A datafile can be associated with only one tablespace and only one database. File Type Parameter Files (initORACLE_SID. so it must be available for writing whenever the database is open. spfileORACLE_SID. The log writer process (LGWR) writes the redo log buffer to a redo log file on disk. Each control file is associated with only one Oracle database. where SID identifies the Oracle database instance. The database control file is a small binary file necessary for the database to start and operate successfully. If for some reason the control file is not accessible. It provides the actual physical storage of the database data and is mounted by one or more instances. Password files can be used for local or remote connections to an Oracle9i database. coalescing contiguous free extents. A set of files that protect altered database data in memory that has not been written to the datafiles. A control file is updated continuously by Oracle during database use. filled online redo files can be archived Depends on the volume but at least before being reused. Optionally. and free resources that the user’s process was using. 3. All data is contained within Tablespaces and accessible only when the database is OPEN. When a datafile is created.ora) Password File Description Minimum Backup Policy Controls aspects of the database instance and is Monthly and before each change referenced at startup time. File Type Datafiles Description A tablespace in an Oracle database consists of one or more physical datafiles. the operating system under which Oracle runs is responsible for clearing old information and authorizations from a file before allocating it to Oracle.ORA.ora. It will clean up the database buffer cache.DBA Introduction Log Writer (LGWR) Process Monitor (PMON) Recoverer (RECO) System Monitor (SMON) requests to the next available shared server process. Archived (offline) redo log files constitute the archived redo log.

ora Listener Process listener. route.DBA Introduction 4 Establishing a Connection and Creating a Session There are primarily two ways to connect to an Oracle Instance. shows the listener on a separate server as the database instance they often reside on the same hardware. which is a part of the Oracle Net Services. security and access control.ora Listener. If the user/application (client) resides on a different machine then it is a remote connection and uses the Oracle Net to access the system. A local connection does not pass through the Oracle Net (formerly SQL*Net). should reside on any machine that wants to make a client connection to the database. It contains information about the destination service and network route information.ora Figure 4 : Establishing Database Connection There are several files that control the connection from the client to the database.ora The transparent network substrate names configuration file. The tnsnames. This concept is similar to the differences between an Oracle Instance and an Oracle Database. protocol addresses on which the listener accepts connection requests.ora This configuration file resides on both the client and server. and in fact many of the Oracle’s applications and third party software applications do.ora file contains all the connection descriptors for the databases to which you want to connection from the machine on which it resides.ora sqlnet. It contains parameter for domain. tnsnames.ora Connection Request Established Connection sqlnet. . database services. It should be noted here that even when the user/application resides on the same machine as the Oracle Instance. Oracle Client tnsnames. you can still use Oracle Net to access the system. log/trace. and control parameters. If your user/application resides on the same machine as the Oracle Instance you can do a “local” connection which can either be through an OS authenticated account or an Oracle account which requires a username and password. Although Figure 4 : Establishing Database Connection. This maps Net service names to connection descriptors. This configuration file resides on the server and contains the listener name. For database security OS authenticated accounts should never be allowed for remote connections. naming methods. sqlnet.ora Network Oracle Server tnsnames.

0 . The lsnrctl status command will display a list of listeners which will include descriptions and services and their individual status (READY. results should be something like: LSNRCTL for Solaris: Version 9. All rights reserved.0.0. but it is not a recommended practice. it then establishes a new process (or picks from a pool and allocates processes).2.2.0 .7.2. The Listener Control Utility (lsnrctl) is used to the control or view the listener configuration.Production on 04-JAN-2007 08:46:42 Copyright (c) 2003 Oracle Corporation.2. Connecting to . Once it receives a session request and establishes the link between the client and the server.0 . 15 min. Shutting down or restarting the listener while a client application is running generally will have no effect on the existing application session. $ lsnrctl status [listener name] Results: If the listener is up.7.log Listener Parameter File /opt/oracle/product/9. 39 sec off OFF OFF /opt/oracle/product/9. The client and the server then communicate independently of the listener.0.2.Production on 04-JAN-2007 09:00:03 Copyright (c) 2003 Oracle Corporation. It can be used to start/stop or even dynamically change some parameters. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)($=EXTPROC))) STATUS of the LISTENER -----------------------Alias Version Start Date Uptime Trace Level Security SNMP Listener Log File LISTENER TNSLSNR for Solaris: Version 9.0/network/log/listener.0/network/admin/listener.DBA Introduction The following is an example of the connect descriptor format: Net_service_name= (DESCRIPTION= (ADDRESS=(protocol_address_information)) (CONNECT_DATA= (SERVICE_NAME=service_name))) The listener listens for client connections.ora The command completed successfully If the listener is down Results: (example) LSNRCTL for Solaris: Version 9.. All rights (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)($=EXTPROC))) TNS-12541: TNS:no listener reserved.Production 04-JAN-2007 17:31:04 12 days 15 hr.7. BLOCK or UNKNOWN).

” Seemingly benign changes to the network configuration at this layer can bring systems to a halt and debugging at that point is extremely difficult. In general communication through the network follows the following steps (Figure 5 : Client Server Architecture). Oracle Connection Manager. heterogeneous computing environments. There are many components to Oracle Net Services including Oracle Net. Application communicates with Oracle Net on the client 2. listener. 1. and Oracle Net Manager.1 Oracle Net Most connections issues can be traced to how the Oracle Net Services and its related components are configured. Oracle Net on the client communicates with the network 3.DBA Introduction TNS-12560: TNS:protocol adapter error TNS-00511: No listener Solaris Error: 2: No such file or directory Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=1521))) TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error TNS-00511: No listener Solaris Error: 146: Connection refused 4. When you are done reading this section you should have a good understanding of the role and importance of Oracle Net and some base knowledge of its common configuration. In other words. Oracle Net on the server communicates with the Server Process . The network communicates with Oracle Net on the server 5. Oracle Net Configuration Assistant. Oracle Net is the communication software that enables a network session from a client application to connect to an Oracle database server. Depending on the application and the location of the application on the system not all these components are used. The network carries the communication to the server 4. The Oracle Manual says that Oracle Net Services is “a suite of networking components that provide enterprise-wide connectivity solutions in distributed. Oracle Net is a “relay” layer that sits on top of network protocols and resides at both the client and server ends. Its function is to perform the following critical network tasks: • • Relay calls from the client to the Oracle server and back Perform character translations between the client character set and the database character set.

etc. Pro*C/C++ and other pre-compiler applications communicate through a layer parallel to OCI called SQLLIB. However. There are thin clients that contain limited networking capabilities for talking to the Oracle Net Layer and these non-OCI JDBC drivers bypass the OCI layer. however since the throughput for these drivers is less than that of OCI-based JDBC driver the cost is performance. Once this connection is establish it does not participate in the communication between client and server (see Figure 7). Depending on the type .) and application such as Perl-DBI and PHP communicate with Oracle Net through the OCI (see Figure 6). The preference is that client programs should interact with Oracle at the OCI level (SQLLIB). ODBC. Both of these layers interact with Oracle Net through the UPI (user Program Interface) layer. It receives a request for a connection from the client and passes off the connection to a server. Oracle Net Services introduces the Oracle Net Listener layer between the network and the Oracle Protocol Support. Some see the benefits of this being you don’t have to install the Oracle client. ADO. which is the lowest layer of the client stack.DBA Introduction Client Application Oracle Net on Client Networ k Oracle Net on Server Server Process Figure 5 : Client Server Architecture 4.3 Oracle Net on the Server On the server. The Oracle Net Listener basically works as a negotiator between the server and the client requests. etc SQLLIB Oracle Call Interface (OCI) User Program Interface (UPI) Oracle Net Foundation Layer Oracle Protocol Support Network Protocol Figure 6 : Oracle Net on Client 4.2 Oracle Net on the Client Most database programming interfaces (JDBC. Client Application ODBC ADO JDBC OCCI Pro*C.

The Oracle Net resides on both the client and server side of the network.DBA Introduction of connection your application maintains. Many systems have applications that only connect once and then maintain their connection until the system is shutdown.4. one server process is spawned by the listener per client connection. If you use an OS authenticated account without specifying the instance in the connection string you by pass the listener when connecting to the server.2 Server Application Architecture The topology in which the server application accesses the database on the same machine is a very minor variant of Figure 5 .4. then a many-to-one relationship exists between client and server connections. after the system starts up the listener can fail without bringing the entire system down (not recommended). Every user / application process connects to a server process on the server side. it is entirely possible that the listener goes off-line with out affecting the application.1 Client/server architectures Server application architectures Database Links (including replication) External Procedures Client / Server Architecture The client/server architecture is illustrated above (see Figure 5) in which the client application accesses the database across the network. but this does prevent new connections over the network (local connections are still possible). except that this scenario likely will reduce issues of network latency. If the configuration is a dedicated server configuration. . If the configuration is of shared server type. Most likely the ones that you will encounter will be of the following: • • • • 4.4 Oracle Net Topologies There are many different topologies that you could encounter with Oracle Net. C l i e n t Listener Netw ork Server Process Initial Request for Connection C l i e n t Listener Netw ork Server Process Communication Hand-Off Figure 7 : Role of the Listener 4. Therefore. 4.

3 Database Links / Replication A database link is like a referenced object that exists in database A. while operations actually take place over the link on database B (see Figure 9). 4.4 External Procedures External procedures are procedures defined externally but declared in the database.4. In this manner more OS interaction can be obtained by the means of the shared libraries or DLL. The basis of replication is a database link and therefore can be depicted in the same manner. When they are called from the database an individual process space is created from which they are executed.4. Client Application Oracle Net on Client Networ k Server X Oracle Net on Server Server Y Oracle Net on Server Server Process Server Process Database A Database Link to DB B Database B Figure 9 : Database Links Note in this figure that the database and server processes are shown two separate servers but they could just as easily be on the same server. It also provides a means to use abilities available in other .DBA Introduction Client Application Oracle Net on Server Oracle Net on Server Server Process Figure 8 : Server Application Architecture 4. The databases can reside on the same or different machines but requires all the proper Oracle Net Services configurations to be done properly.

which allows communication between an Oracle database and other types of databases: the Web-Browser connection. 5.2.0/bin 0:03 1:12 6:31 0:21 0:01 0:14 0:14 0:15 0:15 0:00 ora_pmon_ORCL ora_lgwr_ORCL ora_ckpt_ORCL ora_smon_ORCL ora_reco_ORCL ora_snp0_ORCL ora_snp1_ORCL ora_snp2_ORCL ora_snp3_ORCL oracleORCL (DESCRIPTION=(LOCAL=no) 11 ? 21 ? 0:11 oracleORCL (DESCRIPTION=(LOCAL=no) 0:23 oracleORCL (DESCRIPTION=(LOCAL=no) . Tests may need to be performed locally as well as from the remote server. often referred to as "the listener" and critical for connections to be made to the local database. However. $ ps -ef | grep oracle oracle 308 1 0 Oct oracle 338 1 0 Oct /tnslsnr LISTENER -inherit oracle 306 1 0 Oct oracle 310 1 0 Oct oracle 312 1 0 Oct oracle 314 1 0 Oct oracle 316 1 0 Oct oracle 318 1 0 Oct oracle 320 1 0 Oct oracle 322 1 0 Oct oracle 324 1 0 Oct oracle 7388 1 0 Oct (ADDRESS=(PROTOCOL=BEQ))) oracle 908 1 0 Oct (ADDRESS=(PROTOCOL=BEQ))) oracle 7414 1 0 Dec 11 ? 11 ? 11 11 11 11 11 11 11 11 11 21 ? ? ? ? ? ? ? ? ? ? 3:35 ora_dbw0_ORCL 0:00 /opt/oracle/product/9. which is basically an application connection via a web-browswer. Sometimes a process running on one server extracts data from a database on another server. This output shows that the Oracle processes are running. If you would like more information then do a google search on Oracle Net Configurations. Client Application Oracle Net on Server External Process (extproc) Oracle Net on Server Shared Library/DLL Server Process Figure 10: External Procedures There are other types of connections that are not mentioned here like the Heterogeneous connection. 5 Quick Checks Often there is a need to verify whether an Oracle database is working. including tnslsnr.1 Test for Local Processes on Database Server The output will vary depending on the options in use. ADA or JAVA that are not a part of or as well suited for the database PL/SQL. it is more likely you will encounter on of the above mentioned connections. The listener spawns the extproc process in a manner similar to the server processes (represented by the dotted line in Figure 10) and communication then happens via IPC. Speaking from a security stand point. the external procedures (extproc) should have their own listener.DBA Introduction languages like C.

1521 oe_prod. the tnsping command will still work.2 SQLPLUS Sqlplus can be used to verify that Oracle is responding and some sqlplus commands can be used to verify that the tables or the content of tables match what is expected.DBA Introduction (ADDRESS=(PROTOCOL=BEQ))) 5.1521 32768 0 32768 localhost.1521 localhost.3.ora file contains the correct information.1521 10. assuming that the tnsnames.32841 32768 0 32768 oe_prod.* 0 0 0 Oe_prod. Attempting to contact (ADDRESS=(PROTOCOL=TCP)(HOST=oe_prod)(PORT=1521)) OK (11 msec) The OK indicates that the network is working correctly and the response to 11 milliseconds. The sqlplus command takes this form to connect to an Oracle database: $sqlplus username/password[@service_name] .1521 32768 0 32768 oe_prod.9.1.1 Connectivity Test tnsping This test can usually be done from both the remote and local server.3.Production on 29-DEC-2005 (c) Copyright 1997 Oracle Corporation.ora entry for a single database will could something like this: ORCL = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = oe_prod)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = ORCL) ) ) Notice how the service name (ORCL) that used in the example tnsping command and the port on which the Oracle listener is responding (1521) are both configured in this database descriptor.2.32806 oe_prod.32861 24820 0 8760 0 LISTEN 0 ESTABLISHED 0 ESTABLISHED 0 ESTABLISHED 0 ESTABLISHED 0 ESTABLISHED 0 ESTABLISHED 5.32854 24820 0 8760 oe_prod.32841 localhost.0. will look for a database with a service name of ORCL and will issue a ping-like request to the configured port and report on the response. for example.32806 32768 0 32768 localhost.1521 *.13. If Oracle is listening on a port other than 1521.13.0.3 5.ora file to test connectivity. A tnsnames. A successful response from tnsping will look something like this: $ tnsping ORCL TNS Ping Utility for Unix: Version 9. 5. $ netstat -a | grep 1521 *.2 TEST Port If access to netstat is enabled check to assure a listener exists on the port that Oracle uses (by default 1521). The command "tnsping ORCL".1.1521 10.0 . All rights reserved. This test uses the information in Oracle's tnsnames.9.

2.5 Creating a Script Depending on the information you want to gather and the tests you want to run could make it quicker and more assured by writing scripts and display results or create log files. The next logical step is to either log these results or use the exit code from the commands to display succinct results. You should store the environment variables to be used in a profile that is called within the scripts as needed: # Oracle Settings stty erase ^H export ORACLE_BASE=/opt/oracle export ORACLE_HOME=$ORACLE_BASE/product/9. 5.DBA Introduction This command specifies the username.log listener.log ~/bdump ~/cdump Check Log Directory and Files for Errors or Messages ~/bdump/alertORA_SID. ~/oracle_profile # check connectivity to database tnsping $ORACLE_SID sqlplus username/password@$ORACLE_SID This is a very simple script that displays the results of the tnsping and should leave you at an SQL prompt.6 Script Creation You can write scripts which contain SQL*PLUS. SQL and PL/SQL commands which you can retrieve. You can edit the script and save it then you @. Often people like to create excel spreadsheets to display results and so you may want to create files that are comma delineated. You might want to make several individual scripts like a local connection "connect2local" and a similar script for connecting to a database on a remote server "connect2rem" and then a wrapping script to execute them both. 5. Once connected.4 sqlnet. This is especially useful for storing complex commands or frequently used reports. edit and run. password and SERVICE_NAME/SID in a single command.0 export ORACLE_TERM=vt100 export PATH=$ORACLE_HOME/bin:/usr/ccs/bin:/bin:/usr/bin:/usr/local/bin:/usr/ucb export ORACLE_SID=OE_PROD #!/bin/bash # connect2local: connect to local db using sqlplus . Probably one of the easiest methods of script creation is to have an OS editor open in one window and the SQL*Plus program open in another.log Rman backup logs 5. @@ or START commands to execute the scripts. various scripts can be run to verify state of the database. You can also use and operating system text editor without leaving SQL*Plus commands-line by enter the EDIT command at the SQL . Understand that when ran from CRON shell scripts only take the minimal shell settings.

SQL>edit You can also choose a particular OS text editor by setting the SQL*Plus variable _EDITOR.1 Saving Buffer When editing the buffer from the SQL*Plus command line you may want to save the buffer to a file for use later. or L L n or n L* Ln * L LAST Lmn 5. enter the following command: DEFINE _EDITOR = nedit To create script with a text editor.6. to define the editor used by EDIT to be nedit. for example: SQL>EDIT SALES EDIT adds the filename extension .2 • Placing Comments Using the SQL*Plus REMARK command for or .SQL to the file name unless you specify a file extension. SQL>SAVE /tmp/mysqlscript This command saves a file to the /tmp directory named mysqlscript. enter EDIT followed by the name of the file to edit or create.SQL to the name unless you specify the file extension. If you just type EDIT without a filename the last command stored in the buffer will appear for editing.. 5. Using the SAVE command will save what is in the buffer to the filename of your choice.DBA Introduction prompt.sql. SQL>select sysdate from dual.6. Lists the SQL*Plus commands that all you to examine or change the command in the buffer without re-entering the command. The SAVE commands automatically adds . Table 5: SQL*Plus Editing Commands Command APPEND text CHANGE /old/new CHANGE /text CLEAR BUFFER DEL DEL n DEL n * DEL LAST DEL m n DEL * n INPUT INPUT text LIST LIST n LIST * LIST n * LIST LAST LIST m n Abbreviati on A text C/old/new C/text CL BUFF Purpose Adds text at the end of the current line Changes old to new in the current line Deletes text from the current line Deletes all lines Deletes the current line Deletes line n Deletes line n through * Deletes the last line Deletes a range of lines (m to n) Deletes the current line through line n Adds one or more lines Adds a line consisting of text Lists all lines in the SQL buffer Lists line n Lists the current line Lists the n through the current line Lists the last line Lists a range of line m to n I I text . For example.for single line comments You can enter comments in a script in three ways: . SQL>EDIT select sysdate from dual / You can use a number of SQL*Plus commands to edit the SQL command or PL/SQL block currently stored in the buffer.

Logical reads (consistent gets) are often .DBA Introduction • 5. 5. optimizer_index_cost_adj.7. General Guidelines for SQL tuning: Replace unnecessary large-table full-table scans with index scans. • Cache small-table full tables scans If a small table is being hit often then it should be placed into memory. each with identical results but with far different execution times.6. Tune the overall system first – Changes to critical CBO parameters (optimizer_mode. a slash. so there are many ways to formulate a query. Pre-tune the SQL before deploying – Developers should be given an environment the properly reflects the Operational Environment. your password.7 SQL Tuning SQL is declarative.1 • • Optimizing Oracle SQL Execution Reanalyze statistics only when necessary. Oracle SQL tuning is a very complex subject with entire books written about it. @. a space. This may entail exporting the production CBO statistics into the test/development databases. It is a common mistake to frequently re-analyze the schema.5 • Running a Script as You Start SQL*Plus Follow the SQLPLUS command with your username. then don’t fix it.4 Running Scripts The START command retrieves a script and runs the commands it contains. 5. SQL> START file_name SQL*Plus assumes the file has an . and the name of the file: To run a script as you start SQL*Plus. then your script needs to contain SET ECHO OFF command. This section provides general ideas where to start researching for performance gains. SQL>@file_name SQL>@@file_name 5.6. use one of the following options $SQLPLUS user_name/password @file_name If the /password is eliminated you will be prompted for the password. AUTOTRACE and TKPROF – Utilities should be used to interpret SQL execution results. and optimizer_index_caching) can affect thousands of SQL statements so should be done with great care. However.6. • • 5.3 Using the SQL comment delimiters /*…*/ for single or multi line comments Suppressing Listing If you do not want the text of the script to be displayed on the screen when you run the file. check to statistics to assure CBO is optimal or if needed add an index. 5.2 • If your sql statement displays less than 40 percent of a table then it should not be performing full table scans. If there are no complaints on the execution times. Change the sql to use an index.7. You can also use the @ and @@ commands run the commands in the specified script in the same manner. This will allow the developers to see how their SQL will execute when it is placed in the production system. the only purpose to analyzing the schema is to change the execution plan of the SQL.SQL extension by default.

DBA Introduction 100x faster than a disk read and therefore small often accessed objects should be cached in the KEEP pool. they comprise 90 percent of SQL tuning. • • • Verify optimal index usage Verify optimal JOIN techniques Tuning by Simplifying SQL Syntax o Rewrite query into a more efficient form o Use the WITH clause o Use Global Temporary Tables o Use Materialized Views o Tune complex subqueries to remove redundant access The developer should examine both indexes and ensure the Oracle is using the best index. . Some queries perform faster with NESTED LOOP joins and some with HASH joins. Candidates to be placed in the KEEP pool can be found by analyzing dba_hist_sqlstat. All though these see simple enough.

cdump. udump.ora) Server Name Location\File Name Description .. listener. It is easier to keep the quick reference sheet up than try to remember the information in a crunch. It is also very useful to be able to pass onto people new to the group. DBA.) Name Contact Server Name Description Login Application User Important Environmental Variables Server Name Variable Value Directory/File Locations (tnsnames.com Metalink username : Oracle Customer Service Identifier (CSI): --------------------------Individual System System Name: System Description: Contacts: Role (SA.oracle.bdump.ora. Some of the information is generic but a lot of it is based upon the system. Keep it as a spreadsheet or just in word format.metalink. sqlnet. backup logs..ora. 6.1 Tip Sheet Metalink webaddress : www. SSA. but keep it handy.DBA Introduction 6 Various Tips A quick reference sheet is very helpful especially when you are in a time crunch and need to have the information right there in front of you.

and even the format of fields such as dates within the login.1 Odds and Ends CRON and ENVIRONMENT When running an script from CRON or similar scheduling tool. Data dictionary tables are not directly accessible. query the view DICTIONARY. SQL>select * from DICTIONARY Many data dictionary tables have three corresponding views: ■ An ALL_ view displays all the information accessible to the current user. To list the data dictionary views available to you. DBA_ views are intended only for administrators. 6.USER_%Tables There are many system tables which can be used to determine user/system information.DBA Introduction Backup Times: Server Date/Time (example Mon-Fri/04:00) Notes: 6.4 ALL_%.sql in the SQLPATH. This privilege is assigned to the DBA role when the system is initially installed. feedback.2. . DBA_%.2 SQL Login Profile If you want to set your own defaults for when you log into SQL you can set things like linesizes. 6. including information from the current user's schema as well as information from objects in other schemas. it only uses the basic shell variables therefore you need to set any variables like ORACLE_HOME within the script itself.2. ■ A DBA_ view displays all relevant information in the entire database.2 6. They can be accessed only by users with the SELECT ANY TABLE privilege. if the current user has access to those objects by way of grants of privileges or roles. but you can access information in them through data dictionary views. pagesizes.2.2.3 Example SQL>DESC ALL_TAB_COMMENTS COLUMN OWNER TABLE_NAME TABLE_TYPE COMMENTS DATATYPE NULL VARCHAR2(30) NOT NULL VARCHAR2(30) NOT NULL VARCHAR2(11) VARCHAR2(4000) DESCRIPTION Owner of the object Name of the object Type of the object Comment on the object SQL DESC command If you need to know what fields a table contains use the DESC tablename to view the table structure. 6.

Oracle processes will spin on a latch before waiting on it. These views can help in determining the performance of the database during testing or production. V$INSTANCE . SQL>SELECT OWNER. procedures. which are often referred to as V$views. DBA_LOCKS 6. DBA_LOCK lists all locks or latches held in the database. DBA_LOCK. If you want to see all the tables the current user has access to view use the following SQL statement. and package bodies) in the database. Table Name Description V$DATABASE Displays information about the database from the control file. This displays the current state of the instance. No special privileges are required to query these views. functions. While the LATCHWAIT column indicates what latch a process is waiting for. I will list a few of the more interesting and userful ones.TABLE_NAME FROM DBA_TABLES. and all outstanding requests for a lock or latch. SQL>SELECT OWNER. Examples: If you have the proper privileges you can see all the tables within a database by querying the DBA_TABLES view.DBA Introduction ■ A USER_ view displays all the information from the schema of the current user. SQL>SELECT TABLE_NAME FROM USER_TABLES. Table Name *_ALL_TABLE S *_CONS_COL UMNS *_CONSTRAIN TS *_ERRORS Use Determine Table Information Determine the type of constraints on columns.3 Dynamic Performance V$ views This part describes the dynamic performance views. On multi-processor machines. If you only want to see the tables the current user owner use the next SQL statement. Determine all constraints *_ERRORS describes current errors on stored objects (views. V$PROCESS This view contains information about the currently active processes. packages. the LATCHSPIN column indicates what latch a process is spinning on. TABLE_NAME FROM ALL_TABLES. I will list a few of the essential ones below and you can do a DESC on them to see the available columns.

This file is created by running the utility provided by Oracle called ORAPWD. If accessing remotely $echo $ORACLE_SID $export ORACLE_SID=ORACLE_SID $sqlplus / as sysdba $sqlplus username/password as sysdba This makes a sys connection AS SYSDBA. SYS has the SYSDBA privilege which SYSTEM doesn't.ora. it can be a shared password file between instances or it can limit connections to only secure networks. This is the case when connections are made as sys/password as SYSDBA or / as sysdba The as sysdba phrase is a request to acquire the privileges associated with the single SYSDBA system privileges. • EXCLUSIVE o The password file can be used with only one database o Users other than sys may be given SYSDBA privileges • SHARED o For use with multiple databases . Never ever create objects in the SYS schema. The objects belonging to SYS cannot be exported. That is. someone connects as SYSDBA.DBA Introduction 7 Database Administration Accounts Oracle databases are created with two accounts (SYS.SYSTEM) that have DBA privileges. If it is not set correctly then If accessing from local UNIX account with the proper privileges. • • • • Ensure that your ORACLE_SID is set to the correct instance name. it's possible. if SYSDBA is granted to JOHN and John connects as SYSDBA and select user from dual. The usage of the password file is controlled by an initialization parameter REMOTE_LOGIN_PASSWORDFILE and is used to define the mode of the password file. When doing tasks such as database backups and restores or trouble shooting it is easiest using a session on the server that contains the actual instance you want to backup or restore. it turns out it's being SYS. 7. Anytime. If you are just performing adhoc queries or data manipulation then remote access is fine. if connected as SYSDBA. This “special” password is held encrypted in a password file PWD<ORACLE_SID>. The best approach is to have individual accounts to do general trouble shooting. data manipulation and monitoring of the system.1 SYS SYS is the owner of the database and the owner of the data dictionary. However. The difference becomes clear if you try to shutdown the database as ordinary SYS: you get insufficient privileges as result. The database administrator accounts have a lot of power and should only be used when necessary to perform maintenance on they system. When using this connection you will need to use a special internal password if appropriate operating-system privileges are not held. This makes it possible for SYS to become a very powerful user. Each database administrator should have an individual OS account with the dba group privileges and then a database account with the privileges needed to perform daily tasks. it reveals he's actually SYS. The use of this file can be limited to one instance.

Don't create your own objects under SYSTEM. .2 SYSTEM SYSTEM is a privileged administration user.DBA Introduction o Only logins by sys are recognized by a shared password file • NONE o No privileged connections over non-secure networks o Allows remote connections from accounts that are able to active OSDBA roles (this is OS authentication) 7. and typically owns Oracle provided tables other than the dictionary.

. Activities are limited to things like creating a database. The instance is used to access and manipulate the database data and storage structures. An instance can be STARTed up which builds the SGA in memory and starts the background processes. The instances can also be SHUT DOWN which closes the database.ora Creates and starts instance SHUTDOWN SHUTDOWN Figure 11: Database Stages It can be observed in Figure 11 that the database can be altered in the upward direction (up the stairs) but not back down them. Check with your administrators on each system before trying to perform these commands to know the other steps to take. Shuts down an instance before starting it up in the specified mode and is the same as performing SHUTDOWN ABORT followed by a start-up.1 Database Startup STARTUP OPEN Altering the database Opens datafiles and redo logs Acquires roolback segments Calls SMON if needed Makes data dictionary available STARTUP MOUNT Links the instance to a database Reads control file Checks the datafiles and redo log files Shutting Down (closing) Instance started STARTUP NOMOUNT Reads init. mounts and then opens the database. backing up control files. taking datafiles offline. 8. This is an OPEN option which forces automatic recovery procedures on start-up. The database is inaccessible with no dictionary available for password checking. There is no normal user access possible It starts the instance. In addition to the states there are three additional options that can be combined with the states whose purpose are in the following list. NOMOUNT MOUNT OPEN FORCE RECOVER Starts up the instance without mounting the database. It allows restricted use of the database for “DBA” tasks such as file management and database structuring. two different entities: the Oracle Instance and the database. closed or mounted. stops the instance and removes the memory structures. The database itself may be open. NOTE Sometimes systems have 3rd party clustering software like HP ServiceGuard in place which controls the shutdown and startup of the Oracle Database.DBA Introduction 8 Database States Remember that there are. in essence. If you however a need arises that the DBA must startup/shutdown the instance there are steps that need to take place before issuing these commands to prevent ServiceGuard moving the database package to a different node. Normal users processing is allowed. Other file management activities available such as Manipulating log files. Starts up the instance and mounts the database.

SQL>STARTUP OPEN RESTRICT Can be removed while open by doing the following command: SQL>ALTER SYSTEM DISABLE RESTRICTED SESSION. The database can be moved upward on the state stair step by performing alter commands. you have to SHUTDOWN the database completely and then you can open it to the state you need. o No new connections are allowed. SQL>STARTUP [FORCE] [NOMOUNT | MOUNT | OPEN [open_options]] [oracle_sid_name][PFILE=parameter file]. o This option is difficult to use in man environments since the users are applications and all the applications have to be shutdown before the database would shutdown. The SHUTDOWN command closes the database. • SQL>SHUTDOWN IMMEDIATE o Disconnects all users and performs rollback on all uncommitted data by using PMON o Terminates all current SQL statements • SQL>SHUTDOWN ABORT o Shuts down without tidying up. • SQL>SHUTDOWN NORMAL o The database will only SHUTDOWN when all users have logged off and all work is committed (or rolled back). SQL>STARTUP OPEN RECOVER.2 Database Shutdown You can not go back down the stair step depicted in Figure 11. The above options can be combined at the SQL prompt to create the state you wish the database to start. akin to system failure and requires system recovery on start-up o No rollback of uncommitted transactions . There are several SHUTDOWN options that can be employed.DBA Introduction RESTRICT This is an OPEN option which limits access to the database to users who have been granted both CREATE SESSION AND RESTRICTED SESSION system privileges. 8. SQL>ALTER DATABASE MOUINT. SQL>ALTER DATABASE OPEN. Examples: SQL>STARTUP MOUNT prod. It is useful for doing tasks like database exports while there is no activity on the database. dismounts the database and then shuts down the instance.

This allows for faster recovery in case a media (disk) failure occurs. Tape retention policies – This probably goes hand-in-hand with backup retention policies. System Workload b. keep the archived redo log files on disk for as long as possible. Location of backups – Where will you store your backups. but to ensure recovery you should also perform a binary and text copy backup with every major backup. Business rules may dictate policies. are not supported by Recovery Manager. 4. There may be cases however that you keep one backup on-line and an older one offsite. 2. 5. Will your backups go directly to tape or will you write them to disk first and then have the system write them to tape? 5. If you write backups to disk then when will they get written to a tape? How do you know that they have been written to tape so you can reuse the space for a new backup? Overall Oracle Database Backup and Recovery Strategy Backup Strategy There are several database considerations when planning an Oracle backup. The parameter and password files should however be backed up regularly by the OS backup or included in backup scripts. Detailed capacity planning – The backup plan you put into place today. Backup the Parameter and Passwords files – The oracle parameter init. 4. . Some sample items to consider: 1. In addition you need to regularly monitor the archive log location to ensure that there is adequate disk space to store archived redo log files. 6. This is especially important after database structural changes. Operate in Archive Log Mode – Operate the production Oracle database in automatic archivelog mode. Amount of Database Updates c. Backup the Control File – You should always include the control file as part of the backup. maybe outdated next year if the system grows immensely. Time it Takes to Perform Backups 3. Where is your offsite tape storage location? 3. Use Automatic Scheduling and Notification – The backup scripts should run automatically via a scheduling tool like cron in UNIX. You should know what changes are expected within the business and forecast what effects it will have on the size of your database and your backups. Archived Log File Backups – Depending on the amount of database updates. Size of Database d. State or government laws may place restrictions on retention times. This policy will be dictated by several factors including: a. Retain Archived Redo Log Online – As a rule of thumb. since the logs do not have to be restored from a slower tape failure. 7. Backup retention policies – This may vary depending on how often you are able to perform a full backup. Perform Regular Hot Backups – Your overall system backup policy should include regular backups.DBA Introduction 9 Database Backup The planning of the backup and recovery strategies of the database has to be integrated into the backup and recovery strategies of a system and business in general. 2. ideally until the next full backup.ora file.ora or spfile. 1. archived log files should be archived several times between the full database backups.

Media Failure – Media failures require media recovery.DBA Introduction Recovery Strategy Different types of failures within an Oracle database require their own recovery. All scripts and steps should be well documented and tested multiple times to assure they work properly. GRID or an Oracle standby database. Instance Failure –Instance failure can usually automatically addressed by Oracle if the server has not failed as well. Media recovery can be supported by using a combination of backup files and archived redo log files. This document will document many of types of database failures but all scripts and steps need to be modified for your system and then tested. This is not to be confused with RAC. A secondary node can share the same disk drives and datafiles as the primary node and can be brought up upon node failure. It can not be emphasized enough that for quick recovery you don’t want to be sitting at a terminal trying to remember commands or not understanding how to do the steps properly. If there is only one sever then problems with that server will need to be addressed before the database recovery can be performed. 1. 2. 3. If the server has failed and can be restarted successfully. Server (Node) Failure – This can be dressed by failing over to another node if you are in Fail Safe configuration. the Oracle server can automatically recover itself from the redo logs upon startup. which is the process of restoring database files to the most recent point-in-time image prior to the media failure. .

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->