Forum Replies Created

Viewing 15 posts - 48,481 through 48,495 (of 49,552 total)

  • RE: Changing a script to show SERVERPROPERTY

    I'll have a go at writing something from scratch for you, cause I can't figure out the original script.

    Is going to take a while though, please be patient. 

    Openquery requires that you...

    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: Changing a script to show SERVERPROPERTY

    select servername, serverproperty('productversion'), serverproperty('productlevel'), serverproperty('edition')

     from #t where ServerName...

    That's going to return for the machine where the query is run. You're not actually reading anything from #t there, other than 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: SQL Server slows down and hangs after 300,000 + connections

    Depends why it's unresponsive. Are you seeing lots of blocking on queries? Are you seeing logins timing out?

    Check the front end, see if it has connection pooling enabled. If not,...

    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: Error Log Query

    SQl doesn't keep its error log data for a fixed time. Rather it keeps a certain number of historical error log files.

    A new log file gets created whenever 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: Severity 19 Error

    Yes, they do charge. If the crash is a result of a bug, I believe that they waiver that charge (I could be wrong)

    Does your boss expect you to debug...

    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: If Exists...Drop Table not always working...

    My comment was directed at the OP, not the reply. Sorry for the confusion.

    Select * from tempdb..sysobjects where name = '#tablename' won't return anything

    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: Top n Used with Order by & performance

    OK, having had a careful look at your execution plan, the actualquery doesn't much resemble the earlier examples. As far as I can see, the actual query that you're having...

    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: Performace Tuning

    Yes, but not common. It's a role I have, though I often do other stuff too. As for advice...

    Read, as much as you can. Books, white papers, blogs, forums. Also...

    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: Changing a script to show SERVERPROPERTY

    On each server run

    SELECT @@SERVERNAME AS ServerName, SERVERPROPERTY('Edition') AS Version

    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: If Exists...Drop Table not always working...

    Of course, you cannot use object_name with this id later, since the id is from another db.

    Actually, you can. At least in 2005 SP2. Object_Name has been enhanced to...

    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: Changing a script to show SERVERPROPERTY

    SELECT

    SERVERPROPERTY('ProductVersion') AS ProductVersion,

    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: Using a calculate column in the Where clause

    Or use a subquery

    Select a.order_number, a.customer, qty_in_stock

    From (

    SELECT order_number, customer, stock_calc(<param> ) AS qty_in_stock 

    FROM Orders) a

    Where qty_in_stock  > 10

    Aliases haven't been processed when the where clause executes, so they cause errors

     

    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: If Exists...Drop Table not always working...

    Dunno about real tables, but that won't work with temp tables. The name in sysobjects in tempdb is not the same as the name you use to reference the table....

    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 Optimization

    It will work.

    That said, this kind of catch-all search query is very prone to poor execution plans due to parameter sniffing and cached plans. You may find that for certain...

    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: Severity 19 Error

    You'll probably find the stack dump files in SQL's error log directory. (SQLDumpxxx.txt and SQLDumpxxx.mdmp)

    I would recomend that you contact MS's Product Support and log a case for this. There...

    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 - 48,481 through 48,495 (of 49,552 total)