Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2008-07-13 : 13:08:41
|
| I have put the profiler on and capture some commands...Now i like to copy this and replay in sql query but i don't understand how to do this.declare @p1 intset @p1=1073741879declare @p2 intset @p2=180150097declare @p5 intset @p5=8declare @p6 intset @p6=1declare @p7 intset @p7=1exec sp_cursorprepexec @p1 output,@p2 output,N'@P1 varchar(6),@P2 varchar(10),@P3 varchar(2),@P4 varchar(10)',N'SELECT S.ORG_SEC_PROF_CD, P.PROF_ORG_SEC_FL FROM ORG_SEC_GRP_SETUP S, DELTEK.ORG_SEC_PROFILE P WHERES.ORG_SEC_GRP_CD = @P1 AND S.ORG_SEC_PROF_CD = P.ORG_SEC_PROF_CD AND S.COMPANY_ID = @P2 AND S.S_MODULE_CD = @P3 AND P.COMPANY_ID = @P4 ',@p5 output,@p6 output,@p7 output,'BUSSOL','1','AO','1'select @p1, @p2, @p5, @p6, @p7Now i want to copy this and just run in SQL QueryHow do i get the parameters for the @p1 WHICH give me1073741879 and this is not the value for ORG_SEC_GRP_CD the value is the BUSSOL I just want to do select part where value = 'BUSS0L' etc but having hard job gettingthe values out.Any explaination of how to rerun back on the SQL Query for further investigation. |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-07-13 : 16:47:40
|
| Which events did you trace? The statement maybe from sp or so, and @p1 can't be string since it's int type. |
 |
|
|
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2008-07-13 : 20:49:16
|
| Using standard trace profiler. |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-07-13 : 22:29:26
|
| Not sure what you mean standard trace profiler. How did you choose events to trace in profiler? |
 |
|
|
|
|
|
|
|