connect MSSQL server problem

Hi Team,
I need to connect two MSSQL servers.

One server ask me to enter user name and password. I can use dbConnect (from DBI package) to connect the serve.

Another one do not ask me credential to access the serve. So I remove UID and PWD, it doesn't work. Then I tried to use my PC log in credential for UID and PWD, however, it still doesn't allow me to access. The error message: Error: nanodbc/nanodbc.cpp:1021: 28000: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Login failed for user '******'.
How to modify the code (see below) to access second MSSQL server?

con <- dbConnect(odbc(),
Driver   = "ODBC Driver 17 for SQL Server",
Server   = "abcdefghijklmn", 
Database = "abc_def")

Thank you,

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.