0
votes

I have problems to connect sql server on google cloud to google apps script, have tried many options do url connection like:

Jdbc.getCloudSqlConnection("jdbc:google:mysql://MYINSTANCE","sqlserver", "*****");

but is not connecting

Exception: Failed to establish a database connection. Check connection string.

Do you can help me to solve this problem to connect Sql Server to Google Apps Script?

Information about google cloud Sql Server:

DB Type: SQL Server 2017 Standard
Location: southamerica-east1-b

Using sql server management studio, I have tested and connected successfully, with this information

1
You say you're connecting to SQL Server, but using a mysql:// URI in the connection string. I don't think that's correct. I've edited your post to remove your instance's name & IP information - that's not something you want to broadcast on Stack Overflow.alroc
Thank you alroc for help me, I'm tried to used jdbc:google:sqlserver and jdbc::sqlserver but don't work too.Martentes Adm
Have you tried this in a simple Java program? I would imagine you want something like mssql:// for your URL. See eg docs.microsoft.com/en-us/sql/connect/jdbc/… See also: developers.google.com/apps-script/guides/jdbcFrank
Thank you @Frank for helping me, I will try this too, but I think is a bug in google apps script.Martentes Adm

1 Answers

0
votes

It seems that is not yet implemented to connect to the GoogleSQL SQL Server through Apps Script.

There is already a feature request made in Issue Tracker, you actually seem to be the person that created the Issue so I will leave the answer for visibility if someone faces the same problem.