Forum Replies Created

Viewing 15 posts - 49,186 through 49,200 (of 49,552 total)

  • RE: size of image fields?

    SELECT DATALENGTH(image_field) FROM tbl

    Returns the number of bytes that the field takes up. (replace image_field with the name of the field containing the image and tbl with the name of 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: Perplexing Massive Performance Differences - Bug?

    OK, here are a few suggestions.

    Run profiler overnight and filter so that you'll only catch this sp.

    Recompile the stored procedure if you haven't already. (sp_recompile) or mark if for recompile...

    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: Perplexing Massive Performance Differences - Bug?

    What happens in you run the DTS package from DTS designer?

    Does the stored proc have any params that could have different values?

    Can you change the job so it calls 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: drop index constraint

    You can put an IF EXISTS around the drop constraint, just as you did for the drop table.

    IF

    exists

    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: CPU and perfmon counters from T-SQL

    Thanks. That's great.

    The windows resource kit may not be possible. My server is an IA-64 machine. I don't know if there is a resource kit for it.

    The perfinfo is very...

    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: Cursor for Log Truncation

    Also note that if you truncate the transaction log, you will not be able to restore the database fully after a failure. Without an unbroken set of tran log backups,...

    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: 70-228 Exam

    3 hours, 30 -40 questions (can't remember exactly) Pass mark is around 75%.

    No reference materials of any kind are allowed. You don't have books online or web access and you...

    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: Long, long data rows , what to do?

    One minor correction, a row size can be a limitation and since, for char and varchar, 1 character=1 byte can be measured in characters. SQL rows have a max 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: AS reserved word not operating as expected.

    The where clause is executed before the aliases in the select are resolved. The only place (in a simple select) that you can use an alias defined in the select...

    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: Transaction (Process ID 106) was deadlocked

    Switch traceflag 1204 on on the server and whenever SQL encounters a deadlock it will write a deadlock graph into the error log. that can help you track down 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: Check 3 columns to return single value

    There's probably a simpler way, but this will work

    SELECT CASE IsPage WHEN 1 THEN 'Page'

     ELSE CASE IsFolder WHEN 1 THEN 'Folder'

       ELSE CASE ISMenu WHEN 1 THEN 'Menu'

        ELSE...

    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: To get latest 3 inserted records from a table without date field or time stamp

    SQL does not keep any form of rowid or insert time that you can use to pick up frst or last inserted record.

    If you want to be able to get...

    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: nullability

    It should be doable as a table constraint

    Something like something like (ColA IS NULL AND ColB IS NULL) OR (ColA IS NOT NULL AND ColB IS 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: SQL Server information resources

    These are the RSS feeds that I watch. Note that my job is SQL performance tuning and optimisation, so some of these might be a much lower level than you're...

    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 Stored Procedure......

    Is this comp sci homework?

    I'd suggest a cursor (forward_only, read_only) over the instructors and use a select statement for each to build up the list of courses. Something like

    SELECT...

    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 - 49,186 through 49,200 (of 49,552 total)