Forum Replies Created

Viewing 15 posts - 23,386 through 23,400 (of 49,552 total)

  • RE: How to turn off the checking if the column exists

    Then you have no databases matching the name that have the table with column.

    Add some print statements inside the two IFs so you can see which is not returning true.

    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: Query maxing out 24 CPUs

    M_E_K (9/21/2011)


    Grant:

    Thanks for your feedback. I still have a feeling we are hitting some bug, and I'm tempted to raise an SR with microsoft. Even with the poor execution plan,...

    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: How to turn off the checking if the column exists

    Untested, but I think this is close at least

    EXEC sp_MSforeachdb N'DECLARE @s-2 VARCHAR(200);

    USE ?;

    IF ''?'' LIKE ''MyDb__''

    BEGIN

    IF EXISTS (SELECT * FROM sys.columns WHERE name = ''PriceListID'' and OBJECT_NAME(object_id) = ''Company'')

    BEGIN

    SET...

    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: How to resolve deadlock for MSSQL 2008

    Sorry, don't understand

    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?

    L' Eomot Inversé (9/20/2011)


    GilaMonster (9/20/2011)


    LutzM (9/20/2011)


    We just need to be careful: once we're short on apostrophes, quite a few letters (including the "blank") will be in highe demand, too. (It'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
  • RE: How to resolve deadlock for MSSQL 2008

    Switch traceflag 1222 on. That will result in a deadlock graph been written to the error log every time a deadlock occurs. Post the result of that graph here.

    DBCC TRACEON(1222,-1)

    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: How to turn off the checking if the column exists

    Dynamic SQL for the Select, not the exists.

    The point is that you need the query with the column name to only be parsed if the exists returns true. Both 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: Someone Deleted a Table

    tfifield (9/20/2011)


    Ninja's_RGR'us (9/20/2011)


    You can do that in the restore GUI.

    Pick your db, the PIT to which you want to restore to. Then SCRIPT & manually add 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: alternative of UDF

    Once more with feeling...

    Please post table definitions, sample data and desired output. Read this to see the best way to post this to get quick responses.

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    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: Multiple TempDB Files (Data & Log)

    uncle_boris (9/20/2011)


    and this round robin pattern is for both TempDB data files and also the log files (if their were multiple log files of course).

    No, it's for the data files....

    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: Someone Deleted a Table

    tfifield (9/20/2011)


    Anyone got any ideas?

    Todd Fifield

    Drop database, start again.

    You can put the DB back into restoring easy enough, but it still won;t allow another log restore.

    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: Multiple TempDB Files (Data & Log)

    uncle_boris (9/20/2011)


    Do you know of a way to see what tempdb file is being accessed? or when the last access was?

    Does SQL use the initial one first and then 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: Need help getting first value in a column

    gmrose (9/20/2011)


    Perhaps "first" means the order in which the data was inserted into the table. It's like "First come, first served". This may not be the perfect SQL...

    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: alternative of UDF

    Please post table definitions, sample data and desired output. Read this to see the best way to post this to get quick responses.

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    And please don't shout at us (post in...

    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?

    SQL Kiwi (9/20/2011)


    Amateurs.

    SELECT REPLICATE(CONVERT(VARCHAR(MAX), CHAR(39)), 9223372036854775807)

    Apostrophes all gone :laugh:

    Memory too. :crash:

    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 - 23,386 through 23,400 (of 49,552 total)