Forum Replies Created

Viewing 15 posts - 20,476 through 20,490 (of 49,552 total)

  • RE: Table Name as parameter

    Other than it been an ugly solution?

    Any reason why partitioned views/partitioned tables weren't considered?

    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 kill a executing differential backup and what happens when when no more disk space is available to an LDF ?

    Divine Flame (2/8/2012)


    GilaMonster (2/8/2012)


    Your database essentially becomes read-only, any operation that tries to make any changes fails. You would resolve that by finding out what is preventing the log 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: Parameter Sniffing

    When it says that the context is reused, it's just the structure, not the parameter values. As that quote says, it's reinitialised for the next user - wiped, cleared 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: how to kill a executing differential backup and what happens when when no more disk space is available to an LDF ?

    scott_lotus (2/8/2012)


    Working on transferring a large SQL server bak file the source of which shares space with DB log files. I have alerts in place for disk 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: date and txn problem

    Please post table definitions, sample data and desired output. Read this to see the best way to post this to get quick responses.

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    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: Trigger gives error on filre of bulk update query

    This should do the job

    CREATE TRIGGER [trg_EmpMasterBfNo] ON [dbo].[EmpMaster]

    FOR INSERT, UPDATE

    AS

    IF UPDATE(CantactNo)

    BEGIN

    ...

    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: Trigger gives error on filre of bulk update query

    Yup, that's written assuming that there is only ever 1 row in inserted (which is far from true)

    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: Commit vs Commit Transaction

    No. The word TRANSACTION is optional after COMMIT or ROLLBACK.

    Don't add @@error, add a try-catch construct.

    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: Trigger gives error on filre of bulk update query

    The trigger is probably written assuming there's only a single row in inserted or deleted. Common problem with triggers. If you post the code, we can probably fix it.

    Leave cursors...

    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 Reduce the Logical Reads, to imporve the Performance of the Query

    Dinesh Babu Verma (2/8/2012)


    In case no data in data cache, the physical read will be equal to number of logical read.

    Not necessarily, because a query could request the same...

    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: Mysterious Error on "Execute SQL Task"

    Please run the following and post the full and complete results

    DBCC CHECKDB (<Database Name>) WITH NO_INFOMSGS, ALL_ERRORMSGS

    This is an indication that the connection has been terminated at the server. 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: Help with a query.

    While loops are row-by-row processing and they are generally slower and less efficient than a comparable set-based solution.

    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: Rw-write this Query?

    rka (2/7/2012)


    Definitely not interested in Cursor as we have a coding standard where we try not to implement cursors.

    So While Loop is the way to go (thats what 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: Table Name as parameter

    If you go the dynamic SQL route, read up on SQL Injection first.

    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: Moving an existing large table to a new file group

    Yes. Use create index ... with drop_existing for the clustered index and specify the desired filegroup for the place that the index must be created on.

    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 - 20,476 through 20,490 (of 49,552 total)