home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.oracle      Overblown overpriced overengineered SHIT      2,288 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,741 of 2,288   
   rob to F. Biguet   
   Re: Administration script to check DB   
   14 Sep 04 15:53:48   
   
   From: rob@dsdelft.nl   
      
   "F. Biguet"  wrote in message   
   news:c20c89f0.0409140218.357ed924@posting.google.com...   
   > Hello,   
   >   
   > I want to create a generic script that connects to Oracle databases   
   > (from 7.3.4 to 9.2 version) with a guest user. This script should   
   > return 1 if connection is successful and 0 if not.   
   > My problem is due to the 3 requests for password when the connection   
   > fails. I can't find any option that allows to ask for password only   
   > one time.   
   >   
   > Has anyone already written a such script?   
   >   
   > Thank you in advance.   
   >   
   > Fanny   
      
   You know that 7.3.4 is pre-historic and unsupported for years don't you?   
   I don't know what you exactly like to achieve but this might give you a   
   hint.   
   0 = success   
   1 = failure   
   Can't remember if "whenever sqlerror exit failure" exists in 7.3.4   
      
   == test.sql   
   myserver{oracle}# cat test.sql   
   whenever sqlerror exit failure   
      
   connect &1/&2@&3   
   exit   
   ==   
   == Connect error ===   
   myserver{oracle}#sqlplus /nolog @test bla bla mydb   
      
   SQL*Plus: Release 8.1.7.0.0 - Production on Tue Sep 14 15:38:00 2004   
      
   (c) Copyright 2000 Oracle Corporation.  All rights reserved.   
      
   ERROR:   
   ORA-01017: invalid username/password; logon denied   
      
   myserver{oracle}# echo $?   
   1   
   ==   
   == Connect succeeds   
   myserver{oracle}# sqlplus /nolog @test system manager mydb   
      
   SQL*Plus: Release 8.1.7.0.0 - Production on Tue Sep 14 15:38:15 2004   
      
   (c) Copyright 2000 Oracle Corporation.  All rights reserved.   
      
   Connected.   
   Disconnected from Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production   
   With the Partitioning option   
   JServer Release 8.1.7.4.0 - Production   
   dtodbs1{oracle}# echo $?   
   0   
   ==   
      
   Regards,   
   Rob   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca