Forum Replies Created

Viewing 15 posts - 6,391 through 6,405 (of 49,552 total)

  • RE: Urgently need help with encryption

    Note that the MS site has the Hashbytes function on the CreditCardID, they're not hashing the column that they're encrypting (which is what your code does)

    Maybe ditch the example and...

    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: Urgently need help with encryption

    Why are you first hashing and then encrypting the value? And why, when you try to decrypt are you first hashing the encrypted value and then trying to decrypt 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: Inline vs. Multi-Statement Table-Valued function, Temp Tables vs. CTEs?

    Katerine459 (3/18/2015)


    Unless the CTE is also a correlated subquery, wouldn't it just run once

    And who said that a correlated subquery doesn't run just once?

    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 (3/18/2015)


    GilaMonster (3/18/2015)


    Jack Corbett (3/18/2015)


    Steve Jones - SSC Editor (3/18/2015)


    For your discussion: https://medium.com/@sailorhg/coding-like-a-girl-595b90791cce

    That was an interesting read. I can't disagree with any of it, but I...

    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: DBOwner an invalid SID?

    dan-572483 (3/18/2015)


    Is there any harm to leaving this as is?

    Yes.

    You'll go to set up something like replication, or maybe CDC, or any one of the other features 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: Permissions needed for truncate table permissions within a Database

    No good news, I'm afraid

    https://msdn.microsoft.com/en-us/library/ms177570.aspx

    Permissions

    The minimum permission required is ALTER on table_name. TRUNCATE TABLE permissions default to the table owner, members of the sysadmin fixed server role, and the db_owner...

    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?

    Jack Corbett (3/18/2015)


    Steve Jones - SSC Editor (3/18/2015)


    For your discussion: https://medium.com/@sailorhg/coding-like-a-girl-595b90791cce

    That was an interesting read. I can't disagree with any of it, but I can honestly say...

    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 index rebuild job fails periodically at update stats.

    qur7 (3/18/2015)


    I updated the job step in the advance tab with log to a txt file.

    Yup, that should do it. Run the job again, if it fails...

    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?

    Alvin Ramard (3/18/2015)


    Someone is asking the question: "One of the database that I monitoring is showing the .mdf file full. Recovery model of that database is simple. How can I...

    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: Count on table with million data too slow

    Koen Verbeeck (3/18/2015)


    ChrisM@Work (3/18/2015)


    appdev13 (3/18/2015)


    I am having a table with over 120 million rows. I am executing a count query and it is taking about 4 mins to execute. Every...

    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: Count on table with million data too slow

    Koen Verbeeck (3/18/2015)


    you can create a new non-clustered index on ID and GPSTime.

    This, assuming there aren't any other indexes which we haven't been shown

    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 think I've got it all wrong --- would love advice on this backup plan

    jennifer.elkhouri (3/18/2015)


    the first step in my nightly maintenance plan is "Shrink database, limit 50 MB, free space 10%" ...

    Ow, sob, wince, sob, cringe :hehe:

    but I read another blog post...

    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: Count on table with million data too slow

    Lowell (3/18/2015)


    GilaMonster (3/18/2015)


    Lowell (3/18/2015)


    also, why not count(*)? it would be faster, i would think.

    In this case it's unlikely to be faster as the column in the count is already in...

    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: Count on table with million data too slow

    Lowell (3/18/2015)


    also, why not count(*)? it would be faster, i would think.

    In this case it's unlikely to be faster as the column in the count is already in the where...

    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: Count on table with million data too slow

    Please?

    GilaMonster (3/18/2015)


    Index definitions (CREATE INDEX) and table definition please. I think I know what's going on, but need confirmation.

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