SlideShare a Scribd company logo
1 of 33
Download to read offline
Oded Raz & Zohar Elkayam
Brillix
www.realdbamagic.com
Twitter: @realmgic
SQLcl:
The Next Generation of SQL*Plus?
About Oded Raz
http://brillix.co.il2
• Founder of Brillix and co-CEO
• Oracle ACE Director since 2010
• Over 20 years of experience as DBA
• Identity & Access solution specialist
About Zohar Elkayam
• CTO at Brillix
• Oracle ACE Associate since 2014
• DBA, team leader, Oracle University instructor and a senior
consultant for over 17 years
• Editor of ilDBA – Israel Database Community website
• Blogger – www.realdbamagic.com
http://brillix.co.il3
Agenda
• SQL*Plus and what is it good for
• Introducing SQLcl
• How to install and how to use SQLcl
• SQLcl new features and demo
• Q&A
http://brillix.co.il4
SQL*Plus
• Introduced in Oracle 5 (1985)
• Looks very simple but has tight integration with other Oracle
infrastructure and tools
• Very good for reporting, scripting, and automation
• Replaced old CLI tool called …
UFI (“User Friendly Interface”)
http://brillix.co.il5
What’s Wrong With SQL*Plus?
• Nothing really wrong with SQL*Plus – it is being updated constantly
but it is missing a lot of functionality
• SQL*Plus forces us to use GUI tools to complete some basic tasks
• Easy to understand, a bit hard to use
• Not easy for new users or developers
http://brillix.co.il6
Introducing SQLcl
• SQLcl is a new command line interface (CLI) for SQL users and
DBAs
• It is part of the SQL Developer suite – developed by the same
team: Oracle Database Development Tools Team
• Can do most of what SQL*Plus does and much more
• Minimal installation, minimal requirements
http://brillix.co.il7
Introducing SQLcl (cont.)
• It’s still in the early adopter version (current version:
4.2.0.15.121.1046, May 4, 2015)
• Uses Java, one version for Windows, Linux and OS X
• Planned to be shipped out with Oracle Database 12cR2
http://brillix.co.il8
Current Status
• Early Adopter version
• QA still logging bugs from SQL*Plus regression tests
• Adding support for existing SQL*Plus commands/syntax
• Adding new commands
• But can it do...?
• Yes
• Not yet
• No
http://brillix.co.il9
Installing
• Download from: SQL Developer Download page
• Unzip the file
• Run it
http://brillix.co.il10
Prerequisites
• Very small footprint: 11MB
• Needs Java 7/8 runtime environment (no need for JDK)
• No need for installer or setup
• No need for any other additional software or licence
http://brillix.co.il11
Connecting to the Database
• No need for Oracle Client
• Thin connection: EZConnect connect style out of the box
connect host:port/service
• Support TNS, Thick and LDAP connection when Oracle home detected
• Auto-complete connection strings
• Can show JDBC for connection information
http://brillix.co.il12
Object Completion and Easy Edit
• Use the tab key to complete commands
• Can be used to list tables, views or other queriable objects
• Can be used to replace the * with actual column names
• Use the arrow keys to move around the command
• Use CTRL+W and CTRL+S to jump to the beginning/end of
commands
http://brillix.co.il13
Command History
• 100 command history buffer
• Commands are persistent between sessions (watch out for security!)
• Use UP and DOWN arrow keys to access old commands
• Usage:
history
history usage
History script
history full
History clear [session?]
• Load from history into command buffer:
history <number>
http://brillix.co.il14
Describe, Information and info+
• Describe lists the column of the tables just like SQL*Plus
• Information shows column names, default values, indexes and constraints.
• In 12c database information shows table statistics and In memory status
• Works for table, views, sequences, and code objects
• Info+ shows additional information regarding column statistics and column
histograms
http://brillix.co.il15
Repeat
• Repeats the current SQL or PL/SQL in the buffer the specified
number of times with specified sleep intervals
• Looks like the “watch” command in Linux
• Usage:
repeat <iterations> <sleep>
http://brillix.co.il16
Repeat as “tail -f alert.log”
• Jeff Smith (@thatjeffsmith) had a cool implementation for the
repeat command on Oracle 12c:
• tail –f on the alert log
SELECT
To_Char(Originating_Timestamp, 'DD-MON-YYYY HH24:MI:SSxFF')
Time_Entry, substr(trim(message_text), 0, 75) || '...'
ABBR_MESSAGE_TEXT
FROM X$dbgalertext
ORDER BY Originating_Timestamp DESC, indx desc
fetch FIRST 15 ROWS ONLY;
http://brillix.co.il17
DDL and DBMS_METADATA
• Extract DDL of objects using a single command
DDL <object name>
• Uses DBMS_METADATA.GET_DDL to extract the object
• We can modify the output using TRANSFORM_PARAM:
exec dbms_metadata.set_transform_param
(dbms_metadata.session_transform, 'SEGMENT_ATTRIBUTES',
false);
http://brillix.co.il18
Alias
• Alias is a command which allows us to save a SQL, PL/SQL or
SQL*Plus scripts, and assign it a shortcut command.
• Command can receive parameters using bind variables
• Aliases are session persistent and being saved
• Usage:
• alias - for list of aliases
• alias list <aliasName> - for definition
• Setting an alias:
• alias my_command=sql; (terminate with ;)
• alias my_code=begin command; end; (terminate with /)
http://brillix.co.il19
Alias Example
• We want to show the DDL command without the segment part but the
transformation is on the session level.
• We set this alias:
alias ddl_fix_output=begin
dbms_metadata.set_transform_param
(dbms_metadata.session_transform, 'SQLTERMINATOR', TRUE);
dbms_metadata.set_transform_param
(dbms_metadata.session_transform, 'SEGMENT_ATTRIBUTES', false);
end;
/
http://brillix.co.il20
CTAS
• Extract DDL for a table and use it to recreate another table
using select * from
• Useful when we want to copy a table with partitions or a
primary key
• Might not stay in the final version – have a lot of small and
annoying issues
• Usage:
ctas table new_table
http://brillix.co.il21
SQLPATH
• SQLPATH is the order in which the CLI is looking for sql scripts
(both in SQL*Plus and SQLcl)
• Running a script not from the path requires full path location
• Default search order is:
1. Current cd directory
2. Current running directory
3. The rest of the sqlpath
• Show SQLPATH will show that current search path
http://brillix.co.il22
CD command
• When we want to change the path in SQL*Plus, we usually can’t.
• SQLcl comes with CD command to change that path and make it
easier to run scripts:
• Usage:
cd /u01/app/oracle/scripts
Show SQLPATH
http://brillix.co.il23
Bridge
• Used mainly to script data move between two connections
from the client (no server direct server connections)
• The following functionality is available:
1. Query tables in other connections
2. Query tables in multiple connections in the same statement
3. Insert data from one connection into another
4. Create a table and insert data into it from another connection
http://brillix.co.il24
Bridge (cont.)
• Uses JDBC connection string to connect our client to the remote
connection.
• Creates a table with the results in the database
• Usage:
BRIDGE <targetTableName> as "<jdbcURL>"(<sqlQuery>);
• Example:
BRIDGE dept_remote as
“jdbc:oracle:thin:scott/tiger@localhost:1521/orcl"(
select * from dept);
http://brillix.co.il25
SQL*Plus Output
• SQL*Plus output is generated as text tables
• We can output the data as HTML but the will take over
everything we do in SQL*Plus (i.e. describe command)
• We can’t use colors in our output
• We can’t generate other types of useful outputs (CSV is really
hard for example)
http://brillix.co.il26
Generating Pretty Output
• Outputting query results becomes easier with the “set
sqlformat” command (also available in SQL Developer)
• We can create a query in the “regular” way and then switch
between the different output styles:
• ANSIConsole
• Fixed column size output
• XML or JSON output
• HTML output generates a built in search field and a responsive
html output for the result only
http://brillix.co.il27
Generating Other Useful Outputs
• We can generate loader ready output (with “|” as a delimiter)
• We can generate insert commands
• We can easily generate CSV output
• Usage:
set sqlformat { csv,html,xml,json,ansiconsole,insert,
loader,fixed,default}
http://brillix.co.il28
Load Data From CSV File
• Loads a comma separated value (csv) file into a table
• The first row of the file must be a header row and the file must
be encoded UTF8
• The load is processed with 50 rows per batch
• Usage:
LOAD [schema.]table_name[@db_link] file_name
http://brillix.co.il29
Conclusion
• We talked about SQL*Plus and SQLcl differences
• We saw how to start working with SQLcl
• We tried some of its new features
• There are more new features coming and since it's and EA
version, more bug fixes to come
http://brillix.co.il30
Q&A
http://brillix.co.il31
Useful Resources
• Kris Rice (@krisrice) manage Oracle SQL Developer
Blog: http://krisrice.blogspot.com/
• Jeff Smith (@thatjeffsmith) Oracle SQL Developer Product
Manager at Oracle
Blog: http://www.thatjeffsmith.com/
• Barry McGillin (@bamcgill) – Oracle
Blog: http://barrymcgillin.blogspot.com/
http://brillix.co.il32
Thank You
Zohar Elkayam
twitter: @realmgic
Zohar@Brillix.co.il
www.realdbamagic.com
http://brillix.co.il33

