Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Oracle SQL Developer
Oracle SQL Developer
Oracle SQL Developer
Ebook670 pages2 hours

Oracle SQL Developer

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Learn Database design, development,and administration using the feature-rich SQL Developer 4.1 interface

About This Book

- Explore all the SQL Developer 4.1 features useful for Oracle database developers, architects, and administrators
- Understand how this free tool from Oracle has evolved over the years and has become a complete tool that makes life easy for Oracle and third-party database users
- The author, Ajith Narayanan, has a total of 10+ years of work experience as an Oracle [APPS] DBA

Who This Book Is For

This book is intended for Oracle developers who are responsible for database management. You are expected to have programming knowledge of SQL and PL/SQL, and must be familiar with basic Oracle database concepts.

What You Will Learn

- Install and navigate through all the advanced features of SQL Developer that were introduced in version 4.1
- Browse, create, edit, and delete (drop) database objects
- Use the SQL worksheet to run SQL statements and scripts, edit and debug PL/SQL code, manipulate and export (unload) data
- Carry out all DBA-related activities such as exporting/importing, tuning, and analyzing database performance issues
- Quickly analyze, create, and edit the data model using data modeler
- Extend the SQL developer capabilities by exploring the APEX related pages, enabling and working with RESTful services
- Use the available reports and create new custom reports with custom scripts
- Grasp how to connect to third-party databases and work smoothly with them

In Detail

At times, DBAs support 100s of databases at work. In such scenarios, using a command-line tool like putty adds to the difficulty, while SQL Developer makes the life of a developer, DBA, or DB architect easier by providing a graphical user interface equipped with features that can bolster and enhance the user experience and boost efficiency. Features such as DBA panel, Reports, Data Modeler, and Data Miner are just a few examples of its rich features, and its support for APEX, REST Services, timesten, and third-party database drivers demonstrate its extensibility.
You may be a newbie to databases or a seasoned database expert, either way this book will help you understand the database structure and the different types of objects that organize enterprise data in an efficient manner. This book introduces the features of the SQL Developer 4.1 tool in an incremental fashion, starting with installing them, making the database connections, and using the different panels. By sequentially walking through the steps in each chapter, you will quickly master SQL Developer 4.1.

Style and approach

This book follows a step-by-step approach and is in a conversational and easy-to-follow style. Screenshots , and detailed explanations of the basic and advanced features of SQL Developer 4.1 that will make your work and life easy.
LanguageEnglish
Release dateJan 30, 2016
ISBN9781782174714
Oracle SQL Developer

Related to Oracle SQL Developer

Related ebooks

Databases For You

View More

Related articles

