Ora 4 the_sqldba

36
KELLYN POT’VIN, SR. TECHNICAL CONSULTANT ORACLE FOR THE SQL SERVER DBA

Transcript of Ora 4 the_sqldba

Page 1: Ora 4 the_sqldba

K E L L Y N POT ’ V I N , S R . T E C H N I C A L C O N S U L T A N T

ORACLE FOR THE SQL SERVER DBA

Page 2: Ora 4 the_sqldba

ABOUT THE PRESENTER

• Oracle and MsSQL DBA for over twelve years.

• Oracle ACE

• Board of Directors for RMOUG, (Rocky Mountain Oracle User Group)

• Database Track Committee for ODTUG’s, (Oracle Developer Tools User Group) KSCOPE 2012

• Presenting this year at RMOUG, Miracle World, (Denmark) KSCOPE, Oracle User Group’s Harmony, (Finland) and other international conferences.

• Resides in Broomfield, CO.

• Honing skills at Enkitec, a Platinum Oracle Partner out of Dallas, Tx.

Page 3: Ora 4 the_sqldba

“...GET NO RESPECT…”

• Oracle in comparison to SQL Server DBA’s in the

technical arena.

• Rarely do Oracle DBA’s have other technical

groups performing their tasks.

• Microsoft pushes the database platform for it’s

“ease of management.”

• “We won’t need your SQL Server skills, no [mission

critical] MsSQL databases here…”

• Only one position has kept that deal.

Page 4: Ora 4 the_sqldba

DIVERGENCE

• Oracle Marketshare?

• Oracle’s Latest Innovations?

• SQL Server’s Marketshare?

• SQL Server’s Latest Innovations?

• MySQL in the mix…

Page 5: Ora 4 the_sqldba

MULTI-PLATFORM

“A database is a database…”

• Must be able to adapt quickly.

• Must be open-minded.

• Must like challenges.

• Must be able to absorb a lot of information and

keep it well organized mentally.

• Must be open to finding the right platform/product

for the task/project.

Page 6: Ora 4 the_sqldba

WHAT IS THE SAME

• Both ACID Compliant, (atomicity, consistency,

isolation, durability).

• Extensive tuning options in both databases.

• OLTP and DSS/Warehouse features.

• Multiple Backup and Recovery level features.

• High Availability and stand-by

• Fully auditable, accountable and transactional

level recoverable.

Page 7: Ora 4 the_sqldba

VERY DIFFERENT

• System Databases and Temp Database- None in Oracle.

• Oracle contains a SYSTEM schema, along with other schemas that house important information vs. having in separate database, i.e. SQL Server’s System tablespaces.

• Temporary work is all performed in the TEMP tablespace for Oracle, which does possess physical files underneath, but no separate database.

• SQL Server’s transaction log and temp database handles processing a bit differently than Oracle’s temp tablespace, redo and undo.

Page 8: Ora 4 the_sqldba

THE INSTANCE

• INSTANCE

• Oracle- The core services, (i.e. memory structure and

background processes) that identifies the database. It is

not the database, but again, the background processes, controlfiles and configuration, (initialization parameter file)

that will be used by the database. One instance per

database, unless a RAC, (Real Application Cluster.)

• SQL Server- An Instance allows more than one copy of the

SQL Server software to run at one time, each copy, also

known as an instance. This allows the DBA to run multiple

versions of SQL Server from one server, as well. For an

Oracle DBA, we would translate this more to the term “Oracle Homes” instead of the term of “Instance”.

Page 9: Ora 4 the_sqldba

SQL SERVER MAIN

Page 10: Ora 4 the_sqldba

ORACLE DATABASE MAIN VIEW

Page 11: Ora 4 the_sqldba

ORACLE ARCHITECTURE

Page 12: Ora 4 the_sqldba

SQL SERVER CONFIGURATION

Page 13: Ora 4 the_sqldba

ORACLE INITIALIZATION PARAMETERS

• “Init” parameters are required to (no)mount or open a database, either by: • Text based, “pfile” or

parameter file.

• Naming convention init<sid>.ora

• Bit-secure version, “spfile”

or secure parameter file.

• Naming convention sp<sid>.ora

Page 14: Ora 4 the_sqldba

SQL SERVER DATABASE FILES

Page 15: Ora 4 the_sqldba

ORACLE DATAFILES

Page 16: Ora 4 the_sqldba

