On a Windows Server I had problems with the here shown solutions. For me the following worked
sqlplus 'sys/pass@identifier as sysdba'@script.sql