5

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?

3
  • 1
    What do you mean with "touch tablespace"? That does not make sense. Commented Jun 11, 2012 at 19:30
  • 1
    Do you mean compile code or test / debug? Either would "touch" tables and packages that they referenced. Commented Jun 11, 2012 at 19:41
  • 2
    in 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 Developer Commented Jun 11, 2012 at 19:58

2 Answers 2

3

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.

Sign up to request clarification or add additional context in comments.

Comments

2

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:

enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.