Forum Replies Created

Viewing 15 posts - 6,001 through 6,015 (of 49,552 total)

  • RE: Backup detected error - Checkdb returns errors

    It'll work fine too.

    Take a final log backup before you start the restore. Backup log ... with norecovery. Also take a full backup, just in case. You'll probably have...

    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: Backup detected error - Checkdb returns errors

    Cool.

    Looking at that again, your plan of dropping (or truncating) the table and then reloading will work. You'll have to drop foreign keys and disable the trigger before truncating 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: Backup detected error - Checkdb returns errors

    Before you do anything, please run the following and post the full, complete, unedited output

    DBCC CheckDB('<database name>') WITH NO_INFOMSGS, ALL_ERRORMSGS

    Probably, if you have the time, best fix will be 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: Table Without PK

    xsevensinzx (5/8/2015)


    But, you still have to answer the question of why the transaction has to be uniquely identified in a world where not being unique is allowed? What use is...

    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: Table Without PK

    xsevensinzx (5/8/2015)


    What if you are allowed to have duplicates with transactional records that have customer ID's which forms the relationship? What purpose is the PK giving you outside of deduplicating...

    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: check how many rows delete updated per day and store it in another table?

    SQL doesn't keep track of insert or deletion rates, so you'll need a trigger on the table or something like Change Data Capture or Change Tracking to do this.

    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: Case statement in update not working correctly.

    Structure your query as a select first. It's easier to debug.

    SELECT

    CASE

    WHEN EA.DataSet = 'Abstract' THEN EA.BufferedArea_km2

    ELSE 999

    END as AbstractArea,

    CASE EA.DataSet WHEN 'discharges' THEN EA.BufferedArea_km2

    END as Discharge_Area

    FROM #TEMP1 T

    INNER JOIN Royalties.dbo.RoyaltyActuals...

    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: Table Without PK

    Primary key != clustered index.

    A table can be a heap and have a primary key

    A table may have a clustered index but...

    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 2005: Error calling a sproc from my new sproc

    Please post new questions in a new thread. Thank 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: script to create role

    charipg (5/7/2015)


    Need a script to create a new role in all databases to cover SP creation/execution, any table data manipulation (insert, update, delete & select) .

    Google search topics:

    "CREATE ROLE...

    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?

    Lynn Pettis (5/7/2015)


    I really want to say "Write it yourself. We aren't here to do your work for you."

    For a couple seconds I thought that was directed at me...

    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: MaxDop and Sys.SYSPROCESSES

    Again, MAXDOP does not control the number of threads in total. It controls the number of threads that may be concurrently *running* for a single 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: vNext 2016

    Brent Ozar (5/7/2015)


    The only feature they've announced (this week) is a subset of AlwaysOn Availability Groups in Standard Edition, basically replacing database mirroring, which has been deprecated.

    And about bloody time...

    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?

    spaghettidba (5/7/2015)


    GilaMonster (5/7/2015)


    Ok, I need to write something.

    Article requests?

    "How centralized backup tools promise the moon and don't deliver"

    Hmm, ok, now I see how this topic helps making friends at ISVs...

    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?

    That's not an article, that's a small book.

    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 - 6,001 through 6,015 (of 49,552 total)