Forum Replies Created

Viewing 15 posts - 2,446 through 2,460 (of 49,552 total)

  • RE: How do we get the DEF of a view ?

    mw112009 (9/8/2016)


    The code for a SP goes in this table. Similarly how can we get the DEFINITION of a view

    select [definition] AS ProcDef from sys.sql_modules

    Exactly the same way....

    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: Finding long running query and killing it

    What do you need help with? What's the code doing or not doing that it shouldn't?

    And I will reiterate my comment from last time this came up

    GilaMonster (6/10/2016)


    Chitown (6/9/2016)


    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: Are the posted questions getting worse?

    djj (9/8/2016)


    However, we have a couple of people that are of the old school "wait for the first service pack" that now with no service packs say "it is too...

    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?

    Grant Fritchey (9/8/2016)


    GilaMonster (9/8/2016)


    djj (9/8/2016)


    rodjkidd (9/8/2016)


    SQLRNNR (9/7/2016)


    rodjkidd (9/7/2016)


    Simple things etc as they say...

    Just used Drop Table If Exists for the first time... I had a little smile to myself.... 🙂

    Rodders...

    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: Are the posted questions getting worse?

    djj (9/8/2016)


    rodjkidd (9/8/2016)


    SQLRNNR (9/7/2016)


    rodjkidd (9/7/2016)


    Simple things etc as they say...

    Just used Drop Table If Exists for the first time... I had a little smile to myself.... 🙂

    Rodders...

    It really is 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
  • RE: SQL view performance problem

    There's no way to pass parameters to a view. Either the users apply the date filter when they query the view, or you'll need to change to a procedure or...

    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: UDF - Is Transaction Control possible?

    http://source.entelect.co.za/why-is-this-upsert-code-broken

    While it talks about insert/update pairs, your manual sequence code will have the same problems.

    Edit: And if you need an incrementing value that starts at 5,

    SomeNumber INT IDENTITY (5,1)

    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: Performance tuning using SQL query hint

    If you've analysed and tested, and have confirmed through careful testing and consideration of alternatives, that the hint is the best way to solve the specific problem you have (most...

    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: AlwaysON AG Group Transaction Logs Shrink

    Same way you shrink any other database. DBCC ShrinkFile ('File name', Target Size)

    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: Possible to do a backup/Restore of Tables Only??

    No.

    You could bcp every table out to flat file, script the structures and recreate the DB, but that's a huge amount of work.

    What are you trying to achieve here, 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: DBCC CHECKDB error

    Speak to your SAN admin, storage admin or whoever is responsible for the storage on that server. If the files aren't accessible, then that will have to be fixed before...

    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 Division by Zero NULL?

    Gregory Hart (9/6/2016)


    if divide by zero is allowed, it's possible to prove that 1=2

    The above claim would only work in a logical proof if you identified that NULL= NULL ....

    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: DBCC CHECKDB error

    Not asking if you can see the properties of the database in SQL. with the errors mentioned it's obvious you can't.

    Can you see the database files in the file system?...

    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: Unappreciative OP's maybe.....

    J Livingston SQL (9/3/2016)


    One word response "thanks" from the OP

    Wow, you got a 'thanks'. Impressive.

    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: Add columns to multiple tables

    I second the recommendation for an audit table.

    That said, there's no stored procedure that I know of to run alter table syntax on multiple tables, you have to run 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

Viewing 15 posts - 2,446 through 2,460 (of 49,552 total)