Wednesday, November 30, 2016

database link between Vertica/non-Vertica database

Summarize some research about database link  between Vertica/non-Vertica database


As of now, DB links feature in not present in Vertica. We can not create Vertica database links like those that exist in Oracle and SQL Server. Moreover, we cannot run two databases simultaneously at one time in Vertica cluster.

But we can easily connect to another Vertica database if we need to to copy data between two Vertica databases. See the SQL Reference Manual:
CONNECT TO VERTICA database USER username PASSWORD 'password' ON 'host',port

For copy ORACLE data to Vertica, once can uses a unix shell script. Use COPY command in Vertica. In a shell script, pipe the output from oracle to Vertica in COPY command ( using input as STDIN) and then run the script. This shell script can also be used as STORED PROC in Vertica and running this Stored Proc from Vertica will pull the data from Oracle to Vertica.

For table join, if it requires join two tables in two Vertica databases, why not use two different schemas in same cluster/database  which can act as two different database.

Create Linkserver from SQL Server to Vertica via ODBC is possible, however there can have  performance concern.