SQLPlus jobs fail with "Error 45 initializing SQLPlus" when executed by the OS Agent. This issue occurs when the job script terminates without an explicit
EXIT command. sqlplus <user>/<password>@<Oracle_DB>:1521/<DB> @C:\Automic\Agents\sql.txt
SQL*Plus: Release 19.0.0.0.0 - Production on Thu Jul 31 10:30:05 2025
Version 19.27.0.0.0
Copyright (c) 1982, 2024, Oracle. All rights reserved.
Last Successful login time: Thu Jul 31 2025 10:29:58 +00:00
Connected to:
Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.7.0.25.01
COUNT(*)
----------
1323
SQL> Error 45 initializing SQL*Plus
Internal error
EXIT; command to the end of the SQL script. This ensures SQL*Plus terminates properly and prevents Error 45.Subscribe to this article to receive updates on the status of this fix: .