Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1026865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:08:55+00:00 2026-05-16T12:08:55+00:00

Using sqlplus 11g on windows to run sql script on 11g database. Sqlplus hangs

  • 0

Using sqlplus 11g on windows to run sql script on 11g database. Sqlplus hangs if insert line left in script. If I comment out the insert line, the script returns the records.

Script exec time is < 1 sec when run in sql developer.

I have tried to make the insert statment one continuous line with same resutls.

using echo on, it hangs right after the sql last line (…is null;) and shows a new line starting, commit is never processed. I assume my insert statement is not syntaxed correctly to run in sqlplus

Command line call:

sqlplus e_fraud/e_fraud@eftst2 @"C:\temp\Actimize_ETL\Versions\03\sql\merge2000_insert_new_bank_keys.sql"

sql script:

--insert into e_fraud.bank 
select stg.bank_key bank_key, stg.bank_key bank_name from
(
select distinct account_bank bank_key
from e_fraud.rgbk_stg_account
where account_bank is not null
or account_bank != ''
UNION
select distinct bank_key
from e_fraud.rgbk_stg_branch
where bank_key is not null
or bank_key != ''
) stg
left outer join e_fraud.bank b
on stg.bank_key = b.bank_key
where b.bank_key is null;

commit;

exit;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T12:08:56+00:00Added an answer on May 16, 2026 at 12:08 pm

    If the syntax was wrong it would tell you that, not hang.

    It isn’t clear if you ran it successfully in SQL Developer before or after trying it from SQL*Plus. My guess would be that you ran the insert there first, and haven’t committed or rolled back that transaction, causing a lock – suggesting there might be a unique constraint on one of the e_fraud columns. Or maybe less likely, you’ve inserted and committed in one session, but then in another session you’ve deleted the records prior to rerunning but not committed.

    Your SQL*Plus session is waiting for some other transaction to be finalised either way, so it can either perform the insert or report the constraint violation, but it’s in limbo at the moment. Make sure you’ve committed or rolled back in every session you have open. There are ways to check for locks if necessary.

    Incidentally, as null and the empty string are treated the same by Oracle, you don’t need either of the != '' clauses.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a problem trying to run my sql script into oracle using sqlplus.
I am using sqlplus on a windows environment. At the moment i run sqlplus
In a shell script we can connect to a Database using sqlplus on unix.
Using SQL Plus, you can run a script with the @ operator from the
I have multiple databases that I connect to using SQL*Plus in Windows (not the
I am using Solaris. I have to log into sql plus and run some
I have a SQL script that will insert a long string into a table.
I am using Oracle SQL (in SQLDeveloper, so I don't have access to SQLPLUS
I have a small PL/SQL script that I'm using to try and copy data
I have following SQLPlus syntax. Now I need to run it in Python using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.