Oracle database 12c sql and plsql new features and development best practices

24
Oracle Database 12c SQL and PL/SQL New features and Development Best Practices Ami Aharonovich Uri Margalit

description

slides from our last Webinar

Transcript of Oracle database 12c sql and plsql new features and development best practices

Page 1: Oracle database 12c sql and plsql new features and development best practices

Oracle Database 12c SQL and PL/SQL New features and Development Best PracticesAmi AharonovichUri Margalit

Page 2: Oracle database 12c sql and plsql new features and development best practices

2

• You will be on mute for the duration of the event

• We are now talking so please type a message in the Questions box in the Control Panel if you can’t hear us (please check your speakers and GoToWebinar audio settings first)

• There will be a Q+A session at the end, you can start submitting you questions on the Q&A bar on your gotowebinar dashboard.

• A recording of the full webinar will be put up online

Before We Begin

Page 3: Oracle database 12c sql and plsql new features and development best practices

3

Presenters

Ami Aharonovich• Oracle ACE & OCP• Founder & CEO of DBAces• President of ilOUG (Israel Oracle User

Group)

Uri Margalit• Director of Products at DBmaestro

Page 4: Oracle database 12c sql and plsql new features and development best practices

4

Streamline Database Development Process

Reduce DatabaseDevelopment Costs

Instill Change Policy Enforcement

Mitigate Deployment Risks

Automate Deployment Process

Reduce Deployment cost by 95%

DBmaestro: DevOps for Database

Page 5: Oracle database 12c sql and plsql new features and development best practices

5

• Doing better with less• Reacting quickly to market needs• Getting ahead of competition

• Just can’t wait 6 months for that next release…• Agile Development• Process Automation• DevOps

Agile world…

Page 6: Oracle database 12c sql and plsql new features and development best practices

6

Why Manage Change?

Copyright@2008, Juniper Networks, Inc.

of unplanned downtime is due to Change

50% of this, half is due human errors

40% of changes fail

80%

50% More than

Page 7: Oracle database 12c sql and plsql new features and development best practices

7

• The database holds your essential information

• Changes can impact the entire system• Need to be synchronized with other changes• Often overlooked

Database is a Key Component

Page 8: Oracle database 12c sql and plsql new features and development best practices

8

• Old adage but true• The database is often “forgotten” and

therefore can become the weakest link• Essential from a compliance point of view• Should be the strongest link

• “Using NoSQL can eliminate the step of data migrations and schema changes, often manual steps or exceptions to a continuous delivery workflow” http://en.wikipedia.org/wiki/Continuous_delivery

(Rarely a practical option…)

The Weakest Link In a Chain

Page 9: Oracle database 12c sql and plsql new features and development best practices

9

• There is more to a database than SQL scripts• Schema structure• Code• Content and meta-content• Internal dependencies• …

• Ensure that changes are not made without authorization

• Ensure no out-of-process changes

Reaching Inside the Database

Page 10: Oracle database 12c sql and plsql new features and development best practices

10

• Which Method your organization utilize?• Application Version Control • Database Version Control• Application Lifecycle Management• Agile• DevOps

Poll – What do you utilize

Page 11: Oracle database 12c sql and plsql new features and development best practices

11

• Database Enforced Change Management• Database version control• Plugs into the ALM (change request, tickets & work items)• Database change impact analysis• Database deployment automation

• DevOps Solution for databases • Deployment, rollback & recovery• Plugs into release management

What is DBmaestro TeamWork

Page 12: Oracle database 12c sql and plsql new features and development best practices

12

Two isolated Processes

Version Control Process (file based)

Development Process

Check-Out Script

Modify Script

Get updated Script from DB

Check-In Script

Compile Scriptin DB

Debug Scriptin DB

?

??

?

A

A’

Page 13: Oracle database 12c sql and plsql new features and development best practices

13

• Major challenge… • Risky if done incorrectly…

• Conflicts & Merges• Code overrides• Outdated update scripts

• Need Impact analysis processes• Traceability and transparency• Audit and compliance

• Automating problems into production is a major risk!!!

Database deployment automation

Page 14: Oracle database 12c sql and plsql new features and development best practices

14

With DECM - One Enforced Process

Database & Version Control Process

Check-Out Object

Modify Object in DB

Run Applications’

Tests

Check-In Object

Page 15: Oracle database 12c sql and plsql new features and development best practices

15

If a Picture is Worth a Thousand Words…

Version Control Demo

Page 16: Oracle database 12c sql and plsql new features and development best practices

16

• How much do you automate your database deployment?• None, script is written manually• Generating script automatically, review

manually• Internally within development• Development -> QA• Development -> QA -> Pre prod

Poll – Level of automation

Page 17: Oracle database 12c sql and plsql new features and development best practices

17

Database Deployment Methods

• Build Once Deploy Many• Execute same script across all environments• Saved in file-based version control• Check-In is done before change being tested• Not aware to changes made out of process

• Build & Deploy On Demand (best practice)• Aware of out of process changes• Handles the same script challenges• Alerts on conflicts between environments• Up-to-date script

Page 18: Oracle database 12c sql and plsql new features and development best practices

18

X1.11.1.11.11.21.31.41.51.61.7

Build Once Deploy Many

Int QA Stage Prod

Database Deploy Script

Environment

Re-Base (due to defects)

DevDev

DevModel

1.1 1.2

1.2 1.3

1.3 1.4

1.4 1.5

1.5 1.6

1.6 1.7

1.11.11.41.7

1.1 1.2

1.2 1.3

1.3 1.4

1.4 1.5

1.5 1.6

1.6 1.7

1.1 1.2

1.2 1.3

1.3 1.4

1.4 1.5

1.5 1.6

1.6 1.7

Out of Process Change

X

X

X

X

X

? 1.1.1

Page 19: Oracle database 12c sql and plsql new features and development best practices

19

1.11.21.31.41.51.61.7

Build & Deploy On Demand

*

Int QA Stage Prod

Database Deploy Script

Environment* Execute the same script being executed at the Stage environment

Re-Base (due to defects)

DevDev

DevModel

1.1 1.2

1.2 1.3

1.3 1.4

1.4 1.5

1.5 1.6

1.6 1.7

1.1 1.4

1.4 1.7

1.1 1.7

1.1 1.1 1.11.41.7

File Based Version Control

Out of Process Change

1.1.11.7 1.1.11.7

Page 20: Oracle database 12c sql and plsql new features and development best practices

20

Deployment Automation Safety Net

Simple Compare & Sync Baseline Aware Deployment

Source vs. Target

Action

= No Action

≠ ?

Source vs. Baseline

Target vs. Baseline

Action

= = No Action

≠ = Take Source

= ≠ Keep Target

≠ ≠ Merge Conflict

You do not have all of the information

With Baselines and 3 way analysis the unknown is now known

Page 21: Oracle database 12c sql and plsql new features and development best practices

21

Real Life Deployment…

Baseline Deployment Demo

Page 22: Oracle database 12c sql and plsql new features and development best practices

22

Your Benefits

• All changes are documented• Eliminate out-of-process changes• Support sandbox, shared, mixed and

branch methodologies• Enforce development best practices methods• Have a bullet-proof deployment automation• Leverage baseline-based impact analysis• Enable database continuous delivery

Page 23: Oracle database 12c sql and plsql new features and development best practices

23

Q & A

Page 24: Oracle database 12c sql and plsql new features and development best practices