简体   繁体   中英

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

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.

Is there any other place? How to change the template ssms uses when clicking menu?

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:

SQL Server Management Studio 15.0.18338.0
SQL Server Management Objects (SMO) 16.100.41011.9
Microsoft Analysis Services Client Tools 15.0.19205.0
Microsoft Data Access Components (MDAC) 10.0.17763.1
Microsoft MSXML 3.0 4.0 6.0
Microsoft .NET Framework 4.0.30319.42000
Operating System 10.0.17763

The paths mention in Customise default 'New Stored Procedure' SSMS 2008 Template do not exist on my pc.

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.

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.

Perhaps if the original location could be retrieve and the original scripts adjusted, then you might see changes in 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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