Oracle for SQL Server DBAs
description
Transcript of Oracle for SQL Server DBAs
Gavin Payne
Oracle for SQL Server DBAs
• Why Oracle?
• Installation
• Physical Storage
• Backup and Recovery
20 slides in 50
minutes
• Inside the database
• Programmability
• Tools
• Next Steps
Q&A
Agenda
Gavin Payne
Solution Architect 3.5 yearsSQL Server DBA 10 yearsinc Oracle DBA 2 years
SQL Bits 7SQL Server User GroupSQL Social
Blog http://blog.gavinpayneuk.comTwitter @GavinPayneUK
About Me
• Today I am not going to:
tell you Oracle is better than SQL Servertell you SQL Server is better than Oracle
• This is a Level 100 session for newcomers to Oracle:
Oracle is a massive product, even the basicsSet your expectations appropriately!
Introduction
• Very successful product
• Lion’s share of the market (think Unix not just Wintel)
• Massive legacy install base and still being deployed
• Some things only work or are stored with Oracle
• One day you will bump into one of those things
Why Oracle?
• Oracle runs on many platforms:
HP-UX PA-RISCAIX PowerPCSolaris SparcLinux x86/x64/Itanium Windows x86/x64/Itanium
• Traditionally a very Unix/Linux focussed product
• But today Windows is just as common, if not more
Platforms
• Download from oracle.com– free dev downloads
• Oracle Universal Installer– product setup wizard
• DBCA– database (instance)
setup wizard
Installation Tools
• You can use a virtual machine
– I’m using Windows 2008 R2 on Hyper-V
• More resource hungry than SQL Server
– memory, IO, CPU, in that order
• Just accepting the defaults is fine
Installation Tips
• Browser based administration tool
• Focuses on platform and schema control rather than data
• Primarily of DBA, not developer, interest
• Compared to SSMS it’s pretty shocking
• Portability over functionality
• Not all functionality is free!
• Demo
Oracle Enterprise Manager
Oracle Database Components%ORACLE_SID%
%ORACLE_HOME%
Oracle Database System
Oracle Database
PhysicalFiles
ExecutablesSystem files
Data files
Database Instance
BackgroundProcesses
Operating systemprocesses and services
Database writerLog writerCheckpointSys MonProcess MonArchiverJob Queue
Oracle’s Physical FilesSQ
L Se
rver
Registry
Master
MSDB TempDB
UserDB
UserDB
UserDB
UserDB
LogLogLogLog
Ora
cle
Parameter File(PFILE or SPFILE)
SYSTEM
Control Files
Undo Log
Redo Logs
SYSAUX Temp
UserDataFile
UserDataFile
UserDataFile
UserDataFile
Data
base
Oracle’s Logical HierarchySQL Server
Core Components
Default Instance
Master
Master Log
UserDB1
UserDB1 Log
dbo Schemauser1 Schema
Named Instance
Master
Master Log
UserDB1
UserDB1 Log
dbo Schemauser1 Schema
OracleHome
Database
Data Files
Redo Logs
SYS Schema
APP1 Schema
APP2 Schema
APP3 Schema
APP4 Schema
SQL
Serv
er
Ora
cle
Oracle Recovery Mechanism
Redo LogBuffer
Physical Data Files
DATA1.DBF DATA2.DBF DATA3.DBF etc.
Undo Log
Redo Log 2
Redo Log 3
Archive Logs
User “Application”
Redo Log 1
1
2Cu
rren
tDa
ta
3
4
Com
mit
5
Checkpoint
6Log Switch
• Archivelog mode
Equivalent to Full recovery mode
Writes and then empties the changes in an inactive redo log to an operating system disk file transaction log backup
Key to performing point in time recoveries
And online backups!
Backup and Recovery
• Oracle’s Recovery Manager
• Command line backup and cataloguing manager
• Equivalent of T-SQL Backup and Restore
• Production DBA’s best friend
• Highly comprehensive scripting language
• DEMO
RMAN
High Availability
Cluster NodeActive
Cluster Node
Passive
Datafiles
Windows Failover Clustering
SQL
Serv
er
Cluster NodeActive
Cluster Node
Passive
Datafiles
3rd Party Cluster Manager
Third
Par
tyCluster NodeActive
Datafiles
Real Application Clustering
Cluster NodeActive
Ora
cle
Database Object Types
Inside The Database
• TablesRelationalObjectXML
• Indexes• Views• Synonyms• Sequences
• Packages• Package Bodies• Procedures• Functions• Triggers
• Java Classes• Java Sources
Program Object Types
• Oracle supports 3 languages
SQLPL/SQLJava
• PL/SQL is similar to C, although based on Ada
• Similar feature set to T-SQL 2005 onwards• But not as friendly?
Programmability
Key PL/SQL Differences with T-SQL
desc object_name;
Select sysdate from dual;
Select seq_name.nextval from dual;
Procedures cannot return data!
Programmability
Tools
Oracle Tools• Enterprise
Manager
• SQL*Plus
• JDeveloper
3rd Party Tools• Quest Toad
• Red Gate
DEMO
• Download and install, get to the Enterprise Mgr page
• Decide what you want to learn more about next?
• What we didn’t cover:
Networking and ListenersSecurityMemory managementDynamic and Flash storagePL/SQL
Next Steps
• Oracle 2-day DBA Guide (download)
• Oracle – A Beginner’s Guide (Oracle Press)
• Oracle for SQL Server DBAs (Oracle Press) Nov 2010
Reading Material
Q & A