Change the executed SQL statement to a Linux background process

Source: Internet
Author: User

A few days ago, when operating the database, you needed to execute SQL statements that took a long time. However, at that time, the LAN network was not good and frequent disconnection occurred.

In this case, you need to add the statement to the background process on the Oracle server for execution. The procedure is as follows:

1. First, write the SQL statements to be executed as scripts and store them in SQL. SQL. And place it in a path on the database server.

2. Run the following linux Command:

Nohup sqlplus username/password @ host connection string @ created executable file &

For example: [LINUX community www.LinuxIDC.com]

Nohup sqlplus Oracle/Oracle @ orcl @ SQL. SQL &

You can. In this way, you are not afraid of network interruptions and the impact on SQL Execution. The SQL Execution result can be viewed in the nohup file.

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.