Forum Replies Created

Viewing 15 posts - 11,026 through 11,040 (of 49,552 total)

  • RE: Auto increment a bigint column?

    Why are gaps a concern?

    They're normal with identities (on all data types), and unless you're using it for something that absolutely may not legally have gaps (some industry's invoice...

    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: Auto increment a bigint column?

    blasto_max (11/7/2013)


    I want sql server to create a number and put it in ID when i insert a row into the table. How do I do it ?

    Exactly as 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: Auto increment a bigint column?

    ID BIGINT IDENTITY NOT 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: Index/table rebuild

    Carl B. (11/7/2013)


    I mean table that contains dropped column(s) and/or table that contains modified column(s) (e.g. to increase its capacity).

    DDL triggers to log schema changes or record and compare 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
  • RE: UDF - IF(@parameter)

    IF (@User_RefID IS NULL)

    WITH cte1 AS (SELECT ..[...].)

    INSERT INTO .....

    ELSE

    WITH cte2 AS (SELECT ..[...].)

    INSERT INTO .....

    Watch out for performance from multistatement...

    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: Error Restoring Database including Trasaction Log

    Edit: log file, not log backups.

    Without the error, guessing. Does the drive and path exist?

    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: Database went into Restoring State for unknown reason

    Grant Fritchey (11/7/2013)


    GilaMonster (11/6/2013)


    Restoring or recovering?

    A DB will go restoring if someone runs BACKUP LOG ... WITH NORECOVERY ....

    In what might be an epic role reversal, don't you mean RESTORE...

    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: Conditional Default value for a column

    Defaults cannot reference column names. Per BoL:

    Only a constant value, such as a character string; a scalar function (either a system, user-defined, or CLR function); or NULL can be used...

    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: Slow performance

    Not without a lot more information. Need table definitions, index definitions, queries, execution plans.

    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 does *= mean in a Select statement?

    Old style outer join, deprecated since SQL 2005 and not allowed at all in SQL 2012. You'll need to replace them with the appropriate LEFT OUTER/RIGHT OUTER 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: SQL 2005 T-SQL Performance tuning

    Right click plan -> save as. Please don't take a screenshot, pictures of the plan are near-useless.

    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: DELETE running for 8 hours need to Stop the process

    chandan_jha18 (11/7/2013)


    GilaMonster (11/6/2013)


    Next time don't restart SQL while there's a large transaction rolling back.

    One question here, don't you think the T-log file will keep growing even during the rollback?

    No. Not...

    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: Compact, fully indexed, archive database

    Even with sort in tempdb, there will still be free space left from where the index used to be. How much depends on the order that the rebuilds are done,...

    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: Database went into Restoring State for unknown reason

    Then check jobs, maintenance plans, make sure you don't have something trying to do a tail-log backup (backup with norecovery) and that no one restored the wrong DB (error log...

    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: Index/table rebuild

    Carl B. (11/6/2013)


    Let's say I really need to dynamically detect these tables : "... tables that have "dropped columns" or tables that uses more row space than what is actually...

    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 - 11,026 through 11,040 (of 49,552 total)