Forum Replies Created

Viewing 15 posts - 31,906 through 31,920 (of 49,552 total)

  • RE: Updating all my 1000 procs

    In addition to doing it manually (and I can tell you a couple horror stories about times when I thought I was clever enough to do something like this via...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: I reduced my poor performing query from 10 min to 2 now if I could only use it

    Nils Gustav Stråbø (7/8/2010)


    GilaMonster (7/8/2010)


    As in all cases where the CTE is part of a larger batch, the preceding command must be terminated by a ;

    I order to not forget...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: I reduced my poor performing query from 10 min to 2 now if I could only use it

    Works fine (as in creates without syntax error) for me

    create procedure [dbo].[sp_rptCollectionNotice]

    (@cycle varchar(2))

    AS

    SET NOCOUNT ON;

    WITH PullMaxPrintdate (account,customer,PRINTNOTICE,BALANCEOWING) AS

    (

    select t.account,t.customer,t.PRINTNOTICE,BALANCEOWING

    from

    (

    ...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: I reduced my poor performing query from 10 min to 2 now if I could only use it

    Dan.Humphries (7/8/2010)


    Is it possible to put a CTE in a stored procedure? I kept getting an error since all previous statements are expected to be terminated before the with...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: I reduced my poor performing query from 10 min to 2 now if I could only use it

    Stick the code in a stored procedure, call the stored procedure from SSRS. That way you can use anything you like.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Need help related to indexes

    You find the exact fragmentation in sys.dm_db_index_physical_stats, in the avg_fragmentation_in_precent column. Check it before and after rebuild to see the change.

    If the fragmentation's not decreasing, there's a common reason: the...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: I reduced my poor performing query from 10 min to 2 now if I could only use it

    Please post query, table definitions, index definitions and execution plan, as per http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: why no Binary Search operator ?

    doobya (7/8/2010)


    or, put another way, is there a reason that this functionality doesn't exist, for instance is it the case

    that a predicate can be always be rewritten to be seekable?

    and...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Are the posted questions getting worse?

    Edit: nevermind...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Possible to repair or drop one damaged table

    I've seen that once before, when I was playing with corruption. Happened when there was an active transaction when the DB went suspect. Not sure why.

    As far as I know,...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Possible to repair or drop one damaged table

    Ellen-477471 (7/8/2010)


    Although I have to say why will it let me run checkdb with repair but not checktable with repair?

    Because SQL knows that the database is damaged and needs repairing...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Restore DB

    CirquedeSQLeil (7/8/2010)


    This is for our QA environment and I found out that somebody from the server team had removed the LUN dependencies while I was on vacation this last week....

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Restore DB

    *edit* Never mind.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Possible to repair or drop one damaged table

    If the database is in emergency mode, you have to run CheckDB with the repair_allow_data_loss option to have a chance of bringing it back online. CheckTable is not sufficient. That...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Are the posted questions getting worse?

    GilaMonster (7/8/2010)


    Did I miss a major announcement or something?

    http://www.sqlservercentral.com/Forums/FindPost949498.aspx

    I should have added a </sarcasm> or something to that post. I know full well that, other than SQL Server 2008 R2's...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 31,906 through 31,920 (of 49,552 total)