Forum Replies Created

Viewing 15 posts - 41,341 through 41,355 (of 49,571 total)

  • RE: How to prevent SQL Injection Attack?

    It's not sufficient. Consider this malicious parameter that has neither ;, nor --, nor any hex string at all.

    declare @query varchar(max)

    declare @parameter varchar(200)

    set @parameter = '''' + CHAR(13) + CHAR(10)...

  • RE: Are the posted questions getting worse?

    Grant Fritchey (1/29/2009)


    ...fithy rich consultant...

    I wish!

  • RE: Are the posted questions getting worse?

    I was thinking the super, ultimate, extremely awesome version. Why settle for second-best?

  • RE: Problem with if condition

    Christopher Stobbs (1/29/2009)


    any advice on why the Deferred naming option is a NO NO 🙂

    Did I say it was? It's an interesting trick.

    I said dynamic SQL's the only way...

  • RE: Backup Log With Truncate Only?

    andy.dicken (1/29/2009)


    I guess the correct command to use is a simple DBCC SHRINKFILE ('filename', ) command?

    No. Truncate removes inactive log records but doesn't change the size of the file. Shrink...

  • RE: UPDATE STATISTICS Gets Error "Out-Dated Page" in tempdb

    Looks like a stale read or a lost write, usually caused by a mis-behaving disk cache. Check your hardware, see if there are any errors in any logs

    I don't like...

  • RE: Problem with if condition

    baumgaertner (1/29/2009)


    Unfortunately this doesn't work:

    Here the code:

    if (select nDbSubVersion from tblVersion) = 2

    begin

    alter table tblCustAttrDefValue add strHelpValue varchar(200) null

    end

    go

    if (select nDbSubVersion from tblVersion) = 2

    begin

    ...

  • RE: Problem with if condition

    baumgaertner (1/29/2009)


    Can you describe it?

    The way you had it in your last post. Two ifs with a GO in between.

  • RE: Problem with if condition

    baumgaertner (1/29/2009)


    What do you mean by dynamic SQL?

    I hope not "EXEC".

    Yes. (or sp_executesql, same thing)

    It's that, or break the batch using GO. Your choice.

  • RE: Problem with if condition

    Thought I remembered this: http://www.sqlservercentral.com/Forums/FindPost613599.aspx

    Matt's advice (the last post of that thread) is good. Use dynamic SQL.

  • RE: Problem with if condition

    baumgaertner (1/29/2009)


    Is there any chance to suppress this syntax error?

    No.

    Do you have a workaround?

    Why do you have an if block that will never be executed in the first place? If...

  • RE: Problem with if condition

    You're confusing compile-time errors and run-time errors.

    At compile time, the entire batch is checked for valid syntax and valid objects. If there's anything wrong, a syntax error is generated. This...

  • RE: Page Inconsistency

    amit (1/29/2009)


    I dnt know if the following existing.. just curious.. is there any dbcc checkdb with no_data_loss....

    Yes. It's the REPAIR_REBUILD option. It only fixes things is all of the corruption...

  • RE: Consistency errors - how hosed am I?

    Matt Cherwin (1/28/2009)


    The one bright side to this is it helps support my position that all SQL Server instances in the firm should at least fall under my purview in...

  • RE: Are the posted questions getting worse?

    Steve Jones - Editor (1/28/2009)


    I leave for lunch, 98 pages of answers

    come back, 102.

    You need to take shorter lunch breaks. 😀

Viewing 15 posts - 41,341 through 41,355 (of 49,571 total)