Você está na página 1de 30

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections:

Creating User Defined Extensions in Oracle SQL Developer


Purpose
This tutorial shows you how to add XML extensions to Oracle SQL Developer.

Time to Complete
Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Approximately 40 mins.

Overview
Oracle SQL Developer is a free graphical tool that enhances productivity and simplifies database development tasks. Using Oracle SQL Developer, you can browse database objects, run SQL statements, edit and debug PL/SQL statements and run reports, whether provided or created. Developed in Java, Oracle SQL Developer runs on Windows, Linux and the Mac OS X. This is a great advantage to the increasing number of developers using alternative platforms. Oracle SQL Developer is built on an extensible framework and, as such, is extensible itself. You can create basic XML extensions or more involved Java extensions to add utilities or other functionality to the product.

Prerequisites Viewing Screenshots


Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

Before starting this tutorial, you should: Install Oracle SQL Developer 3.0 from OTN. Follow the release notes here. Install the Oracle Database 11g. Unlock the HR user. Login to SQL Developer as the SYS user and execute the following command: alter user hr identified by hr account unlock; Download and unzip the sql_files.zip file that contains all the files you need to perform this tutorial.

Creating a Database Connection


To create a database connection, perform the following steps: Note: If you already have a database connection, you need not perform the following steps, you can move straight to Sharing Reports. Inyou the installed Connections tab, right-click and select New the SQL DeveloperConnections icon on your desktop, click theConnection icon to start .your SQL Developer and move 3 . If 1 3. If you do not have the icon located on your desktop, perform the following steps to create a shortcut to laun Note: If this3.0 tabdirectly is not visible, select View > Connections. Developer from your desktop. Open the directory where the SQL Developer 3.0 is located, right-click sqldeveloper.exe (on Windows) or sqldeveloper.sh (on Linux) and select Send to > Desktop (create shortcut).

4 . Enter the following and click Test: Connection Name: HR_ORCL Username: hr Password: <your_password> Select Save Password Hostname: localhost Port: 1521 SID: <your_SID>

1 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

5 . Check for the status of the connection on the left-bottom side (above the Help button). It should read Succes save the connection, click Connect.

6 . Once the connection is saved, you will see the database in the list. When a connection is created, a SQL Wo is opened automatically. The SQL Worksheet allows you to execute SQL against the connection you just crea

Sharing Reports
You can share user-defined reports by adding them as an extension to Oracle SQL Developer. To do this, perform the following steps: 1 . Select the Reports tab. Note: If this tab is not visible, select View > Reports.

2 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

2 . Expand each of the nodes. There are a selection of shipped reports under the Data Dictionary Reports nod

3 . There are also shipped Data Modeler Reports. Any report you create is added under the User Defined Re node.

3 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

4 . To add a Shared Reports extension, select Tools > Preferences.

5 . Expand the Database node and select User Defined Extensions.

4 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

6 . Click Add Row .

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

7 . Click in the field under Type and select REPORT from the list.

8 . Click in the field under Location and click Browse .

5 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

9 . Browse to the directory where you unzipped the files from the Prerequisites section and select the employees_reports.xml file. Then click Save .

10 . Ensure that the location is selected and click OK.

6 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

11 . Exit and restart Oracle SQL Developer for the changes to take effect.

12 . The Shared Reports node is added in the Reports tab (View > Reports).

Note: If you do not see the Shared Reports node, then the extension was not saved properly in the previous

13 . Expand the Shared Reports and EmployeeReports nodes and select Employees per Manager.

7 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
14 . Select the HR_ORCL connection, if prompted, to run the report.
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

on the per Manager report. Note that the context menu does not permit you to edit th 15 . Right-click Adding a Tab to Employees Display Column Comments report. You can copy and recreate it as a User Defined report, but shared reports are not editable. Each object in the Navigator has a matching set of definition tabs. These are based on queries against the Data Dictionary. Not all features describing an object are displayed in these tabs. To create a Column Comments tab for a table, perform the following steps: 1 . Select the Connections and expand the connection. Note: If this tab is not visible, select View > Connections.

2 . Expand the Tables node and select EMPLOYEES.

8 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

3 . The initial tab displayed is the Columns. Select the Constraints and view the details displayed.

4 . Click through the other tabs to view the details available for a table.

9 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

5 . You can also display the column comments for a table in a tab. To do this you need to add an extension. Sele Tools > Preferences.

6 . As before, expand the Database node and select User Defined Extensions. Click Add Row .

10 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

7 . Click in the field under Type and select EDITOR from the list.

8 . Click in the field under Location and click Browse .

11 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

9 . Browse to the directory where you unzipped the files from the Prerequisites section and select the comment_tab.xml file.

10 . Ensure that the location is selected and click OK.

12 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

11 . Exit and restart Oracle SQL Developer for the changes to take effect.

12 . Expand the HR_ORCL connection from the Connections tab. Expand the Tables node and select EMPLOY

13 . Click through the tab till you reach the last tab. A new Column Comments tab is added after the other tabs.

