Oracle-Sql-Developer-Users-Guide.Pdf
Total Page:16
File Type:pdf, Size:1020Kb
Oracle® SQL Developer User's Guide Release 19.2 F20349-01 August 2019 Oracle SQL Developer User's Guide, Release 19.2 F20349-01 Copyright © 2006, 2019, Oracle and/or its affiliates. All rights reserved. Primary Author: Celin Cherian Contributing Authors: Chuck Murray This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your li‐ cense agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engi‐ neering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibit‐ ed. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-spe‐ cific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the pro‐ grams, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government. This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devi‐ ces. UNIX is a registered trademark of The Open Group. This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly dis‐ claim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, prod‐ ucts, or services, except as set forth in an applicable agreement between you and Oracle. Contents Preface Audience xxvi Documentation Accessibility xxvi Product Accessibility xxvi Related Documents xxvi Conventions xxvii Third-Party License Information xxvii 1 SQL Developer Concepts and Usage 1.1 About SQL Developer 1-2 1.2 Installing and Getting Started with SQL Developer 1-2 1.3 SQL Developer User Interface 1-3 1.3.1 Menus for SQL Developer 1-7 1.3.2 Restoring the Original "Look and Feel" 1-12 1.4 Database Objects 1-13 1.4.1 Applications (Application Express 3.0.1 and Later) 1-13 1.4.2 Cache Groups (Oracle TimesTen In-Memory Database) 1-14 1.4.3 Chains 1-14 1.4.4 Credentials 1-15 1.4.5 Database Destinations 1-15 1.4.6 Database Links (Public and Private) 1-15 1.4.7 Destination Groups 1-15 1.4.8 Directories 1-16 1.4.9 Editions 1-16 1.4.10 File Watchers 1-16 1.4.11 Functions 1-16 1.4.12 Indexes 1-17 1.4.13 Java Sources 1-18 1.4.14 Jobs 1-18 1.4.15 Job Classes 1-18 1.4.16 Operators 1-18 1.4.17 Materialized Views 1-19 iii 1.4.18 Materialized View Logs 1-19 1.4.19 Multitenant Container Database (CDB) 1-19 1.4.20 Packages 1-19 1.4.21 Procedures 1-20 1.4.22 Programs 1-21 1.4.23 Queues 1-21 1.4.24 Queue Tables 1-21 1.4.25 Recycle Bin 1-21 1.4.26 Replication Schemes (Oracle TimesTen In-Memory Database) 1-22 1.4.27 Schedules 1-22 1.4.28 Sequences 1-22 1.4.29 Synonyms (Public and Private) 1-22 1.4.30 Tables 1-22 1.4.30.1 Flashback Table Support 1-25 1.4.31 Triggers 1-25 1.4.32 Types 1-25 1.4.33 Users (Other Users) 1-25 1.4.34 Views 1-26 1.4.35 Window Groups 1-26 1.4.36 Windows 1-27 1.4.37 XML DB Repository 1-27 1.4.38 XML Schemas 1-27 1.4.39 Captured and Converted Database Objects (for Migration) 1-27 1.5 Database Connections 1-28 1.5.1 Using Folders to Group Connections 1-30 1.5.2 Sharing of Connections 1-31 1.5.3 Advanced Security for JDBC Connection to the Database 1-31 1.5.4 Connections with Operating System (OS) Authentication 1-31 1.5.5 Connections with Proxy Authentication 1-32 1.5.6 Connections with SSH Authentication 1-33 1.6 Entering and Modifying Data 1-34 1.7 Running and Debugging Functions and Procedures 1-36 1.7.1 Using Bookmarks When Editing Functions and Procedures 1-38 1.7.2 Remote Debugging 1-38 1.7.3 Displaying SQL Trace (.trc) Files 1-39 1.7.4 Using the PL/SQL Hierarchical Profiler 1-39 1.7.5 Setting Expression Watches 1-40 1.7.6 Semantic Analysis 1-40 1.7.6.1 SQL Injection Detection 1-40 1.8 Using the SQL Worksheet 1-42 1.8.1 SQL*Plus Statements Supported in SQL Worksheet 1-45 iv 1.8.2 Script Runner 1-46 1.8.3 Execution Plan 1-47 1.8.4 Autotrace Pane 1-47 1.8.5 DBMS Output Pane 1-48 1.8.6 OWA Output Pane 1-48 1.8.7 SQL History 1-48 1.8.8 Query Builder 1-49 1.8.9 Command-Line Interface for SQL Formatting 1-49 1.8.10 SQL Worksheet "Hints" for Formatting Output 1-50 1.8.11 Gauges: In the SQL Worksheet and User-Defined Reports 1-50 1.8.12 Entering OLAP DML Statements in the SQL Worksheet 1-52 1.9 Using Snippets to Insert Code Fragments 1-52 1.9.1 User-Defined Snippets 1-52 1.10 Finding Database Objects 1-53 1.11 Using Recent Objects 1-54 1.12 Using Versioning 1-55 1.12.1 About Subversion and SQL Developer 1-55 1.12.2 Pending Changes 1-56 1.13 Using DBA Features in SQL Developer 1-56 1.13.1 Container Database (CDB) 1-59 1.13.2 Database Configuration 1-59 1.13.2.1 Initialization Parameters 1-59 1.13.2.2 Automatic Undo Management 1-59 1.13.2.3 Current Database Properties 1-59 1.13.2.4 Restore Points 1-60 1.13.2.5 View Database Feature Usage 1-60 1.13.3 Database Status 1-60 1.13.3.1 Status 1-60 1.13.3.2 DB Instance 1-60 1.13.3.3 Instance Viewer 1-60 1.13.4 Data Guard 1-61 1.13.5 Data Pump 1-61 1.13.5.1 Export Jobs 1-61 1.13.5.2 Import Jobs 1-61 1.13.6 Oracle Sharding 1-61 1.13.7 Performance 1-63 1.13.7.1 Snapshots 1-63 1.13.7.2 Baselines 1-63 1.13.7.3 Baseline Templates 1-63 1.13.7.4 Automatic Database Diagnostic Monitor (ADDM) 1-64 1.13.7.5 ASH (Active Session History) Report Viewer 1-64 v 1.13.7.6 AWR (Automatic Workload Repository) 1-64 1.13.8 RMAN Backup/Recovery 1-64 1.13.8.1 Backup Jobs 1-65 1.13.8.2 Backup Sets 1-65 1.13.8.3 Image Copies 1-65 1.13.8.4 RMAN Settings 1-65 1.13.8.5 Scheduled RMAN Actions 1-65 1.13.8.6 Using Action Jobs 1-65 1.13.9 Resource Manager 1-66 1.13.9.1 Consumer Group Mappings 1-66 1.13.9.2 Consumer Groups 1-66 1.13.9.3 Plans 1-66 1.13.9.4 Settings 1-67 1.13.9.5 Statistics 1-67 1.13.10 SQL Translator FrameWork 1-67 1.13.10.1 SQL Translator Profiles 1-67 1.13.10.2 SQL Translators 1-67 1.13.11 Scheduler 1-67 1.13.11.1 Global Attributes 1-67 1.13.11.2 Job Classes 1-67 1.13.11.3 External Destinations 1-67 1.13.12 Security 1-68 1.13.12.1 Audit Settings 1-68 1.13.12.2 Profiles 1-68 1.13.12.3 Roles 1-68 1.13.12.4 Users 1-68 1.13.13 Storage 1-68 1.13.13.1 Archive Logs 1-68 1.13.13.2 Control Files 1-68 1.13.13.3 Datafiles 1-68 1.13.13.4 Redo Log Groups 1-69 1.13.13.5 Rollback Segments 1-69 1.13.13.6 Tablespaces 1-69 1.13.13.7 Temporary Tablespace Groups 1-69 1.13.14 Tuning 1-69 1.13.14.1 Real Time SQL Monitor 1-69 1.14 Scheduling Jobs Using SQL Developer 1-69 1.14.1 Scheduler Design Editor 1-71 1.15 Using the Cart 1-71 1.15.1 Adding Data Files to the Cart 1-74 1.15.2 Cart Versus Database Export Wizard 1-75 vi 1.16 Spatial Support in SQL Developer 1-76 1.16.1 Context Menu Operations on Spatial Data and Metadata 1-76 1.16.2 Map Visualization of Spatial Data 1-76 1.16.2.1 Visualizing Geometries by Creating and Executing a Query 1-77 1.16.2.2 Visualizing Geometries from the Table Data Grid 1-78 1.17 Change Manager Support in SQL Developer 1-78 1.17.1 Change Plan Administrators and Developers 1-79 1.17.2 Developing Change Plans with SQL Developer 1-80 1.17.2.1 Creating a Repository Connection 1-81 1.17.2.2 Creating and Deleting Change Plans 1-81 1.17.2.3 Adding and Updating Change Items 1-81 1.17.2.4 Using Change Plans to Capture Change in SQL Developer 1-81 1.17.3 Change Manager Actions to Perform with Enterprise Manager 1-82 1.17.3.1 Creating Change Plans from Change Manager Schema Compar‐ isons 1-82 1.17.3.2 Deploying Change Plans 1-82 1.18 Apache Hadoop