Thor Logo dbatools

Server

Get-DbaNetworkActivity

Klaas Vandenberghe (@PowerDBAKlaas)

Get-DbaNetworkActivity View Source Klaas Vandenberghe (@PowerDBAKlaas) Windows, Linux, macOS Synopsis Retrieves real-time network traffic statistics for all network interfaces on SQL Server host computers. Description Retrieves current network activity metrics including bytes received, sent, and total throughput per second for every network interface on target computers. This function helps DBAs monitor network performance and identify bandwidth bottlenecks that could impact SQL Server performance, especially during large data transfers, backup operations, or heavy replication traffic.

Read more

New-DbaLinkedServer

Adam Lancaster, github.com/lancasteradam

New-DbaLinkedServer View Source Adam Lancaster, github.com/lancasteradam Windows, Linux, macOS Synopsis Creates a new linked server connection to remote SQL Server instances or heterogeneous data sources. Description Creates a new linked server on a SQL Server instance, allowing you to query remote databases and heterogeneous data sources as if they were local tables. This replaces the need to manually configure linked servers through SSMS or T-SQL scripts, while providing consistent security context management for unmapped logins.

Read more

New-DbaLinkedServerLogin

Adam Lancaster, github.com/lancasteradam

New-DbaLinkedServerLogin View Source Adam Lancaster, github.com/lancasteradam Windows, Linux, macOS Synopsis Creates authentication mappings between local and remote logins for linked server connections. Description Creates linked server login mappings that define how local SQL Server logins authenticate to remote servers during distributed queries. You can either map specific local logins to remote credentials or configure impersonation where local logins use their own credentials. This eliminates the need to hardcode passwords in applications that query across linked servers and provides centralized authentication management for cross-server operations.

Read more

Remove-DbaLinkedServer

Adam Lancaster, github.com/lancasteradam

Remove-DbaLinkedServer View Source Adam Lancaster, github.com/lancasteradam Windows, Linux, macOS Synopsis Removes linked servers from SQL Server instances. Description Removes one or more linked servers from target SQL Server instances. This function drops the linked server objects from the system catalog, effectively severing the connection between the local and remote servers. When using the -Force parameter, it also removes any associated linked server logins before dropping the linked server itself. This is useful for decommissioning legacy connections, cleaning up unused linked servers during server migrations, or removing connections for security compliance requirements.

Read more

Remove-DbaLinkedServerLogin

Adam Lancaster, github.com/lancasteradam

Remove-DbaLinkedServerLogin View Source Adam Lancaster, github.com/lancasteradam Windows, Linux, macOS Synopsis Removes linked server login mappings that define credential relationships between local and remote server logins. Description Removes linked server login mappings, which are the credential associations that determine how local SQL Server logins authenticate to remote servers through linked server connections. These mappings control which credentials are used when executing queries against remote servers, so removing them effectively blocks access through that linked server for the specified local login.

Read more

Set-DbaAgentServer

Claudio Silva (@claudioessilva), claudioessilva.com

Set-DbaAgentServer View Source Claudio Silva (@claudioessilva), claudioessilva.com Windows, Linux, macOS Synopsis Configures SQL Server Agent service properties and operational settings Description Modifies SQL Server Agent configuration settings including logging levels, mail profiles, CPU monitoring thresholds, job history retention, and service restart behaviors. Use this to standardize agent configurations across multiple instances, set up proper alerting and monitoring thresholds, or configure job history retention policies to prevent MSDB bloat. Syntax Set-DbaAgentServer [[-SqlInstance] <DbaInstanceParameter[]>] [[-SqlCredential] <PSCredential>] [[-InputObject] <JobServer[]>] [[-AgentLogLevel] <Object>] [[-AgentMailType] <Object>] [[-AgentShutdownWaitTime] <Int32>] [[-DatabaseMailProfile] <String>] [[-ErrorLogFile] <String>] [[-IdleCpuDuration] <Int32>] [[-IdleCpuPercentage] <Int32>] [[-CpuPolling] <String>] [[-LocalHostAlias] <String>] [[-LoginTimeout] <Int32>] [[-MaximumHistoryRows] <Int32>] [[-MaximumJobHistoryRows] <Int32>] [[-NetSendRecipient] <String>] [[-ReplaceAlertTokens] <String>] [[-SaveInSentFolder] <String>] [[-SqlAgentAutoStart] <String>] [[-SqlAgentMailProfile] <String>] [[-SqlAgentRestart] <String>] [[-SqlServerRestart] <String>] [[-WriteOemErrorLog] <String>] [-EnableException] [-WhatIf] [-Confirm] [<CommonParameters>] Examples Example: 1 PS C:\> Set-DbaAgentServer -SqlInstance sql1 -MaximumHistoryRows 10000 -MaximumJobHistoryRows 100 Changes the job history retention to 10000 rows with an maximum of 100 rows per job.

Read more