This guide explains the complete process of forcing users to reset their password on first login using MySQL's password expiration feature. It addresses the seemingly counterintuitive requirement that users must login with their expired password to change it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Moves SQL Server database files to target drives with step-by-step DBA confirmation. | |
.DESCRIPTION | |
This script moves SQL Server database files from their current locations to specified target paths. | |
It processes databases one at a time, prompting for DBA confirmation at each step. | |
The script handles both physical file movement and SQL Server metadata updates. | |
.PARAMETER ServerInstance |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
ROW_NUMBER() OVER (ORDER BY section_order, priority) AS row_num, | |
section, metric, user_info, value, details, status, | |
query_text, problem_indicator | |
FROM ( | |
-- SECTION 1: BLOCKING CHAINS AND LOCK ISSUES | |
(SELECT | |
1 as section_order, 1 as priority, | |
'BLOCKING' as section, | |
'Lock Chain' as metric, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE | |
@last_execution_time DATETIME = DATEADD(MINUTE, -60, GETUTCDATE()) | |
;WITH FilteredRuntimeStats AS ( | |
SELECT | |
rs.runtime_stats_id, | |
rs.plan_id, | |
rs.last_execution_time, | |
rs.count_executions, | |
rs.avg_cpu_time, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Create an Extended Events session to track login activities | |
CREATE EVENT SESSION [LoginTracking] ON SERVER | |
ADD EVENT sqlserver.login( | |
ACTION( | |
sqlserver.client_app_name, -- Application name | |
sqlserver.client_hostname, -- Client hostname | |
sqlserver.client_pid, -- Client process ID | |
sqlserver.database_name, -- Database name | |
sqlserver.nt_username, -- Windows username | |
sqlserver.server_principal_name, -- SQL Server login name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Ignore Visual Studio temporary files, build results, and | |
## files generated by popular Visual Studio add-ons. | |
# User-specific files | |
*.suo | |
*.user | |
*.userosscache | |
*.sln.docstates | |
*.sqllite |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
azureAccount = Connect-AzAccount | |
$azureToken = Get-AzAccessToken -ResourceUrl https://database.windows.net | |
$azureInstance = "MyServer.database.windows.net" | |
$azureDatabase = "MyDB" | |
$server = Connect-DbaInstance -SqlInstance $azureInstance -Database $azureDatabase -AccessToken $azureToken | |
Invoke-DbaQuery -SqlInstance $server -Query "SELECT @@VERSION" | Format-Table -AutoSize |
For those aiming to download videos from MS Teams meetings in which you participated but were not the Organizer, I managed to do so using yt-dlp and ffmpeg. The procedure is quite similar for both tools.
- Open your Browser (I got it to work in Chrome, Edge and Firefox)
- Login to portal.office.com
- Go to where you can play the video you want to download, either via Sharepoint or Streams.
- Hit F12
- Go to the "Network" tab
- Filter: videomanifest
- Hit F5
- Start playing the video
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ============================================= | |
-- Author: Josiah Siegel | |
-- Create date: 2024-10-21 | |
-- Description: Fetch partition ranges or partitions of given range | |
-- Example: | |
/* | |
-- Fetch partition ranges | |
select * from [fn_GetPartitionsForRange]('MyTable', DEFAULT, DEFAULT, DEFAULT) | |
-- Fetch partitions of given range |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- get query id | |
SELECT | |
q.query_id, | |
qt.query_sql_text | |
FROM sys.query_store_query_text qt | |
INNER JOIN sys.query_store_query q ON | |
qt.query_text_id = q.query_text_id | |
WHERE query_sql_text like N'%select column from table%' | |
GO |
NewerOlder