File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ # SQL Splitter
2+
3+ Split the output of SSMS-scripted objects (even the whole database) into
4+ individual files.
5+
6+ ## Usage:
7+ ```
8+ Usage: sql-splitter [OPTIONS] [IN_FILE]
9+
10+ Arguments:
11+ [IN_FILE] File(s) to process
12+
13+ Options:
14+ -d, --out-dir <OUT_DIR> Output directory to create files [default: .]
15+ -n, --only_names Exclude schema-name from filenames
16+ -v, --verbose Verbose output
17+ -w, --windows-1252 specify that input files are using windows-1252 encoding instead of UTF-8
18+ -h, --help Print help
19+ -V, --version Print version
20+ ```
21+
22+ If ` <IN_FILE> ` is not specified, it will be read from STDIN (useful if you told
23+ SSMS to copy its output to the clipboard).
24+
25+ If ` <OUT_DIR> ` is not specified, it the files will be created in the current
26+ directory.
27+
28+ The output files will be named according to the following rules:
29+ ` <ObjectType>/[<Schema>.]<ObjectName>.sql `
30+ - ` <Schema> ` is only populated for objects where database-schema is relevant.
31+ - Supplying the ` --only_names ` option will exclude schema-name from filenames.
32+
33+ If running this script gives an error relating to files not being UTF-8
34+ encoded, you can run it with the ` --windows-1252 ` option.
You can’t perform that action at this time.
0 commit comments