Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

I am wondering that the line below does not work to run the oracle command inside of a shell script:

sudo su -l oracle 

You should wrap your command to get it work:

su -c "dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbName qualidade -sysPassword password -systemPassword password -scriptDest /u01/app/oracle/oradata/qualidade -characterSet WE8ISO8859P1" -s /bin/sh oracle 

I got this solution here: How to run script as another user without password?How to run script as another user without password?

I am wondering that the line below does not work to run the oracle command inside of a shell script:

sudo su -l oracle 

You should wrap your command to get it work:

su -c "dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbName qualidade -sysPassword password -systemPassword password -scriptDest /u01/app/oracle/oradata/qualidade -characterSet WE8ISO8859P1" -s /bin/sh oracle 

I got this solution here: How to run script as another user without password?

I am wondering that the line below does not work to run the oracle command inside of a shell script:

sudo su -l oracle 

You should wrap your command to get it work:

su -c "dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbName qualidade -sysPassword password -systemPassword password -scriptDest /u01/app/oracle/oradata/qualidade -characterSet WE8ISO8859P1" -s /bin/sh oracle 

I got this solution here: How to run script as another user without password?

Source Link
Eric
  • 64
  • 5

I am wondering that the line below does not work to run the oracle command inside of a shell script:

sudo su -l oracle 

You should wrap your command to get it work:

su -c "dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbName qualidade -sysPassword password -systemPassword password -scriptDest /u01/app/oracle/oradata/qualidade -characterSet WE8ISO8859P1" -s /bin/sh oracle 

I got this solution here: How to run script as another user without password?