Forum Replies Created

Viewing 15 posts - 3,421 through 3,435 (of 49,552 total)

  • RE: Shrinking Data File using TRUNCATEONLY

    jacksonandrew321 (3/18/2016)


    TRUNCATEONLY affects both the LOG and the DATA files in SQL Server.

    No it doesn't. From the very blog post you referenced:

    NOTE: The NOTRUNCATE and TRUNCATEONLY arguments are only...

    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: Send a notification when a backup is succesful or failed

    Don't send alerts on success. It's just noise that people will ignore. Alerts should be when something has gone wrong.

    Set up a job to test-restore your database backups (just 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: Confuse about transaction log, truncation and UNDO management

    szejiekoh (3/17/2016)


    Hi GilaMonster,

    Thanks for your reply and the wonderful link!

    Same way we roll back any transaction. [Smile]

    Log records needed for open transactions cannot be truncated. In your example, T1 (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: Memory recommendation

    sunny.tjk (3/16/2016)


    I'm thinking we are having a high MAXDOP value of 8( MSFT recommends 3) due to which we are seeing high CXPacket waittypes.

    Nope!

    Oh, and CXPacket isn't a problem. All...

    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: Numeric or Decimal Data Type in SQL 2012?

    bsmith 63193 (3/16/2016)


    Would it be recommended to use decimal over numeric because it is a wider held standard?

    No. In SQL they are identical data types, there's no reason to chose...

    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: Index rebuild completion on a partitioned table

    If you specify the rebuild without specifying the partition, then you're getting a full index rebuild. It's not done one partition at a time, it's done as one operation on...

    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: Replicas, indexes and different SQL versions

    Steve Jones - SSC Editor (3/16/2016)


    Replication is more flexible, but it can be brittle. If it breaks, it can be a pain to reset up. Not hard, but painful

    Agreed.And when...

    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: Shrinking Data File using TRUNCATEONLY

    No, because it's pointless.

    If there's space in the data file, SQL will use that and hence won't complain that the drive is full.

    If you shrink and remove the free space,...

    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: Shrinking Data File using TRUNCATEONLY

    It doesn't cause fragmentation, but it only reduces the file size if the free space is at the end of the file. It's still not something you should be doing...

    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: Compilations/sec to Batches/sec

    Casper101 (3/16/2016)


    Would you advise I run DBCC FREESYSTEMCACHE('SQL Plans') to clear these adhoc plans?

    No.

    I'd advise that the code be changed so that parameterised queries (which generate reusable plans) are...

    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: Set @var being used in Where IN

    No, because IN doesn't work like that.

    Column IN (@Var) is equivalent to Column = @var

    You need dynamic SQL, a string split function or a different design.

    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: Confuse about transaction log, truncation and UNDO management

    szejiekoh (3/16/2016)


    q1) my understanding is that with a checkpoint, there is no need to protect the transaction log when the actual data that reflected the changes are already flush 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: Replicas, indexes and different SQL versions

    Add the indexes to the primary and keep a 'revert index changes.sql' around for when the vendor wants to make an update.

    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: Replicas, indexes and different SQL versions

    Ok, so you are talking about availability group replicas. Yes you can read from them. They are read-only and are identical to the primary (read-write) replica.

    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: Is it OK to create this function?

    SteveD SQL (3/16/2016)


    Also can I assume that if I had a SP that returned a larger results set I could pre-fetch the values to variables like below and 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

Viewing 15 posts - 3,421 through 3,435 (of 49,552 total)