I'm using TOAD to develop a stored function in an Oracle database. When I click the "run as script" button in TOAD, it tells me that the script was executed with 0 errors and 1 compile errors. Where do I see the specific compile error(s). I'm fairly new to TOAD so I might be missing something obvious about the interface like a tab/window to see such error messages.
You can either add SHOW ERRORS to the end of the script, which will print the error message(s) to the "script output" tab, or compile the function using the "Execute Statement" command in Toad, which will cause the errors to be displayed in a box at the bottom of the editor.
Or you can look in USER_ERRORS table afterwards
Click on Database -> Procedure Editor in top tool bar.
Paste your code in this new editor window and execute by clicking green play button on top.
All the errors will be displayed in a new window at the bottom.
2 things you can do
goto Toad, schema browser, select Invalid Objects will tell you where to look.
then load the package into the editor and select the function, right click, compile, wioll show you the errors
Another option that worked for me was to open my script in the procedure editor and compile it there.
Related
I'm using TOAD to develop a stored function in an Oracle database. When I click the "run as script" button in TOAD, it tells me that the script was executed with 0 errors and 1 compile errors. Where do I see the specific compile error(s). I'm fairly new to TOAD so I might be missing something obvious about the interface like a tab/window to see such error messages.
You can either add SHOW ERRORS to the end of the script, which will print the error message(s) to the "script output" tab, or compile the function using the "Execute Statement" command in Toad, which will cause the errors to be displayed in a box at the bottom of the editor.
Or you can look in USER_ERRORS table afterwards
Click on Database -> Procedure Editor in top tool bar.
Paste your code in this new editor window and execute by clicking green play button on top.
All the errors will be displayed in a new window at the bottom.
2 things you can do
goto Toad, schema browser, select Invalid Objects will tell you where to look.
then load the package into the editor and select the function, right click, compile, wioll show you the errors
Another option that worked for me was to open my script in the procedure editor and compile it there.
I have Oracle 10g installed and there is a package which has a number of cursors and procedures, how do I debug one of these procedures or cursors. Can you please provide steps for that?
I ran a Google search but did not find anything specifying how to debug a particular procedure from a package.
Basic Steps to Debug a Procedure in Toad
Load your Procedure in Toad Editor.
Put debug point on the line where you want to debug.See the first screenshot.
Right click on the editor Execute->Execute PLSQL(Debugger).See the second screeshot.
A window opens up,you need to select the procedure from the left side and pass parameters for that procedure and then click Execute.See the third screenshot.
Now start your debugging check Debug-->Step Over...Add Watch etc.
Reference:Toad Debugger
Open a PL/SQL object in the Editor.
Click on the main toolbar or select Session | Toggle Compiling with Debug. This enables debugging.
Compile the object on the database.
Select one of the following options on the Execute toolbar to begin debugging:
Execute PL/SQL with debugger ()
Step over
Step into
Run to cursor
I have Oracle 10.5 installed on my system.
I created a stored procedure using Toad. It is running successfully.
I observed that there are different icons for stored procedures in Toad:
Red cross (error in procedure)
White rectangle (new procedure)
Green bug (debugged procedure)
My procedure has the white rectangle icon. I want to change it to the green bug icon.
I found online that I have to run the stored procedure in debug mode. I ran it but it didn't change the icon.
How I can get the green bug icon for my stored procedure?
The green bug indicates that the stored procedure (or package) was compiled with debug information and can be debugged. In order to create the necessary debug information, you need to (re-)compile your stored procedure with
alter procedure PROCNAME compile debug;
Replace PROCNAME with the actual name of your stored procedure.
When using the Schema Browser, you can right-click on your procedure and select "Compile with Debug" from the context menu.
For packages, the context menu item is "Compile" > "Compile with Debug".
If a dialog box opens asking to choose Refresh Mode, you can leave the default option "Refresh items one by one" on, unless otherwise required.
So there I am, working on a Silverlight app, and between one build & run and the next, my debug output goes away. Where before I had dozens of lines of Debug.Writeline text, I now have only the module load and thread messages.
Yes, I'm in debug mode (vs. release mode).
Yes, my Output window says "Show output from: Debug".
Yes, when I right-click on the output window, every option is checked.
No, my Tools > options > debugging > general > "Redirect all output text to the immediate window" is not checked.
All I can figure (and it's a wild guess) is that for some reason, the VS debugger isn't attaching to the Silverlight app like it should.
What's weird is this has been happening for the last couple of days, out of the blue. And just as suddenly, all my debug messages start showing up again.
This is VERY frustrating.
EDIT: Of course, after returning to the project after the weekend, all Debug messages are back. No idea what was causing the issue, so I'm sure it will happen again.
Now the question is: should I leave this question open in case the problem arises again in the near future? What happens to an unawarded bounty?
I found the same problem and just by setting options → debugging → output window → Thread Exit Messages to true the output windows was begin to send the right messages !?
I had exactly the same issue. Out of the blue, debug.print stopped working. In my case, it used to go to the Immediate Window. Nothing there. Nothing in the Output window. I followed several suggestions to no avail until I found this one at http://www.experts-exchange.com/questions/26894732/Debug-Print-and-Debug-Write-no-longer-work-in-Visual-Studio-2010.html
There is a context menu in the Output/Debug pane. The "Program Output"
menu item was accidentally cleared.
Checked the item and it started working again (even though my output was the immediate window). What a relief...
Ensure that the DEBUG conditional compilation symbol is defined. The Debug class suggests that you "add the /d:DEBUG option to the compiler command line when you compile your code using a command line, or add #define DEBUG to the top of your file".
Did you create or modify an Application config? If yes: the initial created configuration by VS does contains the necessary wiring configurations to enable the debugging at all. Not sure what and if there are counterparts in Silverlight, but in WPF environments simply replacing the app.config will have the same effect as you expierience.
Check the Immediate Window. Check the options. There is a general setting that says "send Debug output to Immediate Window"
Below is some PL/SQL which is intended to create a very simple stored procedure in Oracle, based on code generated via SQL Developer IDE. I'm receiving the error when I run the command. On many tutorials online, the instructions for creating stored procedures didn't require a package (in the source code). When is a package required in Oracle? And how can I correct the code below to be as simple as possible?
Source Code:
CREATE OR REPLACE PROCEDURE PROCEDURE1
IS
BEGIN
DBMS_OUTPUT.PUT_LINE('Hello World!');
END;
Error:
Empty package PROCEDURE1 definition (no public members).
FYI:
Before running the code above, I was following these instructions to build a simple example of a stored procedure and connect via Enterprise Library. This code worked.
http://www.codeproject.com/Articles/19581/Microsoft-Enterprise-Library-Data-Access-Block-DAA
Workflow to Avoid the error:
When using SQL Developer IDE for Oracle, right click "{Database Name} > Procedures > New Procedure" in the object explorer, and click OK to that dialog after entering a stored procedure name, click the two gears (Compile) button.
Note
The Green Triangle button is used to run the compiled procedure, but it needs to be compiled before you can run it.
Workflow to reproduce the error:
When using SQL Developer IDE for Oracle, when right clicking "{Database Name} > Procedures > New Procedure" in the object explorer, and clicking OK to that dialog after entering a stored procedure name, and clicking the green triangle (execute) button, I get this error.
Solution:
I right clicked the {Database Name} and selected "Open SQL Worksheet" and then pasted the code generated from the workflow above. Then clicked the green triangle (execute) button.
What a piece of *HIT IDE!
"I SLIT A SHEET"
"A SHEET I SLIT"
"AND ON THAT SLITTED SHEET I SIT"