How to run SSMS query in Visual Studio for Dynamics 365 FO
1. Open Visual Studio on your dev server
2. click on view then select SQL server object explorer as shown below
3. SQL server object explorer will be shown on the left side in Visual Studio as shown below, click on add SQL server
4. A new window will open as shown below
5. Fill in the server name as shown below and click connect
6. Now you will see your DB in Visual Studio, expand your AxDB as shown in the below picture, then right-click on DB and click on new query
7. A new query window will open
8. write your query and click on runIn this way we can connect our DB in Visual studio instead of SSMS