I am having a sql file (Grant_Priv.sql) with 'accept' command.
Grant_Priv.sql:
------------------
accept USER prompt "Enter schema name :"
grant connect to &USER;
Using
ant i am connecting to SQL and executing the SQL file:
----------------------------------------------------------------------------
<exec executable="sqlplus" dir="">
<arg value="sys/sys as sysdba"/>
<arg value="@C:\test\tmp1\Grant_Priv.sql"/>
</exec>
when ant executes the sql file, it has to prompr the user for username. But it is not asking username in my case. Instead, it is connecting to sql, displaying the below line and getting disconnected from sql.
Output:
---------
[exec] Connected to:
[exec] Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
[exec]
[exec] Enter schema name: Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
[echo] after exec
Main:
BUILD SUCCESSFUL
Total time: 2 seconds
Please help me how to make the sql file to prompt for username.