Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | SQLcl: SQL Developer Meets SQL*Plus A New Command Line Interface for Oracle Database Jeff Smith Senior Principal Product Manager Jeff.d.smith@oracle.com || @thatjeffsmith Database Tools, Oracle Corp Oracle Confidential – Internal/Restricted/Highly Restricted
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Improve application developers experience  Who, What, Why?  Talk It  Show It  Questions As We Go, Mostly Agenda
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle SQL Tools History User Friendly Interface  UFI 1979 SQLDev 1.1  SQL Worksheet with Script Engine (F5)  Basic SQL*Plus Support  Ships with 11gR1 SQL*Plus  UFI Advanced  Ships with Oracle v5 20071985 2008 2015 2016 SQLcl Early Adopter  takes existing SQL*Plus engine in SQL Developer to a new CLI sqlplusW & iSQL*Plus discontinued  no longer shipped as of Oracle Database 11g 1998 iSQL*Plus  Web Based SQL*Plus  Ships with 8i (Internet) 1993 SQL*Plus GUI  sqlplusW.exe  Windows ONLY SQLcl Released  support tied to Database  stand-alone or bundled  ships with 12cR2
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Hot Technology from 1985 Merkur XR4Ti
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  The Goonies  MacGyver  Wake Me Up Before You Go-Go  SQL*Plus, replaces User Friendly Interface (UFI) Other Popular Things from 1985
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  FREE Oracle Database IDE/GUI  Windows, OS X, *NIX  More than 4,500,000 users worldwide  My Oracle Support available via your DB license
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | SQL Developer Script Engine Existing SQL*Plus Scripting Support in the GUI  SQL*Plus command support  User friendly interface for running queries, scripts, and reports  What if…?
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | …We Could Take the Helpful GUI Elements to a CLI?  Object Name/Command Completion  SQL Execution History & Recall  Query Result Formatting  User friendly text editing
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Hot Technology from 1997
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | A new way to work with Oracle Database… …brought to you from the makers of SQL Developer
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | SQLcl: a modern take on SQL*Plus Included with SQL Developer, also available as a separate download/program  Java 8 JRE or higher  Small download  Unzip & Go  No Client Required Supports all of your favorite SQL*Plus Commands
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Why?  Not everyone likes a GUI for every task  SQL*Plus is great but lacks many modern features  Can we improve our users’ everyday experience with our technology? Improve application developers experience
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Getting Started  Download  unzip  run ‘sql’  How to ‘install’
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Run Anywhere
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Connections Supports:  EZConnect  TNS  LDAP  Proxy  G/Login.SQL  /nolog  Native SSH tunnels  Easy Wallet Config Add -oci to connect string for thick connections
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | TNS Too  TNS_ADMIN Variable tells us where to look
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | New Dog, Old Tricks?
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Old stuff is still there, not going away…  COLUMN SALARY FORMAT $99,990  C/oldval/newval  DESC  & and &&  pretty much everything else you LOVE about SQL*Plus
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Commands:  Highlighted and Doc in Help  ALIAS  APEX  BRIDGE  CD  CTAS  DDL  FORMAT  HISTORY  INFORMATION (INFO & INFO+)  SSHTUNNEL What’s New?
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Customize/Pimp Your Ride
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Fun set sqlprompt "@|blue _USER|@@@|green_CONNECT_IDENTIFIER|@@|blue >|@"
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | SYS@orcl >alias plan = SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR) SYS@orcl >alias plan2 = SELECT * FROM TABLE (DBMS_XPLAN.DISPLAY_CURSOR( :ID, :CHILD)) Practical: Re-use Your Commands & Scripts With ALIAS
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Commands: Alias Make your own ‘commands’ – map SQL w/binds to an alias Example:  Show me all tables who have columns using :DATA_TYPE
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Commands: CTAS DDL sent to BUFFER – edit or execute
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Commands: DDL  generate object DDL  create scripts using DDL & SPOOL commands
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |  Automatically format query results  SET SQLFORMAT csv  html  xml  json  csv  insert  loader  ansiconsole DEMO – Output Formatting
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | ANSICONSOLE??? Escape Sequences to Effect Console Output Fancy Output, LOOP(  get a PAGE…  ‘smart’ size Columns…  PAGE++  )
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | ANSICONSOLE Formatting Fetch page, format column sizes, print, continue… SET sqlformat ansiconsole
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Demo, ANSI Console Coloring
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | DEMO – SQL History Statement Execution History  Last 100 statements  Persist between sessions  Cycle through using UP/DN  Full List  Also Tracks Total Execution Time & # of Executions  Filter Types of Commands saved in History
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | INFOrmation– a better DESCribe Object Metadata Example: Tables  Keys  Comments  INMEMORY status  Stats  Indexes
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Demo, Object Completion Think ‘the Ctrl+Spacebar stuff’ in SQL Developer  activated with a <TAB>  object, column names, and keywords
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Demo, Command Completion ALTER SESSION {ENABLE | DISABLE | FORCE} PARALLEL {DML|DDL|QUERY} [PARALLEL int]
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Client Side Scripting? (JavaScript)
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | YouTube Overview (10 Minutes) Barry’s Blog Kris’ Blog How to install & connect OTN Home Page, Downloads, FAQs, Release Notes, & More Resources
SQLcl overview - A new Command Line Interface for Oracle Database