More Related Content

What's hot

Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsZohar Elkayam
 
PL/SQL New and Advanced Features for Extreme Performance
PL/SQL New and Advanced Features for Extreme PerformancePL/SQL New and Advanced Features for Extreme Performance
PL/SQL New and Advanced Features for Extreme PerformanceZohar Elkayam
 
Docker Concepts for Oracle/MySQL DBAs and DevOps
Docker Concepts for Oracle/MySQL DBAs and DevOpsDocker Concepts for Oracle/MySQL DBAs and DevOps
Docker Concepts for Oracle/MySQL DBAs and DevOpsZohar Elkayam
 
Oracle Database Advanced Querying
Oracle Database Advanced QueryingOracle Database Advanced Querying
Oracle Database Advanced QueryingZohar Elkayam
 
Things Every Oracle DBA Needs to Know about the Hadoop Ecosystem
Things Every Oracle DBA Needs to Know about the Hadoop EcosystemThings Every Oracle DBA Needs to Know about the Hadoop Ecosystem
Things Every Oracle DBA Needs to Know about the Hadoop EcosystemZohar Elkayam
 
Things Every Oracle DBA Needs To Know About The Hadoop Ecosystem
Things Every Oracle DBA Needs To Know About The Hadoop EcosystemThings Every Oracle DBA Needs To Know About The Hadoop Ecosystem
Things Every Oracle DBA Needs To Know About The Hadoop EcosystemZohar Elkayam
 
