''joehack''

  • While running SQL Server Profiler, I continue to see references to 'joehack' being assigned to variables and I have no idea where this is coming from.  Below is sample code.  Has anyone seen this before?

    DECLARE @INPAR1 nvarchar(4000)

    DECLARE @INPAR2 nvarchar(4000)

    DECLARE @INPAR3 datetime

    DECLARE @OUTPAR4 double precision

    DECLARE @OUTPAR5 int

     execute  GetPropertyBeginMeterReading  N'40140' ,  N'00' ,  '20070501 00:00:00.0' ,  @OUTPAR4  output,  @OUTPAR5  output 

    select @OUTPAR4 'joehack'

    select @OUTPAR5 'joehack'

    Thanks,

    Stubbs

  •  This is the execution code of a procedure with outout parameters.  Check that procedure and see if the last 2 params are set to te joehack value somehow.

  • I would say it's a proc execution followed by two selects showing the outputparameters in two resultsets of one row with one column and that column is named joehack

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • We've checked everything and there is nothing referring to 'joehack'.  I'm also confused as to why a string is being returned. 

  • I'm sure you checked that... but is there a default value to those parameters?

     

    Are they set to something from the calling application?

  • Negative, I've checked all scripts and code.  Nowhere in the application can I find any reference to joehack.

  • There seem to be some syntax error in the code you posted.  Are you able to post the exact code you are getting in the profiler?  Maybe we're just missing something obvious!

  • Sounds like someone is using this to turn off the result values.  I wonder if the application that calls the stored procedures knows about this value?

  • ALZDBA is correct. The code that you provided in your original post included this:

    select @OUTPAR4 'joehack'

    select @OUTPAR5 'joehack'

    This is not assigning the string 'joehack to the variables.

    Each SELECT will return a one row/one column result set, and the column name in each result set will be 'joehack':

    joehack

    -----------------------------------------------------

    NULL

    (1 row(s) affected)

    joehack

    -----------

    NULL

    (1 row(s) affected)

    To perform an assignment, you would need:

    select @OUTPAR4 = 'joehack'

    select @OUTPAR5 = 'joehack'

    However, since @OUTPAR4 is double precision, assigning a string would raise an error.

  • Here is another code extract from profiler.  I still can't find any reference to 'joehack' anywhere within the code, scripts, jsps, triggers, stored procedures, and any system procedures.

    DECLARE @OUTPAR1 nvarchar(4000)

     execute  ProblemNoResponse   @OUTPAR1  output  

    select @OUTPAR1 'joehack'

    Stubbs

  • Here is the code for the stored procedure referenced above.

    create procedure dbo.ProblemNoResponse

    @errorcode varchar(1) out

    as

    declare @countrows numeric(20)

    declare @errormessage varchar(10)

    select @countrows=count(*) from fin_xferhold

    if ( @countrows= 0 )

    begin

    set @errorcode= 1

    end

    else

    begin

     if ((select distinct tbdate from fin_xferhold) = "Stars" )

             set @errorcode=2

     else

             set @errorcode=3

    end

    return

    GO

  • What is the hostname and applicationname values for this entry in Profiler?  Both ALZDBA and mkeast are correct.  Someone is running this stored procedure and then using the statement 'select @OUTPAR1 'joehack'' to display the output parameter values.  Find out the login, hostname, and applicationname and it should tell you where to start looking next (or who to start asking).  I would guess that the applicationname would be Query Analyzer as someone is probably running this SP manually through QA.

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

Viewing 12 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply