Database AdministrationDatabase AdministrationISQA 436ISQA 436
Winter 2004Winter 2004
Mark FreemanMark Freeman
[email protected]@pdx.edu
Database AdministrationDatabase AdministrationISQA 436ISQA 436
• SyllabusSyllabus• BooksBooks• AttendanceAttendance• GradingGrading• WebCTWebCT
http://ce6hosting.webct.com/http://ce6hosting.webct.com/• WebsiteWebsite
http://web.pdx.edu/~markf/sba/isqa436http://web.pdx.edu/~markf/sba/isqa436
DATABASE ApplicationsDATABASE Applications
• Oracle 9i (v9.2.0.1.0)Oracle 9i (v9.2.0.1.0)• Database server: SBALABSDatabase server: SBALABS• You will be assigned a user account which You will be assigned a user account which
you will createyou will create• SQL*Plus and SQL*Plus WorksheetSQL*Plus and SQL*Plus Worksheet• Enterprise ManagerEnterprise Manager• Net configuration/managementNet configuration/management
DATABASEDATABASE
• Remote connectionRemote connection– Oracle 9i clientOracle 9i client– ServiceService
SBALABSSBALABS
– HostHost IP Address (IP Address (See install/config lab for detailsSee install/config lab for details))
What you should knowWhat you should know
• Basic SQL Basic SQL – INSERT, UPDATE and DELETEINSERT, UPDATE and DELETE
– SELECTSELECT WHEREWHERE
ORDER BYORDER BY
GROUP BY/HAVINGGROUP BY/HAVING
– Joins (2 or 3 tables)Joins (2 or 3 tables)
• Basic DDLBasic DDL– CREATE, ALTER, DROP TABLE, etcCREATE, ALTER, DROP TABLE, etc
What you should knowWhat you should know
• Referential IntegrityReferential Integrity– Primary and Foreign KeysPrimary and Foreign Keys
• NULLNULL• Know about:Know about:
– ViewsViews– Functions, procedures, triggersFunctions, procedures, triggers– IndexesIndexes– TransactionsTransactions
WHAT WE WILL LEARNWHAT WE WILL LEARN
1.1. Oracle Database ArchitectureOracle Database Architecture2.2. AdministrationAdministration
• Backup and recoveryBackup and recovery• Storage managementStorage management• Network managementNetwork management• Security managementSecurity management
3.3. PL/SQL programmingPL/SQL programming4.4. Internet database technology*Internet database technology*
*As time allows*As time allows
ORACLE TIMELINE*ORACLE TIMELINE*
1970
IBM employeeE.F. Codd publishestheory of relational
databases
1974 1977 1980
IBM develops System R UC Berkeley develops Ingres Neither becomes commercial before Oracle
Oracle is foundedby Larry Ellison,
Bob Miner and Ed OatesOriginally named SDL
1978 1979
Name changed to RSI
First commercialrelational database
is shipped!
Name changed to Oracle
* Sources: http://math.hws.edu/vaughn/cpsc/343/2003/history.html http://www.oracle.com/corporate/history.html
ORACLE TIMELINEORACLE TIMELINE
1980
Version 3.0on minicomputers
written in C
1984 1987 1990
Version 4.0PC version
Read consistency
Oracle beginsdevelopment of
Oracle Financialssoftware
1988 1989
Version 5.0Distributed database
Client/server
Version 6.0PL/SQL
Oracle Financialsreleased
Version 6.2Parallel Server
1981 1982 1983
IBM releases DB2
1985 1986
ORACLE TIMELINEORACLE TIMELINE
1990
Version 7.0 on UnixVery Large Databases
(VLDB)
1994 1997 2000
Network PC
1998 1999
Version 8.0,named Oracle8,
Released64-bit
Linux
1991 1992 1993
$1 billion in sales
1995 1996
Oralce ApplicationsERP, Supply Chain,Manufacturing, etc..
Oracle becomes#1 databasecompany forinternet and
ERP
Oracle 8iJavaOAS
ORACLE TIMELINEORACLE TIMELINE
2000
Oracle 9iRelease 2
2004
Oracle 10g
2001 2002 2003
Oracle 9i Release 1Internet Application
Server (IAS)
Important Oracle ResourcesImportant Oracle Resources
• Online documentationOnline documentation– All of Oracle documentation is available onlineAll of Oracle documentation is available online
Internet: Internet: http://otn.oracle.com/documentation/index.htmlhttp://otn.oracle.com/documentation/index.html Requires a one-time registration, which is freeRequires a one-time registration, which is free
SBA labs: SBA labs: Run N:\MapOracle.batRun N:\MapOracle.bat
O:\DocumentationO:\Documentation
Important Oracle ResourcesImportant Oracle Resources• Online documentationOnline documentation
– All of Oracle documentation is available onlineAll of Oracle documentation is available online Internet: Internet: http://otn.oracle.com/documentation/index.htmlhttp://otn.oracle.com/documentation/index.html
Requires a one-time registration, which is freeRequires a one-time registration, which is free
SBA labs: O:\DocumentationSBA labs: O:\Documentation
• Useful documents for this class*Useful documents for this class*– Oracle Database ConceptsOracle Database Concepts– Database Administrator’s GuideDatabase Administrator’s Guide– SQL ReferenceSQL Reference– PL/SQL User Guide an ReferencePL/SQL User Guide an Reference
* There are more than 200 Oracle documentation manuals
DATABASE ADMINISTRATORDATABASE ADMINISTRATOR
• What is a DBA?What is a DBA?– Database AdministratorDatabase Administrator– Default Blame Accepter?Default Blame Accepter?
• What does a DBA do?What does a DBA do?
DATABASE ADMINISTRATORDATABASE ADMINISTRATOR
• DBA tasks:DBA tasks:– Database Design and PlanningDatabase Design and Planning
– Database Installation and UpgradeDatabase Installation and Upgrade
– Backup and RecoveryBackup and Recovery
– Storage ManagementStorage Management
– Security ManagementSecurity Management
– Network AdministrationNetwork Administration
– Performance TuningPerformance Tuning
– On-call Emergency Crisis ManagementOn-call Emergency Crisis Management
DATABASE DESIGN AND DATABASE DESIGN AND PLANNINGPLANNING
• Capacity planningCapacity planning– Number and speed of CPUNumber and speed of CPU– MemoryMemory– Disk spaceDisk space– Size and distribution of data filesSize and distribution of data files
• NetworkNetwork– FirewallFirewall– ConcurrancyConcurrancy– Distributed databasesDistributed databases
• Database parametersDatabase parameters– Sizing and resource allocationSizing and resource allocation
• Standby and test databasesStandby and test databases
DATABASE INSTALLATION DATABASE INSTALLATION AND UPGRADEAND UPGRADE
• What products to installWhat products to install• Configuring the operating systemConfiguring the operating system
– memory parametersmemory parameters– Oracle acccountOracle acccount– filesystemfilesystem
• Installing/configuring database and web Installing/configuring database and web serversservers
• Installing client softwareInstalling client software• Planning and performing upgradesPlanning and performing upgrades
BACKUP AND RECOVERYBACKUP AND RECOVERY
• Develop backup and recovery planDevelop backup and recovery plan• Implement backup proceduresImplement backup procedures• Test recovery plansTest recovery plans• Schedule exports and other special-needs Schedule exports and other special-needs
backupsbackups
STORAGE MANAGEMENTSTORAGE MANAGEMENT
• Ensure enough disk space and data files for Ensure enough disk space and data files for growthgrowth
• Monitor growthMonitor growth• Schedule database reorganizationsSchedule database reorganizations
SECURITY MANAGEMENTSECURITY MANAGEMENT
• Create database user accounts and rolesCreate database user accounts and roles• Grant and revoke privilegesGrant and revoke privileges• Maintain operating system securityMaintain operating system security• Network securityNetwork security
– firewallfirewall
• Web server securityWeb server security• EncryptionEncryption
NETWORK ADMINISTRATIONNETWORK ADMINISTRATION
• Server network configurationServer network configuration• Client network configurationClient network configuration• Distributed database configurationDistributed database configuration• Managing connection capacityManaging connection capacity
PERFORMANCE TUNINGPERFORMANCE TUNING
• Monitor performanceMonitor performance– response timeresponse time– resource contentionresource contention
CPUCPU
MemoryMemory
DiskDisk
NetworkNetwork
• Adjust database parameters accordinglyAdjust database parameters accordingly• Assist in SQL statement tuningAssist in SQL statement tuning
ON-CALL CRISIS ON-CALL CRISIS MANAGEMENTMANAGEMENT
• Anticipate emergencies and take Anticipate emergencies and take preventative measurespreventative measures
• Respond to pager at 3amRespond to pager at 3am• Keep a cool headKeep a cool head• Call Oracle for supportCall Oracle for support• Minimize damageMinimize damage• Minimize downtimeMinimize downtime