Page 1 of 3

Vertica 6.0 and COPY LOCAL issue

Posted: Tue Jun 12, 2012 4:42 pm
by caprile
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.

Re: Vertica 6.0 and COPY LOCAL issue

Posted: Tue Jun 12, 2012 6:48 pm
by id10t
Hi caprile!

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

Code: Select all

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

Re: Vertica 6.0 and COPY LOCAL issue

Posted: Tue Jun 12, 2012 9:42 pm
by caprile
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.

Re: Vertica 6.0 and COPY LOCAL issue

Posted: Tue Jun 12, 2012 10:44 pm
by id10t
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?

Re: Vertica 6.0 and COPY LOCAL issue

Posted: Wed Jun 13, 2012 8:52 am
by caprile
Yes, JDBC driver version 6

Re: Vertica 6.0 and COPY LOCAL issue

Posted: Wed Jun 13, 2012 9:13 am
by caprile
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.

Re: Vertica 6.0 and COPY LOCAL issue

Posted: Wed Jun 13, 2012 9:21 am
by id10t
>> 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?