SQLcl overview - A new Command Line Interface for Oracle Database

  • 2.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | SQLcl: SQL Developer Meets SQL*Plus A New Command Line Interface for Oracle Database Jeff Smith Senior Principal Product Manager Jeff.d.smith@oracle.com || @thatjeffsmith Database Tools, Oracle Corp Oracle Confidential – Internal/Restricted/Highly Restricted
  • 3.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | Improve application developers experience  Who, What, Why?  Talk It  Show It  Questions As We Go, Mostly Agenda
  • 4.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | Oracle SQL Tools History User Friendly Interface  UFI 1979 SQLDev 1.1  SQL Worksheet with Script Engine (F5)  Basic SQL*Plus Support  Ships with 11gR1 SQL*Plus  UFI Advanced  Ships with Oracle v5 20071985 2008 2015 2016 SQLcl Early Adopter  takes existing SQL*Plus engine in SQL Developer to a new CLI sqlplusW & iSQL*Plus discontinued  no longer shipped as of Oracle Database 11g 1998 iSQL*Plus  Web Based SQL*Plus  Ships with 8i (Internet) 1993 SQL*Plus GUI  sqlplusW.exe  Windows ONLY SQLcl Released  support tied to Database  stand-alone or bundled  ships with 12cR2
  • 5.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | Hot Technology from 1985 Merkur XR4Ti
  • 6.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. |  The Goonies  MacGyver  Wake Me Up Before You Go-Go  SQL*Plus, replaces User Friendly Interface (UFI) Other Popular Things from 1985
  • 7.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. |  FREE Oracle Database IDE/GUI  Windows, OS X, *NIX  More than 4,500,000 users worldwide  My Oracle Support available via your DB license
  • 8.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | SQL Developer Script Engine Existing SQL*Plus Scripting Support in the GUI  SQL*Plus command support  User friendly interface for running queries, scripts, and reports  What if…?
  • 9.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | …We Could Take the Helpful GUI Elements to a CLI?  Object Name/Command Completion  SQL Execution History & Recall  Query Result Formatting  User friendly text editing
  • 10.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | Hot Technology from 1997
  • 11.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | A new way to work with Oracle Database… …brought to you from the makers of SQL Developer
  • 12.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | SQLcl: a modern take on SQL*Plus Included with SQL Developer, also available as a separate download/program  Java 8 JRE or higher  Small download  Unzip & Go  No Client Required Supports all of your favorite SQL*Plus Commands
  • 13.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | Why?  Not everyone likes a GUI for every task  SQL*Plus is great but lacks many modern features  Can we improve our users’ everyday experience with our technology? Improve application developers experience
  • 14.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | Getting Started  Download  unzip  run ‘sql’  How to ‘install’
  • 15.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | Run Anywhere
  • 16.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | Connections Supports:  EZConnect  TNS  LDAP  Proxy  G/Login.SQL  /nolog  Native SSH tunnels  Easy Wallet Config Add -oci to connect string for thick connections
  • 17.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | TNS Too  TNS_ADMIN Variable tells us where to look
  • 18.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | New Dog, Old Tricks?
  • 19.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | Old stuff is still there, not going away…  COLUMN SALARY FORMAT $99,990  C/oldval/newval  DESC  & and &&  pretty much everything else you LOVE about SQL*Plus
  • 20.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | Commands:  Highlighted and Doc in Help  ALIAS  APEX  BRIDGE  CD  CTAS  DDL  FORMAT  HISTORY  INFORMATION (INFO & INFO+)  SSHTUNNEL What’s New?
  • 21.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | Customize/Pimp Your Ride
  • 22.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | Fun set sqlprompt "@|blue _USER|@@@|green_CONNECT_IDENTIFIER|@@|blue >|@"
  • 23.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | SYS@orcl >alias plan = SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR) SYS@orcl >alias plan2 = SELECT * FROM TABLE (DBMS_XPLAN.DISPLAY_CURSOR( :ID, :CHILD)) Practical: Re-use Your Commands & Scripts With ALIAS
  • 24.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | Commands: Alias Make your own ‘commands’ – map SQL w/binds to an alias Example:  Show me all tables who have columns using :DATA_TYPE
  • 25.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | Commands: CTAS DDL sent to BUFFER – edit or execute
  • 26.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | Commands: DDL  generate object DDL  create scripts using DDL & SPOOL commands
  • 27.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. |  Automatically format query results  SET SQLFORMAT csv  html  xml  json  csv  insert  loader  ansiconsole DEMO – Output Formatting
  • 28.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | ANSICONSOLE??? Escape Sequences to Effect Console Output Fancy Output, LOOP(  get a PAGE…  ‘smart’ size Columns…  PAGE++  )
  • 29.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | ANSICONSOLE Formatting Fetch page, format column sizes, print, continue… SET sqlformat ansiconsole
  • 30.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | Demo, ANSI Console Coloring
  • 31.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | DEMO – SQL History Statement Execution History  Last 100 statements  Persist between sessions  Cycle through using UP/DN  Full List  Also Tracks Total Execution Time & # of Executions  Filter Types of Commands saved in History
  • 32.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | INFOrmation– a better DESCribe Object Metadata Example: Tables  Keys  Comments  INMEMORY status  Stats  Indexes
  • 33.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. |
  • 34.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | Demo, Object Completion Think ‘the Ctrl+Spacebar stuff’ in SQL Developer  activated with a <TAB>  object, column names, and keywords
  • 35.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | Demo, Command Completion ALTER SESSION {ENABLE | DISABLE | FORCE} PARALLEL {DML|DDL|QUERY} [PARALLEL int]
  • 36.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | Client Side Scripting? (JavaScript)
  • 37.
    Copyright © 2014Oracle and/or its affiliates. All rights reserved. | YouTube Overview (10 Minutes) Barry’s Blog Kris’ Blog How to install & connect OTN Home Page, Downloads, FAQs, Release Notes, & More Resources

Editor's Notes

  • #3  To customize this slide with your own picture: Right-click the slide area and choose Format Background from the pop-up menu. From the Fill menu, click Picture and texture fill. Under Insert from: click File. Locate your new picture and click Insert. To Replace the LOGO on this sample slide: Right-click the sample LOGO and choose Change Picture. Navigate to the location where the new logo is stored, select desired logo file and click on the Open button to replace the sample logo.