Quick Solution to Error 45 initializing SQL * Plus Error, initializingplus
Recently, sqlplus is often used to run SQL scripts in the background, so it encounters Error 45 initializing SQL * Plus Error.
The PL/SQL file I run test. SQL is as follows:
Set serveroutput on; set timing on; DECLAREBEGIN dbms_output.put_line (TO_CHAR (SYSDATE, 'yyyy-MM-DD HH24: MI: ss'); END;
The file system of the disk where the Home folder runs the SQL file is ext4. for the file type, check the/etc/fstab file.
The command for running SQL files in the background is as follows:
Nohup sqlplus iqm_blk/welcome1 @ IQMDEV @ test. SQL> test. out 2> & 1 &
I will summarize the main causes of the error.
- The END of the test. SQL file; cannot be empty.
- Test. SQL file END;, you need to add/
- You need to add the exit command after/. After the exit command is added, the empty line is OK.
The script that can be correctly executed is as follows:
Set serveroutput on; set timing on; DECLAREBEGIN dbms_output.put_line (TO_CHAR (SYSDATE, 'yyyy-MM-DD HH24: MI: ss'); END;/exit;
I hope to help you.