Go PL/SQL Developer Usage tips and common mistakes

Source: Internet
Author: User
Tags ibm db2

PL/SQL Developer Usage Tips

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: PL/SQL Developer 7.1.2->tools->preferences->oracle->logon, "Store History" is checked by default, tick "store With password "can, re-login in the input password once 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, and need to be set to the SQL statement that the mouse, that is, the execution of the current SQL statement;

Setup method: PL/SQL Developer 7.1.2-->tools->preferences-->window types, check "AutoSelect Statement".

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 words, so look good, or analysis;

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.

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

· Oracle Learning Manual: Beginner Common Error Episodes

No one would deny that Oracle is one of the most influential database products in the world, but the good stuff seems to be not so easy to use (at first glance), or even ruthless-always giving layman a ruthless error number. Here is my personal summary, all useful, hoping to give beginners a little revelation.

About "good things always seem to be not so easy to use (at first)" A joke: in the IBM DB2 512, 513 training before the campus download to the installation program, but let us a few students to study a half-day, also do not know which files are installed files, unexpectedly no installation success. Finally, I agree: It seems that this training is really necessary! Afterwards, only to know-we downloaded 4linux!

[Take 8.1.6 as an example]:

1, Ora-12541:tns: No listener

Cause: There is no boot listener or the listener is corrupted. If it is the former, use the command net start Oracleorahome81tnslistener (the name may differ), and if it is the latter, use the listener configuration of the Net8 Configuration Assistant Tool Wizard Add a listener (basically do not write any information, all the way OK. You may need to remove all the listeners before adding them!)

2. Ora-12500:tns: The listener cannot start the private server process

Or

ORA-12560:TNS: Protocol Adapter error

Cause: Oracle's database service is not started. You can use the command net start oracleserviceoradb (oradb as the database name). If it's still not resolved, keep looking down.

3. If the database service fails to start, it is most likely that its registry key value is corrupted, and the best practice is to do the following two steps:

1) Oradim-delete-sid oradb Delete database service item

2) Oradim-new-sid oradb New database service entry

Note: If there is an error in this process, restart the computer!

4, Ora-12154:tns: Can resolve the service name

Cause: The Network Service name for Oracle is not configured correctly. Use the local network service name configuration in the Net8 Configuration Assistant Tool Wizard to configure TNS. If it's still not resolved, keep looking down.

5. Ora-1034:tns:oracle Not Available

Cause: The Oracle database service started correctly, but the database is not open!

Use the command:

1) SVRMGRL start Service Manager

2) Connect internal login as internal

3) Startup Open database

6, Ora-12560:tns: Protocol adapter error (stubborn)

Cause: Unknown.

Solution: Must kill skill--open "Windows Task Manager", kill ORACLE.exe and ORADIM.exe process, write your own ora_startup.bat, execute it!

Ps:

1. My ora_startup.bat:

net start Oracleorahome81tnslistener

net start oracleserviceoradb

SVRMGRL generally do not use, but sometimes it is necessary, the concrete steps to see the 5th step.

2. My ora_shutdown.bat:

net stop Oracleorahome81tnslistener

net stop oracleserviceoradb

3. For Oracle related service name, see the service name beginning with Oracle in the services of the administrative tools.

Go PL/SQL Developer Usage tips and common mistakes

Related Article

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.