The Oracle stored procedure can be debugged and modified as needed. The following describes how to modify an Oracle Stored Procedure for your reference.
If you want to execute the Oracle stored procedure, you first need to write a "Hello World!" output string !" The following describes the steps of Oracle storage.
Let's write an output string "Hello World !" Use Notepad to open your skeleton. SQL file. Use DBMS_OUTPUT.PUT_LINE to replace the NULL statement, as shown below:
Create or replace procedure skeleton is begin DBMS_OUTPUT.PUT_LINE ('Hello World! '); END;
Save to the file skeleton. SQL.
Open the file skeleton. SQL from the SQL * Plus command line.
SQL> @ skeleton SQL> CREATE OR REPLACE PROCEDURE skeleton IS BEGIN DBMS_OUTPUT.PUT_LINE ('Hello World! '); * END; SQL>/
SQL * Plus notifies you That the stored Procedure is successfully created and the prompt message is displayed: Procedure created.
SQL>
Run your stored procedure with the EXECUTE command:
SQL> EXECUTE skeleton;
SQL * Plus shows that the stored procedure runs successfully:
PL/SQL procedure successfully completed.
The output string "Hello World! "Failed. Run a SET command before displaying a DBMS_OUTPUT.PUT_LINE result. At the SQL * Plus command line prompt, type:
SQL> SET SERVEROUTPUT ON
Execute your stored procedure again:
SQL> EXECUTE skeleton;
Now the result is output:
Hello World! PL/SQL procedure successfully completed.
When debugging a stored procedure, follow the same steps to modify the SQL file, create a stored procedure, execute the stored procedure, and modify the error information according to the compiler feedback. This step is very tedious, it depends on experience.
In the development and debugging process of the actual commercial storage process, complex logics such as tables, types, cursors, loops, and conditions are involved, and flexible use of PL/SQL statements, during compilation, a lot of error messages will be generated. The programmer can locate and correct the errors Based on the errors, and then compile the statements to get the correct structure;
Online redo Oracle Log File Size
How to delete ORACLE archive logs
Oracle mobile data file Method
Oracle Log File Reconstruction Method
How to modify the oracle user name