Quick Solution to Error 45 initializing SQL * Plus Error, initializingplus

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.