Skrypt dzięki uprzejmości Igora Yaremenko 🙂 — create event session CREATE EVENT SESSION [Database_Growth_Watchdog] ON SERVER ADD EVENT sqlserver.database_file_size_change ( ACTION ( sqlserver.client_app_name , sqlserver.client_hostname , sqlserver.database_name , sqlserver.session_nt_username , sqlserver.sql_text , sqlserver.username ) WHERE ( [database_id] = ( 2 ))) ADD TARGET package0.event_file ( SET filename = N’D:\Temp\Database_Growth_Wathdog.xel’, max_file_size =Czytaj dalej / Read more
Tag: tempdb
tempdb – sprawdzenie rozmiarów po sesji
SELECT sys.dm_exec_sessions.session_id AS [SESSION ID] , DB_NAME(su.database_id) AS [DATABASE Name] , host_name AS [System Name] , program_name AS [Program Name] , login_name AS [USER Name] , status , cpu_time AS [CPU TIME (in milisec)] , total_scheduled_time AS [Total Scheduled TIME (in milisec)] , total_elapsed_time AS [Elapsed TIME (in milisec)] ,Czytaj dalej / Read more