Page 1 of 1

COPY vs. LCOPY

Posted: Tue Mar 27, 2012 7:38 pm
by Josh
What is the difference between the COPY and LCOPY commands? Is there a reason why I would use one over the other?

Re: COPY vs. LCOPY

Posted: Tue Jun 16, 2015 7:53 pm
by Craig_DEI
Hi,

COPY Bulk loads data from one or more files or pipes on a cluster host into a Vertica database. Meaning the files must already be on one of the host servers in the cluster.

LCOPY Loads a data file from a client system into the database. Meaning the file is located locally on the machine of the user. It can only be used via the ODBC interface and is used to actually take the file from your machine to the cluster.

Thus, the use of the commands depends on where the file(s) is located and/or your willingness/access to put the file directly on one of the Vertica cluster servers.

Thanks,
Craig

Re: COPY vs. LCOPY

Posted: Wed Jun 17, 2015 4:17 am
by NorbertKrupa
From the documentation:
The LCOPY function has been removed from the version 5.1 driver. You should instead use the LOCAL option of the COPY SQL statement to copy data from the client system to the server. See Streaming Data From the Client Using COPY LOCAL.