Introduction to Oracle Data Guard Broker
Introduction to Oracle Data Guard BrokerIntroduction to Oracle Data Guard Broker
Introduction to Oracle Data Guard BrokerZohar Elkayam
 
An introduction into Oracle VM V3.x
An introduction into Oracle VM V3.xAn introduction into Oracle VM V3.x
An introduction into Oracle VM V3.xMarco Gralike
 
The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLThe InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLMorgan Tocker
 
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...Dave Stokes
 
Oracle 12.2 sharded database management
Oracle 12.2 sharded database managementOracle 12.2 sharded database management
Oracle 12.2 sharded database managementLeyi (Kamus) Zhang
 
[B14] A MySQL Replacement by Colin Charles
[B14] A MySQL Replacement by Colin Charles[B14] A MySQL Replacement by Colin Charles
[B14] A MySQL Replacement by Colin CharlesInsight Technology, Inc.
 
Oracle 21c: New Features and Enhancements of Data Pump & TTS
Oracle 21c: New Features and Enhancements of Data Pump & TTSOracle 21c: New Features and Enhancements of Data Pump & TTS
Oracle 21c: New Features and Enhancements of Data Pump & TTSChristian Gohmann
 
Upgrade to MySQL 5.7 and latest news planned for MySQL 8
Upgrade to MySQL 5.7 and latest news planned for MySQL 8Upgrade to MySQL 5.7 and latest news planned for MySQL 8
Upgrade to MySQL 5.7 and latest news planned for MySQL 8Ted Wennmark
 
An introduction into Oracle Enterprise Manager Cloud Control 12c Release 3
An introduction into Oracle Enterprise Manager Cloud Control 12c Release 3An introduction into Oracle Enterprise Manager Cloud Control 12c Release 3
An introduction into Oracle Enterprise Manager Cloud Control 12c Release 3Marco Gralike
 
InnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter ZaitsevInnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter ZaitsevFuenteovejuna
 
Rajnish singh(presentation on oracle )
Rajnish singh(presentation on  oracle )Rajnish singh(presentation on  oracle )
Rajnish singh(presentation on oracle )Rajput Rajnish
 
Ogh Ace Case, Part 1 and 2, Oracle Xml Database, Marco Gralike
Ogh Ace Case, Part 1 and 2, Oracle Xml Database, Marco GralikeOgh Ace Case, Part 1 and 2, Oracle Xml Database, Marco Gralike
Ogh Ace Case, Part 1 and 2, Oracle Xml Database, Marco GralikeMarco Gralike
 
DOAG - Oracle Database Locking Mechanism Demystified
DOAG - Oracle Database Locking Mechanism Demystified DOAG - Oracle Database Locking Mechanism Demystified
DOAG - Oracle Database Locking Mechanism Demystified Pini Dibask
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsAlex Zaballa
 

What's hot (20)

Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
 
PL/SQL New and Advanced Features for Extreme Performance
PL/SQL New and Advanced Features for Extreme PerformancePL/SQL New and Advanced Features for Extreme Performance
PL/SQL New and Advanced Features for Extreme Performance
 
Docker Concepts for Oracle/MySQL DBAs and DevOps
Docker Concepts for Oracle/MySQL DBAs and DevOpsDocker Concepts for Oracle/MySQL DBAs and DevOps
Docker Concepts for Oracle/MySQL DBAs and DevOps
 
Oracle Database Advanced Querying
Oracle Database Advanced QueryingOracle Database Advanced Querying
Oracle Database Advanced Querying
 
Things Every Oracle DBA Needs to Know about the Hadoop Ecosystem
Things Every Oracle DBA Needs to Know about the Hadoop EcosystemThings Every Oracle DBA Needs to Know about the Hadoop Ecosystem
Things Every Oracle DBA Needs to Know about the Hadoop Ecosystem
 
Things Every Oracle DBA Needs To Know About The Hadoop Ecosystem
Things Every Oracle DBA Needs To Know About The Hadoop EcosystemThings Every Oracle DBA Needs To Know About The Hadoop Ecosystem
Things Every Oracle DBA Needs To Know About The Hadoop Ecosystem
 
