SQL Server Performance

Can event profile capture sql statements when using oledb interface?

Discussion in 'T-SQL Performance Tuning for Developers' started by zhenyuanDeng, Sep 28, 2008.

  1. zhenyuanDeng New Member

    Can event profile capture sql statements when using oledb interface?
  2. moh_hassan20 New Member

    yes
    i captured sql statments using sql profiler with client applications connected with sql server using oledb.
  3. zhenyuanDeng New Member

    Can SQL SERVER 2000 do that?
    version: developer edition sp4
  4. FrankKalis Moderator

    No, unless I am mistaken this was added in SQL Server 2005, I'm afraid
  5. zhenyuanDeng New Member

    I have never use SQL SERVER 2005, but i find that SQL SERVER 2000 can capture the statements when using oledb interface as moh_hassan20 said.
    but when i use the statement such as "select * from XXX", event profile will capture some statement like:
    declare @P1 int
    set @P1=180150000
    declare @P2 int
    set @P2=8
    declare @P3 int
    set @P3=1
    declare @P4 int
    set @P4=14
    exec sp_cursoropen @P1 output, N'select * from XXX', @P2 output, @P3 output, @P4 output
    select @P1, @P2, @P3, @P4
    I can capture the statement and the execution plan.
  6. kvreddy New Member

    Hi Experts,
    I would like to capture sql statements before execution, can we do that?
    I was tried with SMO object, but it capture only that instance, i wanted to capture all the sql statement which comming from other applications.
    any help is appriciated.
    thanks
    kv

Share This Page