Puede consultar la base de datos event_historical para visualizar eventos de error, eventos de advertencia y eventos recientes específicos.
Mostrar los eventos de error
La siguiente consulta muestra todos los eventos de error de la tabla event_historical.
CREATE VIEW error_events AS ( SELECT ev.EventID, ev.Time, ev.Module, ev.EventType, ev.ModuleAndEventText FROM dbo.VE_event_historical AS ev WHERE ev.Severity = ‘ERROR’ );
Mostrar los eventos de advertencia
La siguiente consulta muestra todos los eventos de advertencia de la tabla event_historical.
CREATE VIEW warning_events AS ( SELECT ev.EventID, ev.Time, ev.Module, ev.EventType, ev.ModuleAndEventText FROM dbo.VE_event_historical AS ev WHERE ev.Severity = ‘WARNING’ );
Mostrar los eventos recientes
La siguiente consulta muestra todos los eventos recientes que están asociados con el usuario fred en el dominio MYDOM.
CREATE VIEW user_fred_events AS ( SELECT ev.EventID, ev.Time, ev.Module, ev.EventType, ev.Severity, ev.Acknowledged FROM dbo.VE_event_historical AS ev, dbo.VE_event_data_historical AS ed WHERE ev.EventID = ed.EventID AND ed.Name = 'UserDisplayName' AND ed.StrValue = ‘MYDOM\fred’ );
La siguiente consulta muestra todos los eventos recientes en los que el agente de una máquina se apaga.
CREATE VIEW agent_shutdown_events AS ( SELECT ev.EventID, ev.Time, ed.StrValue FROM dbo.VE_event_historical AS ev, dbo.VE_event_data_historical AS ed WHERE ev.EventID = ed.EventID AND ev.EventType = ‘AGENT_SHUTDOWN’ AND ed.Name = ‘MachineName’ );
La siguiente consulta muestra todos los eventos recientes en los que un escritorio no se pudo iniciar porque el grupo de escritorios estaba vacío.
CREATE VIEW desktop_launch_failure_events AS ( SELECT ev.EventID, ev.Time, ed1.StrValue, ed2.StrValue FROM dbo.VE_event_historical AS ev, dbo.VE_event_data_historical AS ed1, dbo.VE_event_data_historical AS ed2 WHERE ev.EventID = ed1.EventID AND ev.EventID = ed2.EventID AND ev.EventType = ‘BROKER_POOL_EMPTY’ AND ed1.Name = ‘UserDisplayName’ AND ed2.Name = ‘DesktopId’ );
La siguiente consulta muestra todos los eventos recientes en los que un administrador eliminó un grupo de escritorios.
CREATE VIEW desktop_pool_removed_events AS ( SELECT ev.EventID, ev.Time, ed1.StrValue, ed2.StrValue FROM dbo.VE_event_historical AS ev, dbo.VE_event_data_historical AS ed1, dbo.VE_event_data_historical AS ed2 WHERE ev.EventID = ed1.EventID AND ev.EventID = ed2.EventID AND ev.EventType = ‘ADMIN_DESKTOP_REMOVED’ AND ed1.Name = ‘UserDisplayName’ AND ed2.Name = ‘DesktopId’ );