Is there a way to parse code in SQL Developer (oracle) without actually touching tables/packages data like you can do with "parse" option in SQL Management studio?
-
1What do you mean with "touch tablespace"? That does not make sense.user330315– user3303152012-06-11 19:30:47 +00:00Commented Jun 11, 2012 at 19:30
-
1Do you mean compile code or test / debug? Either would "touch" tables and packages that they referenced.Ben– Ben2012-06-11 19:41:04 +00:00Commented Jun 11, 2012 at 19:41
-
2in SQL Management Studio you can complile/parse code (create, insert or any) and it will tell you whether the syntax is correct, but not actually do any database changes. that's what I'd like to do in SQL DeveloperVictor– Victor2012-06-11 19:58:05 +00:00Commented Jun 11, 2012 at 19:58
2 Answers
There is no option to merely parse the SQL statement to validate the syntax.
You could choose the "Explain Plan" option (F10 in the Windows version of SQL Developer), that will validate the syntax as part of generating the query plan. If there is a syntax error, you'll get the error message when you attempt to generate the plan but you generally won't get the line and column of the error which makes debugging more challenging.
Comments
I was looking for this right now and couldn't find an option in Oracle SQL Developer.
I know a service called SQL Fiddle that can help in such situations where one needs to test/parse/validate an adhoc PL/SQL script. Using SQL Fiddle you can do this:
Select Oracle 11g R2 (as available right now) in the dropdown and type your script in the left text area. Press Build Schema button. If your script is valid then it'll show you Schema Ready message like this:
