How to create a Linked Server from SQL Server to HP Vertica

After you have installed the Vertica client on your SQL Server database host you can create Linked Server  this can be very useful. Here is the syntax you can use to make this happen.

EXEC dbo.sp_addlinkedserver
    @server = N'SRV_VERTICA',
    @srvproduct=N'',
    -- SQL Server driver
    @provider=N'MSDASQL',
    -- Connection string
    @provstr=N'Driver=Vertica;
            Servername=ServerName;
            Port=5430;
            Database=DatabaseName;
            UserName=user;
            Password=pass'
The to query use the OPENQUERY statement.
select * from OPENQUERY (SRV_VERTICA, 'SELECT getdate()')
getdate
---------------------------
2015-05-08 11:21:12.3058180

(1 row(s) affected)