Thread: "Run Script" (F5) Flacky Behavior with CREATE PROCEDURE and PACKAGE


Permlink Replies: 18 - Pages: 2 [ 1 2 | Next ] - Last Post: Jun 29, 2006 4:04 PM Last Post By: sensslen
marife

Posts: 1,298
Registered: 03/19/98
"Run Script" (F5) Flacky Behavior with CREATE PROCEDURE and PACKAGE
Posted: May 17, 2006 5:51 AM
Click to report abuse...   Click to reply to this thread Reply
When I have the following create statement in a SQL Worksheet and run the script using "Run Script" (F5), I get the "PROCEDURE bogus Compiled." message. Why does it not tell me that there was a compile error? The procedure is marked with a little red "X" in the connections pane.

CREATE OR REPLACE PROCEDURE bogus IS
BEGIN
x := 1;
END;
/

Also, when I have the following command in a SQL Worksheet and run the script using "Run Script" (F5), I get the "PROCEDURE bogus Compiled." message. The difference is that I removed the slash after the CREATE PROCEDURE command. I can go into that procedure in the database via the Connections pane, click on the compile button, and the procedure compiles with no errors. Why does it not compile in a script when missing the slash?

CREATE OR REPLACE PROCEDURE bogus IS
BEGIN
NULL;
END;


I noticed the same flaky behavior with CREATE PACKAGE BODY as well. This is in version 1.0.0.14.67 on Windows XP. Has this been fixed in the latest version?

Mike
EricH2

Posts: 793
Registered: 01/19/06
Re: "Run Script" (F5) Flacky Behavior with CREATE PROCEDURE and PACKAGE
Posted: May 17, 2006 6:35 AM   in response to: marife in response to: marife
Click to report abuse...   Click to reply to this thread Reply
While it may seem flakey, it is acting as designed. Without the slash you are simply loading it into memory. Since it is not a select/update/etc statement it requires the slash so that your command executes. I can't really explain the why of this, just that this is how it works. The behavior is the same as if you were using sql*plus. Some other tools will assume that you want it compiled and implicitly add the / at the end. I happen to like that it requires it from me because all of my scripts get run from sql*plus when our code gets promoted to production, so it keeps me from forgetting to add it.

Eric
marife

Posts: 1,298
Registered: 03/19/98
Re: "Run Script" (F5) Flacky Behavior with CREATE PROCEDURE and PACKAGE
Posted: May 17, 2006 2:18 PM   in response to: EricH2 in response to: EricH2
Click to report abuse...   Click to reply to this thread Reply
I just wonder why in the first case SQLDeveloper does not register an error.

Mike
adwinn

Posts: 484
Registered: 07/08/00
Re: "Run Script" (F5) Flacky Behavior with CREATE PROCEDURE and PACKAGE
Posted: May 17, 2006 9:26 PM   in response to: marife in response to: marife
Click to report abuse...   Click to reply to this thread Reply
I found a number of earlier posts on this (going back to at least v804), but I cannot find a thread with a response from the SQL Developer team - see:
http://forums.oracle.com/forums/thread.jspa?messageID=1222990&#1222990
http://forums.oracle.com/forums/thread.jspa?messageID=1238921&#1238921
http://forums.oracle.com/forums/thread.jspa?messageID=1178839&#1178839
http://forums.oracle.com/forums/thread.jspa?messageID=1165388&#1165388

I assume that it is just a bug with SQL Developer that it does not check for compilation errors when determining the status message to display (ie "PROCEDURE bogus Compiled"). At least now we get the little red cross on the navigator to tell us it is invalid :)
ARF

Posts: 1,536
Registered: 10/06/05
Re: "Run Script" (F5) Flacky Behavior with CREATE PROCEDURE and PACKAGE
Posted: May 18, 2006 4:42 AM   in response to: adwinn in response to: adwinn
Click to report abuse...   Click to reply to this thread Reply
marife

