Forum Replies Created

Viewing 15 posts - 48,211 through 48,225 (of 49,552 total)

  • RE: sp_recompile problems

    What are those 'strange errors'?

    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 Database Integrity Check Error

    The number of pages that the metadata says belong to the table don't agree with the number of pages actually allocated.

    As the error says, try running DBCC UPDATEUSAGE and see...

    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: Return value using exec(@query)

    Faraz Shuja (11/15/2007)


    i am just passing null to @WhereConditions.

    Yup. That'll do it. If @WhereCondition is NULL, then when concatenated to the rest of the @sql string, that also becomes 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: Return value using exec(@query)

    See my revised reply. Also, make sure that the where conditions you're specifying don't filter out all records.

    Can you give an example of how you're calling the proc please?

    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: Return value using exec(@query)

    Edit: Ah, silly me. The output variable's not getting assigned.

    ALTER PROCEDURE dbo.SP_NewClassifiedsMain

    @PageIndex INT,

    @NumRows INT,

    @NewClassifiedsCount INT OUTPUT,

    @WhereConditions varchar(200)

    AS

    BEGIN

    declare @sql nvarchar(400);

    set @sql = 'Select @count = Count(*) From classifieds_Ads

    Where AdStatus=100 ' +...

    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: Return value using exec(@query)

    Faraz Shuja (11/14/2007)


    Still not working. @NewClassifiedsCount is 0 always

    Try this

    declare @sql nvarchar(400);

    declare @test-2 int;

    set @sql = 'Select @count = Count(*) From classifieds_Ads

    Where AdStatus=100 ' + @WhereConditions

    exec sp_executesql @sql, N'@count...

    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 there any difference between != and <>

    Matt Miller (11/14/2007)


    There's a XML trick that might be worth throwing into the mix for this one. it's VERY slick, but I've been reading mixed reviews as to its...

    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 there any difference between != and <>

    Matt Miller (11/14/2007)


    Giants? Nah - I aint that tall....

    More like - boys with their toys:)

    You said it. 😉

    What I'll do is grab one of the string functions that 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: is there any difference between != and <>

    Wow. You guys have been busy overnight. I think I'll bow out of this race while I'm behind... 😀

    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: UniqueIdentifiers as Indexes

    My recomendation would be to find a more appropiate column for the clustered index. Which column it is will depend on how the tables are used.

    The problems with guids as...

    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 me...

    Were those rows inserted before or after the 9th Nov backup? If before, then restore that backup to another server and copy the data across.

    Look on the bright side. 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: Help! Drowning! Runaway log file!

    If this is a dev server and the data's not important you can set the DB to simple recovery mode. That way you won't need to do log backups.

    Be aware...

    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 me...

    dewa_himatif_sf (11/13/2007)


    IN SIMPLE MODE,

    can you help me?

    but I've heard that the record from table was delete, isn't not permanent deleted, we can undo "delete proses" if we can read 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 me...

    dewa_himatif_sf (11/13/2007)


    i've heard that the data isn't permanent delete, but it's save in .ldf, but idon't know about that

    All data changes are written to the transaction log. If the DB...

    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 problems on Live server

    Jez (11/13/2007)


    We already have WITH RECOMPILE in the procs and it seemed to make no difference. That's why I made the other changes.

    Our processing sometimes involves a few thousand...

    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 - 48,211 through 48,225 (of 49,552 total)