sqlobjexport
builds a file system representation of definitions for a specified set of SQL Server objects.
See the docs here.
go get github.com/cbergoon/sqlobjexport
USAGE: Usage: sqlobjectdump [--git] [--git-address] [--directory] [--schema=<schema>] [--type=<type>] <username>:<password>@<address>:<port>/<database>
To retreive all stored procedures in the dbo
schema in the AdventureWorks
database:
$ sqlobjexport -schema=dbo -type=P sa:password@127.0.0.1:1433/AdventureWorks
To use windows authentication:
$ sqlobjexport -schema=dbo -type=P 'domain\username:password@127.0.0.1:1433/AdventureWorks'
Available object types include:
FN SQL_SCALAR_FUNCTION
IF SQL_INLINE_TABLE_VALUED_FUNCTION
V VIEW
AF AGGREGATE_FUNCTION
S SYSTEM_TABLE
IT INTERNAL_TABLE
P SQL_STORED_PROCEDURE
X EXTENDED_STORED_PROCEDURE
TF SQL_TABLE_VALUED_FUNCTION
This project is licensed under the MIT License.