Forum Replies Created

Viewing 15 posts - 1,651 through 1,665 (of 49,552 total)

  • RE: Update Query Performance

    Most likely there is blocking. Can you check sys.dm_exec_requests when there's load and see what the query is waiting for?

    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: t-sql 2012 sort

    pietlinden - Wednesday, March 15, 2017 10:31 PM

    Can't you do this? If you use TOP 100 PERCENT, you can use 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: Are the posted questions getting worse?

    Brandie Tarvin - Thursday, March 16, 2017 5:16 AM

    Sigh. So my morning starts off with a Dev asking me to move code...

    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: Auto increment Foreign Key Column in sql

    You don't.
    Insert the row into the remarks table, obtain the ID assigned to that row, put that into the customer 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: SQL server database engine account question

    Then the necessary permissions were added for the account when the login was changed.

    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?

    Grant Fritchey - Wednesday, March 15, 2017 6:03 AM

    I almost always asked them about our latest problem or challenge. It's not 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: Violation of primary key constraint error when updating sql table ?

    That's not going to work for what you want. That query, if there are ANY rows in employee with ID between 1 and 2000, then the insert won't run.
    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: Are the posted questions getting worse?

    Beatrix Kiddo - Wednesday, March 15, 2017 4:45 AM

     They then sat there for a further 10 minutes and got as much...

    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: Violation of primary key constraint error when updating sql table ?

    Then you'll need to use option 2.

    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: Violation of primary key constraint error when updating sql table ?

    The answer for 2) makes no sense, you can't update when rows don't exist in one table. I'll assume you meant 'insert them' for (2) and 'update to make 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: Violation of primary key constraint error when updating sql table ?

    What, exactly do you want to do with the rows that are:

    1) In employee, not in backup.employee?
    2) Not in employee, in backup.employee?
    3) In both?

    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: Violation of primary key constraint error when updating sql table ?

    I'm confused.
    You say you want to update this table from another DB, but the query you're running is an insert, not an update.

    The reason you're getting 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: Downgrading from SQL Server 2014 to SQL Server 2012

    Please note: 3 year old thread.

    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: log shipping between different Service Pack levels

    PearlJammer1 - Tuesday, March 14, 2017 9:58 AM

    Does it even matter ?

    No.
    From 2012 to SQL 2014 would be a problem (well, failover...

    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 does a SQL Script Execute

    What was confusing was your use of 'query'. A script (multiple queries) executes top to bottom, a single query doesn't.

    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 - 1,651 through 1,665 (of 49,552 total)