Vertica 6.0 and COPY LOCAL issue

Moderator: NorbertKrupa

caprile
Newbie
Newbie
Posts: 13
Joined: Tue May 29, 2012 1:24 pm

Vertica 6.0 and COPY LOCAL issue

Post by caprile » Tue Jun 12, 2012 4:42 pm

Hi,
I migrate my database from vertica 5.1 to the new Vertica 6.0 because I need to manage the rejected data.
The documentation says :
LOCAL : "Specifies that all paths for the COPY statement are on the
client system and that all COPY variants are initiated from a
client. You can use the LOCAL and STDIN parameters
together. See Using the COPY and LCOPY Statements in the
Administrator's Guide."


Administrator Guide says:
REJECTED DATA : "Indicates the file in which to save information about
rejected data that specifies the file path. For COPY
LOCAL, the exceptions file must be on the client."


So I execute the following COPY statement :
COPY public.TEST_LOAD_TABLE (A, B, DATADATE FORMAT 'YYYYMMDDHH24MISS', N) FROM LOCAL '/var/work/VERTICA_FLOW8.txt' DELIMITER '|' TRAILING NULLCOLS REJECTED DATA '/var/VERTICA_FLOW/rejected/VERTICA_FLOW8.txt' DIRECT NO COMMIT;

but the following error occurred :
com.vertica.util.ServerException: [Vertica][VJDBC](4368) ERROR: Permission denied for storage location [/var/VERTICA_FLOW/rejected/VERTICA_FLOW8.txt]

Thanks in advance.

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: Vertica 6.0 and COPY LOCAL issue

Post by id10t » Tue Jun 12, 2012 6:48 pm

Hi caprile!

Have you (dbadmin) write permissions? Can you provide next output:

Code: Select all

ls -ld /var
ls -ld /var/VERTICA_FLOW/rejected/

caprile
Newbie
Newbie
Posts: 13
Joined: Tue May 29, 2012 1:24 pm

Re: Vertica 6.0 and COPY LOCAL issue

Post by caprile » Tue Jun 12, 2012 9:42 pm

I have an application running on linux machine on jboss application server.
This application loading data via JDBC by the descripted statement on a remote machine where Vertica is running and I want the rejected file is written on the linux machine where the application resides.
the var directory is on client side where the application is running, on linux machine.
I had the doubt on the permission and for testing I execute the command chmod 777 on the directory rejected.
drwxrwxrwx

but no effects...same error.

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: Vertica 6.0 and COPY LOCAL issue

Post by id10t » Tue Jun 12, 2012 10:44 pm

Hi caprile!

The problem is only permissions - JVM get no permissions for writing.
Check via Java permissions (as servlet in JBoss), if Java returns that you have permissions i think you should open a ticket.

PS JDBC driver from ver. 6?

caprile
Newbie
Newbie
Posts: 13
Joined: Tue May 29, 2012 1:24 pm

Re: Vertica 6.0 and COPY LOCAL issue

Post by caprile » Wed Jun 13, 2012 8:52 am

Yes, JDBC driver version 6

caprile
Newbie
Newbie
Posts: 13
Joined: Tue May 29, 2012 1:24 pm

Re: Vertica 6.0 and COPY LOCAL issue

Post by caprile » Wed Jun 13, 2012 9:13 am

Ok, JVM has permission for writing.
I execute a test where I create the empty reject file before execute the COPY statement on vertica.
The rejected empty file is correctly created, but same error during COPY statement execution.

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: Vertica 6.0 and COPY LOCAL issue

Post by id10t » Wed Jun 13, 2012 9:21 am

>> Yes, JDBC driver version 6
Ok, I will check it later at my PC.

>> The rejected empty file is correctly created, but same error during COPY statement execution.
Looks like problem with drivers.

PS Is this simple implementation of LOCAL COPY? Can you provide source code of servlet or appropriate part of it?

Post Reply

Return to “JDBC”