Lecture 2
Lecture 2
Lecture 2
2
What is Database Administration?
7
Managing Oracle 11g Data Storage
9
Tablespaces
• One or more Data files
• Stores all database structures + data
– Tables, data, views, sp’s etc…
• .dbf extensions
• Store tablespace contents
• Stored in Oracle_Base\oradata\SID
• Use OEM to view and modify
• Grow via Extents
12
Extents – Smallest unit added to data
file
• Sequence of Data Blocks
• When an insert grows beyond the data file size
allocation, a new extent is added.
• More efficient to add groups of data blocks vs.
individual blocks.
14
Managing Oracle 11g Data Structures
• Create tablespace
• Manage datafile extents
– Autoextensible tablespace
• Configure tablespace and datafile properties
• Demo!
Guide to Oracle 10g 15
Oracle 11g Database File Architecture
16
Parameter File
• Text file
• Specifies configuration information about Oracle
10g database instance
• init.ora
– Stored in Oracle_Base\admin\SID\pfile folder
• DBAs can edit parameter file
– Modify database configuration
20
Creating and Managing User Accounts
• Create new user account
– General information about user account
– System privileges user has in database
– User’s tablespace quota on database server
–Demo!
• Use OEM
– General page:
• Name
• Profile
• Authentication
• Default tablespace
• Temporary tablespace
• Status
• System privilege
• Object privilege
• Enable new user to interact with Oracle 10g
database
– DBA grants system privileges
– Use System Privileges page in Create User page
• Admin Option
• Use OEM
– Select user account to be modified on Users page
– General page opens
– Select other links to modify properties
• Database object
• Represents collection of system privileges
• Assign to multiple users
• Create role
– Can inherit privileges from other roles
• Grant Role to User Account
• Easier than manually assigning everything
manually.
26
Startup / Shutdown
27
Starting /Shutting Down the Db
• Shut down database periodically
– Perform maintenance
• Restart database
30
Instance Options
Startup Shutdown
• Start in one of two modes: • Specify one of four ways to
– Unrestricted handle existing user
– Restricted connections:
– Normal
– Transactional
– Immediate
– Abort
31
Oracle 11g Database Instance States
32
Questions?