Issue
Import Vista Alarms and Events into an Excel file
Product Line
TAC Vista
Environment
- Vista 5
- SQL 2005
Cause
Unable to import Vista Alarms and Events in to excel file from Vista
Resolution
- Select Data > Import External Data > Import Data as shown in below screen capture.
- Select New SQL server connection as shown in below screen capture.
- Enter Vista SQL Server instance name as shown in below screen capture.
- Select taclogdata from dropdown menu as shown in the below screen capture.
- Select Event table as shown in the below screen capture.
- Rename .odc as .dsn as shown in below screen captures.
- Select Edit Query as shown in below screen capture.
- Select SQL as shown in below screen capture.
- Paste the Query as shown in below screen capture. Click OK button to apply the query.
- Click OK button as shown in below screen.
- Click OK button as shown in below screen.
Events are imported in to Excel
Query for Events based on dates:
SELECT EventId, EventType, EventDatetime, OperatorUnit, UserName, ObjectType, [FreeText], ObjectPathNameId, ShortcutPathNameId, ObjectKey FROM Event WHERE (EventDatetime BETWEEN '10/12/2009' AND '10/12/2009 23:59:59.997')
Query for One Day Events:
SELECT EventId, EventType, EventDatetime, OperatorUnit, UserName, ObjectType, [FreeText], ObjectPathNameId, ShortcutPathNameId, ObjectKey FROM Event WHERE (EventDatetime BETWEEN DATEADD(day, - 1, GETDATE()) AND GETDATE())
Query for Alarm based on dates:
SELECT AlarmEvent.Priority, AlarmEvent.EventId, Event.EventDatetime, Event.OperatorUnit, Event.UserName, Event.ObjectType, Event.[FreeText] FROM AlarmEvent INNER JOIN Event ON AlarmEvent.EventId = Event.EventId WHERE (Event.EventDatetime BETWEEN '08/24/2010' AND '08/25/2010 23:59:59.997')
Query for One Day Alarm:
SELECT AlarmEvent.Priority, AlarmEvent.EventId, Event.EventDatetime, Event.OperatorUnit, Event.UserName, Event.ObjectType, Event.[FreeText] FROM AlarmEvent INNER JOIN Event ON AlarmEvent.EventId = Event.EventId WHERE (EventDatetime BETWEEN DATEADD(day, - 1, GETDATE()) AND GETDATE())