Forum Replies Created

Viewing 15 posts - 16 through 30 (of 144 total)

  • RE: Reducing deadlocks with update query hint or other method...

    Because of the time it takes to review the rows another process may come in and start grabbing those same rows while you are in the middle of your update

    Each...



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: Double queue reader or is it still busy?

    Solved it.

    The Queue Reader agent is only used in snapshot or updatable transactional replications.

    I just deleted the job and emptied tables MSqreader_agents & MSqreader_history from the distribution database. Finally I...



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: The OLE DB provider "SQLNCLI" for linked server "X" reported a change in schema version between compile time

    I also encounter this now and then, but with not any specific regularity.

    EXEC sp_RefreshView '<View that reverences a linkedserver table>' will also allow the view to be used.

    Has anyone encountered...



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: Pass Variable to Precendant Constraint

    Glad you got it working.

    Jody Claggett-376930 (5/1/2009)


    In an Execute SQL task I have the following configuration:

    Result Set = Single Row

    SQLStatement = SELECT COUNT(ID) AS CheckData FROM Table_A

    Compare these in the...



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: Complex hierarchy: how to build?

    Thanks for the link Jeff.

    :blush:

    Bit beyond me at the moment though.

    I failed the "Who This Article Is For" section.

    Never heard of Adjacency List or Nested Sets.

    If / when I...



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: Query tuning performance

    :unsure:

    Hmm good point Chris.

    Not sure why I posted that.

    Good to keep indexes defragmented and statistics up to date though....



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: DBCC FREEPROCCACHE

    This article by Kimberly Tripp[/url] maybe useful to you.

    I'm reading it and the related articles now.



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: DBCC FREEPROCCACHE

    Are you able to increase the size of TempDB or add extra data files to it?

    Correct me if I'm wrong people but, the Proccache is stored in memory and not...



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: Multiple subscribers for one publication

    I would think just creating a new subscriber to the existing publication is better.

    That is, if the articles being published are what you want on the 3rd subscriber.

    If it is...



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: How not to replicate certain delete statements

    Hi,

    Instead of just deleting the records on the publisher, insert them in an archive table on the subscriber then do your publisher cleanup.

    Create a view on the subscriber with both...



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: sp_reinitsubscription multiple subscribers

    Hi,

    Depending on your criteria you could do something like:

    DECLARE@sql Varchar(MAX)

    SELECT@sql = ''

    --SELECTP.Name PubName, S.SrvName SubScriber, S.Dest_DB

    SELECT@sql = @sql +

    'sp_reinitsubscription @publication = '''+P.Name+

    ''', @subscriber = '''+S.SrvName+

    ''', @destination_db = '''+S.Dest_DB+

    ''', @invalidate_snapshot =...



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: Using SQL Profiler to Resolve Deadlocks in SQL Server

    Thanks Jonathan!!

    This really made things a lot clearer for me.

    Don't know if there are better techniques now days, but this one's a keeper!!



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: Query tuning performance

    Check out : http://ola.hallengren.com/

    Learn the and understand the code.

    When you do, you'll have no worries with these questions again.



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: Complex hierarchy: how to build?

    Looks like a job for a recursive query.

    Make up some sample data so we can help you out. (Create table + inserts + clean up)

    Or you could check out the...



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

  • RE: Index cannot be created on view because the underlying object has a different owner

    Here's a script to reproduce the error and correct it.

    CREATE SCHEMA Test1 AUTHORIZATION Guest

    GO

    CREATE SCHEMA Test2 AUTHORIZATION dbo

    GO

    IF OBJECT_ID('Test1.Tmp1') IS NOT NULL

    DROP TABLE Test1.Tmp1

    CREATE TABLE Test1.Tmp1

    (

    ID INT IDENTITY,

    CharVal Char(1),

    )

    IF OBJECT_ID('Test1.Tmp2')...



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

Viewing 15 posts - 16 through 30 (of 144 total)