Introduction to Oracle Data Guard Broker
Introduction to Oracle Data Guard BrokerIntroduction to Oracle Data Guard Broker
Introduction to Oracle Data Guard Broker
 
An introduction into Oracle VM V3.x
An introduction into Oracle VM V3.xAn introduction into Oracle VM V3.x
An introduction into Oracle VM V3.x
 
The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLThe InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQL
 
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
 
Oracle 12.2 sharded database management
Oracle 12.2 sharded database managementOracle 12.2 sharded database management
Oracle 12.2 sharded database management
 
[B14] A MySQL Replacement by Colin Charles
[B14] A MySQL Replacement by Colin Charles[B14] A MySQL Replacement by Colin Charles
[B14] A MySQL Replacement by Colin Charles
 
Oracle 21c: New Features and Enhancements of Data Pump & TTS
Oracle 21c: New Features and Enhancements of Data Pump & TTSOracle 21c: New Features and Enhancements of Data Pump & TTS
Oracle 21c: New Features and Enhancements of Data Pump & TTS
 
Upgrade to MySQL 5.7 and latest news planned for MySQL 8
Upgrade to MySQL 5.7 and latest news planned for MySQL 8Upgrade to MySQL 5.7 and latest news planned for MySQL 8
Upgrade to MySQL 5.7 and latest news planned for MySQL 8
 
An introduction into Oracle Enterprise Manager Cloud Control 12c Release 3
An introduction into Oracle Enterprise Manager Cloud Control 12c Release 3An introduction into Oracle Enterprise Manager Cloud Control 12c Release 3
An introduction into Oracle Enterprise Manager Cloud Control 12c Release 3
 
InnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter ZaitsevInnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter Zaitsev
 
Rajnish singh(presentation on oracle )
Rajnish singh(presentation on  oracle )Rajnish singh(presentation on  oracle )
Rajnish singh(presentation on oracle )
 
Ogh Ace Case, Part 1 and 2, Oracle Xml Database, Marco Gralike
Ogh Ace Case, Part 1 and 2, Oracle Xml Database, Marco GralikeOgh Ace Case, Part 1 and 2, Oracle Xml Database, Marco Gralike
Ogh Ace Case, Part 1 and 2, Oracle Xml Database, Marco Gralike
 
DOAG - Oracle Database Locking Mechanism Demystified
DOAG - Oracle Database Locking Mechanism Demystified DOAG - Oracle Database Locking Mechanism Demystified
DOAG - Oracle Database Locking Mechanism Demystified
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 

Viewers also liked

SQLcl overview - A new Command Line Interface for Oracle Database
SQLcl overview - A new Command Line Interface for Oracle DatabaseSQLcl overview - A new Command Line Interface for Oracle Database
SQLcl overview - A new Command Line Interface for Oracle DatabaseJeff Smith
 
Exadata and the Oracle Optimizer: The Untold Story
Exadata and the Oracle Optimizer: The Untold StoryExadata and the Oracle Optimizer: The Untold Story
Exadata and the Oracle Optimizer: The Untold StoryEnkitec
 
Advanced SQL Webinar
Advanced SQL WebinarAdvanced SQL Webinar
Advanced SQL WebinarRam Kedem
 
Oracle SQL Developer Top 10 Tips & Tricks
Oracle SQL Developer Top 10 Tips & TricksOracle SQL Developer Top 10 Tips & Tricks
Oracle SQL Developer Top 10 Tips & TricksJeff Smith
 
PL/SQL All the Things in Oracle SQL Developer
PL/SQL All the Things in Oracle SQL DeveloperPL/SQL All the Things in Oracle SQL Developer
PL/SQL All the Things in Oracle SQL DeveloperJeff Smith
 
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & Tricks
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & TricksPennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & Tricks
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & TricksJeff Smith
 
Debugging PL/SQL with Oracle SQL Developer
Debugging PL/SQL with Oracle SQL DeveloperDebugging PL/SQL with Oracle SQL Developer
Debugging PL/SQL with Oracle SQL DeveloperJeff Smith
 

Viewers also liked (8)

SQLcl overview - A new Command Line Interface for Oracle Database
SQLcl overview - A new Command Line Interface for Oracle DatabaseSQLcl overview - A new Command Line Interface for Oracle Database
SQLcl overview - A new Command Line Interface for Oracle Database
 
Oracle SQLcl
Oracle SQLcl Oracle SQLcl
Oracle SQLcl
 
Exadata and the Oracle Optimizer: The Untold Story
Exadata and the Oracle Optimizer: The Untold StoryExadata and the Oracle Optimizer: The Untold Story
Exadata and the Oracle Optimizer: The Untold Story
 
Advanced SQL Webinar
Advanced SQL WebinarAdvanced SQL Webinar
Advanced SQL Webinar
 
Oracle SQL Developer Top 10 Tips & Tricks
Oracle SQL Developer Top 10 Tips & TricksOracle SQL Developer Top 10 Tips & Tricks
Oracle SQL Developer Top 10 Tips & Tricks
 
