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

徵狀

假設您使用 Microsoft SQL Server 2014 Management Studio (SSMS)並聯機至 Azure SQL 資料庫。 當您執行命令 執行 Stored_Procedure_name 從已儲存程式的快捷方式功能表,在顯示的對話方塊視窗中填入欄位並按一下 [確定] 之後,您會收到下列錯誤訊息:

Msg 40508、Level 16、State 1、Line 1USE 語句不支援在資料庫之間切換。 使用新的連線來連線至不同的資料庫。Msg 2812、Level 16、State 62、Line 6Could 找不到已儲存程式的 [Execute Stored_Procedure_name]。

原因

之所以發生這個問題,是因為 Azure SQL Database 不支援 "use" 命令。

解決方案

累積更新資訊

此問題最初是在 SQL Server 的後續累積更新中修正。

每個新的 SQL Server 累計更新都包含所有的修正程式,以及前一個累積更新中所包含的所有安全性修正程式。 我們建議您下載並安裝最新的 SQL Server 累積更新:

因應措施

若要解決此問題,請先在 SSMS 資料庫下拉式清單中選取正確的資料庫,然後執行已儲存的程式。

狀態

Microsoft 已確認本篇文章<適用於>一節所列之 Microsoft 產品確實有上述問題。

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
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!

×