简体   繁体   English

SSMS 不使用新存储过程的模板

[英]SSMS not using template for new stored procedure

I edit the template "Create Stored Procedure (New Menu).sql" with the template-explorer.我使用模板资源管理器编辑模板“创建存储过程(新菜单)”。 And saved it.并保存了它。 Restart ssms.重启短信。

But if I create a new stored procedure by right-click in the object explorer and then "new -> stored procedure..." the changes are not visible.但是,如果我通过在对象资源管理器中右键单击创建一个新的存储过程,然后“新建 -> 存储过程...”,则更改不可见。 It seems ssms uses an standard-template I can't find... ssms 似乎使用了我找不到的标准模板...

If I call the template via template-explorer I can see my changes.如果我通过模板资源管理器调用模板,我可以看到我的更改。

The template I changed is saved at C:\\Users\\breuerp\\AppData\\Roaming\\Microsoft\\SQL Server Management Studio\\18.0\\Templates\\Sql\\Stored Procedure.我更改的模板保存在 C:\\Users\\breuerp\\AppData\\Roaming\\Microsoft\\SQL Server Management Studio\\18.0\\Templates\\Sql\\Stored Procedure。

Is there any other place?还有其他地方吗? How to change the template ssms uses when clicking menu?单击菜单时如何更改模板 ssms 使用?

Google finds only instructions how to change the template - I did it like the hits described ir - or where they are saved - the place I find my template...谷歌只找到如何更改模板的说明 - 我像描述的命中那样做 - 或者保存它们的位置 - 我找到模板的地方......

I'm using ssms Version 18.6 and with this infos:我正在使用 ssms 版本 18.6 和以下信息:

SQL Server Management Studio 15.0.18338.0 SQL Server 管理工作室 15.0.18338.0
SQL Server Management Objects (SMO) 16.100.41011.9 SQL Server 管理对象 (SMO) 16.100.41011.9
Microsoft Analysis Services Client Tools 15.0.19205.0 Microsoft Analysis Services 客户端工具 15.0.19205.0
Microsoft Data Access Components (MDAC) 10.0.17763.1 Microsoft 数据访问组件 (MDAC) 10.0.17763.1
Microsoft MSXML 3.0 4.0 6.0微软 MSXML 3.0 4.0 6.0
Microsoft .NET Framework 4.0.30319.42000微软 .NET 框架 4.0.30319.42000
Operating System 10.0.17763操作系统 10.0.17763

The paths mention in Customise default 'New Stored Procedure' SSMS 2008 Template do not exist on my pc.我的电脑上不存在自定义默认“新存储过程”SSMS 2008 模板中提到的路径。

Sincerly Peter真诚的彼得

Looks like the templates are intended to start your own collection of starting points for frequently used scripts.看起来模板旨在为常用脚本启动您自己的起点集合 Nowhere does the documentation state that it will import or include your custom templates in SSMS. 文档中没有任何地方说明它将在 SSMS 中导入或包含您的自定义模板。

The documentation states the following (without higlights).文档说明如下(没有亮点)。

The first time the template explorer is opened, a copy of the templates are placed in the user's folder in C:\\Users, under AppData\\Roaming\\Microsoft\\SQL Server Management Studio\\130\\Templates.第一次打开模板资源管理器时,模板的副本放置在 C:\\Users 中的用户文件夹中,位于 AppData\\Roaming\\Microsoft\\SQL Server Management Studio\\130\\Templates 下。

Perhaps if the original location could be retrieve and the original scripts adjusted, then you might see changes in SSMS.也许如果可以检索原始位置并调整原始脚本,那么您可能会看到 SSMS 中的更改。

Create custom templates for tasks you perform frequently.为您经常执行的任务创建自定义模板。 Organize your custom scripts into the existing folders or create a new folder structure.将您的自定义脚本组织到现有文件夹中或创建新的文件夹结构。

If creating a new folder structure is suggested as possible practice, but there is no option to configure the new folder path in SSMS, then there is no way for the application to find your custom templates.如果建议将创建新文件夹结构作为可能的做法,但没有在 SSMS 中配置新文件夹路径的选项,则应用程序无法找到您的自定义模板。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM