User-Deinffed Aliases & Snippets - Where are they

Provides intelligent code completion for SQL Server editors.

Moderators: David Atkinson, Anu Deshpande, Luke Jefferson

User-Deinffed Aliases & Snippets - Where are they

Postby EdCarden » Mon Aug 02, 2010 11:03 pm

ANyone know where exactly SQL Prompt stores the User-Defined Aliases and code Snippets that you can specify via the AUto Insert & Snippets Tabs in SQL Prompts OPTIONS dialog?

I neeed to setup over a thousand of the User-Defined Aliases and I'll be darned if I'm going to do it one at a time thru the interface. There's no bulk load feature in SQL Prompt that I can to setup a large number of these. I know they got to be stored somewhwere in the regiostry or some file, I just need to find where and maybe I can edit the thing directly.

This seems like it should be a no brainer ability in SQL Prompt but its not and I can't determine where its storing these things.
EdCarden
 
Posts: 90
Joined: Tue Nov 25, 2008 6:26 pm

I figured it out thanks to Sysinternals Process Viewer

Postby EdCarden » Mon Aug 02, 2010 11:45 pm

FYI - SQL Prompt stores User-Deifned aliases along with a few other custmizations in the xml file EngineOptions.xml which can be found (On a Windows Vista computer) at

C:\\Users\\John.Smith\\AppData\\Local\\Red Gate\\SQL Prompt 3

Where the 'John.Smith' is your name/Login Name.

In it is a section labled UserDefinedAliases that has 4 lines of info for each defined User-Defined Alias. I am going to test editing this with just a few items and if it works then I will use a query (in T-SQL) that pulls Table Names and aliases from a table we have setup to store this. Using concactenated string combined with CHAR(10) (for CrLf) and output to Text will produce a complete section of UserDefinedAlias items.

This section ahs at the very start a line that lists the total number of UDFs listed and so it will need to be updated to account for the new items

Hopefully this will work and save me literally hours of time.
EdCarden
 
Posts: 90
Joined: Tue Nov 25, 2008 6:26 pm

Postby Anu Deshpande » Wed Aug 04, 2010 10:23 am

Thanks for your post and suggestion ED.

Kindly let us know if you have any issues or questions regarding the product,I'll like to help.
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Anu Deshpande
 
Posts: 692
Joined: Mon Apr 20, 2009 3:53 pm
Location: Cambridge

Re: User-Deinffed Aliases & Snippets - Where are they

Postby EdCarden » Wed Oct 27, 2010 9:35 pm

Anu Deshpande wrote:Thanks for your post and suggestion ED.

Kindly let us know if you have any issues or questions regarding the product,I'll like to help.


Anu, If I wanted to suggest as a new feature in a future version the ability to more easily edit the info in this file how would I go about doing so? I imagine I'm not teh first person who wished to Bulk Load User-Defined Aliases and the like in SQL Prompt.

Thanks
EdCarden
 
Posts: 90
Joined: Tue Nov 25, 2008 6:26 pm


Return to SQL Prompt Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests