Forum Replies Created

Viewing 15 posts - 19,246 through 19,260 (of 49,552 total)

  • RE: DB whitespace

    Mostly that will be unallocated pages. SQL stores data on pages that are 8kb in size. If a page does not belong to an object (it's never been allocated, was...

    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 Query not working correctly

    Close...

    DECLARE @var VARCHAR means DECLARE @var VARCHAR(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: DB whitespace

    To answer that properly, we'd need to know what report you're looking at, because 'whitespace' is not a usual term for data 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: space used by reindex

    sqlfriends (4/9/2012)


    Sorry, now I remember it seems the space is doubled in data file, not log file, is that supposed to be correct?

    Yes, SQL needs somewhere to put...

    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: space used by reindex

    sqlfriends (4/9/2012)


    I am reading an article http://www.mssqltips.com/sqlservertip/1299/sql-server-dba-interview-questions-part-1/?utm_source=dailynewsletter&utm_medium=email&utm_content=headline&utm_campaign=201248#comments

    It says what is the difference between index reorganizaiton and index rebuild.

    The answer is a reorganization is always a fully logged operation, but 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 Query not working correctly

    dwilliscp (4/9/2012)


    For some reason these two statements are not returning the same data.. first is NULL and the second returns the correct data set.. I must be missing something simple...

    declare...

    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 Trigger

    It'll work, but that's a bad way to do it.

    Read up on joins (as in the SQL keyword JOIN)

    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: Strange Tables In TempDB

    Tables named things like #A453DF43 are either table variables or are the shells of cached temp tables.

    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 Trigger

    GilaMonster (4/9/2012)


    Read up on JOINs

    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 Trigger

    lukebaker (4/9/2012)


    Ok so it has been SOLVED. Would like to thank all the people that helped. Below is the code that worked for me.

    That is definitely not going to work....

    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: Update Trigger

    Then those 'additionalcolumn' columns need to come out of the insert and the select clause.

    The column list on the insert is the list of columns you're populating. Leave out any...

    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 Trigger

    Are the columns actually called 'AdditionalColumn1' and 'AdditionalColumn2'?

    Is there a Staff_no column in the Training table? If not, you'll have to join deleted to whatever table does have the staff_no...

    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 to Filter Query by Schema

    GilaMonster (4/9/2012)


    Use sys.objects and sys.columns and filter on the schema_id (or join to sys.schemas and filter on the name)

    If you're asking about the join column to sys.schemas, the full definition...

    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 to Filter Query by Schema

    Syscolumns and sysobjects are deprecated, should not be used any longer, included only for backward compat with SQL 2000

    Use sys.objects and sys.columns and filter on the schema_id (or join 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: Update Trigger

    TheSQLGuru (4/9/2012)


    It could also be that the history table isn't defined EXACTLY like the base table.

    The OP says there are 7 columns in the hist table and 5 in 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 - 19,246 through 19,260 (of 49,552 total)