Forum Replies Created

Viewing 15 posts - 2,881 through 2,895 (of 49,552 total)

  • RE: Reseed Max value

    Please post new questions in a new thread. Thanks

    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: Deadlocks with Object Locks - NO objectids

    Can you post the deadlock graph?

    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: Update 1 of 3 tables based on parameter

    David92595 (6/28/2016)


    Are their any other good ways to stop a sql injection?

    Yes. Don't concatenate input into strings to be executed unless completely unavoidable (eg table names and column names), if...

    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: Saving Date AND exact Time to data table

    There's probably some implicit conversion happening somewhere in the LINQ such that the value is getting cast to the LINQ equivalent of DATE before the insert.

    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: Update 1 of 3 tables based on parameter

    You need Dynamic SQL, you can't parameterise a table name. Build up a string, execute it.

    And yes, people are paranoid for good reason, which is why you will check 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: Saving Date AND exact Time to data table

    Can you use Profiler to show the exact INSERT sent to SQL Server?

    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: Update 1 of 3 tables based on parameter

    IF @State = 'AZ'

    UPDATE AZ_Fees

    SET @ColumnName = @NewValue

    WHERE ID = @ID

    IF @State = 'CA'

    UPDATE CA_Fees

    SET @ColumnName = @NewValue

    WHERE ID = @ID

    ...

    Alternately, use dynamic SQL and check that the table name...

    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: Saving Date AND exact Time to data table

    DATETIME is accurate to 3 milliseconds. It won't convert a time to midnight

    Check the LINQ make sure there's no rounding/conversion happening. Also check there's no trigger on the 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: what happens to transaction when memory in sufficiant error comes.

    What's the exact error message?

    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 Memory Change

    Can't see the image, but don't use Task Manager. It lies.

    Performance monitor, the process object should help. It'll probably take a lot or work.

    Increasing memory will help, bump to 32,...

    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: Reduce Log Database

    And the second 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: SQL Server Memory Change

    hadihalim90 (6/27/2016)


    My problem is, can I reduce the maximum server memory to 4096 MB to rectify this issue as it is on production now? I have checked on the application...

    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: Reduce Log Database

    If you run these, what's the result for the database you have the problem with?

    DBCC SQLPERF(LogSpace)

    SELECT name, log_reuse_wait_desc from sys.databases

    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: Reduce Log Database

    angelreynosog (6/27/2016)


    There is no defined structure as such , this is why I'm looking for guidance , how could. Currently , it is being done as I said , Backup...

    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: Reduce Log Database

    What recovery model are you in?

    How often do you back up the transaction log?

    What's the maximum allowable data loss for this DB, in the case of a disaster?

    Please take 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

Viewing 15 posts - 2,881 through 2,895 (of 49,552 total)