PL/SQL All the Things in Oracle SQL Developer
PL/SQL All the Things in Oracle SQL DeveloperPL/SQL All the Things in Oracle SQL Developer
PL/SQL All the Things in Oracle SQL Developer
 
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & Tricks
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & TricksPennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & Tricks
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & Tricks
 
Debugging PL/SQL with Oracle SQL Developer
Debugging PL/SQL with Oracle SQL DeveloperDebugging PL/SQL with Oracle SQL Developer
Debugging PL/SQL with Oracle SQL Developer
 

Similar to SQLcl the next generation of SQLPlus?

Oracle 12c New Features For Better Performance
Oracle 12c New Features For Better PerformanceOracle 12c New Features For Better Performance
Oracle 12c New Features For Better PerformanceZohar Elkayam
 
android sqlite
android sqliteandroid sqlite
android sqliteDeepa Rani
 
Tanel Poder Oracle Scripts and Tools (2010)
Tanel Poder Oracle Scripts and Tools (2010)Tanel Poder Oracle Scripts and Tools (2010)
Tanel Poder Oracle Scripts and Tools (2010)Tanel Poder
 
Access Data from XPages with the Relational Controls
Access Data from XPages with the Relational ControlsAccess Data from XPages with the Relational Controls
Access Data from XPages with the Relational ControlsTeamstudio
 
Oracle sql developer_slides
Oracle sql developer_slidesOracle sql developer_slides
Oracle sql developer_slidesKrishna Murthy
 
COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesAlfredo Abate
 
20180929 jssug 10_a5_sql_mk2
20180929 jssug 10_a5_sql_mk220180929 jssug 10_a5_sql_mk2
20180929 jssug 10_a5_sql_mk2Kunihisa Abukawa
 
Inside sql server in memory oltp sql sat nyc 2017
Inside sql server in memory oltp sql sat nyc 2017Inside sql server in memory oltp sql sat nyc 2017
Inside sql server in memory oltp sql sat nyc 2017Bob Ward
 
Products.intro.forum version
Products.intro.forum versionProducts.intro.forum version
Products.intro.forum versionsqlserver.co.il
 
MySQL Baics - Texas Linxufest beginners tutorial May 31st, 2019
MySQL Baics - Texas Linxufest beginners tutorial May 31st, 2019MySQL Baics - Texas Linxufest beginners tutorial May 31st, 2019
MySQL Baics - Texas Linxufest beginners tutorial May 31st, 2019Dave Stokes
 
Ten query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should knowTen query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should knowKevin Kline
 
SQL PPT.pptx
SQL PPT.pptxSQL PPT.pptx
SQL PPT.pptxKulbir4
 
What's New in Apache Solr 4.10
What's New in Apache Solr 4.10What's New in Apache Solr 4.10
What's New in Apache Solr 4.10Anshum Gupta
 
SQL Server 2019 CTP2.4
SQL Server 2019 CTP2.4SQL Server 2019 CTP2.4
SQL Server 2019 CTP2.4Gianluca Hotz
 

Similar to SQLcl the next generation of SQLPlus? (20)

Oracle 12c New Features For Better Performance
Oracle 12c New Features For Better PerformanceOracle 12c New Features For Better Performance
Oracle 12c New Features For Better Performance
 
android sqlite
android sqliteandroid sqlite
android sqlite
 
ow.ppt
ow.pptow.ppt
ow.ppt
 
ow.ppt
ow.pptow.ppt
ow.ppt
 
Ow
OwOw
Ow
 
Tanel Poder Oracle Scripts and Tools (2010)
Tanel Poder Oracle Scripts and Tools (2010)Tanel Poder Oracle Scripts and Tools (2010)
Tanel Poder Oracle Scripts and Tools (2010)
 
Plantilla oracle
Plantilla oraclePlantilla oracle
Plantilla oracle
 
Access Data from XPages with the Relational Controls
Access Data from XPages with the Relational ControlsAccess Data from XPages with the Relational Controls
Access Data from XPages with the Relational Controls
 
Oracle sql developer_slides
Oracle sql developer_slidesOracle sql developer_slides
Oracle sql developer_slides
 
COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_Features
 
20180929 jssug 10_a5_sql_mk2
20180929 jssug 10_a5_sql_mk220180929 jssug 10_a5_sql_mk2
20180929 jssug 10_a5_sql_mk2
 
Inside sql server in memory oltp sql sat nyc 2017
Inside sql server in memory oltp sql sat nyc 2017Inside sql server in memory oltp sql sat nyc 2017
Inside sql server in memory oltp sql sat nyc 2017
 
Products.intro.forum version
Products.intro.forum versionProducts.intro.forum version
Products.intro.forum version
 
MySQL Baics - Texas Linxufest beginners tutorial May 31st, 2019
MySQL Baics - Texas Linxufest beginners tutorial May 31st, 2019MySQL Baics - Texas Linxufest beginners tutorial May 31st, 2019
MySQL Baics - Texas Linxufest beginners tutorial May 31st, 2019
 
