SlideShare une entreprise Scribd logo
1  sur  58
Télécharger pour lire hors ligne
Getting the Most Out of SQL 
Developer User-Defined Reports 
David Mann - Biogen Idec - ECOUG 2014
Topics 
• Context 
• Why use SQL Developer for reports? 
• Canned Report Review 
• Basic User Defined Reports 
• Supplying Parameters to Reports 
• Parent/Child & Drill Down 
• Advanced - Charts, HTML, Command Line Reports 
• Where do you go from here?
Bio 
• Graphic Arts Background 
• Development Background 
• Lead Oracle DBA @ 
• Interests : 
• Tools, Performance, 
Data Visualization
Context 
• GUI Java Application 
• Available for Windows/Mac OS X/Linux 
• Free from Oracle 
• Connects to databases via JDBC 
• No OCI client required (usually) 
• TNS / LDAP / Custom connection 
parameters
Why use SQL 
Developer for reports?
Ease of Use 
• Ready to go infrastructure 
• Multiple OSes supported 
• Quick download and install 
• Just need a JVM + GUI
Features 
• Feature Rich Admin and Query Tool 
• Source Code Control Integration 
• Unit testing 
• Data Modeling 
• DBA Module 
• Vote for features 
• Its a democracy, get some you want, some 
you don’t 
• Access to expertise
Reporting 
• Robust reporting feature set 
• Canned reports 
• User Defined Reports 
• HTML/PDF Output Options 
• Command Line Report Generation 
• Extensible 
• Customizable / Extensions 
• Portable report definitions 
• Sharing is caring
4.0 - Not Your Father’s SQL Developer 
• Faster report development round trips 
• Live Preview in report editor during design 
time 
• 50+ Charting Options 
• Live preview also available for charts 
• Comprehensive reports included out of the box 
• Command Line Report Generation
Personal Reporting Process 
• DBA 1.0? 
• Get out of the query-> export -> 
Excel Graph rut 
• Too cumbersome to repeat reliably 
• Slow to repeat 
• Hard to share with others 
• Hard to motivate others to use your methods 
• Put this power into user’s hands with UDRs
Canned Reports
Canned Reports 
• Lots of useful reports included 
• Database Administration 
• Data Dictionary 
• Object Info 
• Application Express 
• Performance 
• + more
Other Canned Report Uses 
• Good learning tool 
• Copy + Modify 
• Can be the target of your own Drill Down 
reports
Basic User Defined Reports
Create a Simple UDR
Specify Properties
Set SQL Query
Run It
Gauge Example
Building Gauges 
• SQLDEV:GAUGE 
• min:max:low thresh:upper threshold:value
Using Bind Variables
Filter with Binds
Bind Variable Details
“All” Option 
• Provide for optional use of Bind Variables
Parent/Child Reports
• Consist of a pair of related queries 
• Child query refreshed when Parent row clicked 
• Related by bind variable
Parent/Child
Drill Down Reports
Features 
• Like Parent/Child but Child is hidden 
• Multiple Children can be attached to each 
Parent 
• Usage 
• Right click on Parent data element 
• Select drill down report name 
• Helps navigate your data
Creation 
• Create target report 
• Add to parent report* 
• Drilled report has access to bind variables
Navigation 
Forward: 
Back:
Advanced : Charts
Charts
Charts 
• Prepare data series 
• Position 1 : Category Group (Y Axis) 
• Position 2 : Series (Legend) 
• Position 3 : Data Value (X Axis) 
• Choose best representation 
• Customize styles 
• Test it!
Chart Usage 
• Combine Parent Summary chart with Child 
Detail report 
• Can click on chart region to generate child 
report 
• Best of both worlds - digest the summary but 
have access to detail
Save as HTML
Options
Table Report as HTML
Chart Rendered in SQL Dev
Chart as HTML
Advanced : 
Internal HTML Render 
& 
PL/SQL DBMS_OUTPUT
HTML - Internal Render 
• PL/SQL DBMS_OUTPUT or Table Cell 
• Supports HTML subset 
• Supports inline CSS 
• No: 
• Style sheets 
• Javascript
HTML Example 1 
Source 
Code
HTML Example 2 
Source 
Code
HTML Example 3 
Source 
Code
HTML Example 4 
Source 
Code
Advanced: 
HTML External Render 
PL/SQL DBMS_OUTPUT
HTML - External Render 
• Many report types will save to local 
HTML file 
• Formatting decisions made for you 
• Not all features may translate
Advanced: 
Command Line Interface
Command Line 
• Develop in SQL Developer, call from 
Command Line 
• Leverages SQL Developer connection info 
• Can supply Bind variables 
• Con: Heavyweight JVM Startup 
./sdcli reports generate  
-report "User Defined Reports/My Report"  
-db "PDB1 - dmann"  
-file /tmp/test.html  
-bind name=value
Putting It All Together 
• Let’s make the most complicated UDF we can 
• HTML Report 
• External render 
• Javascript referencing external libraries 
• Kick it off via the command line 
• Look at familiar data in a new way
Example Output 
Source 
Code
Behind the Scenes 
• Check the XML 
• Do you feel lucky?
Where Do You Go From Here? 
• Start your own collection of UD Reports 
• SQL Analytic Features 
• Custom Actions 
• What can you automate? 
• SQL Developer Exchange, OTN 
• http://github.com/dmann99/SQLDevUDRepPack 
• “5 in 5” at http://ba6.us
Questions 
Slides, code, links : 
http://ba6.us 
david@ba6.us 
@ba6dotus 
http://github.com/dmann99
References 
• http://www.thatjeffsmith.com/archive/2014/04/ 
how-to-add-custom-actions-to-your-user-reports/ 
• http://www.thatjeffsmith.com/archive/2012/07/ 
customizing-monitor-sessions-in-oracle-sql-developer/
Abstract 
• SQL Developer has proved itself as one of the 
most innovative and useful tools available for 
Oracle users, DBAs, and developers. With the 
release of version 4.0 the included and custom 
report options have been greatly expanded. This 
session will review the different types of reports 
available in SQL developer and review the 
powerful Custom Reports features. Demos will 
include creating simple and complex user defined 
reports, leveraging the new graph types, as well 
as a discussion and demo of the new command 
line HTML reports generation features.

