我可以在无服务器SQL池中创建一个存储过程吗
根据Microsoft的官方文档,可以在Azure Synapse无服务器SQL池中创建一个存储过程。我设法执行以下脚本
Create proc Test
as
Select 1 as X
,但是,我在无服务器SQL池中看不到测试存储过程。 我也没有在无服务器SQL池中看到可编程性文件夹
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我发现在Synapse Studio或Azure Data Studio中查看存储过程的唯一方法是查询系统模式表。但是,如果您通过此处使用ssms使用SSM,则可以看到SPS, https://learn.microsoft.com/en-us/azure/synapse-analytics/sql/get-started-smsms
Synapse Studio中的
” //i.sstatic.net/wqktp.png“ rel =” nofollow noreferrer“>
ssms
The only way I've found to view the Stored Procedure in Synapse Studio or Azure Data Studio is to query the sys schema tables. However SPs are visible if you use SSMS via steps here https://learn.microsoft.com/en-us/azure/synapse-analytics/sql/get-started-ssms
Query in Synapse Studio
SSMS
是的,可以使用T-SQL命令在Synapse Analytics中的无服务器SQL中创建存储过程。我实际上是使用SSMS进行的,并连接到Synapse Analytics工作区中的SQL数据库 - 使用
无服务器SQL Endpoint
链接,在Azure的概述窗口中提供:net/2fynkqym.png“ rel =“ nofollow noreferrer”>
创建过程脚本之前创建一个模式。
第二个警告是我必须做两次。我第一次执行
创建过程
即使SSMS报告了成功,也没有发生任何事情。只有在我再次执行它之后,存储的过程才出现在Object Explorer中。但是我在之前又有连接问题,它可能与之链接,而与无服务器SQL无关。PS。我的SQL DB实际上是Deltalake,表是Parquet文件。不确定它在此答案中扮演任何角色,但我包括在内,以防万一。
Yes, it is possible to create Stored procedure in Serverless SQL in Synapse Analytics, using T-SQL commands. I actually did that using SSMS and connecting to a SQL database in Synapse Analytics Workspace - using
Serverless SQL endpoint
link, provided in Overview window in Azure:But for me there were caveats - schema [dbo] is explicitly prohibited, so I had to create a schema before executing
CREATE PROCEDURE
script.Second caveat was that I had to do it twice. First time I executed the
CREATE PROCEDURE
nothing happened, even though SSMS reported success. Only after I executed it again, stored procedure showed up in Object Explorer. But I had connection issues prior and after, it may be linked to that, and nothing related to Serverless SQL.PS. My SQL DB is actually DeltaLake, and tables are parquet files. Not sure it plays any role in this answer, but I include it, just in case.