Skip to content

Commit 64f9c99

Browse files
niphlodgithub-actions[bot]
authored andcommitted
updating build ref file
1 parent 3b8c2c5 commit 64f9c99

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

assets/dbatools-index.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20336,7 +20336,7 @@
2033620336
},
2033720337
{
2033820338
"Name": "Get-DbaEstimatedCompletionTime",
20339-
"Description": "Gets execution and estimated completion time information for queries\n\nPercent complete will show for the following commands\n\nALTER INDEX REORGANIZE\nAUTO_SHRINK option with ALTER DATABASE\nBACKUP DATABASE\nDBCC CHECKDB\nDBCC CHECKFILEGROUP\nDBCC CHECKTABLE\nDBCC INDEXDEFRAG\nDBCC SHRINKDATABASE\nDBCC SHRINKFILE\nRECOVERY\nRESTORE DATABASE\nROLLBACK\nTDE ENCRYPTION\n\nFor additional information, check out https://blogs.sentryone.com/loriedwards/patience-dm-exec-requests/ and https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-exec-requests-transact-sql",
20339+
"Description": "Gets execution and estimated completion time information for queries\n\nPercent complete will show for the following commands\n\nALTER INDEX REORGANIZE\nAUTO_SHRINK option with ALTER DATABASE\nBACKUP DATABASE\nDBCC CHECKDB\nDBCC CHECKFILEGROUP\nDBCC CHECKTABLE\nDBCC INDEXDEFRAG\nDBCC SHRINKDATABASE\nDBCC SHRINKFILE\nRECOVERY\nRESTORE DATABASE\nROLLBACK\nTDE ENCRYPTION\n\nFor additional information, check out https://blogs.sentryone.com/loriedwards/patience-dm-exec-requests/ and https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-exec-requests-transact-sql\n\nThe command will only return queries that provide estimated completion time, all other running queries will be filtered out.",
2034020340
"Tags": [
2034120341
"Diagnostic",
2034220342
"Query"
@@ -33969,7 +33969,7 @@
3396933969
"CommandName": "Invoke-DbaQuery",
3397033970
"Availability": "Windows, Linux, macOS",
3397133971
"Links": "https://dbatools.io/Invoke-DbaQuery",
33972-
"Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eInvoke-DbaQuery -SqlInstance server\\instance -Query \u0027SELECT foo FROM bar\u0027\nRuns the sql query \u0027SELECT foo FROM bar\u0027 against the instance \u0027server\\instance\u0027\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaRegServer -SqlInstance [SERVERNAME] -Group [GROUPNAME] | Invoke-DbaQuery -Query \u0027SELECT foo FROM bar\u0027\nRuns the sql query \u0027SELECT foo FROM bar\u0027 against all instances in the group [GROUPNAME] on the CMS [SERVERNAME]\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e\"server1\", \"server1\\nordwind\", \"server2\" | Invoke-DbaQuery -File \"C:\\scripts\\sql\\rebuild.sql\"\nRuns the sql commands stored in rebuild.sql against the instances \"server1\", \"server1\\nordwind\" and \"server2\"\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance \"server1\", \"server1\\nordwind\", \"server2\" | Invoke-DbaQuery -File \"C:\\scripts\\sql\\rebuild.sql\"\nRuns the sql commands stored in rebuild.sql against all accessible databases of the instances \"server1\", \"server1\\nordwind\" and \"server2\"\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eInvoke-DbaQuery -SqlInstance . -Query \u0027SELECT * FROM users WHERE Givenname = @name\u0027 -SqlParameter @{ Name = \"Maria\" }\nExecutes a simple query against the users table using SQL Parameters.\r\nThis avoids accidental SQL Injection and is the safest way to execute queries with dynamic content.\r\nKeep in mind the limitations inherent in parameters - it is quite impossible to use them for content references.\r\nWhile it is possible to parameterize a where condition, it is impossible to use this to select which columns to select.\r\nThe inserted text will always be treated as string content, and not as a reference to any SQL entity (such as columns, tables or databases).\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eInvoke-DbaQuery -SqlInstance aglistener1 -ReadOnly -Query \"select something from readonlydb.dbo.atable\"\nExecutes a query with ReadOnly application intent on aglistener1.\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eInvoke-DbaQuery -SqlInstance \"server1\" -Database tempdb -Query \"Example_SP\" -SqlParameter @{ Name = \"Maria\" } -CommandType StoredProcedure\nExecutes a stored procedure Example_SP using SQL Parameters\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003e$QueryParameters = @{\n\"StartDate\" = $startdate;\r\n \"EndDate\" = $enddate;\r\n};\r\nPS C:\\\u003e Invoke-DbaQuery -SqlInstance \"server1\" -Database tempdb -Query \"Example_SP\" -SqlParameter $QueryParameters -CommandType StoredProcedure\nExecutes a stored procedure Example_SP using multiple SQL Parameters\n-------------------------- EXAMPLE 9 --------------------------\nPS C:\\\u003e$inparam = @()\nPS C:\\\u003e $inparam += [pscustomobject]@{\r\n\u003e\u003e somestring = \u0027string1\u0027\r\n\u003e\u003e somedate = \u00272021-07-15T01:02:00\u0027\r\n\u003e\u003e }\r\nPS C:\\\u003e $inparam += [pscustomobject]@{\r\n\u003e\u003e somestring = \u0027string2\u0027\r\n\u003e\u003e somedate = \u00272021-07-15T02:03:00\u0027\r\n\u003e\u003e }\r\n\u003e\u003e $inparamAsDataTable = ConvertTo-DbaDataTable -InputObject $inparam\r\nPS C:\\\u003e New-DbaSqlParameter -SqlDbType structured -Value $inparamAsDataTable -TypeName \u0027dbatools_tabletype\u0027\r\nPS C:\\\u003e Invoke-DbaQuery -SqlInstance localhost -Database master -CommandType StoredProcedure -Query my_proc -SqlParameter $inparamAsDataTable\nCreates an TVP input parameter and uses it to invoke a stored procedure.\n-------------------------- EXAMPLE 10 --------------------------\nPS C:\\\u003e$output = New-DbaSqlParameter -ParameterName json_result -SqlDbType NVarChar -Size -1 -Direction Output\nPS C:\\\u003e Invoke-DbaQuery -SqlInstance localhost -Database master -CommandType StoredProcedure -Query my_proc -SqlParameter $output\r\nPS C:\\\u003e $output.Value\nCreates an output parameter and uses it to invoke a stored procedure.\n-------------------------- EXAMPLE 11 --------------------------\nPS C:\\\u003e$server = Connect-DbaInstance -SqlInstance localhost -Database master -AlwaysEncrypted\nPS C:\\\u003e $inputparamSSN = New-DbaSqlParameter -Direction Input -ParameterName \"@SSN\" -DbType AnsiStringFixedLength -Size 11 -SqlValue \"444-44-4444\" -ForceColumnEncryption\r\nPS C:\\\u003e Invoke-DbaQuery -SqlInstance $server -Query \u0027SELECT * FROM bar WHERE SSN_col = @SSN\u0027 -SqlParameter @inputparamSSN\nCreates an input parameter using Always Encrypted",
33972+
"Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eInvoke-DbaQuery -SqlInstance server\\instance -Query \u0027SELECT foo FROM bar\u0027\nRuns the sql query \u0027SELECT foo FROM bar\u0027 against the instance \u0027server\\instance\u0027\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaRegServer -SqlInstance [SERVERNAME] -Group [GROUPNAME] | Invoke-DbaQuery -Query \u0027SELECT foo FROM bar\u0027\nRuns the sql query \u0027SELECT foo FROM bar\u0027 against all instances in the group [GROUPNAME] on the CMS [SERVERNAME]\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e\"server1\", \"server1\\nordwind\", \"server2\" | Invoke-DbaQuery -File \"C:\\scripts\\sql\\rebuild.sql\"\nRuns the sql commands stored in rebuild.sql against the instances \"server1\", \"server1\\nordwind\" and \"server2\"\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaDatabase -SqlInstance \"server1\", \"server1\\nordwind\", \"server2\" | Invoke-DbaQuery -File \"C:\\scripts\\sql\\rebuild.sql\"\nRuns the sql commands stored in rebuild.sql against all accessible databases of the instances \"server1\", \"server1\\nordwind\" and \"server2\"\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eInvoke-DbaQuery -SqlInstance . -Query \u0027SELECT * FROM users WHERE Givenname = @name\u0027 -SqlParameter @{ Name = \"Maria\" }\nExecutes a simple query against the users table using SQL Parameters.\r\nThis avoids accidental SQL Injection and is the safest way to execute queries with dynamic content.\r\nKeep in mind the limitations inherent in parameters - it is quite impossible to use them for content references.\r\nWhile it is possible to parameterize a where condition, it is impossible to use this to select which columns to select.\r\nThe inserted text will always be treated as string content, and not as a reference to any SQL entity (such as columns, tables or databases).\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eInvoke-DbaQuery -SqlInstance aglistener1 -ReadOnly -Query \"select something from readonlydb.dbo.atable\"\nExecutes a query with ReadOnly application intent on aglistener1.\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003eInvoke-DbaQuery -SqlInstance server1 -Database tempdb -Query Example_SP -SqlParameter @{ Name = \"Maria\" } -CommandType StoredProcedure\nExecutes a stored procedure Example_SP using SQL Parameters\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003e$queryParameters = @{\n\u003e\u003e StartDate = $startdate\r\n\u003e\u003e EndDate = $enddate\r\n\u003e\u003e }\r\nPS C:\\\u003e Invoke-DbaQuery -SqlInstance server1 -Database tempdb -Query Example_SP -SqlParameter $queryParameters -CommandType StoredProcedure\nExecutes a stored procedure Example_SP using multiple SQL Parameters\n-------------------------- EXAMPLE 9 --------------------------\nPS C:\\\u003e$inparam = @()\nPS C:\\\u003e $inparam += [pscustomobject]@{\r\n\u003e\u003e somestring = \u0027string1\u0027\r\n\u003e\u003e somedate = \u00272021-07-15T01:02:00\u0027\r\n\u003e\u003e }\r\nPS C:\\\u003e $inparam += [pscustomobject]@{\r\n\u003e\u003e somestring = \u0027string2\u0027\r\n\u003e\u003e somedate = \u00272021-07-15T02:03:00\u0027\r\n\u003e\u003e }\r\n\u003e\u003e $inparamAsDataTable = ConvertTo-DbaDataTable -InputObject $inparam\r\nPS C:\\\u003e New-DbaSqlParameter -SqlDbType structured -Value $inparamAsDataTable -TypeName \u0027dbatools_tabletype\u0027\r\nPS C:\\\u003e Invoke-DbaQuery -SqlInstance localhost -Database master -CommandType StoredProcedure -Query my_proc -SqlParameter $inparamAsDataTable\nCreates an TVP input parameter and uses it to invoke a stored procedure.\n-------------------------- EXAMPLE 10 --------------------------\nPS C:\\\u003e$output = New-DbaSqlParameter -ParameterName json_result -SqlDbType NVarChar -Size -1 -Direction Output\nPS C:\\\u003e Invoke-DbaQuery -SqlInstance localhost -Database master -CommandType StoredProcedure -Query my_proc -SqlParameter $output\r\nPS C:\\\u003e $output.Value\nCreates an output parameter and uses it to invoke a stored procedure.\n-------------------------- EXAMPLE 11 --------------------------\nPS C:\\\u003e$server = Connect-DbaInstance -SqlInstance localhost -Database master -AlwaysEncrypted\nPS C:\\\u003e $inputparamSSN = New-DbaSqlParameter -Direction Input -ParameterName \"@SSN\" -DbType AnsiStringFixedLength -Size 11 -SqlValue \"444-44-4444\" -ForceColumnEncryption\r\nPS C:\\\u003e Invoke-DbaQuery -SqlInstance $server -Query \u0027SELECT * FROM bar WHERE SSN_col = @SSN\u0027 -SqlParameter @inputparamSSN\nCreates an input parameter using Always Encrypted",
3397333973
"Params": [
3397433974
[
3397533975
"SqlInstance",

0 commit comments

Comments
 (0)