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”>