Kako razvijate PL/SQL pakete? File based PL/SQL development Mitja Golouh SIOUG 2006, 11.10.2006.

Slides:



Advertisements
Similar presentations
Oracle SQL Developer Data Modeler 3.0: Technical Overview March 2011.
Advertisements

Company Confidential 1 © 2005 Nokia DBUpgradeTool_ ppt / / JMa A Database Upgrade Tool Nokia Networks Jukka Maaranen.
Utility SQL Bin (v3.3). Agenda  Purpose  Target User  Benefits  System Requirement  User Guide Introduction Navigation Add New SQL Add New Version.
Test Case Management and Results Tracking System October 2008 D E L I V E R I N G Q U A L I T Y (Short Version)
Improving your OpenEdge® Development Productivity David Lund Sr. Training Program Manager, Progress.
1 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Building Enterprise Applications Using Visual Studio ®.NET Enterprise Architect.
A Guide to Oracle9i1 Advanced SQL And PL/SQL Topics Chapter 9.
CS 501 : An Introduction to SCM & GForge An Introduction to SCM & GForge Lin Guo
Low level CASE: Source Code Management. Source Code Management  Also known as Configuration Management  Source Code Managers are tools that: –Archive.
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle SQL Developer What’s New in Version 4.1 Jeff Smith
Improving Software Quality with Continuous Integration
Continuous Integration for Databases Learn how to automate your build and test Steve Jones Red Gate Software Part II of the Continuous Delivery for Databases.
Michael Solomon Tugboat Software Managing the Software Development Process.
Project Implementation for COSC 5050 Distributed Database Applications Lab1.
Standards for Technology in Automotive Retail STAR Workbench 1.0 Michelle Vidanes & Dave Carver STAR XML Data Architects, Certified Scrum Masters.
SubVersioN – the new Central Service at DESY by Marian Gawron.
Version Control with git. Version Control Version control is a system that records changes to a file or set of files over time so that you can recall.
Oracle SQL Developer Kris Rice Director - Database Tools Research.
CONTINUOUS INTEGRATION, DELIVERY & DEPLOYMENT ONE CLICK DELIVERY.
Multi Duty Tool for Smallworld™ solution providers.
Chapter - 2 What is “GIT” VERSION CONTROL AND GIT BASICS.
Oracle9 i JDeveloper for Database Developers and DBAs Brian Fry Principal Product Manager Oracle JDeveloper Oracle Corporation.
4 Copyright © 2009, Oracle. All rights reserved. Designing Mappings with the Oracle Data Integration Enterprise Edition License.
Admin Tool June 11, Admin Tool Overview Architecture Implementation Dependencies Futures 2.
Source Control Repositories for Team Collaboration: SVN, TFS, Git.
Subversion, an Open Source Version Control System An Introduction.
Database Technical Session By: Prof. Adarsh Patel.
1 Software Development Configuration management. \ 2 Software Configuration  Items that comprise all information produced as part of the software development.
© All rights reserved. U.S International Tech Support
1 SEG4912 University of Ottawa by Jason Kealey Software Engineering Capstone Project Tools and Technologies.
Chapter 2: SQL – The Basics Objectives: 1.The SQL execution environment 2.SELECT statement 3.SQL Developer & SQL*Plus.
DEV-05: Ratcheting up your OpenEdge™ Development Productivity Sunil S Belgaonkar Principal Software Engineer.
Copyright © 2015 – Curt Hill Version Control Systems Why use? What systems? What functions?
Oracle Data Integrator Procedures, Advanced Workflows.
Chris Wright Senior Systems Engineer, Lucity MOVING TO ONE DATABASE FOR SQL SERVER.
7 1 Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
17 Copyright © Oracle Corporation, All rights reserved. Recovery Catalog Creation and Maintenance.
CERN - IT Department CH-1211 Genève 23 Switzerland t DB Development Tools Benthic SQL Developer Application Express WLCG Service Reliability.
Productivity Tools Ken Nguyen Department of Information Technology Clayton State University.
1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)
1 / 22 AliRoot and AliEn Build Integration and Testing System.
Software Maintenance Speaker: Jerry Gao Ph.D. San Jose State University URL: Sept., 2001.
© 2008 by Shawn Spiars; made available under the EPL v1.0 | March 17, 2008 Case Study – Phurnace Software and RCP Shawn Spiars Lead UI Developer Phurnace.
DATABASE DEVELOPMENT WITH VSTS DATABASE EDITION By Chris Dahlberg ©2009 Aspect Software, Inc. All rights reserved. 1.
9 Copyright © 2009, Oracle. All rights reserved. Deploying and Reporting on ETL Jobs.
12 Copyright © 2009, Oracle. All rights reserved. Managing Backups, Development Changes, and Security.
Transactions, Roles & Privileges Oracle and ANSI Standard SQL Lecture 11.
SPI NIGHTLIES Alex Hodgkins. SPI nightlies  Build and test various software projects each night  Provide a nightlies summary page that displays all.
3 Copyright © 2007, Oracle. All rights reserved. Using the RMAN Recovery Catalog.
Continuous Integration for Databases Steve Jones SQLServerCentral Red Gate Software.
JRA1 Meeting – 09/02/ Software Configuration Management and Integration EGEE is proposed as a project funded by the European Union under contract.
Integrating and Extending Workflow 8 AA301 Carl Sykes Ed Heaney.
1 Punishment Through Continuous Delivery If it hurts, do it more often…
Developing SQL/Server database in Visual Studio Introducing SQL /Server Data Tools Peter Lu.Net Practices Director Principle Architect Nexient March 19.
E Copyright © 2006, Oracle. All rights reserved. Using SQL Developer.
1 Ivan Marsic Rutgers University LECTURE 2: Software Configuration Management.
1 Copyright © 2005, Oracle. All rights reserved. Oracle Database Administration: Overview.
C Copyright © 2009, Oracle. All rights reserved. Using SQL Developer.
Agenda for Today  DATABASE Definition What is DBMS? Types Of Database Most Popular Primary Database  SQL Definition What is SQL Server? Versions Of SQL.
1 Middle East Users Group 2008 Self-Service Engine & Process Rules Engine Presented by: Ryan Flemming Friday 11th at 9am - 9:45 am.
Presented by: K.AMARNATH Ht.no:10841f0045 Guided by: T.Suneetha.
SQL Server deployments
Maximum Availability Architecture Enterprise Technology Centre.
Maintaining software solutions
Continuous Integration For Databases
Using JDeveloper.
Presented by : Chirag Dani & Dhaval Shah
SSDT and Database Project Basics
INTRODUCTION A Database system is basically a computer based record keeping system. The collection of data, usually referred to as the database, contains.
Presentation transcript:

