RelationalDBDesign 




DB Creation   «Prev  Next»
Lesson 8 When you make a mistake
Objective Learn how to recover from a misspelled command.

Mistakes in Server Manager

It is easy to mistype a command while you are using Server Manager, and suddenly find yourself in a situation where Server Manager keeps accepting text, but refuses to actually do anything no matter what you type. That situation typically looks like this:
SVRMGR> exite
 2> exit
 3> quit

Reasons for Server Manager's behavior

Here is what is happening in the above situation. Server Manager is designed to let you enter and execute SQL statements. SQL statements may be many lines long, and Server Manager must allow for this. When you type in a command that is not one of the few Server Manager specific commands, such as help or exit, the program assumes that you are entering an SQL statement. Once Server Manager thinks that you are entering an SQL statement, it accepts and buffers all text that you type until you terminate the statement, usually with a semicolon. Only at that point does it try to execute the statement.

How to rectify your mistake

The solution to the problem of mistyping a command is to enter a semicolon to terminate the statement, accept the error that occurs, and retry your command. When you do this, Server Manager returns the word it doesn't recognize. Here is an example showing how to recover from the mistyped exit command shown earlier:


SVRMGR> exite
     2> exit
     3> quit
     4> ;
exite
*
ORA-00900: invalid SQL statement
SVRMGR> exit
Server Manager complete.
C:\A>
If you are curious why Server Manager can not recognize exite as a bad command, read this explanation.