Here's what i'm doing:
I've got sql server 7 running a job that executes an stored procedure ( http://support.microsoft.com/kb/251004/
- this is the SP)
it outputs a text file, which contains this block of text in the middle of the file:
DBCC OPENTRAN FOR DBID 7 [testDB]
Transaction information for database 'testDB'.
Oldest active transaction:
SPID (server process ID) : 36
UID (user ID) : 1
Name : user_transaction
LSN : (28046:334:1)
Start time : Apr 20 2005 2:56:17:077PM
NOTE: it may not always contain this block, if there are no active transactcions..
I need VB to read in the file, find this block (if it exists), read in the Start time, and compare the Start time to the current time. if it is an hour old or more, I need to send out an email alert.
Can i get some good VB references for all the techniques i need, or example code? I don't have much vb experience, most of it is in asp or vb.net. I need ref/examples for parsing txt files, parse date, comparing dates, sending email...
also, can I just run this all from a .vb file? the sql server job needs to be able to exec the vb after executing the stored procedure.
any info would be appreciated.
thanks - Trevor