
Man kunto Maula, fa haza Ali un Maula !!
” to whom I am the master. Ali is the the Master. “ 
The Database is a set of physical operating system files. These files actually holds the user data and the metadata (or the data dictionary). Every running Oracle database is associated with (atleast) an Oracle instance. The Instance refers to the set of Oracle background processes or threads and a shared memory area (SGA). An instance can mount and open at most one database in its life. A database may be mounted and opened by one or more instances (using RAC) and the number of instances mounting a single database can fluctuate over time.
During a database shutdown we close the database and terminates the instance.
Different Modes in Database Shutdown
There are different modes to bring down the database:
1. Shutdown immediate
2. Shutdown transactional
3. Shutdown normal
4. Shutdown abort
No user session will be permitted once you issue any of these Shutdown commands.
– Oracle Database terminates any executing SQL statements and disconnects users.
– Active transactions are terminated and uncommitted changes are rolled back.
– Oracle then performs a checkpoint and then close the online datafiles.
$ sqlplus / as sysdba
SQL> shutdown immediate
– This mode prevents users from starting new transactions, but waits for all current transactions to complete before shutting down.
– Oracle then performs a checkpoint and then close the online datafiles.
$ sqlplus / as sysdba
SQL> shutdown transactional
– The database waits for all connected users to disconnect before shutting down.
– It waits till all the current transactions end.
– Oracle then performs a checkpoint and then close the online datafiles.
$ sqlplus / as sysdba
SQL> shutdown normal
– Oracle Closes the datafiles without any checkpoint.
– This is the fastest shutdown mode.
– Instance recovery is required in the next startup and hence it will take time.
$ sqlplus / as sysdba
SQL> shutdown abort
– Oracle writes the data in the SGA to the disk, updates the file headers and closes the online datafiles and the redo log files.
– But the database will still be mounted.
– After the database is closed, Oracle Database unmounts the database to disassociate it from the instance.
– After a database is unmounted, Oracle Database closes the control files of the database.
– At this point, the instance remains in memory.
– The last step is to remove the shared memory (SGA) and terminate the background processes.
Sometimes shutdown does not cleanup the SGA or background process completely. This can cause error during the next startup. In such situation we can force a instance startup
The Database is a set of physical operating system files. These files actually holds the user data and the metadata (or the data dictionary). Every running Oracle database is associated with (atleast) an Oracle instance. The Instance refers to the set of Oracle background processes or threads and a shared memory area (SGA). An instance can mount and open at most one database in its life. A database may be mounted and opened by one or more instances (using RAC) and the number of instances mounting a single database can fluctuate over time.
For any normal user to access the database, the instance has to be started up and it should mount and open the corresponding database. We term the entire steps as database startup. In short, database startup includes the following steps:
1. Start an instance.
2. Mount the database.
3. Open the database.
Database startup requires SYSDBA privilege. To start a database :
$ export ORACLE_SID=[SID of the instance]
$ export ORACLE_HOME= [location of ORACLE_HOME]
$ sqlplus / as sysdba
SQL> startup
The above syntax assumes you have a pfile or spfile in the default location ($ORACLE_HOME/dbs). If you are using a non default parameter file, the startup command is:
$ sqlplus / as sysdba
SQL> startup pfile=[file name and location]
When you issue a ‘Startup’ command, this is the first stage. ie, starting up the instance. Here,
– Oracle will read the parameter file (spfile or pfile) in the default location or in the location specified in the startup command.
– It will then allocate the memory area (SGA) and starts the background processes. Together we call it as the instance.
– Please note that no database is associated with the instance at this point. We can start the instance alone using the command:
$ sqlplus / as sysdba
SQL> startup nomount
ORACLE instance started.
Total System Global Area 304807936 bytes
Fixed Size 2221000 bytes
Variable Size 113249336 bytes
Database Buffers 184549376 bytes
Redo Buffers 4788224 bytes
The instance is now started and the database is in nomount stage. Starting the instance in nomount stage is usually required for database creation or for creating or recovering the controlfiles.
– In this phase the instance will mount the database.
– Mounting the instance means associating the started instance with a specified database.
– For this, the instance checks the controlfiles specified under CONTROL_FILES parameter and opens it.
– It then reads the control files to find the names of the data files and the online redo log files that it will attempt to access when opening the database.
– The database is still closed and only the DBA can access it.
– This stage is normally used for maintenance operations like renaming datafiles, enabling and disabling archiving options.
– Adding, dropping, or renaming redo log files is also done in mount stage.
– For performing full database recovery database is opened in mount stage.
To mount a database:
$ sqlplus / as sysdba
SQL> startup mount
To mount a database from nomount stage:
$ sqlplus / as sysdba
SQL> alter database mount
– This is the final stage and here Oracle opens the online datafiles and redolog files.
– If any of the required files are not present, media recovery is required .
– It also ensures the datafiles are consistent. Incase of a normal shutdown, the in-memory changes will be written to disk as part of the shutdown checkpoint.
– But if the instance crashed (or shutdown abort), then Oracle Database performs the instance recovery in the next startup.
To open a database :
$ sqlplus / as sysdba
SQL> startup
To open a database from mount stage:
$ sqlplus / as sysdba
SQL> alter database open
To verify :
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
| APPLICATION SHORT NAME | APPLICATION NAME |
| FND | Application Object Library |
| SYSADMIN | System Administration |
| AU | Application Utilities |
| AD | Applications DBA |
| SQLGL | General Ledger |
| OFA | Assets |
| ALR | Alert |
| RG | Application Report Generator |
| CS | Service |
| EC | e-Commerce Gateway |
| SQLAP | Payables |
| PO | Purchasing |
| AR | Receivables |
| QA | Quality |
| CE | Cash Management |
| PA | Projects |
| AS | Sales Foundation |
| CN | Incentive Compensation |
| OE | Order Entry |
| INV | Inventory |
| AN | Sales Analysis |
| ODQ | Data Query |
| AX | Global Accounting Engine |
| AK | Common Modules-AK |
| MFG | Manufacturing |
| BOM | Bills of Material |
| ENG | Engineering |
| MRP | Master Scheduling/MRP |
| CRP | Capacity |
| WIP | Work in Process |
| CZ | Configurator |
| PER | Human Resources |
| PAY | Payroll |
| FF | FastFormula |
| DT | DateTrack |
| SSP | SSP |
| MSC | Advanced Supply Chain Planning |
| BEN | Advanced Benefits |
| OTA | Learning Management |
| JA | Asia/Pacific Localizations |
| JE | European Localizations |
| JG | Regional Localizations |
| JL | Latin America Localizations |
| CHV | Supplier Scheduling |
| ICX | Oracle iProcurement |
| AHM | Hosting Manager(Obsolete) |
| CST | Cost Management |
| RLA | Release Management Integration Kit (Obsolete) |
| VEH | Automotive Integration Kit (Obsolete) |
| HXT | Time and Labor |
| AZ | Application Implementation |
| PJM | Project Manufacturing |
| FLM | Flow Manufacturing |
| RHX | Advanced Planning Foundation(obsolete) |
| GHR | US Federal Human Resources |
| DEM | Demo Order Entry (AOL Class) |
| CLR | Culinary Application |
| CCT | Telephony Manager |
| BIS | Applications BIS |
| ADS | Applications Demonstration Services |
| CUSTOM | Custom Development |
| ADS_DEV | ADS Development |
| XTR | Treasury |
| PN | Property Manager |
| WMS | Warehouse Management |
| WPS | Manufacturing Scheduling |
| FII | Financial Intelligence |
| POA | Purchasing Intelligence |
| HRI | Human Resources Intelligence |
| OKC | Contracts Core |
| CSC | Customer Care |
| CSD | Depot Repair |
| ITA | Information Technology Audit |
| CDR | Oracle Clinical Data Repository |
| DUMMY_GMO | Obsolete Process Operations |
| CLJ | Japan Consulting Localizations |
| RRC | Retail Core |
| CLL | LAD Consulting Localizations |
| RRS | Site Management |
| CLE | EMEA Consulting Localizations |
| CSF | Field Service |
| CSS | Support (obsolete) |
| OKS | Service Contracts |
| ME | Controlled Availability Product(Obsolete) |
| BIM | Marketing Intelligence |
| BIC | Customer Intelligence (obsolete) |
| IES | Scripting |
| AMV | Marketing Encyclopedia System |
| AST | TeleSales |
| ASF | Sales Online |
| CSP | Spares Management |
| OKX | Contracts Integration |
| AMS | Marketing |
| XNM | Marketing for Communications (Obsolete) |
| XNC | Sales for Communications (Obsolete) |
| XNS | Service for Communications (obsolete) |
| XNP | Number Portability |
| XDP | Provisioning |
| FPT | Banking Center (obsolete) |
| IEO | Interaction Center Technology |
| GMA | Process Manufacturing Systems |
| GMI | Process Manufacturing Inventory |
| GMD | Process Manufacturing Product Development |
| GME | Process Manufacturing Process Execution |
| GMP | Process Manufacturing Process Planning |
| GMF | Process Manufacturing Financials |
| GML | Process Manufacturing Logistics |
| GR | Process Manufacturing Regulatory Management |
| PMI | Process Manufacturing Intelligence |
| XLA | Subledger Accounting |
| ONT | Order Management |
| QP | Advanced Pricing |
| RLM | Release Management |
| VEA | Automotive |
| WSH | Shipping Execution |
| IBA | iMarketing (Obsolete) |
| IBE | iStore |
| IBU | iSupport |
| IBY | Payments |
| IBP | Bill Presentment & Payment |
| BIL | Sales Intelligence |
| BIX | Interaction Center Intelligence |
| IEM | Email Center |
| OZP | Trade Planning (Obsolete) |
| OZF | Trade Management |
| OZS | iClaims (Obsolete) |
| ASG | CRM Gateway for Mobile Devices |
| JTF | CRM Foundation |
| IEX | Collections |
| IEU | Universal Work Queue |
| ASO | Order Capture |
| MSO | Constraint Based Optimization |
| OKE | Project Contracts |
| IPA | Capital Resource Logistics – Projects |
| CUI | Network Logistics – Inventory |
| CUP | Network Logistics – Purchasing |
| CUF | Capital Resource Logistics – Financials |
| CUS | Network Logistics |
| CUN | Network Logistics – NATS (obsolete) |
| CUA | Capital Resource Logistics – Assets |
| WSM | Shop Floor Management |
| SHT | Applications Shared Technology |
| ECX | XML Gateway |
| FRM | Report Manager |
| EAA | SEM Exchange (obsolete) |
| BSC | Balanced Scorecard |
| ABM | Activity Based Management (Obsolete) |
| EVM | Value Based Management |
| FEM | Enterprise Performance Foundation |
| POM | Exchange |
| MWA | Mobile Applications |
| OPI | Operations Intelligence |
| ISC | Supply Chain Intelligence |
| CSR | Scheduler |
| IEB | Interaction Blending |
| MSD | Demand Planning |
| HXC | Time and Labor Engine |
| PQH | Public Sector HR |
| PQP | Public Sector Payroll |
| PSB | Public Sector Budgeting |
| GMS | Grants Accounting |
| PSP | Labor Distribution |
| IGW | Grants Proposal |
| IGS | Student System |
| IGF | Financial Aid |
| IGC | Contract Commitment |
| PSA | Public Sector Financials |
| FV | Federal Financials |
| ENI | Product Intelligence |
| PV | Partner Management |
| ASL | Sales Offline |
| CUE | Billing Connect (obsolete) |
| EAM | Enterprise Asset Management |
| FTE | Transportation Execution |
| IGI | Public Sector Financials International |
| ITG | Internet Procurement Enterprise Connector |
| OKR | Contracts for Rights (Obsolete) |
| IPD | Product Development (obsolete) |
| MSR | Inventory Optimization |
| PRGC | Progress Custom |
| POS | iSupplier Portal |
| BNE | Web Applications Desktop Integrator |
| ASP | Oracle Sales for Handhelds |
| BIV | Service Intelligence |
| CSI | Install Base |
| CSL | Field Service/Laptop |
| CUG | Citizen Interaction Center |
| IMT | iMeeting (obsolete) |
| OKI | Contracts Intelligence |
| IEC | Advanced Outbound Telephony |
| CSE | Asset Tracking |
| OKO | Contracts for Sales (Obsolete) |
| JTS | CRM Self Service Administration |
| JTM | Mobile Application Foundation |
| AHL | Complex Maintenance Repair and Overhaul |
| IMC | Customers Online |
| OKB | Contracts for Subscriptions (Obsolete) |
| XNI | Install Base Intelligence (Obsolete) |
| QRM | Risk Management |
| PON | Sourcing |
| OKL | Lease and Finance Management |
| IBC | Content Manager |
| AMF | Fulfillment Services (Obsolete) |
| QOT | Quoting |
| CSM | Field Service/Palm |
| DOM | Document Managment and Collaboration |
| EGO | Advanced Product Catalog |
| DDD | CADView-3D |
| PJI | Project Intelligence |
| XNB | Oracle Telecommunications Billing Integrator |
| ZFA | Financial Analyzer |
| ZSA | Sales Analyzer |
| CLN | Supply Chain Trading Connector for RosettaNet |
| EDR | E-Records |
| PRP | Proposals |
| OUC | University Curriculum |
| TEST | test |
| PSR | Public Sector Receivables |
| CSN | Call Center |
| CLA | APAC Consulting Localizations |
| AMW | Internal Controls Manager |
| XDO | XML Publisher |
| WMA | Manufacturing Mobile Applications |
| ISX | iSettlement |
| MIV | Media Interactive |
| OAM | Oracle Applications Manager |
| BIE | eCommerce Intelligence |
| BIN | Communications Intelligence |
| CUC | Revenue Accounting |
| CUR | Mass Market Receivables for Comms |
| IBT | iAuction |
| XNA | Service Assurance for Communications |
| XNT | TeleBusiness for Telecom/Utilities |
| MQA | Mobile Quality Applications |
| CTB | Clinical Transaction Base |
| IET | Call Center Connectors |
| IEV | IVR Integrator |
| IEP | Predictive |
| HCP | Healthcare Intelligence |
| HCA | Healthcare |
| PBR | Budgeting and Planning |
| IAM | Digital Asset Management |
| OKT | Royalty Management |
| GNI | Genealogy Intelligence |
| CPGC | CPG – CDOA |
| HCC | iHCConnect |
| HCN | iHCIntegrate |
| AME | Approvals Management |
| OKP | Contracts for Procurement (Obsolete) |
| HCT | Healthcare Terminology Server |
| MIA | Mobile Applications for Inventory Management |
| GMW | Process Manufacturing Portal |
| BIY | Systems Intelligence |
| PFT | Oracle Profitability Manager |
| RMG | Risk Manager |
| FTP | Transfer Pricing |
| DNA | Development |
| BLC | Utility Billing |
| PTX | Patch Tracking System |
| EMS | Environment Management System |
| RCM | Regulatory Capital Manager (obsolete) |
| JMF | Supply Chain Localizations |
| IRC | iRecruitment |
| GMO | Manufacturing Execution System for Process Manufacturing |
| IPM | Oracle Imaging Process Management |
| IBW | Oracle Web Analytics |
| XLE | Legal Entity Configurator |
| ASN | Sales |
| MST | Transportation Planning |
| FUN | Financials Common Modules |
| GCS | Financial Consolidation Hub |
| ZX | E-Business Tax |
| LNS | Loans |
| IA | iAssets |
| FPA | Project Portfolio Analysis |
| ZPB | Enterprise Planning and Budgeting |
| BANKING | Banking |
| COREBANK | Core Banking |
| INSTITBANK | Institutional Banking |
| IZU | Oracle E-Business Suite Diagnostics |
| DPP | Oracle Price Protection |
| MTH | Oracle Manufacturing Operations Center |
| QPR | Oracle Deal Management |
| DDR | Demand Signal Repository |
| INL | Oracle Landed Cost Management |