Contenu connexe

Tendances

SSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveSSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveDavide Mauri
 
SQL Explore 2012: P&T Part 3
SQL Explore 2012: P&T Part 3SQL Explore 2012: P&T Part 3
SQL Explore 2012: P&T Part 3sqlserver.co.il
 
SQL Explore 2012: P&T Part 2
SQL Explore 2012: P&T Part 2SQL Explore 2012: P&T Part 2
SQL Explore 2012: P&T Part 2sqlserver.co.il
 
SQL vs. NoSQL. It's always a hard choice.
SQL vs. NoSQL. It's always a hard choice.SQL vs. NoSQL. It's always a hard choice.
SQL vs. NoSQL. It's always a hard choice.Denis Reznik
 
Survey of the Microsoft Azure Data Landscape
Survey of the Microsoft Azure Data LandscapeSurvey of the Microsoft Azure Data Landscape
Survey of the Microsoft Azure Data LandscapeIke Ellis
 
Databases & Microsoft SQL Server
Databases & Microsoft SQL ServerDatabases & Microsoft SQL Server
Databases & Microsoft SQL ServerMahmoud Abdallah
 
Oracle to Postgres Schema Migration Hustle
Oracle to Postgres Schema Migration HustleOracle to Postgres Schema Migration Hustle
Oracle to Postgres Schema Migration HustleEDB
 
MongoDB - An Agile NoSQL Database
MongoDB - An Agile NoSQL DatabaseMongoDB - An Agile NoSQL Database
MongoDB - An Agile NoSQL DatabaseGaurav Awasthi
 
Geek Sync | Azure Cloud & You: First Steps for the DBA
Geek Sync | Azure Cloud & You: First Steps for the DBAGeek Sync | Azure Cloud & You: First Steps for the DBA
Geek Sync | Azure Cloud & You: First Steps for the DBAIDERA Software
 
What is NoSQL and CAP Theorem
What is NoSQL and CAP TheoremWhat is NoSQL and CAP Theorem
What is NoSQL and CAP TheoremRahul Jain
 
MS DevDay - SQLServer 2014 for Developers
MS DevDay - SQLServer 2014 for DevelopersMS DevDay - SQLServer 2014 for Developers
MS DevDay - SQLServer 2014 for DevelopersДенис Резник
 
