Can I convert this into 1 command line on bash in sqlplus? cause i want to automate it.
sqlplus / as sysdba
SQL> EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);
exit
Can I convert this into 1 command line on bash in sqlplus? cause i want to automate it.
sqlplus / as sysdba
SQL> EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);
exit
You won't need the exit with automation because it should exit on end of file anyway. So on one line you could do:
echo 'EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);' | sqlplus / as sysdba
you can wirite by follow in a shell
#!/bin/bash
sqlplus / as sysdba <<EOF
EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);
exit
EOF
or you can put this commond into a procedure
sqlplus /nolog @your_script.sql