Sign in with Microsoft
Sign in or create an account.
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.


Assume that you use Microsoft SQL Server 2014 Management Studio (SSMS) and connect to Azure SQL Database. When you run the command Execute Stored_Procedure_name from the right-click shortcut menu of a stored procedure, after filling out the fields in the appearing dialog window and clicking OK, you receive the following error messages:

Msg 40508, Level 16, State 1, Line 1
USE statement is not supported to switch between databases. Use a new connection to connect to a different database.

Msg 2812, Level 16, State 62, Line 6
Could not find stored procedure 'Execute Stored_Procedure_name'.


This issue occurs because Azure SQL Database does not support the "use" command.


Cumulative Update information

The issue was first fixed in the following cumulative update of SQL Server.

Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. We recommend that you download and install the latest cumulative updates for SQL Server:


To work around this issue, select the correct database first in the SSMS database drop-down list, and then execute the stored procedure.


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!