Thursday, February 9, 2023
How to delete Temp dB files when you get error The file cannot be removed because it is not empty.
USE [tempdb]
GO
ALTER DATABASE [tempdb] REMOVE FILE [temp6]
GO
Msg 5042, Level 16, State 1, Line 13
The file 'temp6' cannot be removed because it is not empty.
USE [tempdb]
GO
ALTER DATABASE [tempdb] REMOVE FILE [temp6]
GO
that should help
if not --DBCC FREEPROCCACHE('ALL') but test in test environments before doing in production
Subscribe to:
Post Comments (Atom)
https://blog.sqlauthority.com/2009/06/27/sql-server-fix-error-17892-logon-failed-for-login-due-to-trigger-execution-changed-database-context...
-
SELECT is_broker_enabled, name FROM sys.databases All Availability Group Databases =0 It’s a default behavior. The message will ...
-
Hi, I have set up Always on Availability Groups on top of Windows Server Failover Cluster(WSFC) with two sql server stand alone installat...
No comments:
Post a Comment