Following ‘Naming Conventions’ is the best practice for SQL Server projects as they contribute to better maintainability and code quality.
Finding non-compliant objects and fixing issues is time-consuming. The ‘Naming Conventions’ feature allows you to automate the detection of naming issues, in a configurable way.
How to Check Naming Conventions in SQL Server Projects:
- Select your SQL Server Project in the Main view
- Click on ‘Naming Conventions’ in the navigation bar.
Visual Expert lists the objects that do not follow the predefined naming rules along with a hint on the correction that needs to be made.
- Naming Conventions can also be called at root items like Procedures, Functions, Triggers, Views, etc.
How to setup the ‘Naming Conventions’ feature for SQL Server
Visual Expert provides a set of default naming rules, which can be customized as per your needs.
- Mouse over the ‘Naming Conventions’ macro and click on the wrench that appears on its right end.
- This opens a configuration window, where the rules can be modified as needed.
- Open ‘More Settings’ under the ‘Settings’ tab on the top menu
- Select the ‘Transact-SQL’ tab
- Set the naming conventions as required for the current Visual Expert project. The changes will be automatically saved upon closing this window.
You can also configure the naming conventions at the Project Settings level.