EDB's Migration Portal - Migrate from Oracle to Postgres
EDB's Migration Portal - Migrate from Oracle to PostgresEDB's Migration Portal - Migrate from Oracle to Postgres
EDB's Migration Portal - Migrate from Oracle to PostgresEDB
 
SQLDay2013_Denny Cherry - Table indexing for the .NET Developer
SQLDay2013_Denny Cherry - Table indexing for the .NET DeveloperSQLDay2013_Denny Cherry - Table indexing for the .NET Developer
SQLDay2013_Denny Cherry - Table indexing for the .NET DeveloperPolish SQL Server User Group
 
Cloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure toolsCloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure toolsPushkar Chivate
 

Tendances (20)

SSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveSSIS Monitoring Deep Dive
SSIS Monitoring Deep Dive
 
Tableau API
Tableau APITableau API
Tableau API
 
SQL Explore 2012: P&T Part 3
SQL Explore 2012: P&T Part 3SQL Explore 2012: P&T Part 3
SQL Explore 2012: P&T Part 3
 
Apex ace update
Apex ace updateApex ace update
Apex ace update
 
SQL Explore 2012: P&T Part 2
SQL Explore 2012: P&T Part 2SQL Explore 2012: P&T Part 2
SQL Explore 2012: P&T Part 2
 
Drop acid
Drop acidDrop acid
Drop acid
 
SQL vs. NoSQL. It's always a hard choice.
SQL vs. NoSQL. It's always a hard choice.SQL vs. NoSQL. It's always a hard choice.
SQL vs. NoSQL. It's always a hard choice.
 
Survey of the Microsoft Azure Data Landscape
Survey of the Microsoft Azure Data LandscapeSurvey of the Microsoft Azure Data Landscape
Survey of the Microsoft Azure Data Landscape
 
Sql implementations
Sql implementationsSql implementations
Sql implementations
 
Databases & Microsoft SQL Server
Databases & Microsoft SQL ServerDatabases & Microsoft SQL Server
Databases & Microsoft SQL Server
 
An AMIS overview of database 12c
An AMIS overview of database 12cAn AMIS overview of database 12c
An AMIS overview of database 12c
 
Oracle to Postgres Schema Migration Hustle
Oracle to Postgres Schema Migration HustleOracle to Postgres Schema Migration Hustle
Oracle to Postgres Schema Migration Hustle
 
MongoDB - An Agile NoSQL Database
MongoDB - An Agile NoSQL DatabaseMongoDB - An Agile NoSQL Database
MongoDB - An Agile NoSQL Database
 
Geek Sync | Azure Cloud & You: First Steps for the DBA
Geek Sync | Azure Cloud & You: First Steps for the DBAGeek Sync | Azure Cloud & You: First Steps for the DBA
Geek Sync | Azure Cloud & You: First Steps for the DBA
 
What is NoSQL and CAP Theorem
What is NoSQL and CAP TheoremWhat is NoSQL and CAP Theorem
What is NoSQL and CAP Theorem
 
MS DevDay - SQLServer 2014 for Developers
MS DevDay - SQLServer 2014 for DevelopersMS DevDay - SQLServer 2014 for Developers
MS DevDay - SQLServer 2014 for Developers
 
EDB's Migration Portal - Migrate from Oracle to Postgres
EDB's Migration Portal - Migrate from Oracle to PostgresEDB's Migration Portal - Migrate from Oracle to Postgres
EDB's Migration Portal - Migrate from Oracle to Postgres
 
Rdbms vs. no sql
Rdbms vs. no sqlRdbms vs. no sql
Rdbms vs. no sql
 
SQLDay2013_Denny Cherry - Table indexing for the .NET Developer
SQLDay2013_Denny Cherry - Table indexing for the .NET DeveloperSQLDay2013_Denny Cherry - Table indexing for the .NET Developer
SQLDay2013_Denny Cherry - Table indexing for the .NET Developer
 
Cloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure toolsCloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure tools
 

Similaire à DMann-SQLDeveloper4Reporting

Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011
Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011
Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011camp_drupal_ua
 
SQL Server Konferenz 2014 - SSIS & HDInsight
SQL Server Konferenz 2014 - SSIS & HDInsightSQL Server Konferenz 2014 - SSIS & HDInsight
SQL Server Konferenz 2014 - SSIS & HDInsightTillmann Eitelberg
 
