SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Presented By:
Sunil Kumar Sharma
CS08117
Contents :

1.Introduction of ORACLE 9i.

2. SQL

3. Database Administration

4. Data Dictionary

5. Recovery Manager Tool(RMAN).
Introduction

 Oracle9i Enterprise Edition is an object relational database
 that is scalable and easily manageable.

Oracle 9i offers a comprehensive high-performance
 infrastructure for e-busines .It is called oracle 9i.

 oracle 9i includs everything needed to develop,deploy,and
 manage Internet applications.
Oracle9i Features



Dynamic Memory                                RMAN
Management



                                         One
   Multiple Insert                       Management
  Statement                              Interface

                                 Default
                 Oracle Merge    Temporary
                 Statement       Tablespace
Oracle9i
Oracle9i Application Server
             Portals




  A    Transactional Apps
  P
  A
  C   Business Intelligence
               intelligence
  H
  E
           Integration
Oracle9i Database
          Object Relational Data




               Documents

                            XML

               Multimedia




               Messages
Communicating with a RDBMS
             Using SQL
SQL statement
is entered.               Statement is sent to
SELECT department_name
 SELECT department_name   Oracle Server.
FROM
 FROM departments;
        departments;




                               Oracle
                               server
Relational Database Management
             System

                            Oracle
                            server




              User tables        Data
                                 dictionary
SQL Statements
SELECT         Data retrieval

INSERT
UPDATE         Data manipulation language (DML)
DELETE
MERGE
CREATE
ALTER
DROP           Data definition language (DDL)
RENAME
TRUNCATE

COMMIT
ROLLBACK       Transaction control
SAVEPOINT
GRANT
REVOKE
               Data control language (DCL)
SQL Functions


                Functions




Single-row                   Multiple-row
 functions                    functions
Substitution Variables

                               I want to query
... salary = ? …               different values.
… department_id = ? …
... last_name = ? ...




                        User
Sample Report




…
The MERGE Statement Syntax

 We can conditionally insert or update rows in a
table by using the MERGE statement.

MERGE INTO table_name table_alias
MERGE INTO table_name table_alias
  USING (table|view|sub_query) alias
  USING (table|view|sub_query) alias
  ON (join condition)
  ON (join condition)
  WHEN MATCHED THEN
  WHEN MATCHED THEN
    UPDATE SET
    UPDATE SET
    col1 = col_val1,
    col1 = col_val1,
    col2 = col2_val
    col2 = col2_val
  WHEN NOT MATCHED THEN
  WHEN NOT MATCHED THEN
    INSERT (column_list)
    INSERT (column_list)
    VALUES (column_values);
    VALUES (column_values);
Controlling User Access

 Database
 administrator



  Username and password
  Privileges

Users
Tasks of a Database Administrator

 –   To plan and create databases
 –   To manage database availability
 –   To manage storage based on design
 –   To manage security
 –   Network administration
 –   Backup and recovery
 –   Database tuning
Database Objects
Object       Description

Table        Basic unit of storage; composed of rows
             and columns

View         Logically represents subsets of data from
             one or more tables

Sequence     Generates primary key values

Index        Improves the performance of some queries

Synonym      Alternative name for an object
Overview of Primary Components
                                          Instance
User
process                 Shared Pool         SGA

                       Library                              Redo Log
                                         Database
                       Cache                                Buffer
                                         Buffer Cache
Server                 Data Dictionary
process                Cache                                 Large Pool
                                         Java Pool
          PGA
                  PMON SMON DBWR LGWR                       CKPT     Others




                             Data        Control files   Redo Log
           Parameter                                     files            Archived
                             files
           file                                                           Log files
            Password
            file
                                                     Database
Database Administration Tools

    Tool                              Description
Oracle Universal    Used to install, upgrade, or remove software
Installer (OUI)     components
Oracle Database     A graphical user interface tool that interacts with the
Configuration       OUI, or can be used independently, to create, delete,
Assistant(DBCA)     or modify a database
SQL*Plus            A utility to access data in an Oracle database
Oracle Enterprise   A graphical interface used to administer, monitor, and
Manager(OEM)        tune one or more databases
Database Configuration Assistant
• With the Database Configuration Assistant we can:
   •   Create a database
   •   Configure database options
   •   Delete a database
   •   Manage templates
        – Create new templates using predefined template settings
        • Create new templates from an existing database
        • Delete database templates