SQL SERVER FILEGROUPS

Page 17: Ora 4 the_sqldba

ORACLE TABLESPACES

Logical structure, datafiles underneath.

Page 18: Ora 4 the_sqldba

ORACLE CONTROLFILES

Page 19: Ora 4 the_sqldba

ORACLE REDO LOGS

• Redo logs are stored in “member groups” and each file within the

member group is referred to as a “member”.

• Each Member Group includes information about last SCN change, if

active, inactive and if archived.

Page 20: Ora 4 the_sqldba

ORACLE REDO LOG FILES

• Files are mirrored for security reasons.

• These files are REQUIRED to be moved for recovery and are archived

off, (archive logs…)

• Files are stored as part of groups and although .log is standard naming

convention .rdo is recommended.

• Can you suspect why the naming convention recommendation

change?

Page 21: Ora 4 the_sqldba

ORACLE ARCHIVE LOGS

• Once the Redo log is no longer Current, the archiver is able to archive

the redo log file off for recovery purposes.

• All archive logs contain a sequence, SCN change number and dates

of activity included in their information stored.

Page 22: Ora 4 the_sqldba

ORACLE UNDO

• Undo is required to “undo” or rollback changes. Either from a rollback

request, timeout, failure or recovery scenario.

• Automatic Undo tablespace, replaced Static, manually sized

“Rollback Segments” as of Oracle 9i.

• Automatic and easy to manage, (still many myths regarding this

feature.

Page 23: Ora 4 the_sqldba

SQL SERVER MULTI-LEVEL LOGINS

Page 24: Ora 4 the_sqldba

ORACLE USERS

• Users can be created within the database, use Windows

authentication or Oracle’s “Wallet”.

Page 25: Ora 4 the_sqldba

MONITORING SQL SERVER USERS

• Simple SP_WHO2 call.

• Shows running, sleeping and waiting.

• Database, login, user, SPID and if blocked.

Page 26: Ora 4 the_sqldba

MONITORING ORACLE ACTIVITY

Page 27: Ora 4 the_sqldba

ORACLE ASM

Oracle’s answer to reduce redundancy and give DBA’s more control

over storage, luns, placement and performance of database files.

Page 28: Ora 4 the_sqldba

COOL ORACLE ENTERPRISE MANAGER FEATURES

Able to historically trace back activity in Oracle to a given “snapshot in

time”.

Data is aggregated, but can drill down to individual sessions and pull

information.

Page 29: Ora 4 the_sqldba

SQL SERVER LINKED SERVERS

Select * from loufin01.db1.dbo.table1 [GO]

User logging in from linked server privileges are links

privileges.

Page 30: Ora 4 the_sqldba

ORACLE DATABASE LINKS

Select * from schema.table1@dblinkname;

• Can be private or public.

Page 31: Ora 4 the_sqldba

SQL SERVER GRANTS/MAPPINGS

Page 32: Ora 4 the_sqldba

ORACLE GRANTS/PRIVILEGES

• System, Schema and Role Grants

• VPD, (replaces row level grants in Oracle.)

Page 33: Ora 4 the_sqldba

ORACLE SQL MONITOR, (11G)

Activity

Duration

SQL Identifier

User

Degree of Parallelism

Wait Event

SQL Text

Page 34: Ora 4 the_sqldba

ORACLE SCHEDULER

Oracle DBA’s Often do not use the Oracle Scheduler- Why?

• Scripting gives more control, (shell, perl, etc. with Cron in Linux/Unix)

• Scheduling time “inching”- Next execution based off completion

time, allows execution movement.

• Complicated command line syntax and dependencies.

• New to 10g, previous scheduler, DBA Jobs, was less efficient.

Page 35: Ora 4 the_sqldba

BACKUP AND RECOVERY

• Backups are performed by a Oracle supplied

product RMAN, (Recovery Manager)

• Extremely robust and flexible.

• Supports full, incremental, archive log backups..

• Can be used for duplicating, cloning and

dataguard, (standby)

• Can be configured through command line, scripts

and the Enterprise Manager.

Page 36: Ora 4 the_sqldba

REVIEW & QUESTIONS

• Oracle is a very robust RDBMS platform.

• Differences are many, but its main goal is the same as SQL Server.

• The goal to learning to be an Oracle DBA is to keep an open mind

and embrace that with added features, comes added management.

Thank you!