Unable to connect RStudio to database

Hi all,
I tried to connect my R Studio to Netezza database to directly run sql queries and it always gives me the following error:

Error: nanodbc/nanodbc.cpp:950: 08001: Client unable to establish connection

I have tried using the below mentioned code, connections tab and other methods. Any help would be highly appreciated.
Thanks

'''r
con <- DBI::dbConnect(odbc::odbc(),
Driver = "NetezzaSQL",
Server = "server name",
Database = "database name",
UID = "username",
PWD = "password",
Port = portnumber)

'''

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.