Bringing DevOps to the Database
Bringing DevOps to the DatabaseBringing DevOps to the Database
Bringing DevOps to the DatabaseMichaela Murray
 
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...Lucidworks
 
Power BI vs Tableau
Power BI vs TableauPower BI vs Tableau
Power BI vs TableauDon Hyun
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Dutyreedmaniac
 
Oracle hadoop let them talk together !
Oracle hadoop let them talk together !Oracle hadoop let them talk together !
Oracle hadoop let them talk together !Laurent Leturgez
 
SQL in Version Control using SQL Server Database Projects
SQL in Version Control using SQL Server Database ProjectsSQL in Version Control using SQL Server Database Projects
SQL in Version Control using SQL Server Database Projectsfloydhilton
 
Migrating Data and Databases to Azure
Migrating Data and Databases to AzureMigrating Data and Databases to Azure
Migrating Data and Databases to AzureKaren Lopez
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyLeslie Doherty
 
Data Vault Automation at the Bijenkorf
Data Vault Automation at the BijenkorfData Vault Automation at the Bijenkorf
Data Vault Automation at the BijenkorfRob Winters
 

Similaire à DMann-SQLDeveloper4Reporting (20)

Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011
Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011
Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011
 
SQL Server Konferenz 2014 - SSIS & HDInsight
SQL Server Konferenz 2014 - SSIS & HDInsightSQL Server Konferenz 2014 - SSIS & HDInsight
SQL Server Konferenz 2014 - SSIS & HDInsight
 
Taming the shrew Power BI
Taming the shrew Power BITaming the shrew Power BI
Taming the shrew Power BI
 
Bringing DevOps to the Database
Bringing DevOps to the DatabaseBringing DevOps to the Database
Bringing DevOps to the Database
 
ow.ppt
ow.pptow.ppt
ow.ppt
 
ow.ppt
ow.pptow.ppt
ow.ppt
 
Ow
OwOw
Ow
 
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
 
Power BI vs Tableau
Power BI vs TableauPower BI vs Tableau
Power BI vs Tableau
 
Power bi vs tableau
Power bi vs tableauPower bi vs tableau
Power bi vs tableau
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
 
presentation
presentationpresentation
presentation
 
Oracle hadoop let them talk together !
Oracle hadoop let them talk together !Oracle hadoop let them talk together !
Oracle hadoop let them talk together !
 
SQL in Version Control using SQL Server Database Projects
SQL in Version Control using SQL Server Database ProjectsSQL in Version Control using SQL Server Database Projects
SQL in Version Control using SQL Server Database Projects
 
Datastage Introduction To Data Warehousing
Datastage Introduction To Data WarehousingDatastage Introduction To Data Warehousing
Datastage Introduction To Data Warehousing
 
Oracle OpenWo2014 review part 03 three_paa_s_database
Oracle OpenWo2014 review part 03 three_paa_s_databaseOracle OpenWo2014 review part 03 three_paa_s_database
Oracle OpenWo2014 review part 03 three_paa_s_database
 
Migrating Data and Databases to Azure
Migrating Data and Databases to AzureMigrating Data and Databases to Azure
Migrating Data and Databases to Azure
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
 
presentation
presentationpresentation
presentation
 
Data Vault Automation at the Bijenkorf
Data Vault Automation at the BijenkorfData Vault Automation at the Bijenkorf
Data Vault Automation at the Bijenkorf
 

