midterum Flashcards
Can an instance exist without a database
Instance can exist without a database
Cloud
Rent computing power – pay as you go
Smart phones often interact with cloud data
List of background processes (9)
PMON SMON DBWn CKPT LGWR ARCn MMON MMAN LREG
SYS
Owns most of tables needed to run DB, data dictionary views, packages, and built in procedures
Can perform high level tasks (start up/shut down DB instances, backup/recovery tasks)
Is SGA apart of the oracle instance, why?
Yes
Everything is a cache
Volatile storage (memory) faster than non-volatile storage (disk)
Shared memory
PMON definition
PMON: Process monitor
Regulates all other processes
Cleans up dead processes
Must be alive
SGA definition
System/shared global area
Can a database exist without an instance
Database can exist without an instance
Mobile
Runs on smart phone or pervasive device
Specialized version of a departmental or enterprise DBMS
Remote users, not usually connected to the network
Data can be synchronized
when can you have multiple instances?
You can set up multiple instances to access the same set of files or one database
Log buffer
Log writer process writes changes to memory fast
how many databases can an instance access?
An instance can only access one database
what does PMON stand for
PMON: Process monitor
Control file
Most important file in oracle (“the brain”)
Information on the state of the database
System change number – SCN
multiplexing
who owns data dictionary views
Owned by SYS
dedicated server
One user process to one server process (typical when DB created during installation)
where are dynamic performance views derived from
Derived from memory and control file
OFA definition
Optimal flexible architecture
Logical storage
o Tablespaces
o Segments
o Extents
o Blocks
How to decipher data dictionary views
DBA_ , User_, All_
Locking login
prohibits the user from accessing the DBMS, but it does not drop login from system
When is Pfile parameter not needed?
Pfile parameter not needed if SPfile exists
what are dynamic performance views used for?
Used to monitor and tune database
What do online redo log files contain?
Checkpoints
Changes (DML –insert update delete, DDL)
Datafile changes – new datafiles
What two tablespaces must be in the database?
System
Sysaux
When is SGA allocated?
SGA is allocated at instance startup
where are data dictionary views stored?
Stored in system tablespace (necessary)
Shared server
Multiple server process are shared with multiple connections and controlled using dispatcher
Best for OLTP
when is the user process created?
Created when application requests a connection to the database
System table space
System
• Holds the data dictionary
• Cannot be taken offline
• Requires instance shutdown to recover it
what is the server process?
Interacts with user process to deal with request
PCTFree
PCTFree – 10%; space in each block is reserved for growth
Physical storage
o Datafiles
o Control files
o Redo log files
three dynamic performance views
o V$CONTROLFILE
o V$PARAMETER
o V$DATABASE
How to decipher dynamic performance views?
V$
What are the two types of table spaces?
Permanent (segments persistent beyond session)
Temporary (transient, no permanent objects)
PCTUsed
PCTUsed – 40%; a block is put backon the free list when its used space falls below PCTUsed
Two tablespace modes:
Read/write
Read only
full backup
Non-incremental RMAN backup. (full does not refer to how much of database is backed up, refers to the fact the backup is not incremental). You can make a full backup of one data file
what can an instance failure result in?
Instance failure can result in corruption of data that requires a recovery but usually such failures do not damage data, so the DBMS simply needs to be restarted to re-establish normal operations
requirements of an OLTP backup
Needs to be available 24x7 x365
Hot backup, zero loss of data
Incremental backups with RMAN
Export, tablespace backup
how many profiles can a user be assigned to?
User can be assigned only 1 profile at a time
Transient data
data that is created within an application session, at end of session it is discarded or reset back to its default and not stored in a database
Instance failures
o Result of internal exception within the DBMS
o Operating system failure or other software-related database failure
Data integrity enforcement through(6)
o Entity integrity – uniqueness (PK) o Data types o Default values o Check constraints o Triggers o Referential integrity (FK)
Whole backup
A backup of the control file and all data files that belong to a database
MTBF definition
mean time between failure
Incremental backup can be:
- differential incremental backup
* cumulative incremental backup
is a users current session affected by profile change?
Users current session isn’t affected by profile change
Causes of planned downtime
o System and database changes
o Data changes – index rebuild
o Application changes - perform
SQL Injection
Form of web hacking whereby SQL statements are specified in the fields of a web form to cause a poorly designed web application to dump database content to the attacker
Incremental backup
RMAN backup in which only modified blocks are backed up. Incremental backups are classified by level.
• Level 0 incremental backup preforms same function as full backup.
how can you enforce password complexity
Predefined SQL script to verify the complexity of a password
Adjust the PASSWORD_VERIFY_FUNCTION setting in a profile and assign that profile to a user
types of backups to use:
OLTP
Data warehouse
how many users can a profile be assigned to?
A profile can be assigned to any number of users
what is encryption
Encryption transforms data rendering it unreadable to anyone without the decryption key
Archivelog mode
o Needed for DB to create archive logs
o Needed to enable flashback database
Default roles
creator or the DBA can adjust roles for a user using ALTER USER
Data warehouse
Often static (possible read-only)
New data at regular intervals (RMAN incremental backup or rebuild)
Application (transaction) failures
o Programs or scripts are run at the wrong time, using wrong input or in wrong order
o Sooner an application failure is identified and corrected, the smaller amount of damage
3 areas to examine when working with passwords
o Changing password and making it expire
o Enforcing password time limits, history and other
settings
o Enforcing password complexity
Restoration
process of copying files from a backup
Enable roles
user role can enable or disable her role with the SET ROLE command
what is a database profile?
Collection of settings that limit resources and define use of passwords
Redo logs and archive logs consist of:
Redo logs and archive logs consist of records of all transactions made to a database
Two types of encryption
In transit – prohibit network packet sniffing
At rest – in database
what is the database profile assigned to?
Only assigned to user (not to role)
Types of backups
Full
Incremental
Whole
RMAN
oracles recovery manager
Drop roles
DBA can drop the role form the DB and thereby cancel the role for all users who had it
Backup
process of making some kind of copies of parts of a database, or an entire database
application (transaction) failure results in
Application failure results in corrupt data that requires a database restore or recovery
when can a database profile be assigned to a user
Can be assigned when user created
What is a flashback query?
Explicitly references a past time through a time stamp or system change number (SCN)
Recovery
process of rebuilding a database after some part of a database has been lost, to a desired point in time (for full recovery the database must be archived)
Persistent data
data survives after the process which it was created has ended.
Enterprise architecture
Designed for scalability and high performance
Multiple users may connect concurrently
Support for very large databases
Supports multiple DB instances and replication
Runs on a high-end machine (mainframe, server)
High cost
OLTP, data warehouse …
Shared pool
- Concept of parsing (select ename from emp;)
- Library cache – shares stored SQL
- Data dictionary cache – stored metadata
SMON definition
SMON: System monitor
system user
Owner of additional internal tables and views
Has DBA role to perform routine tasks
Pfile
o Static text parameter file
o Init.ora( = database name)
SMON
o SMON: System monitor
Responsible for instance recovery
Cleans up temporary files