Search code examples
sql-serverprestotrino

How to specify database for SQL Server catalog in Presto?


I specified following catalog for SQL Server

connector.name=sqlserver
connection-url=jdbc:sqlserver://192.168.1.1
connection-user=build_agent
connection-password=build_agent

When I try running queries against it, it seems that I can access master database only. How can I specify specific database?


Solution

  • From Trino (formerly Presto SQL) SQL Server connector documentation (https://trino.io/docs/current/connector/sqlserver.html):

    connection-url=jdbc:sqlserver://<host>:<port>;database=<database>