Data Dictionary
–   Central to every Oracle database
–   Describes the database and its objects
–   Contains read-only tables and views
–   Stored in the SYSTEM tablespace
–   Owned by the user SYS
–   Maintained by the Oracle server Data
                                      files
–   Accessed with SELECT                      Control Redo
                                              files     Log
                                                        files
                                                  Database


                                        Data Dictionary
                                            tables
Creating Data Dictionary Views

  Script               Purpose

catalog.sql   Creates commonly used data dictionary
              views and synonyms

catproc.sql   Runs scripts required for server-side
              PL/SQL
Tablespaces and Data Files
• Oracle stores data logically in tablespaces and
  physically in data files.
   – Tablespaces:
      • Can belong to only one database at a time
      • Consist of one or more data files
      • Are further divided into logical units of storage
   – Data files:
      • Can belong to only one
        tablespace and one database
      • Are a repository for schema         Database
        object data
                                              Tablespace


                                                Data files
Password Management


           Password    Account
           history     locking



User                                 Setting up
                                     profiles


       Password       Password
       expiration     verification
       and aging
Users and Security
              Account      Default
              locking      tablespace


Authentication                     Temporary
mechanism                          tablespace
                      Security
                      domain
Role                                  Tablespace
privileges                            quotas


              Direct       Resource
             privileges    limits
Roles
Users
                    A            B              C



Roles              HR_MGR              HR_CLERK




Privileges
                   SELECT              INSERT
                  ON JOBS             ON JOBS

         CREATE             CREATE              UPDATE
                            SESSION             ON JOBS
Recovery Manager(RMAN)
We use Following three steps:

1.Set Archive Mode.

2. Backup Database through RMAN.

3.Recovery Database through RMAN.
1.Set Archive Mode
1. Set ORACLE_SID=HP
2. Sqlplus
3. Update PFILE with-
        log_archive_start=true
        log_archive_dest_1=‘Location=D:HPARCH’
        log_archive_format=‘%t_%s.ARC’
4. Shutdown immediate
5.Startup mount pfile=‘D:HPPFILEINITHP.ora’
6.Alter database archivelog;
7. Alter system switch logfile;
8. Archive log list;
2. Backup Database Through RMAN
1.Set ORACLE_SID=HP
2.RMAN target /
3.RMAN> Show all;
4.RMAN> Configure controlfile Autobackup ON;
5.RMAN> Configure controlfile Autobackup format for device
type disk to ‘D:HPBACKUPCONTROLBACK%F.BAK’ ;
6.RMAN> Configure channel device type disk format
‘D:HPBACKUPDATABACKUP%U.BAK’;
7.RMAN> Backup database;
8.RMAN> List backup;
3. Recovery Database (DataFile) through RMAN.
1.Set ORACLE_SID=HP
2.RMAN target /
3.RMAN> Show all;
4.RMAN> Backup database;
5.RMAN> Exit
6.RMAN> Shutdown;
            (Delete all datafiles)
7. RMAN> Restore Database;
8. RMAN> Recover Database;
Recover Database(ControlFiles) Through RMAN

1.RMAN>  startup
2. RMAN> set DB_ID=1425892549 (v$database)
             OR
   RMAN> set ORACLE_SID=HP;
3. RMAN> Restore controlfile from
‘D:HPBACKUPCONTROLC-125492_06.BAK’;
4. RMAN> Alter database mount;
5. RMAN> Recover Database;
6. RMAN> Alter database open resetlogs;
32
ORACLE 9i

Weitere ähnliche Inhalte

Was ist angesagt?

Radix sort presentation
Radix sort presentationRadix sort presentation
Radix sort presentationRatul Hasan
 
Presentation on Data Structure
Presentation on Data StructurePresentation on Data Structure
Presentation on Data StructureA. N. M. Jubaer
 
Data Structures (CS8391)
Data Structures (CS8391)Data Structures (CS8391)
Data Structures (CS8391)Elavarasi K
 
