Forum Stats

  • 3,757,538 Users
  • 2,251,243 Discussions
  • 7,869,860 Comments

Discussions

Sql Developer freezes when trying to generate insert scripts from a CSV file.

stom
stom Member Posts: 104 Blue Ribbon

Sql Developer freezes when trying to generate insert scripts from a CSV file. I was able to replicate this a few times.

Sql Developer version: 20.2

Database: 12.2.0.1

OS: Windows 10


1) Open SQL Developer and connect to the database.

2) On the object list tree, navigate to the target table.

3) Right click and select import data.

4) Select csv file.(file has 7 rows)

5) Choose import method as Insert Script, Next, Next and Finish

6) I get a popup saying "Import Data. Task successful and import committed."

7) Click on Ok. This opens a worksheet with the insert scripts.

8) All good so far. I see the data isn't inserted and there are no uncommitted transactions.

9) Repeat steps 3 to 5 on the same table with the same or different csv, SQL Developer freezes.


It becomes unresponsive and I can't close it. I have to kill it from the task manager.


Attaching the jstack output.


Tagged:

Best Answer

Answers

  • Philipp Salvisberg
    Philipp Salvisberg Member Posts: 145 Silver Badge

    I can reproduce the issue on macOS with SQLDev 20.2 and a 19.8 database instance.

    I used this dept.csv file with this content (you can guess the target table):

    "DEPTNO","DNAME","LOC"
    50,"ACCOUNTING2","NEW YORK"
    60,"RESEARCH2","DALLAS"
    70,"SALES2","CHICAGO"
    80,"OPERATIONS2","BOSTON"
    

    The very first time a new worksheet is opened with the following content:

    SET DEFINE OFF
    INSERT INTO DEPT (DEPTNO, DNAME, LOC) 
    VALUES (50, 'ACCOUNTING2', 'NEW YORK');
    INSERT INTO DEPT (DEPTNO, DNAME, LOC) 
    VALUES (60, 'RESEARCH2', 'DALLAS');
    INSERT INTO DEPT (DEPTNO, DNAME, LOC) 
    VALUES (70, 'SALES2', 'CHICAGO');
    INSERT INTO DEPT (DEPTNO, DNAME, LOC) 
    VALUES (80, 'OPERATIONS2', 'BOSTON');
    

    As you said from a database point of view no transaction is pending. No pending tasks in SQLDev as well.

    I'm not sure what the intended process is. Should this script be executed in the background? should it be presented in a worksheet to be executed manually? However, when you run "Data Import..." a second time SQLDev will become unresponsive (needs to be killed).

    The import method does not seem to be important. The wizard simply does not work more than once. The only workaround I see is to close SQLDev after the first use of the "Data Import" wizard.

    Looks like a bug.

    stom
  • stom
    stom Member Posts: 104 Blue Ribbon
  • stom
    stom Member Posts: 104 Blue Ribbon
    Accepted Answer

    This is fixed in 20.4