Forum Replies Created

Viewing 15 posts - 6,436 through 6,450 (of 49,552 total)

  • RE: How to create check constraint on a view

    g.britton (3/13/2015)


    GilaMonster (3/13/2015)


    Be careful of using a function in a constraint. The constraint only gets checked when the table that it is on changes. If the table that the function...

    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: SP_TRACE_CREATE. Error

    yuvipoy (3/13/2015)


    As i said in my first post i am able to open and create/write/delete files in \\mynetwork\yuvipoy\ path.

    Which is utterly irrelevant as the account that's running the sp_create_trace 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: default trace file- sort warnings

    Bear in mind that it's not at all uncommon for sorts to spill. The sort operation requires a lot of memory and, as such, most sorts that affect larger row...

    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 choosing to use the worst possible index

    Can we see the query and execution plan please? There's lots of guessing happening, but hard to say what's really happening without seeing details.

    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: SP_TRACE_CREATE. Error

    You need to grant permission on the share and folder (the ones in Windows) to the account that SQL Server runs under.

    If you don't have permissions on the windows 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: OR condition cancels AND condition

    The main thing that immediately comes to mind is that you're missing brackets.

    AND takes precedence over OR, meaning without brackets, your WHERE clause actually means

    (b.field1 LIKE 'ABC' AND b.field2 BETWEEN...

    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: SP_TRACE_CREATE. Error

    You need to grant the account which SQL Server runs under permission to access the share. If the service account is not a domain account, it first needs to be...

    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: SP_TRACE_CREATE. Error

    The account that SQL Server is running under (the SQL Server service account) does not have permission to the share.

    I don't recommend saving a trace across the network. The network...

    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: The Worst Comments

    Toby Harman (3/13/2015)


    Many years ago I found a comment by my boss in the code which read something along the lines of

    -- Don't touch this code

    -- It does fancy statistical...

    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 to create check constraint on a view

    Be careful of using a function in a constraint. The constraint only gets checked when the table that it is on changes. If the table that the function reads from...

    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: Tutorials on Transactions?

    As a counter-example of when you would wrap something in BEGIN TRAN ... ROLLBACK:

    I do a lot of performance tuning. As such, I have to run procedures so that 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: INSTEAD OF trigger on a view

    A trigger on the base table for the view.

    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: Need SQL query for this scenario

    "Fully denied" would be claims that have 1 or more "3" and 0 "1", correct?

    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 Check

    Restore it to another server. If the restore succeeds, the backup is undamaged.

    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: INSTEAD OF trigger on a view

    If there's an INSTEAD OF trigger on the view, then when the view is the target of an data modification the trigger is fired replacing the data modification. Hence 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

Viewing 15 posts - 6,436 through 6,450 (of 49,552 total)