Introduction to data structure ppt
Introduction to data structure pptIntroduction to data structure ppt
Introduction to data structure pptNalinNishant3
 
10. Search Tree - Data Structures using C++ by Varsha Patil
10. Search Tree - Data Structures using C++ by Varsha Patil10. Search Tree - Data Structures using C++ by Varsha Patil
10. Search Tree - Data Structures using C++ by Varsha Patilwidespreadpromotion
 
Data structure using c module 1
Data structure using c module 1Data structure using c module 1
Data structure using c module 1smruti sarangi
 
Red black tree
Red black treeRed black tree
Red black treeuos lahore
 
Data structure and algorithm using java
Data structure and algorithm using javaData structure and algorithm using java
Data structure and algorithm using javaNarayan Sau
 
1.1 binary tree
1.1 binary tree1.1 binary tree
1.1 binary treeKrish_ver2
 
sparse matrix in data structure
sparse matrix in data structuresparse matrix in data structure
sparse matrix in data structureMAHALAKSHMI P
 
NOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLNOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLRamakant Soni
 

Was ist angesagt? (20)

Radix sort presentation
Radix sort presentationRadix sort presentation
Radix sort presentation
 
Presentation on Data Structure
Presentation on Data StructurePresentation on Data Structure
Presentation on Data Structure
 
Data Structures (CS8391)
Data Structures (CS8391)Data Structures (CS8391)
Data Structures (CS8391)
 
Introduction to data structure ppt
Introduction to data structure pptIntroduction to data structure ppt
Introduction to data structure ppt
 
10. Search Tree - Data Structures using C++ by Varsha Patil
10. Search Tree - Data Structures using C++ by Varsha Patil10. Search Tree - Data Structures using C++ by Varsha Patil
10. Search Tree - Data Structures using C++ by Varsha Patil
 
Linked list
Linked listLinked list
Linked list
 
Data structure using c module 1
Data structure using c module 1Data structure using c module 1
Data structure using c module 1
 
Red black tree
Red black treeRed black tree
Red black tree
 
Data structure and algorithm using java
Data structure and algorithm using javaData structure and algorithm using java
Data structure and algorithm using java
 
1.1 binary tree
1.1 binary tree1.1 binary tree
1.1 binary tree
 
sparse matrix in data structure
sparse matrix in data structuresparse matrix in data structure
sparse matrix in data structure
 
Oracle notes
Oracle notesOracle notes
Oracle notes
 
Singly link list
Singly link listSingly link list
Singly link list
 
Clustering in Data Mining
Clustering in Data MiningClustering in Data Mining
Clustering in Data Mining
 
Dbms schemas for decision support
Dbms schemas for decision supportDbms schemas for decision support
Dbms schemas for decision support
 
NOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLNOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQL
 
Arrays in java
Arrays in javaArrays in java
Arrays in java
 
Binary search trees
Binary search treesBinary search trees
Binary search trees
 
Kdd process
Kdd processKdd process
Kdd process
 
Object oriented databases
Object oriented databasesObject oriented databases
Object oriented databases
 

Andere mochten auch

Use Oracle 9i Summary Advisor To Better Manage Your Data Warehouse
Use Oracle 9i Summary Advisor To Better Manage Your Data WarehouseUse Oracle 9i Summary Advisor To Better Manage Your Data Warehouse
Use Oracle 9i Summary Advisor To Better Manage Your Data Warehouseinfo_sunrise24
 
Oracle 9i Dba Fundamentals
Oracle 9i Dba FundamentalsOracle 9i Dba Fundamentals
Oracle 9i Dba FundamentalsLiquidHub
 
Strategies for Improving the Readability of Printed Text
Strategies for Improving the Readability of Printed TextStrategies for Improving the Readability of Printed Text
Strategies for Improving the Readability of Printed TextGfK User Centric
 
Theories in reading instruction report
Theories in reading instruction  reportTheories in reading instruction  report
Theories in reading instruction reportrearojo
 

Andere mochten auch (9)

