Using RSA SecurID technology there might come a time when you will need to export the events that the Authentication Manager logs programmaticlyRSA was nice enough to provide an API that can be called to execute Queries against the Database.

The script will use TCL and run under the tcl-sd.exe tool found under C:\program Files\RSA Security\RSA Authentication Manager\utils\tcl\BIN

To run the query first you need to make a TCL script that you will push into the tcl-sd.exe. The example below will query the database and return all events for a given day with the LOCAL TIME as the time (NOT GMT).  The output will be saved as output.xml.

today.tcl
<code>

puts [Sd_ApiInit "" "" 1]
set line 0
set line [Sd_DynamicSelect output.xml 1 0 0 0 "" "" "SELECT dtLocalDate, tLocalTOD, chTokenSerialNum, chDefaultLogin, chShortMessage, iLogEntryNum, SDLogEntry.iMessageNum, chClientName FROM SDToken JOIN SDLogEntry  ON SDLogEntry.chTokenSerialNum = SDToken.chSerialNum  JOIN SDLogMessage ON SDLogEntry.iMessageNum = SDLogMessage.iMessageNum JOIN SDUser ON (SDUser.iUserNum = SDToken.iUserNum)  WHERE dtLocalDate = DATE(\"11/26/2006\") ORDER BY SDLogEntry.dtLocalDate, SDLogEntry.tLocalTOD "]
Sd_ApiEnd
exit

<code>

Open a cmd prompt and execute C:\program Files\RSA Security\RSA Authentication Manager\utils\tcl\BIN\tcl-sd.exe today.tcl