Forum Replies Created

Viewing 15 posts - 46 through 60 (of 337 total)

  • RE: Running Totals with window function

    Jacob Wilkins (3/25/2016)



    Careful, that CASE statement seems incorrect for the requirements.

    Once b (the min of the basic running total so far) goes negative, that absolute value has to be...

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: Dynamic Lag Function

    This ?

    CREATE TABLE test

    (

    id INT IDENTITY(1, 1) NOT NULL,

    score INT,

    ...

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: Running Totals with window function

    DECLARE @TranTable TABLE (

    AccountID INT NOT NULL

    , TranDate DATETIME...

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: Query can be improved?

    Without looking at the underlying tables and the query plan even the best SQL expert wont be of any help.Please post query plan,table structure and underlying indexes.

    Just a shot in...

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: Finding retention of a person

    It can be done with a combination of UnPivot and Crosstab query.

    ;WITH cte

    AS (SELECT itr_cst_key,

    ...

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: Can i schedule a sql trace through script and have data write to table

    Yes you can ..Google "Server side tracing in SQL Server".Place the trace script in a SQL job and schedule it and using fn_trace_gettable read the trace file to insert the...

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: Recurring deadlocks

    You can use a UpdLock lockhint on Table1.Updlock allows other reads to acquire Shared locks but will block other transactions from trying to get update or X lock on the...

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: merge replication web synchronization

    Something came to my mind.For your first question merge agent can run on a distributor as well for a push subscription.So if you can set up a distributor on a...

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: I don't understand why I'm getting an "invalid column name" error when creating this SP

    Unfortunately referencing a column alias in the same select statement is not supported in SQL Server the way it is done in MS Access. So you probably will have to...

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: merge replication web synchronization

    For your first question I probably think its not possible because a merge agent always has to run on a subscriber.For the second one you can configure replication to mark...

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: NumaNode Configuration

    Forcing affinity you basically make individual scheduler bound to a particular CPU and the thread on the scheduler will be constrained to run only on that CPU and cannot be...

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: merge replication web synchronization

    Shouldn't you be setting up Snapshot or Transactional replication instead ?

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: problem with the query plan cache probably

    Grant Fritchey (3/22/2016)

    Trace is trace. If you mean the trace versus Profiler GUI, yeah, the trace every time. But, capturing execution plans is expensive. Even if you went to extended...

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: Index reorganization

    Reorg of indexes is always executed online irrespective of the edition and is a single threaded operation.Writes are not blocked and updates to the underlying tables are allowed.

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: problem with the query plan cache probably

    Grant Fritchey (3/22/2016)

    Be very cautious here. A trace capturing execution plans is extremely costly on the server. If it's already under stress, this may not help at all.

    Yes completely agree.

    Just...

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

Viewing 15 posts - 46 through 60 (of 337 total)