Far safer than connecting as a non-privileged user is attempting to
connect as a non-existent user. If the database instance is up and
running and working normally, you'll just get the ORA-01017 error
("username or password incorrect"), which is normal and expected. This
tests IP connectivity, TNS Listener availability, instance
availability/function/response, all without jeopardizing security. Or
at least minimal jeopardy.
So, for a username/password string, I typically just whip through the
entire QWERTY keyboard a couple times:
connect asdfljwiuzliweihnzwaer/zxcvbsghqwerouawefr@xxxxxxxxxx
On 8/29/06, *Kevin Closson* <kevinc@xxxxxxxxxxxxx <mailto:kevinc@xxxxxxxxxxxxx>> wrote:
I will agree with Mr. Bobak. Connect to test that the database is not only started but is accessible to a non-privileged username.
As you have stated, the non-privileged username is particularly important.
For those that are wondering why that is important:
10:26:57 SQL>create user scott identified by tiger;
User created.
10:27:02 SQL>grant create session to scott;
Grant succeeded.
10:27:48 SQL>alter system enable restricted session;
System altered.
10:27:54 SQL>connect scott/tiger
ERROR:
ORA-01035: ORACLE only available to users with RESTRICTED SESSION privilege
Warning: You are no longer connected to ORACLE. 10:28:00 SQL>
...this is a great thread, but it has moved more into database health than "is the instance up", which was the initial thread. So let me ask, is connecting as a non-priveledged user really good enough? So you get a session. Are the datafiles online? Can you parse a SQL statement? etc ?
-- //www.freelists.org/webpage/oracle-l
-- Jared Still Certifiable Oracle DBA and Part Time Perl Evangelist
-- //www.freelists.org/webpage/oracle-l