Forum Replies Created

Viewing 15 posts - 12,466 through 12,480 (of 49,552 total)

  • RE: issue with tempdb

    http://www.simple-talk.com/sql/backup-and-recovery/the-sql-server-instance-that-will-not-start/

    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: TEMP DB ISSUE

    sqlpanther (7/3/2013)


    my analysys says out tempdb is not flushing the commited transaction

    Won't be the cause.

    If TempDB is growing to 60GB, then you have stuff (temp tables, table variables, internal query...

    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: default trace configurations

    Not possible. You cannot in any way configure any of the attributes of the default trace.

    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: Column Order in an Index

    sandippani (5/11/2013)


    Nice attempt. Here in this article you should explain why SQL server does like this. I'm referring to the Index Statistitics.

    It's not due to statistics. It's due to 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 want deadlock notification using mail address and record stored in table.

    Try using extended events.

    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: Autonumber field sometimes skips a 1000

    Identity is not and never has been guaranteed to be without gaps. Hence the presence of such gaps it to be expected.

    If the service is restarting, you probably want 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: Can a strawberry query be done better?

    There are multiple different ways to do this.

    Rank or row number

    Max in a subquery and join to it

    Top 1 in a cross apply

    All will likely be way faster than a...

    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: Can a strawberry query be done better?

    Query 2.

    SELECT * FROM (

    SELECT

    o.OrderDate,

    o.AccountNumber,

    o.TotalDue,

    o.SalesPersonID,

    p.FirstName,

    p.LastName,

    ROW_NUMBER() OVER (PARTITION BY YEAR(o.OrderDate), MONTH(o.OrderDate) ORDER BY o.TotalDue desc) MonthPosition

    FROM Sales.SalesOrderHeader AS o

    INNER JOIN Person.Person AS p

    ON o.SalesPersonID = p.BusinessEntityID

    ) sub

    WHERE MonthPosition = 1

    ORDER...

    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: Can a strawberry query be done better?

    Query 1.

    SELECT * FROM (

    SELECT o.SalesOrderID,

    o.OrderDate,

    o.AccountNumber,

    o.TotalDue,

    o.SalesPersonID,

    p.FirstName,

    p.LastName,

    ROW_NUMBER() OVER (PARTITION BY o.SalesPersonID ORDER BY o.TotalDue desc) SalesPersonPosition

    FROM Sales.SalesOrderHeader AS o

    INNER JOIN Person.Person AS p

    ON o.SalesPersonID = p.BusinessEntityID

    ) sub

    WHERE SalesPersonPosition = 1

    ORDER BY...

    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: Getting error while creating database

    Then someone has likely implemeted a DDL trigger without your permission. Check under server triggers in management studio.

    Reason is, create database does not run any select statements but your error...

    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: Worker Thread

    For max worker threads, query sys.configurations. If it's 0, then see this article for the calculation of effective worker threads

    http://msdn.microsoft.com/en-us/library/ms189631.aspx

    Current you can get by querying sys.dm_os_workers

    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: Getting error while creating database

    Speak to your DBA. If there is one, he'd have had to implement it.

    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: Getting error while creating database

    Do you have a DDL trigger implemented that fires for create database statements?

    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: Worker Thread

    Max worker threads? Current worker threads?

    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 I/O Errors

    Repeating the exact same thing is not explaining.

    What do you consider an I/O error? What do you want the query to show?

    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 - 12,466 through 12,480 (of 49,552 total)