Use Oracle 9i Summary Advisor To Better Manage Your Data Warehouse
Use Oracle 9i Summary Advisor To Better Manage Your Data WarehouseUse Oracle 9i Summary Advisor To Better Manage Your Data Warehouse
Use Oracle 9i Summary Advisor To Better Manage Your Data Warehouse
 
Oracle 9i Dba Fundamentals
Oracle 9i Dba FundamentalsOracle 9i Dba Fundamentals
Oracle 9i Dba Fundamentals
 
Strategies for Improving the Readability of Printed Text
Strategies for Improving the Readability of Printed TextStrategies for Improving the Readability of Printed Text
Strategies for Improving the Readability of Printed Text
 
ORACLE PL SQL
ORACLE PL SQLORACLE PL SQL
ORACLE PL SQL
 
Data dictionary
Data dictionaryData dictionary
Data dictionary
 
Data Dictionary
Data DictionaryData Dictionary
Data Dictionary
 
Data dictionary
Data dictionaryData dictionary
Data dictionary
 
Theories in reading instruction report
Theories in reading instruction  reportTheories in reading instruction  report
Theories in reading instruction report
 
Data dictionary
Data dictionaryData dictionary
Data dictionary
 

Ähnlich wie ORACLE 9i

Summer training oracle
Summer training   oracle Summer training   oracle
Summer training oracle Arshit Rai
 
Summer training oracle
Summer training   oracle Summer training   oracle
Summer training oracle Arshit Rai
 
Orcale dba training
Orcale dba trainingOrcale dba training
Orcale dba trainingUgs8008
 
Oracle DBA Training in Hyderabad
Oracle DBA Training in HyderabadOracle DBA Training in Hyderabad
Oracle DBA Training in Hyderabadunited global soft
 
Oracle DBA Training in Hyderabad
Oracle DBA Training in HyderabadOracle DBA Training in Hyderabad
Oracle DBA Training in HyderabadUgs8008
 
Oracle dba trainining in hyderabad
Oracle dba trainining in hyderabadOracle dba trainining in hyderabad
Oracle dba trainining in hyderabadsreehari orienit
 
Less04 database instance
Less04 database instanceLess04 database instance
Less04 database instanceAmit Bhalla
 
SQLBits X SQL Server 2012 Rich Unstructured Data
SQLBits X SQL Server 2012 Rich Unstructured DataSQLBits X SQL Server 2012 Rich Unstructured Data
SQLBits X SQL Server 2012 Rich Unstructured DataMichael Rys
 
Expertezed 2012 Webcast - XML DB Use Cases
Expertezed 2012 Webcast - XML DB Use CasesExpertezed 2012 Webcast - XML DB Use Cases
Expertezed 2012 Webcast - XML DB Use CasesMarco Gralike
 
D17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlD17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlMoeen_uddin
 
Azure - Data Platform
Azure - Data PlatformAzure - Data Platform
Azure - Data Platformgiventocode
 
Ms sql server architecture
Ms sql server architectureMs sql server architecture
Ms sql server architectureAjeet Singh
 

Ähnlich wie ORACLE 9i (20)

Lee oracle
Lee oracleLee oracle
Lee oracle
 
Summer training oracle
Summer training   oracle Summer training   oracle
Summer training oracle
 
Summer training oracle
Summer training   oracle Summer training   oracle
Summer training oracle
 
Sql server basics
Sql server basicsSql server basics
Sql server basics
 
ora_sothea
ora_sotheaora_sothea
ora_sothea
 
App D
App DApp D
App D
 
Sybase To Oracle Migration for DBAs
Sybase To Oracle Migration for DBAsSybase To Oracle Migration for DBAs
Sybase To Oracle Migration for DBAs
 
MS-SQL SERVER ARCHITECTURE
MS-SQL SERVER ARCHITECTUREMS-SQL SERVER ARCHITECTURE
MS-SQL SERVER ARCHITECTURE
 
Orcale dba training
Orcale dba trainingOrcale dba training
Orcale dba training
 
Oracle DBA Training in Hyderabad
Oracle DBA Training in HyderabadOracle DBA Training in Hyderabad
Oracle DBA Training in Hyderabad
 
Oracle DBA Training in Hyderabad
Oracle DBA Training in HyderabadOracle DBA Training in Hyderabad
Oracle DBA Training in Hyderabad
 
