I am trying to connect to azure sql database with database connector package used for Achillesweb .
Below are my connection details.
azuresql4 <- createConnectionDetails(dbms="sql server", connectionString="jdbc:sqlserver://xxxsqldbserver.database.windows.net:1433;database=xxxsqldb;user=xxxsqladmin@xxxsqldbserver;password=password;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;", user="xxxsqladmin", password='password' , pathToDriver ="/home/user/app4/framework/lib/")
It gives me error as
com.microsoft.sqlserver.jdbc.SQLServerException: USE statement is not supported to switch between databases. Use a new connection to connect to a different database
when I looked for this error . This seems that azure sql database does not support USE statement if we try to switch between different databases .
I will be following up with azure support team for this .
But my question is why it is trying to switch to different database . When I have already provided the database name in the connectionstring.
Have any body worked on connecting with azure sql database or azure sql warehouse .
Please help !!