Ten query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should knowTen query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should know
 
SQLite - Overview
SQLite - OverviewSQLite - Overview
SQLite - Overview
 
SQL PPT.pptx
SQL PPT.pptxSQL PPT.pptx
SQL PPT.pptx
 
Master tuning
Master   tuningMaster   tuning
Master tuning
 
What's New in Apache Solr 4.10
What's New in Apache Solr 4.10What's New in Apache Solr 4.10
What's New in Apache Solr 4.10
 
SQL Server 2019 CTP2.4
SQL Server 2019 CTP2.4SQL Server 2019 CTP2.4
SQL Server 2019 CTP2.4
 

More from Zohar Elkayam

Oracle Advanced SQL and Analytic Functions
Oracle Advanced SQL and Analytic FunctionsOracle Advanced SQL and Analytic Functions
Oracle Advanced SQL and Analytic FunctionsZohar Elkayam
 
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem 20170527
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem 20170527Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem 20170527
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem 20170527Zohar Elkayam
 
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem (c17lv version)
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem (c17lv version)Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem (c17lv version)
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem (c17lv version)Zohar Elkayam
 
Rapid Cluster Computing with Apache Spark 2016
Rapid Cluster Computing with Apache Spark 2016Rapid Cluster Computing with Apache Spark 2016
Rapid Cluster Computing with Apache Spark 2016Zohar Elkayam
 
OOW2016: Exploring Advanced SQL Techniques Using Analytic Functions
OOW2016: Exploring Advanced SQL Techniques Using Analytic FunctionsOOW2016: Exploring Advanced SQL Techniques Using Analytic Functions
OOW2016: Exploring Advanced SQL Techniques Using Analytic FunctionsZohar Elkayam
 
Exploring Advanced SQL Techniques Using Analytic Functions
Exploring Advanced SQL Techniques Using Analytic FunctionsExploring Advanced SQL Techniques Using Analytic Functions
Exploring Advanced SQL Techniques Using Analytic FunctionsZohar Elkayam
 
Exploring Advanced SQL Techniques Using Analytic Functions
Exploring Advanced SQL Techniques Using Analytic FunctionsExploring Advanced SQL Techniques Using Analytic Functions
Exploring Advanced SQL Techniques Using Analytic FunctionsZohar Elkayam
 
Advanced PLSQL Optimizing for Better Performance
Advanced PLSQL Optimizing for Better PerformanceAdvanced PLSQL Optimizing for Better Performance
Advanced PLSQL Optimizing for Better PerformanceZohar Elkayam
 
The Hadoop Ecosystem for Developers
The Hadoop Ecosystem for DevelopersThe Hadoop Ecosystem for Developers
The Hadoop Ecosystem for DevelopersZohar Elkayam
 
Big data for cio 2015
Big data for cio 2015Big data for cio 2015
Big data for cio 2015Zohar Elkayam
 
Oracle Data Guard A to Z
Oracle Data Guard A to ZOracle Data Guard A to Z
Oracle Data Guard A to ZZohar Elkayam
 
Oracle Data Guard Broker Webinar
Oracle Data Guard Broker WebinarOracle Data Guard Broker Webinar
Oracle Data Guard Broker WebinarZohar Elkayam
 

More from Zohar Elkayam (13)

Oracle Advanced SQL and Analytic Functions
Oracle Advanced SQL and Analytic FunctionsOracle Advanced SQL and Analytic Functions
Oracle Advanced SQL and Analytic Functions
 
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem 20170527
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem 20170527Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem 20170527
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem 20170527
 
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem (c17lv version)
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem (c17lv version)Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem (c17lv version)
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem (c17lv version)
 
Rapid Cluster Computing with Apache Spark 2016
Rapid Cluster Computing with Apache Spark 2016Rapid Cluster Computing with Apache Spark 2016
Rapid Cluster Computing with Apache Spark 2016
 
OOW2016: Exploring Advanced SQL Techniques Using Analytic Functions
OOW2016: Exploring Advanced SQL Techniques Using Analytic FunctionsOOW2016: Exploring Advanced SQL Techniques Using Analytic Functions
OOW2016: Exploring Advanced SQL Techniques Using Analytic Functions
 
Exploring Advanced SQL Techniques Using Analytic Functions
Exploring Advanced SQL Techniques Using Analytic FunctionsExploring Advanced SQL Techniques Using Analytic Functions
Exploring Advanced SQL Techniques Using Analytic Functions
 
Exploring Advanced SQL Techniques Using Analytic Functions
Exploring Advanced SQL Techniques Using Analytic FunctionsExploring Advanced SQL Techniques Using Analytic Functions
Exploring Advanced SQL Techniques Using Analytic Functions
 
Advanced PLSQL Optimizing for Better Performance
Advanced PLSQL Optimizing for Better PerformanceAdvanced PLSQL Optimizing for Better Performance
Advanced PLSQL Optimizing for Better Performance
 
