1
votes

About this documentation https://cloud.google.com/sql/docs/postgres/connect-run I only see support for MySQL and PostgreSQL. SQL Server over Cloud SQL connections of Cloud Run config really not supported yet?

I'm talking about this configuration section:Cloud SQL connections

Thanks in advance for the help!

1
From my latest discussion with Google PM, it was because SQL Server driver don't yet support Unix socket. I don't know if it's still the case.guillaume blaquiere

1 Answers

3
votes

Cloud SQL Proxy (used by Cloud Run) does actually support Microsoft SQL Server. However, Cloud Run exposes this proxy only using "unix domain sockets" (and not local TCP IP addresses). Problem is, many mssql client libraries won't be supporting Unix sockets as the connection option.

If you can find a SQL Server client that has support for Unix sockets as the transport (see this), you should be able to use unix:///cloudsql/... socket on Cloud Run to connect to SQL Server.

However, note that this is about to get a ton easier as Cloud Run is adding support for VPC Connector which will allow you to connect to Cloud SQL instances within the same network directly over their private IP address, and you won't need to use the Cloud Run’s feature exposing the Unix socket.