You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds -p and -p1 flags to print execution statistics after each batch:
- -p: Standard format with packet size, execution count, and timing
- -p1: Colon-separated format for parsing (packetSize:batches:total:avg:rate)
Uses new DefaultPacketSize constant (4096) instead of magic numbers.
Copy file name to clipboardExpand all lines: README.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -154,6 +154,16 @@ switches are most important to you to have implemented next in the new sqlcmd.
154
154
-`:Connect` now has an optional `-G` parameter to select one of the authentication methods for Azure SQL Database - `SqlAuthentication`, `ActiveDirectoryDefault`, `ActiveDirectoryIntegrated`, `ActiveDirectoryServicePrincipal`, `ActiveDirectoryManagedIdentity`, `ActiveDirectoryPassword`. If `-G` is not provided, either Integrated security or SQL Authentication will be used, dependent on the presence of a `-U` username parameter.
155
155
- The new `--driver-logging-level` command line parameter allows you to see traces from the `go-mssqldb` client driver. Use `64` to see all traces.
156
156
- Sqlcmd can now print results using a vertical format. Use the new `--vertical` command line option to set it. It's also controlled by the `SQLCMDFORMAT` scripting variable.
157
+
-`-p` prints performance statistics after each batch execution. Use `-p` for standard format or `-p1` for colon-separated format suitable for parsing.
158
+
159
+
```
160
+
1> select 1
161
+
2> go
162
+
163
+
Network packet size (bytes): 4096
164
+
1 xact[s]:
165
+
Clock Time (ms.): total 5 avg 5.00 (200.00 xacts per sec.)
166
+
```
157
167
158
168
```
159
169
1> select session_id, client_interface_name, program_name from sys.dm_exec_sessions where session_id=@@spid
_=rootCmd.Flags().BoolP("client-regional-setting", "R", false, localizer.Sprintf("Provided for backward compatibility. Client regional settings are not used"))
476
480
_=rootCmd.Flags().IntP(removeControlCharacters, "k", 0, localizer.Sprintf("%s Remove control characters from output. Pass 1 to substitute a space per character, 2 for a space per consecutive characters", "-k [1|2]"))
0 commit comments