Oracle for SQL Server DBAs

23
Gavin Payne Oracle for SQL Server DBAs

description

Oracle for SQL Server DBAs. Gavin Payne. Agenda. Inside the database Programmability Tools Next Steps Q&A. Why Oracle? Installation Physical Storage Backup and Recovery 20 slides in 50 minutes. About Me. Gavin Payne Solution Architect 3.5 years - PowerPoint PPT Presentation

Transcript of Oracle for SQL Server DBAs

Page 1: Oracle for SQL Server DBAs

Gavin Payne

Oracle for SQL Server DBAs

Page 2: 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

Page 3: Oracle for SQL Server DBAs

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

Page 4: Oracle for SQL Server DBAs

• 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

Page 5: Oracle for SQL Server DBAs

• 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?

Page 6: Oracle for SQL Server DBAs

• 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

Page 7: Oracle for SQL Server DBAs

• Download from oracle.com– free dev downloads

• Oracle Universal Installer– product setup wizard

• DBCA– database (instance)

setup wizard

Installation Tools

Page 8: Oracle for SQL Server DBAs

• 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

Page 9: Oracle for SQL Server DBAs

• 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

Page 10: Oracle for SQL Server DBAs

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

Page 11: Oracle for SQL Server DBAs

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

Page 12: Oracle for SQL Server DBAs

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

Page 13: Oracle for SQL Server DBAs

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

Page 14: Oracle for SQL Server DBAs

• 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

Page 15: Oracle for SQL Server DBAs

• 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

Page 16: Oracle for SQL Server DBAs

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

Page 17: Oracle for SQL Server DBAs

Database Object Types

Inside The Database

• TablesRelationalObjectXML

• Indexes• Views• Synonyms• Sequences

• Packages• Package Bodies• Procedures• Functions• Triggers

• Java Classes• Java Sources

Program Object Types

Page 18: Oracle for SQL Server DBAs

• 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

Page 19: Oracle for SQL Server DBAs

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

Page 20: Oracle for SQL Server DBAs

Tools

Oracle Tools• Enterprise

Manager

• SQL*Plus

• JDeveloper

3rd Party Tools• Quest Toad

• Red Gate

DEMO

Page 21: Oracle for SQL Server DBAs

• 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

Page 22: Oracle for SQL Server DBAs

• Oracle 2-day DBA Guide (download)

• Oracle – A Beginner’s Guide (Oracle Press)

• Oracle for SQL Server DBAs (Oracle Press) Nov 2010

Reading Material

Page 23: Oracle for SQL Server DBAs

Q & A