PL SQL Developer Usage Summary

Source: Internet
Author: User
Tags beautifier

If the OS is a Windows 7 64-bit system, the Oracle version for Oracle 11g 64 installs PL SQL Developer please refer to
http://myskynet.blog.51cto.com/1471053/623957 HTTP://SUPPORT.MICROSOFT.COM/KB/2585547/ZH-TW

1, PL/SQL developer remember login password

When using PL/SQL developer, you want PL/SQL developer to remember the username and password to log in to Oracle for your convenience;

Setup method: Tools->preferences->oracle->logon History, "store" is the default check, tick "store with password", Re-login at the time of entering the password then remember

2. Execute a single SQL statement

When using PL/SQL developer, press the F8 key, PL/SQL developer is the default to execute all of this window of the statement, you need to set the SQL statement that the mouse, that is, execute the current SQL statement, each SQL statement at the end of the ";" End

Setting method: Tools->preferences-->window types-->sql window, tick "AutoSelect Statement".

If you want to execute multiple SQL statements, use the mouse to select these statements and then execute F8.

3. Formatting SQL statements

When using PL/SQL developer, sometimes the SQL statement entered is too long or too messy, I hope to use a more general format of the words, so look good, or analysis; Edit-->pl/sql Beautifier

To use: Select the SQL statement that you want to format, and then click the PL/SQL Beautifier button on the toolbar.

4. View Execution Plan

When using the SQL window of PL/developer, sometimes the efficiency of input SQL statement execution, analysis of the following table structure, how to improve the efficiency of the query, you can view the execution plan provided by Oracle;

To use: Select the SQL statement you want to analyze, and then click the Explain Plan button on the toolbar (that is, execution plan), or press F5 directly. (This is still more useful)

5. Debugging Stored Procedures

When using PL/SQL developer to operate Oracle, some stored procedures are sometimes called, or stored procedures are debugged;

Method of calling the stored procedure: first, select procedures in the browser to the left of PL/SQL developer to find the stored procedure that needs to be called, then select the stored procedure for debugging, right-click, select Test, and in the pop-up Test scrīpt window, For a parameter defined as an in type, you need to enter a value for the parameter's value; Last click the number of bars button above: Start debugger or press F9; Last click: RUN or Ctrl+r

6. Set shortcut keys

Tools->preferences-->user Interface-->key Configuration

where F2,f3,f4,f7 and other keys are still useless, you can set the shortcut keys for edit data.

In the SQL window, press the CTRL key, the mouse is placed on the table name can view table, plus edit data shortcut, you can easily edit the table.

7. Setting of the beautification device

When writing SQL statements, can the keyword automatically capitalize in addition to auto-sensing? Formatting code by using the SQL renderer also formats lowercase keywords as uppercase.

Please look at the following settings:

However, if this comes down to formatting the code using the PL/SQL beautification, the table or field is also formatted as uppercase, and the beautification settings need to be modified:



Go to Preferences, find Plsql settings, such as, however, "syntax case" in the case of the settings you can be careful, because just set the keyword capitalization, cause here to set exactly the opposite, notice the content of the preview is good

8. Set auto-complete.

Set the automatic prompt and remove the tick if you don't need it:

Tools->preferences->user Interface->code assistant->automatically Activated

To set auto-complete shortcut keys:

Tools->preferences->user Interface->key configuration Inside there is a tools/code Assistant this is the key for auto-completion. You can set the key to your own use. There are many shortcut keys in the key configuration. All can be set according to their own needs.

9. Custom Code Hints

Tools->preferences->edit->autoreplace

For example, set S=select * from, I=insert into

Tap an S in the editor and then space a bit. It will automatically become a select * from the content you set yourself. This is very convenient. Do not have to repeat the input of some content every time.

10. Automatic Capitalization of keywords

Tools->preferences->editor, select the keyword case uppercase.

11. Save the last login layout

In the Window menu, there is a save layout item, set the window layout, choose this option to save your current window layout, the next time you start it will not be set

Add:

(1) How to save login information?

(a) in the [Log on] down button in the toolbar, select [Configure ...], and then select and save the [store history] and [store with password] Two multi-marquee boxes in the Definition tab. After the entry of the user name/password after the login information will be saved, the next login only need to select a username after the password will be automatically brought out, no need to enter again, more convenient.

