Skip to content

Feature Request: Support scanning local SQL files to extract SQL Server objects (procedures, functions, tables)Β #250

@lozn00

Description

@lozn00

πŸš€ Feature Request

I'm developing a SQL Server database management tool that focuses on database version control and schema synchronization.

Currently, the tool supports pulling all tables, stored procedures, and table-valued functions from a remote SQL Server database using standard system views (e.g., INFORMATION_SCHEMA, sys.objects, etc.).

Each file contains one CREATE PROCEDURE, CREATE FUNCTION, or CREATE TABLE statement.

I'd like the language server to parse these files and expose symbol information (object name, type, maybe parameters) to enable:

  • IntelliSense (autocomplete)
  • "Go to Definition"
  • "Find all References"
  • Diagnostics if duplicate object names are found
  • Offline support without connecting to a live SQL Server

Image

DBName1\Functions
DBName2\Stored Procedures

πŸ’‘ Proposed Feature

  • Add support for parsing local SQL files containing T-SQL definitions
  • Extract symbols for SQL Server-specific objects (e.g., CREATE PROCEDURE, CREATE FUNCTION, CREATE VIEW, CREATE TABLE)
  • Optionally, allow configuration of file scan locations (e.g., via sql.lsp.workspaceFolders)

πŸ”§ Technical Note

T-SQL is more complex than standard SQL (e.g., TRY...CATCH, GO batch separators, WITH ENCRYPTION, etc.).
One possible solution is to leverage Microsoft's ScriptDom parser (C#), or integrate an ANTLR-based parser for T-SQL.

πŸ™ Why It Matters

This feature would greatly benefit teams managing SQL Server schema via Git and CI/CD pipelines, and would align with the goal of supporting modern database development workflows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions