Skip to Main Content

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, Xiaohe.

Asked: October 21, 2016 - 3:04 am UTC

Last updated: January 24, 2019 - 11:00 am UTC

Version: 12.1.0.2.0

Viewed 10K+ times! This question is

You Asked

Hi Sir,

From the doc:
SP2-0042 unknown command command_name - rest of line ignored
Cause: The command entered was not valid.
Action: Check the syntax of the command you used for the correct options.

SP2-0734 Unknown command beginning command_name ... - rest of line ignored
Cause: The command entered was invalid.
Action: Check the syntax of the command you used for the correct options.

They seems to be the same error, why there are two error codes (0042 and 0734) ?

SQL> foobar a
SP2-0042: unknown command "foobar a" - rest of line ignored.
SQL> foobar a.sql
SP2-0734: unknown command beginning "foobar a.s..." - rest of line ignored.
SQL>


How does SQL*Plus handle the two unknown commands "foobar a" and "foobar a.sql" ?

Thanks,
Xiaohe

and Chris said...

I reached out to Luan Nim, one of our internal SQL*Plus experts about this. He had this to say:

The reason for the different between these errors is that for SP-743, it tries to indicate there are more text in the command line, but ignored, where as for SP2-0042 is for less than 10 characters.

Some commands might be longer, and we don't want to print out the whole text, therefore, SP2-00743 is to truncate command lines that > 10 characters and SP2-0042 is for < 10 characters. (This behavior as resulted of bug 812337 fixed back in 8.1)


Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Tom U R the Best

haritha reddy munnelli, January 24, 2019 - 10:51 am UTC

you will explain why and how to resolve issues in a single statement.
Chris Saxon
January 24, 2019 - 11:00 am UTC

Thanks, though it's Chris here. And the answer's from Luan Nim ;)