13 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Note: If you do not see the Column Comments tab, then the extension was not saved properly.

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Reviewing the XML File Structure


In order to add an XML extension to Oracle SQL Developer, you need to create the XML file. In this section, you review the structure of the XML file used to add the Column Comments tab extension (previous topic). 1 . In Oracle SQL Developer, select File > Open.

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

2 . Browse to the directory where you unzipped the files from the Prerequisites section. Select the comment_ta file and click Open.

3 . Double-click the tab to maximize the editor.

14 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

4 . The Oracle SQL Developer framework recognizes the XML tags. The tags you are interested in are the title SQL query tags. The title here is Column Comments and is used to name the tab.

5 . The SQL query is querying the Data Dictionary for the column comments for the OWNER and OBJECT_NA this example, the EMPLOYEES Table for the HR schema.

15 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

Adding a Tab to Describe Sub-partitions


You can add a tab to describe sub partitions within a table. In this example, you create a table with partitions and sub partitions and add an extension to review the details. To do this, perform the following steps: 1 . In Oracle SQL Developer, select File > Open.

2 . Browse to the directory where you unzipped the files from the Prerequisites section. Select the cust_part.sq click Open.

16 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

3 . Review the file. This script creates a partitioned table, CUSTOMERS_PART.

4 . Select the HR_ORCL connection from the drop-down list on the right of the SQL Worksheet.

17 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

5 . Click the Run Script

6 . To add the extension, select Tools > Preferences.

18 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

7 . Expand the Database node and select User Defined Extensions. Click Add Row .

8 . Click in the field under Type and select EDITOR from the list.

19 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

9 . Click in the field under Location and click Browse .

10 . Browse to the directory where you unzipped the files from the Prerequisites section and select the subpartition_tab.xml file.

20 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

11 . Ensure that the location is selected and click OK.

12 . Exit and restart Oracle SQL Developer for the changes to take effect.

HR_ORCL connection in the Connections tab. Expand the Tables node and select the 13 . Expand Adding a the Context Menu

CUSTOMERS_PART table. In the above examples, you added tabs to the table definition using XML files. You can add context menus using a similar approach. Context menus can be added at any level to the existing context menu structure. In this example, you add a high-level context menu to set a transaction to READ ONLY. To add a new context menu, perform the following steps: 1 . In Oracle SQL Developer, select File > Open.

21 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

2 . Browse to the directory where you unzipped the files from the Prerequisites section. Select the readonly_me file and click Open.

3 . Double-click tab to maximize the editor.

22 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

4 . This XML file is more involved. Notice that in this case there are two sections; one for Set Read Only and the for Set Read/Write . The image below highlights one of the sections between the <item > tags.

23 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

5 . Notice the <prompt> and <confirmation> tags.

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

6 . To add the extension, select Tools > Preferences.

7 . Expand the Database node and select User Defined Extensions. Click Add Row .

24 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

8 . Click in the field under Type and select ACTION from the list.

9 . Click in the field under Location and click Browse .

25 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

10 . Browse to the directory where you unzipped the files from the Prerequisites section and select the readonly_menu.xml file.

11 . Ensure that the location is selected and click OK.

26 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

12 . Exit and restart Oracle SQL Developer for the changes to take effect.

13 . Select the HR_ORCL connection and right-click to invoke the context menu. Scroll to the bottom and select S Read Only .

14 . The title Set Read Only is displayed in the dialog header. Notice the Prompt. The text is from the following p the xml file. <prompt type="confirm"> <label>Confirm Setting Connection to Read Only.</label> </prompt>

27 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
15 . Select the SQL tab. Find the equivalent SQL code in the XML file. Click Apply .
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

16 . The final Confirmation dialog is also driven by the XML file. Click OK.

17 . Expand the HR_ORCL connection and expand the Tables node. Select EMPLOYEES. Select the Data tab.

28 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

Viewing Screenshots
Click icon to hide all screenshots

18 . Modify the FIRST_NAME for one of the records.


Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

19 . Select Commit changes

to commit the changes.

29 of 30

10/10/2011 17:49

Creating User Defined Extensions

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/sqldev...

Print Preview

Creating User Defined Extensions in Oracle SQL Developer


This tutorial contains the following sections: Purpose Time to Complete Overview Prerequisites Creating a Database Connection Sharing Reports Adding a Tab to Display Column Comments Reviewing the XML File Structure Adding a Tab to Describe Sub-partitions Adding a Context Menu Summary

20 . You are not able to commit the records due to the READ ONLY transaction.

Viewing Screenshots
Click icon to hide all screenshots Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.

Summary
In this tutorial, you have learned how to: Create a Database Connection Share Reports Add a Tab to Display Column Comments Review the XML File Structure Add a Tab to Describe Sub-partitions Add a Context Menu

About Oracle |Oracle and Sun |

| Careers | Contact Us | Site

Maps | Legal Notices | Terms of Use | Your Privacy Rights

30 of 30

10/10/2011 17:49

Você também pode gostar