Analyze TSQL stored procedures
This app extracts the source tables used by stored procedures in a particular database. You probably don't have access to the network or database in question, but you might pull some ideas from the appoach.
- The app parses the stored procedure syntax, assumed to be written in T-SQL
- Antlr was used to generate the parser from this grammar file
- The Go code queries the relevant database for procedure definitions, listens for table_source events, and sends output to CSV
- Once main.go is compiled (instructions for setting up an environment are here), the resulting executable is run as a console application
- All library dependencies are vendored using gvt