DMann-SQLDeveloper4Reporting

  • 1. Getting the Most Out of SQL Developer User-Defined Reports David Mann - Biogen Idec - ECOUG 2014
  • 2. Topics • Context • Why use SQL Developer for reports? • Canned Report Review • Basic User Defined Reports • Supplying Parameters to Reports • Parent/Child & Drill Down • Advanced - Charts, HTML, Command Line Reports • Where do you go from here?
  • 3. Bio • Graphic Arts Background • Development Background • Lead Oracle DBA @ • Interests : • Tools, Performance, Data Visualization
  • 4. Context • GUI Java Application • Available for Windows/Mac OS X/Linux • Free from Oracle • Connects to databases via JDBC • No OCI client required (usually) • TNS / LDAP / Custom connection parameters
  • 5. Why use SQL Developer for reports?
  • 6. Ease of Use • Ready to go infrastructure • Multiple OSes supported • Quick download and install • Just need a JVM + GUI
  • 7. Features • Feature Rich Admin and Query Tool • Source Code Control Integration • Unit testing • Data Modeling • DBA Module • Vote for features • Its a democracy, get some you want, some you don’t • Access to expertise
  • 8. Reporting • Robust reporting feature set • Canned reports • User Defined Reports • HTML/PDF Output Options • Command Line Report Generation • Extensible • Customizable / Extensions • Portable report definitions • Sharing is caring
  • 9. 4.0 - Not Your Father’s SQL Developer • Faster report development round trips • Live Preview in report editor during design time • 50+ Charting Options • Live preview also available for charts • Comprehensive reports included out of the box • Command Line Report Generation
  • 10.
  • 11. Personal Reporting Process • DBA 1.0? • Get out of the query-> export -> Excel Graph rut • Too cumbersome to repeat reliably • Slow to repeat • Hard to share with others • Hard to motivate others to use your methods • Put this power into user’s hands with UDRs
  • 13. Canned Reports • Lots of useful reports included • Database Administration • Data Dictionary • Object Info • Application Express • Performance • + more
  • 14. Other Canned Report Uses • Good learning tool • Copy + Modify • Can be the target of your own Drill Down reports
  • 21. Building Gauges • SQLDEV:GAUGE • min:max:low thresh:upper threshold:value
  • 25. “All” Option • Provide for optional use of Bind Variables
  • 27. • Consist of a pair of related queries • Child query refreshed when Parent row clicked • Related by bind variable
  • 30. Features • Like Parent/Child but Child is hidden • Multiple Children can be attached to each Parent • Usage • Right click on Parent data element • Select drill down report name • Helps navigate your data
  • 31. Creation • Create target report • Add to parent report* • Drilled report has access to bind variables
  • 35. Charts • Prepare data series • Position 1 : Category Group (Y Axis) • Position 2 : Series (Legend) • Position 3 : Data Value (X Axis) • Choose best representation • Customize styles • Test it!
  • 36. Chart Usage • Combine Parent Summary chart with Child Detail report • Can click on chart region to generate child report • Best of both worlds - digest the summary but have access to detail
  • 40. Chart Rendered in SQL Dev
  • 42. Advanced : Internal HTML Render & PL/SQL DBMS_OUTPUT
  • 43. HTML - Internal Render • PL/SQL DBMS_OUTPUT or Table Cell • Supports HTML subset • Supports inline CSS • No: • Style sheets • Javascript
  • 44. HTML Example 1 Source Code
  • 45. HTML Example 2 Source Code
  • 46. HTML Example 3 Source Code
  • 47. HTML Example 4 Source Code
  • 48. Advanced: HTML External Render PL/SQL DBMS_OUTPUT
  • 49. HTML - External Render • Many report types will save to local HTML file • Formatting decisions made for you • Not all features may translate
  • 51. Command Line • Develop in SQL Developer, call from Command Line • Leverages SQL Developer connection info • Can supply Bind variables • Con: Heavyweight JVM Startup ./sdcli reports generate -report "User Defined Reports/My Report" -db "PDB1 - dmann" -file /tmp/test.html -bind name=value
  • 52. Putting It All Together • Let’s make the most complicated UDF we can • HTML Report • External render • Javascript referencing external libraries • Kick it off via the command line • Look at familiar data in a new way
  • 54. Behind the Scenes • Check the XML • Do you feel lucky?
  • 55. Where Do You Go From Here? • Start your own collection of UD Reports • SQL Analytic Features • Custom Actions • What can you automate? • SQL Developer Exchange, OTN • http://github.com/dmann99/SQLDevUDRepPack • “5 in 5” at http://ba6.us
  • 56. Questions Slides, code, links : http://ba6.us david@ba6.us @ba6dotus http://github.com/dmann99
  • 57. References • http://www.thatjeffsmith.com/archive/2014/04/ how-to-add-custom-actions-to-your-user-reports/ • http://www.thatjeffsmith.com/archive/2012/07/ customizing-monitor-sessions-in-oracle-sql-developer/
  • 58. Abstract • SQL Developer has proved itself as one of the most innovative and useful tools available for Oracle users, DBAs, and developers. With the release of version 4.0 the included and custom report options have been greatly expanded. This session will review the different types of reports available in SQL developer and review the powerful Custom Reports features. Demos will include creating simple and complex user defined reports, leveraging the new graph types, as well as a discussion and demo of the new command line HTML reports generation features.