Dear Satheesh. in my own experience, File locking under Windows has always been problematic. Windows locks files, when reading from it while normally you would expect lock on write only. After reading the CSV file into H2, shutdown the H2 DB (maybe even the JVM) and open it again. That should release the lock and enable you deleting the CSV file.
H2 1.3.76 is quite old. If there is any problem with closing the CSV file it is unlikely someone will investigate and/or fix it in this old branch. Maybe you can try with a recent H2 version 1.4.200 or even pull from GIT. If reproducible, we would have a chance to fix it. Best regards Andreas On Tue, 2020-11-10 at 23:06 -0800, satheesh Thodupunoori wrote: > correction: My h2 version is 1.3.176 > > On Wednesday, November 11, 2020 at 11:28:05 AM UTC+5:30 satheesh > Thodupunoori wrote: > > Hi Team, > > > > I am using CSVREAD function to dump data from csv into a table > > using below query. > > > > INSERT INTO testdomain.`sale_data` (SELECT Column3,Column1,Column2 > > FROM > > CSVREAD('E:\Temp\nosqldb\saledata_1110.csv',null,'fieldSeparator=\, > > charset=UTF-8') LIMIT 0,40). > > > > Data got dumped into table but i am no longer able to delete the > > csv from file system. > > > > I tried running this query from a java program and through web > > console on windows machine. But I could not delete the file from > > file system. > > > > My h2 version is 1.3.76 . > > > > can someone please help me here. > > Thanks in advance. > > > > Satheesh > > > > > > > -- > You received this message because you are subscribed to the Google > Groups "H2 Database" group. > To unsubscribe from this group and stop receiving emails from it, > send an email to h2-database+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/h2-database/745c7f85-d364-4300-9774-39ba93e4d60fn%40googlegroups.com > . -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/7b43e8809e45ec625cf36fe26452a12596925dfb.camel%40manticore-projects.com.