Reviews for Oracle SQL Developer

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Oracle SQL Developer - Narayanan Ajith

    Table of Contents

    Oracle SQL Developer

    Credits

    About the Author

    About the Reviewer

    www.PacktPub.com

    Support files, eBooks, discount offers, and more

    Why subscribe?

    Free access for Packt account holders

    Instant updates on new Packt books

    Preface

    What this book covers

    What you need for this book

    Who this book is for

    Conventions

    Reader feedback

    Customer support

    Downloading the example code

    Downloading the color images of this book

    Errata

    Piracy

    Questions

    1. Getting Started with SQL Developer 4.1

    Preparing your environment

    Finding and downloading the software

    Downloading and installing the Java Development Kit

    Installing and starting SQL Developer

    Working with different platforms

    Microsoft Windows

    Alternative platforms

    Mac OS X

    Linux

    Migrating settings from a previous release

    Maintaining your environment

    Verifying the current release

    Using Check for Updates

    Managing the system folder and other files

    Alternative installations of SQL Developer

    Oracle JDeveloper

    Oracle Database 12c

    Troubleshooting

    Removing extensions

    Resetting shortcut keys

    Reset the environment, do not reinstall the product

    A quick overview

    Sample schemas

    Creating your first connection

    Using basic commands in the SQL Worksheet

    Browsing and updating data

    Running reports

    Navigating around SQL Developer

    Managing SQL Developer windows

    Tiling windows

    Splitting documents

    Maximizing detail

    Resetting the window layout

    Database certification matrix (Oracle & Third-Party)

    Finding more help

    Summary

    2. Database Connections and SQL Worksheet

    Working with the Connections navigator

    Opening connections

    Working with database objects

    Display editors

    General display editors

    Working with the display editors

    Using the SQL display editor

    Working with the data grids

    Reviewing other database object nodes

    Working with PL/SQL objects

    Accessing objects you don't own

    Other users

    Synonyms and filters

    Recycle Bin

    Creating new database objects

    Editing database objects – putting context menus to work

    Editing objects

    Script Runner/Running scripts

    Execution plan

    Autotrace pane

    DBMS Output pane

    OWA output pane

    Query Builder

    Command-line interface for SQL formatting

    SQL Worksheet hints for formatting output

    Summary

    3. The Power of SQL Reports

    Introducing SQL Developer reports

    Who can run reports?

    When do you use reports?

    Tree layout for ease of navigation

    Running a report

    Privileges required for running reports

    Running data dictionary reports

    Getting to know the data dictionary

    About the database

    Reviewing privileges and security reports

    Assisting with quality assurance

    Using PL/SQL reports

    Running ASH and AWR reports

    Migration reports

    Application Express reports

    Data Modeler reports

    More report categories

    Running reports from other menus

    The Monitor Sessions report

    Managing the database

    Real-time SQL monitoring

    Creating your own reports

    Getting started

    Creating folders

    Storing reports

    Creating general reports

    Building general tabular reports

    Adding bind variables

    Drilling down through reports

    Creating a drill-down report

    Master-detail reports

    Creating master-detail reports

    Adding charts

    Importing and exporting

    Sharing reports through user-defined extensions

    DB Doc generation

    Summary

    4. Working with PL/SQL

    Creating, compiling, and debugging PL/SQL

    Writing PL/SQL in the SQL Worksheet

    Using code insight

    Using code snippets and code templates

    Working with triggers

    Using the Create Trigger dialog

    Creating INSTEAD OF triggers

    Controlling triggers

    Adding functions or procedures

    Working with errors

    Creating packages

    Creating the body

    Refactoring code

    Searching for code

    Finding a DB Object

    Debugging PL/SQL code

    Using the debugging mechanism in SQL Developer

    Using the Oracle debugging packages

    Debugging

    Working with Explain Plan

    Controlling the Explain Plan output

    Execution plan details

    Using SQL reports

    Running the Top SQL reports

    Summary

    5. SQL Developer for DBAs

    Database instance viewer

    Finding database objects

    Database configuration – initialization parameters

    Automatic undo management

    Current database properties

    Restore points

    Data Pump

    Export Jobs

    Import Jobs

    Performance

    Snapshots (filtered)

    Baselines

    Baseline templates

    Automatic Database Diagnostic Monitor (ADDM)

    ASH Report Viewer

    AWR

    RMAN Backup/Recovery

    Backup jobs

    Backup sets

    Image copies

    RMAN settings

    Scheduled RMAN actions

    Resource manager

    Consumer group mappings

    Consumer groups

    Plans

    Settings

    Statistics

    Scheduler

    Global Attributes

    Job Classes

    External Destinations

    Security

    Audit Settings

    Profiles

    Roles

    Users

    Storage

    Archive Logs

    Control Files

    Datafiles

    Redo Log Groups

    Rollback Segments

    Tablespaces

    Temporary Tablespace Groups

    Summary

    6. SQL Developer Accessibility

    Screen reader readability

    Keyboard access

    Font and color choices

    No audio-only feedback

    Screen magnifier usability

    Change the editor or tabbed view of a file

    Read text in a multi-line edit field

    Read the line number in the source editor

    Customize the accelerators keys

    The look and feel of SQL Developer

    Customize syntax highlighting

    Display line numbers in Code Editor

    Timing for completion insight

    Specify the columns in the Debugger

    Summary

    7. Importing, Exporting, and Working with Data

    Exporting data

    Exporting instance data

    Exporting table data

    Setting up the export file

    Exporting SQL DML

    Exporting to HTML

    Supporting export for SQL*Loader

    Exporting to Microsoft Excel

    Exporting to XML

    Exporting DDL (Metadata)

    Exporting table DDL

    Selecting multiple tables for DDL export

    Using the Database Export wizard to export DDL and data

    Starting the export wizard

    Selecting objects for generation

    Specifying objects

    Running the script

    Importing data

    Importing data from SQL script files

    Importing data from XLS and CSV files

    Creating a table on XLS import

    Summary

    8. Database Connections and JDBC Drivers

    Working with Oracle connections

    Using alternative Oracle connection types

    Reviewing the Basic connection

    Accessing the tnsnames.ora file

    Accessing LDAP server details

    Creating advanced connections with JDBC URLs

    Connecting to Oracle TimesTen

    Reviewing JDBC drivers

    Oracle JDBC thin driver (Type IV driver)

    Oracle JDBC thick driver (Type II driver)

    SQL Developer's shipped drivers

    Fixing connection errors

    Using different authentication methods

    OS Authentication

    Setting the database environment variables

    Creating a connection using OS Authentication

    Using proxy authentication

    Using the Kerberos authentication

    Implementing Kerberos authentication in SQL Developer

    Kerberos authentication using the thin JDBC driver

    Creating non-Oracle database connections

    Setting up JDBC drivers

    Using Check for Updates

    Manually adding JDBC drivers

    Summary

    9. Introducing SQL Developer Data Modeler

    Oracle SQL Developer Data Modeler

    Feature overview

    Integrated architecture

    Getting started

    Oracle clients and JDBC drivers

    Creating your first models

    Importing from the Data Dictionary

    Creating a database connection

    Using the Import Wizard

    Reviewing the results

    Working with diagrams and their components

    Formatting the elements

    Controlling the layout

    Adjusting the level of detail displayed

    Adjusting the width and height across the model

    Analysis, design, and generation

    The flow of work

    Starting with analysis (top down)

    Importing existing models (bottom up)

    Building the relational model

    Logical models

    Creating an ERD

    Creating entities

    Adding attributes

    Working with relationships

    Creating constraints, domains, and setting default values

    Working with domains

    Creating domains

    Using domains to implement check constraints

    Introducing forward and reverse engineering

    Forward engineering

    Reverse engineering models

    Creating relational models

    Building the physical model

    Importing a schema from the Data Dictionary

    Generating the DDL

    Creating a new model

    Summary

    10. Extending SQL Developer

    Introducing extensibility

    Extensibility in SQL Developer

    Who builds extensions?

    Why extend?

    SQL Developer XML extension types

    Adding an XML extension

    Sharing user-defined reports

    Adding display editors

    Examples of display editors

    Include subpartitions

    Use restricted queries

    Add display editors for new navigator nodes

    Building the XML file for a display editor

    Working with context menus

    Adding a context menu to the connections menus

    Passing parameters

    Creating a utility using context menus

    Including the user-defined extension for context menus

    Adding new nodes to the Connections navigator

    Including user-defined extensions for a navigator node

    Adding a new tree to the navigator

    Working with extensions

    Controlling existing extensions

    Adding in new Java extensions

    Removing extensions

    Sharing extensions

    Summary

    11. Working with Application Express

    Setting the scene

    Setting up Application Express

    Creating a workspace and database schema

    Creating an Application Express user

    Browsing applications in SQL Developer

    Creating a connection in SQL Developer

    Browsing and working with schema objects

    Browsing the applications

    Drilling down into lists of values

    Focusing on pages

    Mapping objects from SQL Developer to Application Express

    Tuning SQL and PL/SQL code using SQL Developer

    Working with Region Source SQL

    Tuning with Explain Plan

    Working with PL/SQL code

    Replacing the anonymous block in Application Express

    Managing applications in SQL Developer

    Importing applications

    Modifying applications

    Deploying applications

    Controlling services

    Reporting on applications using SQL Developer

    Summary

    12. Working with SQL Developer Migrations

    Introducing SQL Developer Migrations

    An overview of the migration process

    Offline or online migration choices

    Supported third-party databases

    Setting up your environment

    Setting up JDBC drivers

    Creating third-party connections

    Accessing non-Oracle databases

    Browsing database objects

    Managing the repository

    Setting up the repository owner:

    Creating the repository

    Associating a repository with a user

    Planning database connections

    Setting up the source database connection

    Setting up the target database connection

    Migrating

    Using Quick Migrate

    The migration

    Verifying the results

    Reviewing the logs

    Generating scripts

    Migration reports

    Summary

    13. Oracle Data Miner 4.1

    Data source node

    Creating a new project

    Creating a new workflow

    Addition of nodes to the workflow

    Link nodes

    Run nodes

    View reports

    JSON data type

    JSON Query node

    The APIs for data mining

    Summary

    14. REST Data Services and REST Development

    About Oracle REST Data Services

    The Oracle REST Data Services Administration toolbar and context menu

    Connecting to Oracle REST Data Services

    REST Data Services navigator – global and database settings

    About RESTful services

    RESTful services terminology

    RESTful services requirements and setup

    Summary

    Index

    Oracle SQL Developer


    Oracle SQL Developer

    Copyright © 2016 Packt Publishing

    All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

    Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

    Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

    First published: January 2016

    Production reference: 1250116

    Published by Packt Publishing Ltd.

    Livery Place

    35 Livery Street

    Birmingham B3 2PB, UK.

    ISBN 978-1-78528-127-3

    www.packtpub.com

    Credits

    Author

    Ajith Narayanan

    Reviewer

    Lewis Cunningham

    Acquisition Editors

    Ruchita Bhansali

    Sonali Vernekar

    Content Development Editor

    Anish Dhurat

    Technical Editor

    Ryan Kochery

    Copy Editors

    Akshata Lobo

    Angad Singh

    Merilyn Pereira

    Stuti Srivastava

    Vikrant Phadke

    Project Coordinator

    Bijal Patel

    Proofreader

    Safis Editing

    Indexer

    Rekha Nair

    Production Coordinator

    Aparna Bhagat

    Cover Work

    Aparna Bhagat

    About the Author

    Ajith Narayanan is the chief technology officer (CTO) of InfraStack-Labs in Bangalore, India, and has more than 11 years of work experience as an Oracle [apps] DBA and platform architect with expertise in infrastructure architecture, capacity planning, and performance tuning of medium to large e-business suite environments.

    He holds a postgraduate degree with PGDBA (finance) from Symbiosis, Pune, an M.S. (software systems) from BITS Pilani, a BE (electronics and communication) from Amrita Institute of Technology, and a diploma (computer technology) from Sree Narayana Guru Institute of Technology.

    He has worked in different technical positions as an Oracle DBA, APPS DBA, Oracle apps platform architect, and configuration management technical leader in companies such as GE, Dell, JP MorganChase, Oracle, and TCS. Ajith was at GE before joining InfraStack-Labs.

    He is also a regular speaker at national and international Oracle user group conferences such as SANGAM, NZOUG, DOAG, UKOUG, OTN APAC Tour, AIOUG Tech Days, and so on. His white papers have been published on the Oracle Technology Network in English, Portuguese, and Spanish. Ajith is currently serving the ORACLERACSIG board as the web seminar chair (from October 2015), and has previously served the board as the website chair (September 2011 to September 2013).

    I would like to thank my entire family, including my wife, Anjali, daughter, Akshara, and my father, mother, and sister, who always gave me continuous support. Also, thanks to Packt for giving me an opportunity to write a book.

    I would also like to thank Lewis Cunningham for carefully reviewing the chapters and making the necessary recommendations and comments to make the chapters technically error-free and more informative.

    About the Reviewer

    Lewis Cunningham is an Oracle ACE and the author of multiple database-related books. He has multiple certifications (Oracle Certified Professional being one of them). Lewis works in the financial industry as a database architect and application developer and has been doing so for over 20 years.

    He enjoys reading, writing, gardening, woodworking, programming, and playing FPS and RPG games. He lives in Tampa, Florida, USA, with his wife, two sons, three dogs, and one cat.

    www.PacktPub.com

    Support files, eBooks, discount offers, and more

    For support files and downloads related to your book, please visit www.PacktPub.com.

    Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at for more details.

    At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

    https://www2.packtpub.com/books/subscription/packtlib

    Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.

    Why subscribe?

    Fully searchable across every book published by Packt

    Copy and paste, print, and bookmark content

    On demand and accessible via a web browser

    Free access for Packt account holders

    If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.

    Instant updates on new Packt books

    Get notified! Find out when new books are published by following @PacktEnterprise on Twitter or the Packt Enterprise Facebook page.

    Preface

    The book dives into the details of Oracle SQL Developer 4.1, which is a graphical version of SQL*Plus. Oracle SQL Developer has been continuously evolving and reaching maturity with the capability to give database developers and DBAs a convenient way to perform basic and advanced database tasks. Oracle Developers and DBAs can browse, create, edit, and delete (drop); run SQL statements and scripts; edit and debug PL/SQL code; manipulate and export (unload) data; and view and create custom reports.

    After reading this book, Oracle developers and DBAs will learn to install Oracle SQL Developer and learn to navigate through all its advanced features that have been introduced in version 4.1. You will be competent enough to use all the advanced features available, helping them perform basic and advanced database tasks with ease.

    What this book covers

    Chapter 1, Getting Started with SQL Developer 4.1, covers how to prepare the SQL Developer environment on your laptop, including the download, installation, installation options, creating database connections, and so on.

    Chapter 2, Database Connections and SQL Worksheet, covers how to make database connections and create, update, or delete database objects using the SQL worksheet.

    Chapter 3, The Power of SQL Reports, guides a DBA or an application developer to use reports for running a set of queries that are frequently executed. This chapter will explain how to categorize a group of these SQL queries (reports). The first section will discuss the reports navigator in general, how to run and use reports, and any errors you might encounter.

    Chapter 4, Working with PL/SQL, shows you how to create, edit, compile, and debug PL/SQL blocks efficiently in the first section, followed by the use of SQL and PL/SQL tuning tools provided by SQL Developer.

    Chapter 5, SQL Developer for DBAs, shows you how a DBA can leverage SQL Developer's features to efficiently work with multiple databases in the areas of manageability, monitoring, performance tuning, and so on.

    Chapter 6, SQL Developer Accessibility, provides information about the accessibility features of Oracle SQL Developer. It includes using a screen reader and Java access bridge with Oracle SQL Developer, Oracle SQL Developer features that support accessibility, recommendations for customizing Oracle SQL Developer, and highly visual features of Oracle SQL Developer.

    Chapter 7, Importing, Exporting, and Working with Data, uses SQL Developer features such as the export/import feature using which we can easily and quickly export and import data from within a database or across a database, and also compare all the data after the activity.

    Chapter 8, Database Connections and JDBC Drivers, uses alternative Oracle connections such as tnsnames.ora, LDAP, JDBC URLs, and also shows you how to create non-Oracle database connections.

    Chapter 9, Introducing SQL Developer Data Modeler, uses data modeler features such as diagrams, components, entity relationship diagrams, relational and physical data models, and some forward/reverse engineering possibilities using SQL developer.

    Chapter 10, Extending SQL Developer, helps you learn the range of support available for adding XML extensions, a task that is easily within the reach of any database developer with SQL and PL/SQL skills. The nature of these extensions can range from including a single XML report to adding complex Java extensions bundled as JAR files.

    Chapter 11, Working with Application Express, shows you how to connect to Application Express, browse your applications, review some of the administration utilities, and use the SQL Worksheet to refactor PL/SQL code.

    Chapter 12, Working with SQL Developer Migrations, reviews the tool support for a migration without discussing the additional work required when planning and preparing for a migration.

    Chapter 13, Oracle Data Miner 4.1, teaches you about the new Data Miner features in SQL Developer 4.1 and the general enhancements to Oracle Data Miner 4.1. In response to the growing popularity of JSON data and its use in big data configurations, Data Miner now provides an easy-to-use JSON query node.

    Chapter 14, REST Data Services and REST Development, shows you how Oracle REST Data Services (a JEE-based alternative to Oracle HTTP Server (OHS) and mod_plsql) can be administered. The second session will be a detailed discussion of how we can use SQL Developer to create, maintain, and use RESTful services.

    What you need for this book

    This book was written on the SQL Developer 4.1 tool and the new features provided by Oracle. Though the name has Developer in it, the book should be equally useful for developers, DBAs, and architects. All the examples and features should work with version 4.1, which can be downloaded for free from the OTN website. We need minimum JDK 1.8 to use the SQL Developer 4.1 version.

    Who this book is for

    Oracle database developers and DBAs who seek a convenient way to perform basic and advanced database tasks are the audience of this book.

    Conventions

    In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

    Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: We can include other contexts through the use of the include directive.

    A block of code is set as follows:

     

       

     

     

     

    Any command-line input or output is written as follows:

    FROM DEPARTMENTS WHERE DEPARTMENT_NAME = &DNAME;

    New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: If you want to use these extensions, then invoke the wizard, select Search Update Centers, and include the Third Party SQL Developer Extensions.

    Note

    Warnings or

    Enjoying the preview?
    Page 1 of 1