Home Forums SQL Server 2008 Security (SS2K8) Logon Triggers. A good idea? Or a nerve-racking exprience? RE: Logon Triggers. A good idea? Or a nerve-racking exprience?

  • here's a snippet that woudl generate a CREATE view statement for your traces;

    default naming convention of VW_TRACE_[traceid]

    SELECT

    ' CREATE VIEW master.dbo.VW_Trace_' + CONVERT(varchar,id) + '

    AS

    SELECT

    ev.name ,

    tr.*

    FROM ::fn_trace_gettable(''' + path +'.trc'', default) tr

    INNER join sys.trace_events ev

    ON tr.eventclass = ev.trace_event_id

    END '

    ,*

    from sys.traces

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!