Getting Started With the Oracle Database Plugin for Eclipse
Welcome to the first step towards supporting the Eclipse Data Tool Platform (DTP) by Oracle. This document provides a high-level tour through each of the Oracle Database Plugin features. Note that screen shots and examples in this document use the HR schema that is installed by default with Oracle Database. You may download The Database Explorer is the Datasource View provided by the DTP. It is used to create Database connections and to navigate the database. 2.1.1. Connecting to an Oracle Database You can create a connection to a database using the Data Source Explorer view.To open the Database Development perspective, click Windows > Open Perspective > Other from the Main menu, and then select Database Development from the Open Perspective dialog. This perspective opens the Data Source Explorer (DSE) view.
Right click on the Databases node in DSE and select
New... to create a database connection, as Figure 2 shows.
This displays the New Connection Profile wizard, as Figure 3 shows.
Select Oracle Database Connection
from the list, and then click Next. Complete the rest of the dialog as follows:
2.1.2. Exploring the Oracle DatabaseThe open database connection allows you to navigate through the database objects.
2.1.3. Editing Data from a TableWith the enabled database connection, you can edit the table data in the Data Source Explorer (DSE).To do so, navigate to the table you want to edit in the DSE, then right-click the table, and select Data > Edit, as Figure 7 shows.
This opens the table data in the editor, as Figure 8 shows. You can make changes to the table data by right-clicking on a table cell and using the popup menu. When you have finished editing, click Save to save the changes to the database.
2.1.4. Loading Data into a TableTo load data into a table from a text file, in the DSE, navigate to the table into which you want to load data. Right-click the table, and select Data > Load from the drop-down menu, as Figure 9 show.This opens the Load Data dialog, as Figure 10 shows. Complete fields on the dialog, and then click Finish. Note that this may fail if there is a foreign key violation.
2.1.5. Extracting Data from a TableTo extract data from a table to a text file, in the DSE, navigate to the table from which you want to extract data. Right-click the table and select Data > Extract from the drop-down menu, as Figure 11 shows.This opens the Extract Data dialog, as Figure 12 shows. Complete fields on the dialog, and then click Finish.
2.1.6. Generating DDLYou can use the Generate DDL option on most database objects to create or drop the object.In the DSE, navigate to the object you want to create or drop, right-click the object, and select Generate DDL from the drop-down menu to create a DDL script, as Figure 13 and Figure 14 show. Note that you need to create a project in order to save the generated DDL script. See Creating a project for more details.
Figure 14. Generating DDL The preceding
steps generate the following statements:
SQL Tools enable you to edit and run stored procedures and functions, as well as execute the so-called explain plans in either graphic or text mode. To use an SQL Editor, do the following:
The procedure or function opens in the SQL Editor, as Figure 16 shows. The SQL Editor enables standard
text-based editing of SQL statements, provides syntax color, and multiple statement support.
To execute a stored procedure or function, do the following:
If the procedure or function has any input parameters, the Configure Parameters dialog appears, as Figure 18 shows. Enter input values and click OK to run the procedure or function.
For example, open the Alternatively, if you select Execute Text Explain Plan from the drop-down menu, it will result in a text version of the execution plan, as Figure 20 demonstrates.
To grant specific database privileges to a specific user, do the following:
This will open the Grant Privileges dialog, as Figure 22 shows.
Select one of the privileges from the list and click OK. To revoke specific database privileges from a specific user, do the following:
This will open the Revoke Privileges dialog, as Figure 24 shows.
Select one of the privileges from the list and click OK.
|