Posts: 1,298
Registered: 03/19/98
Re: "Run Script" (F5) Flacky Behavior with CREATE PROCEDURE and PACKAGE
Posted: May 18, 2006 5:26 AM   in response to: adwinn in response to: adwinn
Click to report abuse...   Click to reply to this thread Reply
Wow this issue has been in SQL Developer since version 804. This is a huge pain in the "you know what". I wonder why SQL Developer does not trap compile errors.

I guess if we keep this thread at the top of the thread list along with the other 5 postings of this problem, they may look at it if they have not already done so. It would be nice to at least get a "Yes that is a known issue" response.

Thanks for searching the thread list. (I should have started there first.)

Mike
ARF

Posts: 1,536
Registered: 10/06/05
Re: "Run Script" (F5) Flacky Behavior with CREATE PROCEDURE and PACKAGE
Posted: May 18, 2006 6:07 AM   in response to: marife in response to: marife
Click to report abuse...   Click to reply to this thread Reply
Oh yes, if the intention is this...

I also would like to see this implemented in the SQL Developer.

I do not know which the criterion that is being used for the team of development of the SQL Developer, but to me this is very important and would be very useful.

What I have made is to execute the script, to go in the tree and to locate the object that was servant, and to compile again.
This bothers very.
EricH2

Posts: 793
Registered: 01/19/06
Re: "Run Script" (F5) Flacky Behavior with CREATE PROCEDURE and PACKAGE
Posted: May 18, 2006 6:57 AM   in response to: marife in response to: marife
Click to report abuse...   Click to reply to this thread Reply
.

Message was edited by:
EricH
marife

Posts: 1,298
Registered: 03/19/98
Re: "Run Script" (F5) Flacky Behavior with CREATE PROCEDURE and PACKAGE
Posted: May 19, 2006 6:12 AM   in response to: marife in response to: marife
Click to report abuse...   Click to reply to this thread Reply
Any response from Oracle Support on this one?

Mike
ARF

Posts: 1,536
Registered: 10/06/05
Re: "Run Script" (F5) Flacky Behavior with CREATE PROCEDURE and PACKAGE
Posted: May 19, 2006 6:24 AM   in response to: marife in response to: marife
Click to report abuse...   Click to reply to this thread Reply
They are have some days without answering to threads of this forum.
marife

Posts: 1,298
Registered: 03/19/98
Re: "Run Script" (F5) Flacky Behavior with CREATE PROCEDURE and PACKAGE
Posted: May 19, 2006 8:16 AM   in response to: ARF in response to: ARF
Click to report abuse...   Click to reply to this thread Reply
I do not know who are Oracle people in forum and who are not.

Mike
ARF

Posts: 1,536
Registered: 10/06/05
Re: "Run Script" (F5) Flacky Behavior with CREATE PROCEDURE and PACKAGE
Posted: May 19, 2006 9:40 AM   in response to: marife in response to: marife
Click to report abuse...   Click to reply to this thread Reply
I am certain that Kris Rice, Sharon (sbkenned) and Barry McGillin are part of the SQL Developer team.
But he must have other people.
MattP

Posts: 22
Registered: 05/02/06
Re: "Run Script" (F5) Flacky Behavior with CREATE PROCEDURE and PACKAGE
Posted: May 23, 2006 2:45 PM   in response to: marife in response to: marife
Click to report abuse...   Click to reply to this thread Reply
I ran into this as well, caused me quite a bit of investigation time as I thought my proc had compiled successfully.

As a result, I started using this to check for compile errors each time after compiling my proc.

select * from user_errors
adwinn

Posts: 484
Registered: 07/08/00
Re: "Run Script" (F5) Flacky Behavior with CREATE PROCEDURE and PACKAGE
Posted: May 23, 2006 5:40 PM   in response to: ARF in response to: ARF
Click to report abuse...   Click to reply to this thread Reply
So we are still left with no "official" response from the SQL Developer team?
ARF

Posts: 1,536
Registered: 10/06/05
Re: "Run Script" (F5) Flacky Behavior with CREATE PROCEDURE and PACKAGE
Posted: May 24, 2006 4:29 AM   in response to: adwinn in response to: adwinn
Click to report abuse...   Click to reply to this thread Reply
Therefore it is.
We continue waiting for a manifestation of somebody of the SQL Developer team.
Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums