KB3035071 - FIX: Error when you run a query that contains "Use database_name" or "Execute Stored_Procedure_name" command

Applies to: SQL Server 2014 DeveloperSQL Server 2014 EnterpriseSQL Server 2014 Standard

Symptoms


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'.

Cause


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

Resolution


Cumulative Update information

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

Workaround


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

Status


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