Oracle dba trainining in hyderabad
Oracle dba trainining in hyderabadOracle dba trainining in hyderabad
Oracle dba trainining in hyderabad
 
Oracle Database Administration 11g Course Content
Oracle Database Administration 11g Course ContentOracle Database Administration 11g Course Content
Oracle Database Administration 11g Course Content
 
Less04 database instance
Less04 database instanceLess04 database instance
Less04 database instance
 
SQLBits X SQL Server 2012 Rich Unstructured Data
SQLBits X SQL Server 2012 Rich Unstructured DataSQLBits X SQL Server 2012 Rich Unstructured Data
SQLBits X SQL Server 2012 Rich Unstructured Data
 
Expertezed 2012 Webcast - XML DB Use Cases
Expertezed 2012 Webcast - XML DB Use CasesExpertezed 2012 Webcast - XML DB Use Cases
Expertezed 2012 Webcast - XML DB Use Cases
 
D17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlD17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sql
 
Azure - Data Platform
Azure - Data PlatformAzure - Data Platform
Azure - Data Platform
 
Ms sql server architecture
Ms sql server architectureMs sql server architecture
Ms sql server architecture
 
Ora 4 the_sqldba
Ora 4 the_sqldbaOra 4 the_sqldba
Ora 4 the_sqldba
 

