https://learn.microsoft.com/en-us/ef/core/saving/transactions#savepoints
Lập Trình .NET
Thứ Sáu, 26 tháng 7, 2024
Thứ Tư, 24 tháng 7, 2024
[RabbitMQ] Configure Consumer Timeout
https://www.rabbitmq.com/docs/consumers#acknowledgement-timeout
https://stackoverflow.com/questions/42003640/how-to-configure-rabbitmq-config-inside-docker-containers
Thứ Ba, 23 tháng 7, 2024
[Elasticsearch ] Configure vm.max_map_count when running in Docker Desktop on Windows
1) wsl -d docker-desktop
2) sysctl -w vm.max_map_count=262144
Thứ Ba, 16 tháng 1, 2024
Disable Fips Algorithm Policy ASP.NET
- Solution 1: Disable FipsAlgorithmPolicy in Windows Registry:
Set Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\FipsAlgorithmPolicy\Enabled to 0
- Solution 2: Modify C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Aspnet.config
<configuration>
<runtime>
<enforceFIPSPolicy enabled="false" />
</runtime>
</configuration>
Reference:
- https://techcommunity.microsoft.com/t5/modern-work-app-consult-blog/fips-and-net-core/ba-p/1454638
Chủ Nhật, 24 tháng 12, 2023
[SQL Server] Find Currently Running Queries
SELECT DB_NAME(req.database_id) as db_name ,sqltext.text ,req.session_id ,req.status ,req.command ,req.start_time ,req.cpu_time ,req.total_elapsed_time ,queryplan.query_plan ,c.client_net_address ,s.login_name ,s.login_time ,s.program_name ,s.host_name ,s.host_process_id ,s.client_interface_name ,s.client_version --,req.* --,c.* --,s.* FROM sys.dm_exec_requests req JOIN sys.dm_exec_connections c on req.connection_id = c.connection_id JOIN sys.dm_exec_sessions s on req.session_id = s.session_id CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext CROSS APPLY sys.dm_exec_query_plan(req.plan_handle) as queryplan
Thứ Tư, 19 tháng 4, 2023
[SQL Server] Convert DateTimeOffset to DateTime
declare @dateTime datetime2 = SYSDATETIME() declare @dateTimeOffset datetimeoffset = SYSDATETIMEOFFSET() select @dateTime as [CurrentDateTime], @dateTimeOffset as [CurrentDateTimeOffset], CAST(@dateTimeOffset as datetime2) as [DateTime1] select CAST('2023-04-19 15:32:31.2721255 +07:00' as datetime2) -- Output: 2023-04-19 15:32:31.2721255 select CAST('2023-04-19 15:32:31.2721255 +08:00' as datetime2) -- Output: 2023-04-19 15:32:31.2721255 select SWITCHOFFSET('2023-04-19 15:32:31.2721255 +07:00', '+01:00') -- Output: 2023-04-19 09:32:31.2721255 +01:00 select SWITCHOFFSET('2023-04-19 15:32:31.2721255 +08:00', '+01:00') -- Output: 2023-04-19 08:32:31.2721255 +01:00 select CAST(SWITCHOFFSET('2023-04-19 15:32:31.2721255 +07:00', '+01:00') as datetime2) -- Output: 2023-04-19 09:32:31.2721255 select CAST(SWITCHOFFSET('2023-04-19 15:32:31.2721255 +08:00', '+01:00') as datetime2) -- Output: 2023-04-19 08:32:31.2721255
Thứ Ba, 2 tháng 8, 2022
[SQL Server] Convert DateTime to DateTimeOffset
declare @dateTime datetime2 = SYSDATETIME() declare @dateTimeOffset datetimeoffset = SYSDATETIMEOFFSET() select @dateTime as [CurrentDateTime], @dateTimeOffset as [CurrentDateTimeOffset], CAST(@dateTime as datetimeoffset) as [DateTimeOffset1], TODATETIMEOFFSET(@dateTime, '+07:00') as [DateTimeOffset2], TODATETIMEOFFSET(@dateTime, RIGHT(SYSDATETIMEOFFSET(), 6)) as [DateTimeOffset3]
Đăng ký:
Bài đăng
(
Atom
)