The Hadoop Ecosystem for Developers
The Hadoop Ecosystem for DevelopersThe Hadoop Ecosystem for Developers
The Hadoop Ecosystem for Developers
 
Big data for cio 2015
Big data for cio 2015Big data for cio 2015
Big data for cio 2015
 
Intro to Big Data
Intro to Big DataIntro to Big Data
Intro to Big Data
 
Oracle Data Guard A to Z
Oracle Data Guard A to ZOracle Data Guard A to Z
Oracle Data Guard A to Z
 
Oracle Data Guard Broker Webinar
Oracle Data Guard Broker WebinarOracle Data Guard Broker Webinar
Oracle Data Guard Broker Webinar
 

Recently uploaded

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 

Recently uploaded (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

SQLcl the next generation of SQLPlus?

  • 1. Oded Raz & Zohar Elkayam Brillix www.realdbamagic.com Twitter: @realmgic SQLcl: The Next Generation of SQL*Plus?
  • 2. About Oded Raz http://brillix.co.il2 • Founder of Brillix and co-CEO • Oracle ACE Director since 2010 • Over 20 years of experience as DBA • Identity & Access solution specialist
  • 3. About Zohar Elkayam • CTO at Brillix • Oracle ACE Associate since 2014 • DBA, team leader, Oracle University instructor and a senior consultant for over 17 years • Editor of ilDBA – Israel Database Community website • Blogger – www.realdbamagic.com http://brillix.co.il3
  • 4. Agenda • SQL*Plus and what is it good for • Introducing SQLcl • How to install and how to use SQLcl • SQLcl new features and demo • Q&A http://brillix.co.il4
  • 5. SQL*Plus • Introduced in Oracle 5 (1985) • Looks very simple but has tight integration with other Oracle infrastructure and tools • Very good for reporting, scripting, and automation • Replaced old CLI tool called … UFI (“User Friendly Interface”) http://brillix.co.il5
  • 6. What’s Wrong With SQL*Plus? • Nothing really wrong with SQL*Plus – it is being updated constantly but it is missing a lot of functionality • SQL*Plus forces us to use GUI tools to complete some basic tasks • Easy to understand, a bit hard to use • Not easy for new users or developers http://brillix.co.il6
  • 7. Introducing SQLcl • SQLcl is a new command line interface (CLI) for SQL users and DBAs • It is part of the SQL Developer suite – developed by the same team: Oracle Database Development Tools Team • Can do most of what SQL*Plus does and much more • Minimal installation, minimal requirements http://brillix.co.il7
  • 8. Introducing SQLcl (cont.) • It’s still in the early adopter version (current version: 4.2.0.15.121.1046, May 4, 2015) • Uses Java, one version for Windows, Linux and OS X • Planned to be shipped out with Oracle Database 12cR2 http://brillix.co.il8
  • 9. Current Status • Early Adopter version • QA still logging bugs from SQL*Plus regression tests • Adding support for existing SQL*Plus commands/syntax • Adding new commands • But can it do...? • Yes • Not yet • No http://brillix.co.il9
  • 10. Installing • Download from: SQL Developer Download page • Unzip the file • Run it http://brillix.co.il10
  • 11. Prerequisites • Very small footprint: 11MB • Needs Java 7/8 runtime environment (no need for JDK) • No need for installer or setup • No need for any other additional software or licence http://brillix.co.il11
  • 12. Connecting to the Database • No need for Oracle Client • Thin connection: EZConnect connect style out of the box connect host:port/service • Support TNS, Thick and LDAP connection when Oracle home detected • Auto-complete connection strings • Can show JDBC for connection information http://brillix.co.il12
  • 13. Object Completion and Easy Edit • Use the tab key to complete commands • Can be used to list tables, views or other queriable objects • Can be used to replace the * with actual column names • Use the arrow keys to move around the command • Use CTRL+W and CTRL+S to jump to the beginning/end of commands http://brillix.co.il13
  • 14. Command History • 100 command history buffer • Commands are persistent between sessions (watch out for security!) • Use UP and DOWN arrow keys to access old commands • Usage: history history usage History script history full History clear [session?] • Load from history into command buffer: history <number> http://brillix.co.il14
  • 15. Describe, Information and info+ • Describe lists the column of the tables just like SQL*Plus • Information shows column names, default values, indexes and constraints. • In 12c database information shows table statistics and In memory status • Works for table, views, sequences, and code objects • Info+ shows additional information regarding column statistics and column histograms http://brillix.co.il15
  • 16. Repeat • Repeats the current SQL or PL/SQL in the buffer the specified number of times with specified sleep intervals • Looks like the “watch” command in Linux • Usage: repeat <iterations> <sleep> http://brillix.co.il16
  • 17. Repeat as “tail -f alert.log” • Jeff Smith (@thatjeffsmith) had a cool implementation for the repeat command on Oracle 12c: • tail –f on the alert log SELECT To_Char(Originating_Timestamp, 'DD-MON-YYYY HH24:MI:SSxFF') Time_Entry, substr(trim(message_text), 0, 75) || '...' ABBR_MESSAGE_TEXT FROM X$dbgalertext ORDER BY Originating_Timestamp DESC, indx desc fetch FIRST 15 ROWS ONLY; http://brillix.co.il17
  • 18. DDL and DBMS_METADATA • Extract DDL of objects using a single command DDL <object name> • Uses DBMS_METADATA.GET_DDL to extract the object • We can modify the output using TRANSFORM_PARAM: exec dbms_metadata.set_transform_param (dbms_metadata.session_transform, 'SEGMENT_ATTRIBUTES', false); http://brillix.co.il18
  • 19. Alias • Alias is a command which allows us to save a SQL, PL/SQL or SQL*Plus scripts, and assign it a shortcut command. • Command can receive parameters using bind variables • Aliases are session persistent and being saved • Usage: • alias - for list of aliases • alias list <aliasName> - for definition • Setting an alias: • alias my_command=sql; (terminate with ;) • alias my_code=begin command; end; (terminate with /) http://brillix.co.il19
  • 20. Alias Example • We want to show the DDL command without the segment part but the transformation is on the session level. • We set this alias: alias ddl_fix_output=begin dbms_metadata.set_transform_param (dbms_metadata.session_transform, 'SQLTERMINATOR', TRUE); dbms_metadata.set_transform_param (dbms_metadata.session_transform, 'SEGMENT_ATTRIBUTES', false); end; / http://brillix.co.il20
  • 21. CTAS • Extract DDL for a table and use it to recreate another table using select * from • Useful when we want to copy a table with partitions or a primary key • Might not stay in the final version – have a lot of small and annoying issues • Usage: ctas table new_table http://brillix.co.il21
  • 22. SQLPATH • SQLPATH is the order in which the CLI is looking for sql scripts (both in SQL*Plus and SQLcl) • Running a script not from the path requires full path location • Default search order is: 1. Current cd directory 2. Current running directory 3. The rest of the sqlpath • Show SQLPATH will show that current search path http://brillix.co.il22
  • 23. CD command • When we want to change the path in SQL*Plus, we usually can’t. • SQLcl comes with CD command to change that path and make it easier to run scripts: • Usage: cd /u01/app/oracle/scripts Show SQLPATH http://brillix.co.il23
  • 24. Bridge • Used mainly to script data move between two connections from the client (no server direct server connections) • The following functionality is available: 1. Query tables in other connections 2. Query tables in multiple connections in the same statement 3. Insert data from one connection into another 4. Create a table and insert data into it from another connection http://brillix.co.il24
  • 25. Bridge (cont.) • Uses JDBC connection string to connect our client to the remote connection. • Creates a table with the results in the database • Usage: BRIDGE <targetTableName> as "<jdbcURL>"(<sqlQuery>); • Example: BRIDGE dept_remote as “jdbc:oracle:thin:scott/tiger@localhost:1521/orcl"( select * from dept); http://brillix.co.il25
  • 26. SQL*Plus Output • SQL*Plus output is generated as text tables • We can output the data as HTML but the will take over everything we do in SQL*Plus (i.e. describe command) • We can’t use colors in our output • We can’t generate other types of useful outputs (CSV is really hard for example) http://brillix.co.il26
  • 27. Generating Pretty Output • Outputting query results becomes easier with the “set sqlformat” command (also available in SQL Developer) • We can create a query in the “regular” way and then switch between the different output styles: • ANSIConsole • Fixed column size output • XML or JSON output • HTML output generates a built in search field and a responsive html output for the result only http://brillix.co.il27
  • 28. Generating Other Useful Outputs • We can generate loader ready output (with “|” as a delimiter) • We can generate insert commands • We can easily generate CSV output • Usage: set sqlformat { csv,html,xml,json,ansiconsole,insert, loader,fixed,default} http://brillix.co.il28
  • 29. Load Data From CSV File • Loads a comma separated value (csv) file into a table • The first row of the file must be a header row and the file must be encoded UTF8 • The load is processed with 50 rows per batch • Usage: LOAD [schema.]table_name[@db_link] file_name http://brillix.co.il29
  • 30. Conclusion • We talked about SQL*Plus and SQLcl differences • We saw how to start working with SQLcl • We tried some of its new features • There are more new features coming and since it's and EA version, more bug fixes to come http://brillix.co.il30
  • 32. Useful Resources • Kris Rice (@krisrice) manage Oracle SQL Developer Blog: http://krisrice.blogspot.com/ • Jeff Smith (@thatjeffsmith) Oracle SQL Developer Product Manager at Oracle Blog: http://www.thatjeffsmith.com/ • Barry McGillin (@bamcgill) – Oracle Blog: http://barrymcgillin.blogspot.com/ http://brillix.co.il32
  • 33. Thank You Zohar Elkayam twitter: @realmgic Zohar@Brillix.co.il www.realdbamagic.com http://brillix.co.il33