I am creating a powershell script to execute oracle sql script. It is necessary for me to know the query output before I decide to commit or rollback the transaction. How can I read the script output first and keep the sqlplus session so I can issue commit/rollback later?
Here is my code:
$script | &"$env:ORACLE_HOME\bin\sqlplus" ”$schema_name/$schema_pwd@$instance_name$Oracle_Version_Suffix" | Tee-Object -Variable output | Out-Null