(b) For outdated login information, you can use [Log on]–] [Configure ...] – "[Added users] deletes it.

(2) How to quickly switch users?

Select the user and database you want to switch from the [Log on] down button in the toolbar.

(3) How to quickly find a database object?

In PL/SQL Develper, there is a search function for database objects, through the Program menu [Tools------"Find Objects ...] To open the Database Object lookup window.

(4) How do I see the objects that are only currently logged in?

By default, the Object Browser displays all the objects that the current user can view, including some system objects. If you want to display only the current user's own objects, you can set the selection box above the Object Browser to "My Objects".

(5) How to quickly view the meta-information of a table?

Right-click on the table in the Object Browser and select [view] to view the table's meta information in a new window that opens. Including:

(a) General: information such as the owner, table space name of the table;

(b) Columns: Information such as field names, field types, non-null constraints, default values, and annotations;

(c) Keys: Table's primary key information, etc.;

(d) Checks:

(e) Indexs: index information;

(f) Privileges: Empowering information, which permissions on the table are assigned to which users.

In any editing window, it is also possible to view the "view" option on the right-click.

(6) How do I view a table's build statement?

Right-click the table in the Object Browser, select [view], then click [View SQL] in the lower-right corner of the pop-up window to view the table's statement. The built-in statements also contain the creation of objects associated with the table, such as creating a primary key, creating an index, and assigning weights to operations.

(7) How to bulk export the build table statement?

(a) SELECT [tools]–] from the menu [Export User Objects ...] and select the table you want to export in the open window.

There is no INSERT statement in the SQL script exported in this way, that is, the data in the table is not exported at the same time, only the DDL statement.

(b) SELECT [tools]–] from the menu [export Tables ...], select the table to be exported in the open window, and select the option [Delete Records] option, then export the script.

(8) How to export initialization data?

SELECT [tools]–] from the menu [export Tables ...], select the table you want to export in the open window, uncheck the option [Delete Records] option, and then export the script.

(9) How to export data bits in CSV format?

(a) Select the table to be exported in the Object Browser, right-select [Query data], and in the popup window, click the [Fetch last page] button to display all the data;

(b) Select the data row, right click, select [Export results]–] [CSV file], the selected data line will be exported.

How do I edit the data in a table directly?

Open a SQL Window and enter the following statement:

(a) SELECT * from table_name for update;

(b) Click the Unlock button at the top left of the Results display list page to allow direct editing of the field contents;

(c) Double-click the field you want to edit to modify the field contents;

(d) Click the Submit button at the top left to submit the modified content;

(e) Set the lock status and submit the transaction.

Faster start-up speed

Default automatically check my Objects after login

By default, after Plsql developer is logged in, Brower will select all objects, and if you are logged on as a DBA, you will need to wait a few seconds for the tables directory to expand, and the response rate after selecting my objects is in milliseconds.

Setup method:

The Tools menu, Object Brower Filters, opens the Order window for Brower folders and sets the "My Objects" to default.

Tools menu-->object Brower Folders, a few directories you often order (such as: Tables views Seq Functions Procedures) Move up a bit, and add color to distinguish, This way your average look-up time will be greatly shortened, try it.

Double-click to display table data

The default response when the mouse double-clicks a table or view is disappointing because I am most concerned with the table structure and data, but the two things do not happen after double-clicking, perhaps the default response is the master needs, but for me to view the data and table structure is the most important, the other I do not care. But the good thing is this can be set, you can give the mouse double-click and drag and drop the required events, such as: Double-click Edit Data, drag and drop display table structure, yeah!

Setup method: Menu Tools---Preferences--Browser, on the right, double-click and drag-and-drop operations for different object type

If Pl\sql opens with "Dynamic execution table unreachable, automatic statistics for this session is forbidden" error solution

SQL code
    1. Grant Select on v_$statname to user;
    2. Grant Select on v_$sesstat to user;
    3. Grant Select on v_$session to user;
    4. Grant Select on v_$mystat to user;

User is the username to be authorized, if the prompt table or view does not exist, please switch to the SYS account and then authorize

PL SQL Developer Export Data Reference

http://xuehu2009.iteye.com/blog/450094

Reference Link: http://www.cnblogs.com/biGpython/archive/2012/03/30/2424739.html

http://blog.csdn.net/iamlaosong/article/details/8021795

(EXT) PL SQL Developer Usage Summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.