ORACLE 9i

635 views

Published on

1 Comment
1 Like
Statistics
Notes
No Downloads
Views
Total views
635
On SlideShare
0
From Embeds
0
Number of Embeds
10
Actions
Shares
0
Downloads
0
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide

ORACLE 9i

  1. 1. Presented By:Sunil Kumar SharmaCS08117
  2. 2. Contents :1.Introduction of ORACLE 9i.2. SQL3. Database Administration4. Data Dictionary5. Recovery Manager Tool(RMAN).
  3. 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. 4. Oracle9i FeaturesDynamic Memory RMANManagement One Multiple Insert Management Statement Interface Default Oracle Merge Temporary Statement Tablespace
  5. 5. Oracle9i
  6. 6. Oracle9i Application Server Portals A Transactional Apps P A C Business Intelligence intelligence H E Integration
  7. 7. Oracle9i Database Object Relational Data Documents XML Multimedia Messages
  8. 8. Communicating with a RDBMS Using SQLSQL statementis entered. Statement is sent toSELECT department_name SELECT department_name Oracle Server.FROM FROM departments; departments; Oracle server
  9. 9. Relational Database Management System Oracle server User tables Data dictionary
  10. 10. SQL StatementsSELECT Data retrievalINSERTUPDATE Data manipulation language (DML)DELETEMERGECREATEALTERDROP Data definition language (DDL)RENAMETRUNCATECOMMITROLLBACK Transaction controlSAVEPOINTGRANTREVOKE Data control language (DCL)
  11. 11. SQL Functions FunctionsSingle-row Multiple-row functions functions
  12. 12. Substitution Variables I want to query... salary = ? … different values.… department_id = ? …... last_name = ? ... User
  13. 13. Sample Report…
  14. 14. The MERGE Statement Syntax We can conditionally insert or update rows in atable by using the MERGE statement.MERGE INTO table_name table_aliasMERGE 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. 15. Controlling User Access Database administrator Username and password PrivilegesUsers
  16. 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. 17. Database ObjectsObject DescriptionTable Basic unit of storage; composed of rows and columnsView Logically represents subsets of data from one or more tablesSequence Generates primary key valuesIndex Improves the performance of some queriesSynonym Alternative name for an object
  18. 18. Overview of Primary Components InstanceUserprocess Shared Pool SGA Library Redo Log Database Cache Buffer Buffer CacheServer Data Dictionaryprocess 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. 19. Database Administration Tools Tool DescriptionOracle Universal Used to install, upgrade, or remove softwareInstaller (OUI) componentsOracle Database A graphical user interface tool that interacts with theConfiguration OUI, or can be used independently, to create, delete,Assistant(DBCA) or modify a databaseSQL*Plus A utility to access data in an Oracle databaseOracle Enterprise A graphical interface used to administer, monitor, andManager(OEM) tune one or more databases
  20. 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. 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. 22. Creating Data Dictionary Views Script Purposecatalog.sql Creates commonly used data dictionary views and synonymscatproc.sql Runs scripts required for server-side PL/SQL
  23. 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. 24. Password Management Password Account history lockingUser Setting up profiles Password Password expiration verification and aging
  25. 25. Users and Security Account Default locking tablespaceAuthentication Temporarymechanism tablespace Security domainRole Tablespaceprivileges quotas Direct Resource privileges limits
  26. 26. RolesUsers A B CRoles HR_MGR HR_CLERKPrivileges SELECT INSERT ON JOBS ON JOBS CREATE CREATE UPDATE SESSION ON JOBS
  27. 27. Recovery Manager(RMAN)We use Following three steps:1.Set Archive Mode.2. Backup Database through RMAN.3.Recovery Database through RMAN.
  28. 28. 1.Set Archive Mode1. Set ORACLE_SID=HP2. Sqlplus3. Update PFILE with- log_archive_start=true log_archive_dest_1=‘Location=D:HPARCH’ log_archive_format=‘%t_%s.ARC’4. Shutdown immediate5.Startup mount pfile=‘D:HPPFILEINITHP.ora’6.Alter database archivelog;7. Alter system switch logfile;8. Archive log list;
  29. 29. 2. Backup Database Through RMAN1.Set ORACLE_SID=HP2.RMAN target /3.RMAN> Show all;4.RMAN> Configure controlfile Autobackup ON;5.RMAN> Configure controlfile Autobackup format for devicetype 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. 30. 3. Recovery Database (DataFile) through RMAN.1.Set ORACLE_SID=HP2.RMAN target /3.RMAN> Show all;4.RMAN> Backup database;5.RMAN> Exit6.RMAN> Shutdown; (Delete all datafiles)7. RMAN> Restore Database;8. RMAN> Recover Database;
  31. 31. Recover Database(ControlFiles) Through RMAN1.RMAN> startup2. 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. 32

×