Chris Tate Thank you for reaching out.
This error message indicates that the GRANT CONNECT SQL statement is not supported in your version of SQL Server.
I was able to successfully run the above query.
To efficiently connect from a remote external location to shared data using Microsoft Office to an Azure SQL database, you can use Azure Active Directory authentication. This allows you to use your Azure AD credentials to authenticate to the database, instead of using a SQL Server login.
To use Azure AD authentication, you need to create an Azure AD user or group and add it to the database. Then, you can use the Azure AD user or group to connect to the database from Microsoft Office.
Here are the high-level steps to use Azure AD authentication.
- Create an Azure AD user or group and add it to the database.
- Create a connection string that uses Azure AD authentication.
- Use the connection string to connect to the database from Microsoft Office.
Here is an example.
Data Source=myserver.database.windows.net;Initial Catalog=mydatabase;Authentication=Active Directory Integrated;
- Open Microsoft Excel or Access and click on the "Data" tab.
- Click on "From Database" and select "From SQL Server".
- In the "Data Connection Wizard", enter the server name and database name that you want to connect to.
- Select "Use the following User Name and Password" and enter the Azure AD user or group that you created earlier.
- Click on "Test Connection" to test the connection.
- Click on "Finish" to create the connection.
Please note that you need to have the appropriate permissions to create an Azure AD user or group and add it to the database. Also, you need to have the appropriate permissions to create a firewall rule to allow external access to the database.
I hope this helps! Let me know if you have any other questions.
Regards,
Oury