File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -72,13 +72,16 @@ EXEC dbo.sp_doc @DatabaseName = 'WideWorldImporters', @ExtendedPropertyName = 'M
7272
7373### Output to File
7474
75- Batch:
75+ #### Batch
7676
7777``` batchfile
7878sqlcmd -S localhost -d master -Q "exec sp_doc @DatabaseName = 'WideWorldImporters';" -o readme.md -y 0
7979```
8080
81- PowerShell / DbaTools:
81+ ** Note:** The ` -y 0 ` option is [ important to specify] [ sqlcmd ] so that variable length
82+ output is not capped at the default of 256 characters by sqlcmd.
83+
84+ #### PowerShell / DbaTools
8285
8386``` powershell
8487$Query = "EXEC sp_doc @DatabaseName = 'WideWorldImporters';"
@@ -143,4 +146,5 @@ Check out the other scripts in the [DBA MultiTool][tool].
143146[ issue ] : https://github.com/LowlyDBA/dba-multitool/issues
144147[ sample ] : assets/WideWorldImporters.md
145148[ so ] : https://stackoverflow.com/a/37284582/4406684
149+ [ sqlcmd ] : https://docs.microsoft.com/en-us/sql/tools/sqlcmd-utility?view=sql-server-ver15#command-line-options
146150[ UVBug ] : https://feedback.azure.com/forums/908035-sql-server/suggestions/32899324-ssms-ignores-final-r-n-crlf-carriage-return
You can’t perform that action at this time.
0 commit comments