Kako razvijate PL/SQL pakete? File based PL/SQL development Mitja Golouh SIOUG 2006,

2 Schema deployment Scripts and schema versioning PL/SQL development cycle Creating database schema from scripts Sqlmake - automated deploy tool Agenda

3 The word schema comes from the Greek word "σχήμα" (skhēma), which means shape or more generally plan. A database schema is a collection of logical structures of data, or schema objects. A schema is owned by a database user and has the same name as that user. What is database schema?

4 Schema and application Client Application server.net, J2EE, Oracle Forms Database database schema Application Application server.net, J2EE, Oracle Forms Database database schema New release of application.ear,.msi SQL*Plus scripts.fmx manually

5 Deploying schema What to deploy Schema objects (physical attributes!) Non schema objects Data Privileeges Deployment type Empty schema Upgrade existing schema

6 How to deploy? Non repeatable Hm, no need, I am developing in production Generate from Designer into database Use tools to compare and synchronize two schemas Repeatable Scripts

7 Script is not working Package has errors when we compile in target environment Index already exists Update table has failed App - schema synchronization Database schema version is not in sync with application release Deployment gap is finalized manually Deployment problems

8 The gap Differences between What is in target schema and What we think is in target schema Source of differences Loose deployment organization and control Manual interaction during deployment 3rd party interaction in between

9 Scripts Different types of database objects Create (tables, indexes,...) Create or Replace (PL/SQL packages, views,...) Data (insert, “import”) Upgrade (alter, update, drop,...) How to group objects Single big install script One object per script Somewhere in between

10 Creating scripts Generate scripts Data modeling tools like Oracle Designer Compare two schemas for differencies PL/SQL IDE tools Oracle SQL Developer (Raptor) Toad PL/SQL Developer Manually

