When connecting to oracle the syntax is CONNECT username/password@url
The equvalent sql task for ant is
<sql driver=”oracle.jdbc.driver.OracleDriver” url=”url” userid=”username” password=”password”>
However when one wants to connect as the sysdba one has to use CONNECT username/password@url as sysdba
Using the sys username and password int the ant task throws theexception.
java.sql.SQLExpection: connection to sys should be as sysdba or sysoper
The ant task can stil be used however. To overcome this you need to use:
<sql driver=”oracle.jdbc.driver.OracleDriver” url=”url” userid=”username as sysdba” password=”password”>
September 4, 2007 at 8:09 am |
Thanks this helped me indeed