One other method used by hackers to break into the
database is to guess passwords, and then try to login to sqlplus.
When the user ID/password combination is wrong, the database
displays the message:
ORA-01017: invalid username/password; logon
denied
Enter user-name:
It errors out, but the username prompt remains.
After three failed attempts, the return goes into the OS prompt.
Until then, the username prompt remains. In a good security
practice, say in the case of batch files, we may not want that. We
may want the OS prompt to appear as soon as the first error is
reported.
Oracle 9i introduced a new option, LOGON, to
stop connection attempts after the first failure. For instance, in
the above case, you would issue:
sqlplus 's ?LOGON scott/tiger
or
sqlplus 's ?L scott/tiger
If the connection fails, regardless of the
reason, the control returns to the operating system immediately
after reporting the error, the username prompt is not displayed.
This is also very useful in writing a script to
automate the checking of a database's availability. A common
approach is to have a shell script with:
sqlplus 's scott/tiger@service1.mycompany.com
If the connection does not succeed for some
reason, because either the listener is down or the database is down,
or because the user ID and password combination is wrong, the script
does not return to the operating system prompt. In an automated
script, it hangs, making the script useless. Using the ?LOGON option
can make the script useful.
|
|
Get the Complete
Oracle SQL Tuning Information
The landmark book
"Advanced Oracle
SQL Tuning The Definitive Reference" is
filled with valuable information on Oracle SQL Tuning.
This book includes scripts and tools to hypercharge Oracle 11g
performance and you can
buy it
for 30% off directly from the publisher.
|