11 Upgrade scripts Upgrade script is... New objects (data and privileges) Modified objects (and data) Droped objects (data and privileges) Usually created By hand Using compare schemas By developer responsible for modification

12 Testing scripts How to setup test environment? Upgrade existing test schema Set up in empty schema (import or create all objects and test data from scripts) Tests (and also deployments) can fail – how to rollback DDL changes? CREATE SCHEMA but no ALTER SCHEMA RESTORE POINT + FLASHBACK Set up a new test environment Manual “rollback”

13 Deploying upgrade scripts Schema v1 Schema v2 Schema v3 Data v1 Data v2 Data v3 UPGRADE SCRIPT UPGRADE SCRIPT Different approaches to upgrade scripts –Single big upgrade script –Small atomical upgrade scripts Use prepared and tested upgrade scripts Who does the deployment? Know what was deployed!

14 Base Release 2 Customer 1 Release 1 Customer 2 Release 1 Customer 3 Release 2 Customer 2 Release 2 Base Release 1 The challange

15 Schema versioning Can we version database schema? Google keywords: schema evolution, schema versioning Source Configuration Management (SCM) Clear Case, Subversion, Perforce, CVS Multiple developers Multiple target environments (branches) Change request tracking History tracking

16 How to use SCM Data modeling tool Version generated scripts One big file or many small files PL/SQL development Integrate into development cycle One package = one file Data Version insert scripts

17 Introduced in version 6i It looked promising but … Statement of direction Oracle SCM has been placed into maintenance mode. This means that Oracle will continue to fix bugs but there will be no new features added to the product. Not very user friendly PL/SQL development Oracle Designer SCM

18 Inbuilt functionality with PL/SQL development tools TOAD (Team coding, Project Manager) PL/SQL Developer (Project, VCS plugin) SQL Developer (sorry, not there yet) Versioning software works with file system 3rd party SCM

19 Frequent changes No need for upgrade scripts due to CREATE or REPLACE syntax Can deploy previous version File based development and versioning supported by development tools Versioning PL/SQL code

20 Use source files Open from filesystem Edit Compile Save Checkin to SCM Instead of Open from database Edit Compile PL/SQL development cycle

21 Top wish on new SQL Developer (Raptor) functionality survey File based PL/SQL support Added file browsing support Every database object is scripted in a file Privileeges are scripted in a file Data is scripted in a file Test data System data List of values File based development

22 schema_name tab (.tab,.con,.ind) plsql data schema_name kernel data_entry reports File system

23 Change of philosophy Do you trust your file system? Drop your development or test schema Recreate it from scripts See if anyone complains Single Point Of Control = File system SPOC SPOCK

24 Deploying 10, 100 or 1000 scripts is not easy Alternatives Hand made install scripts Automated deploy tool like Designer Repository install Creating schema from scripts

25 Good example found in utPLSQL install scripts Use SQL*Plus Substitution variables Hard to maintain for large number of files in changing environment Hand made scripts

26 Goal = Synchronize source files and database schema schema_name tab (.tab,.con,.ind) plsql data = Automated tool schema name

27 Sqlmake Automated tool for database schema deployment Predecessor used in live projects Currently in development Ported to.net Adding new features

28 No need to manually create install scripts Easy setup of new schema from release xy For a new developer For testing purposes For bug hunting Easy upgrade of PL/SQL code (all database objects with replace syntax) Controlled deployment of upgrade scripts (all database objects without replace syntax, data) Sqlmake benefits

29 Some obstacles found and solved Database object dependencies Performance (reinstall only modified files) Keep schema version information Upgrade scripts To do Nant integration PL/SQL development tool integration Sqlmake internals

30 SCM can add value to database schema development Automated tools like Sqlmake are helpful in a file based development Take control of your development and deployment Deployment organization is very important for good testing practices Summary

31 ? Mitja Golouh Questions

32 Usefull keywords Versioning tools CVS Subversion File compare tools WinMerge Extract DDL from export files DDL Wizard (Databee)

©2004 HERMES SoftLab. All rights reserved. Logotype is a registered trademark of HERMES SoftLab d.d. All other names/logos may be registered trademarks of their respective owners.