0

I get "ORA-00904: "MEMORY_TARGET": invalid identifier" no matter how I try to quote the identifier in the following command:

MEMORY_TARGET=$(su - orat01 -c " echo 'select VALUE from V\$PARAMETER where name = 'memory_target';'| sqlplus / as sysdba ")

Any ideas on how to do this would be greatly appreciated.

1 Answer 1

1
[root@o73 ~]# SGA_TARGET=$(su - oracle -c "export ORACLE_SID=RYMIN19; export ORAENV_ASK=NO; . oraenv >/dev/null; echo \"set pages 0
select value from v\\\$parameter where name = 'sga_target';\" | sqlplus -s / as sysdba")
[root@o73 ~]# echo $SGA_TARGET
2147483648
[root@o73 ~]#
1
  • Thanks, I could not get it to work with echo, but it did work when I used printf. Jul 3, 2020 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.