Thor Logo dbatools

Instance

Get-DbaPermission

Klaas Vandenberghe (@PowerDBAKlaas)

Get-DbaPermission View Source Klaas Vandenberghe (@PowerDBAKlaas) Windows, Linux, macOS Synopsis Retrieves explicit and implicit permissions across SQL Server instances and databases for security auditing Description Retrieves comprehensive permission information from SQL Server instances and databases, including both explicit permissions and implicit permissions from fixed roles. This function queries sys.server_permissions and sys.database_permissions to capture all granted, denied, and revoked permissions across server and database levels. Perfect for security audits, compliance reporting, troubleshooting access issues, and planning permission migrations between environments.

Read more

Get-DbaService

Klaas Vandenberghe (@PowerDbaKlaas)

Get-DbaService View Source Klaas Vandenberghe (@PowerDbaKlaas) Windows, Linux, macOS Synopsis Retrieves SQL Server-related Windows services from local or remote computers. Description Retrieves detailed information about SQL Server-related Windows services across one or more computers, including Database Engine, SQL Agent, Reporting Services, Analysis Services, Integration Services, and other SQL Server components. This function replaces manual service management tasks by providing a unified view of service status, startup modes, and service accounts across your SQL Server environment.

Read more

Get-DbaUptime

Stuart Moore (@napalmgram), stuart-moore.com

Get-DbaUptime View Source Stuart Moore (@napalmgram), stuart-moore.com Windows, Linux, macOS Synopsis Retrieves uptime information for SQL Server instances and their hosting Windows servers Description This function determines SQL Server uptime by checking the tempdb creation date and calculates Windows server uptime using CIM/WMI calls to get the last boot time. Essential for monitoring system stability, troubleshooting unexpected restarts, and generating compliance reports that require uptime documentation. Returns both raw TimeSpan objects for calculations and formatted strings for reporting, covering both the SQL Server service and the underlying Windows host.

Read more

Invoke-DbaCycleErrorLog

Shawn Melton (@wsmelton), wsmelton.github.io

Invoke-DbaCycleErrorLog View Source Shawn Melton (@wsmelton), wsmelton.github.io Windows, Linux, macOS Synopsis Cycles the current SQL Server error log and/or SQL Agent error log to start fresh log files Description Archives the current error log files and creates new ones for SQL Server instance and/or SQL Agent. This operation is typically performed during maintenance windows to manage log file sizes and establish clean baselines for troubleshooting. When cycled, the current error log becomes the archived log (errorlog.

Read more

Repair-DbaInstanceName

Chrissy LeMaire (@cl), netnerds.net

Repair-DbaInstanceName View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Updates SQL Server’s @@SERVERNAME system variable to match the Windows hostname Description Updates SQL Server’s @@SERVERNAME system variable to match the current Windows hostname, which is required after renaming a Windows server. This ensures proper functionality for Kerberos authentication and Availability Groups. The function automatically detects the correct new server name and uses sp_dropserver and sp_addserver to update the SQL Server system tables.

Read more

Reset-DbaAdmin

Chrissy LeMaire (@cl), netnerds.net

Reset-DbaAdmin View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Regains administrative access to SQL Server instances when passwords or access has been lost Description Recovers access to SQL Server instances when you’re locked out due to forgotten passwords, disabled accounts, or authentication issues. This emergency recovery tool stops the SQL Server service and restarts it in single-user mode, allowing exclusive access to reset credentials and restore administrative privileges.

Read more

Restart-DbaService

Kirill Kravtsov (@nvarscar)

Restart-DbaService View Source Kirill Kravtsov (@nvarscar) Windows, Linux, macOS Synopsis Restarts SQL Server services with proper dependency handling and service ordering. Description Restarts SQL Server services across multiple computers while automatically managing service dependencies and restart order. This function performs a controlled stop-then-restart sequence, ensuring that dependent services like SQL Agent are properly handled when restarting the Database Engine. You can target specific service types (Engine, Agent, SSRS, SSAS, etc.

Read more

Set-DbaErrorLogConfig

Shawn Melton (@wsmelton), wsmelton.github.com

Set-DbaErrorLogConfig View Source Shawn Melton (@wsmelton), wsmelton.github.com Windows, Linux, macOS Synopsis Configures SQL Server error log retention and size rollover settings Description Configures how SQL Server manages its error log files by setting retention count and automatic rollover size. You can specify how many error log files to keep (6-99) across all SQL Server versions, and set the file size limit in KB for automatic rollover on SQL Server 2012 and later.

Read more

Set-DbaExtendedProtection

Claudio Silva (@claudioessilva), claudioessilva.eu

Set-DbaExtendedProtection View Source Claudio Silva (@claudioessilva), claudioessilva.eu Windows, Linux, macOS Synopsis Configures Extended Protection for Authentication on SQL Server network protocols Description Modifies the Extended Protection registry setting for SQL Server network protocols to enhance connection security. Extended Protection helps prevent authentication relay attacks by requiring additional authentication at the network protocol level. This security feature is particularly useful in environments where you need to protect against man-in-the-middle attacks or when connecting over untrusted networks.

Read more

Start-DbaService

Kirill Kravtsov (@nvarscar)

Start-DbaService View Source Kirill Kravtsov (@nvarscar) Windows, Linux, macOS Synopsis Starts SQL Server related services across multiple computers while respecting service dependencies. Description Starts SQL Server services (Engine, Agent, Browser, FullText, SSAS, SSIS, SSRS) on one or more computers following proper dependency order. This function handles the complexity of starting services in the correct sequence so you don’t have to manually determine which services depend on others. Commonly used after maintenance windows, server reboots, or when troubleshooting stopped services across an environment.

Read more
Page 2 of 3