ORACLE 9i

  • 1. Presented By: Sunil Kumar Sharma CS08117
  • 2. Contents : 1.Introduction of ORACLE 9i. 2. SQL 3. Database Administration 4. Data Dictionary 5. Recovery Manager Tool(RMAN).
  • 3. Introduction   Oracle9i Enterprise Edition is an object relational database that is scalable and easily manageable. Oracle 9i offers a comprehensive high-performance infrastructure for e-busines .It is called oracle 9i.  oracle 9i includs everything needed to develop,deploy,and manage Internet applications.
  • 4. Oracle9i Features Dynamic Memory RMAN Management One Multiple Insert Management Statement Interface Default Oracle Merge Temporary Statement Tablespace
  • 6. Oracle9i Application Server Portals A Transactional Apps P A C Business Intelligence intelligence H E Integration
  • 7. Oracle9i Database Object Relational Data Documents XML Multimedia Messages
  • 8. Communicating with a RDBMS Using SQL SQL statement is entered. Statement is sent to SELECT department_name SELECT department_name Oracle Server. FROM FROM departments; departments; Oracle server
  • 9. Relational Database Management System Oracle server User tables Data dictionary
  • 10. SQL Statements SELECT Data retrieval INSERT UPDATE Data manipulation language (DML) DELETE MERGE CREATE ALTER DROP Data definition language (DDL) RENAME TRUNCATE COMMIT ROLLBACK Transaction control SAVEPOINT GRANT REVOKE Data control language (DCL)
  • 11. SQL Functions Functions Single-row Multiple-row functions functions
  • 12. Substitution Variables I want to query ... salary = ? … different values. … department_id = ? … ... last_name = ? ... User
  • 14. The MERGE Statement Syntax  We can conditionally insert or update rows in a table by using the MERGE statement. MERGE INTO table_name table_alias MERGE INTO table_name table_alias USING (table|view|sub_query) alias USING (table|view|sub_query) alias ON (join condition) ON (join condition) WHEN MATCHED THEN WHEN MATCHED THEN UPDATE SET UPDATE SET col1 = col_val1, col1 = col_val1, col2 = col2_val col2 = col2_val WHEN NOT MATCHED THEN WHEN NOT MATCHED THEN INSERT (column_list) INSERT (column_list) VALUES (column_values); VALUES (column_values);
  • 15. Controlling User Access Database administrator Username and password Privileges Users
  • 16. Tasks of a Database Administrator – To plan and create databases – To manage database availability – To manage storage based on design – To manage security – Network administration – Backup and recovery – Database tuning
  • 17. Database Objects Object Description Table Basic unit of storage; composed of rows and columns View Logically represents subsets of data from one or more tables Sequence Generates primary key values Index Improves the performance of some queries Synonym Alternative name for an object
  • 18. Overview of Primary Components Instance User process Shared Pool SGA Library Redo Log Database Cache Buffer Buffer Cache Server Data Dictionary process Cache Large Pool Java Pool PGA PMON SMON DBWR LGWR CKPT Others Data Control files Redo Log Parameter files Archived files file Log files Password file Database
  • 19. Database Administration Tools Tool Description Oracle Universal Used to install, upgrade, or remove software Installer (OUI) components Oracle Database A graphical user interface tool that interacts with the Configuration OUI, or can be used independently, to create, delete, Assistant(DBCA) or modify a database SQL*Plus A utility to access data in an Oracle database Oracle Enterprise A graphical interface used to administer, monitor, and Manager(OEM) tune one or more databases
  • 20. Database Configuration Assistant • With the Database Configuration Assistant we can: • Create a database • Configure database options • Delete a database • Manage templates – Create new templates using predefined template settings • Create new templates from an existing database • Delete database templates
  • 21. Data Dictionary – Central to every Oracle database – Describes the database and its objects – Contains read-only tables and views – Stored in the SYSTEM tablespace – Owned by the user SYS – Maintained by the Oracle server Data files – Accessed with SELECT Control Redo files Log files Database Data Dictionary tables
  • 22. Creating Data Dictionary Views Script Purpose catalog.sql Creates commonly used data dictionary views and synonyms catproc.sql Runs scripts required for server-side PL/SQL
  • 23. Tablespaces and Data Files • Oracle stores data logically in tablespaces and physically in data files. – Tablespaces: • Can belong to only one database at a time • Consist of one or more data files • Are further divided into logical units of storage – Data files: • Can belong to only one tablespace and one database • Are a repository for schema Database object data Tablespace Data files
  • 24. Password Management Password Account history locking User Setting up profiles Password Password expiration verification and aging
  • 25. Users and Security Account Default locking tablespace Authentication Temporary mechanism tablespace Security domain Role Tablespace privileges quotas Direct Resource privileges limits
  • 26. Roles Users A B C Roles HR_MGR HR_CLERK Privileges SELECT INSERT ON JOBS ON JOBS CREATE CREATE UPDATE SESSION ON JOBS
  • 27. Recovery Manager(RMAN) We use Following three steps: 1.Set Archive Mode. 2. Backup Database through RMAN. 3.Recovery Database through RMAN.
  • 28. 1.Set Archive Mode 1. Set ORACLE_SID=HP 2. Sqlplus 3. Update PFILE with- log_archive_start=true log_archive_dest_1=‘Location=D:HPARCH’ log_archive_format=‘%t_%s.ARC’ 4. Shutdown immediate 5.Startup mount pfile=‘D:HPPFILEINITHP.ora’ 6.Alter database archivelog; 7. Alter system switch logfile; 8. Archive log list;
  • 29. 2. Backup Database Through RMAN 1.Set ORACLE_SID=HP 2.RMAN target / 3.RMAN> Show all; 4.RMAN> Configure controlfile Autobackup ON; 5.RMAN> Configure controlfile Autobackup format for device type disk to ‘D:HPBACKUPCONTROLBACK%F.BAK’ ; 6.RMAN> Configure channel device type disk format ‘D:HPBACKUPDATABACKUP%U.BAK’; 7.RMAN> Backup database; 8.RMAN> List backup;
  • 30. 3. Recovery Database (DataFile) through RMAN. 1.Set ORACLE_SID=HP 2.RMAN target / 3.RMAN> Show all; 4.RMAN> Backup database; 5.RMAN> Exit 6.RMAN> Shutdown; (Delete all datafiles) 7. RMAN> Restore Database; 8. RMAN> Recover Database;
  • 31. Recover Database(ControlFiles) Through RMAN 1.RMAN> startup 2. RMAN> set DB_ID=1425892549 (v$database) OR RMAN> set ORACLE_SID=HP; 3. RMAN> Restore controlfile from ‘D:HPBACKUPCONTROLC-125492_06.BAK’; 4. RMAN> Alter database mount; 5. RMAN> Recover Database; 6. RMAN> Alter database open resetlogs;
  • 32. 32