Forum Replies Created

Viewing 12 posts - 1 through 12 (of 12 total)

  • Reply To: The process could not execute sp_repldone/sp_replcounters

    sp_replrestart command worked for me .  No Parameters required , you can simply run this command on the DB where you have this issue. Note that all the publications on...

  • RE: Reindex of Table Stuck

    you can use sp_who2 to see all processes and check which SPID is actaully causing blocking and kill that... To automate that you can write take the results of Sp_who2...

  • RE: Substitute for SQL Agent

    You can use Windows Scheduler to schdule your SSIS package execution.

    Another tool which can call SSIS package is Control-M .

    I had used Windows scheduler as well as COntrol-M...

  • RE: Why Shouldn't I use Linked server?

    Fair point Jeff. There shouldn't be really any doubt that if we replicate tables locally and use local tables in our join then performance will be definitely be better than...

  • RE: Stored Procedure with optional parameters

    Try the below query , even if you skip one parameter it simply uses that columnName during comparison

    alter procedure spGetDetails

    (

    @AccountID nvarchar(10)= null ,

    @Name nvarchar(20) = null

    )

    as

    begin

    select * from...

  • RE: How to see index coding

    Hi Anand, Good to know that the query helped you. Indexes are categorized only in 2 categories Clustered and non-clustered Index. However, when you create an INDEX and you mention...

  • RE: How to see index coding

    There are scripts to fetch the scripts for an index but its a big code , not a MS provided procedure/function like sp_helptext... you can refer one in below link......

  • RE: conditional where clause

    Check the below code, ISNULL function should help to resolve this. Adding Recompile will take care of changing the query plan in case the variable is NULL and you end...

  • RE: Query tuning - Help needed

    Your query is spending maximum time in Sorting the data. I checked your view and I see it uses "TOP 100 PERCENT " ... If you are getting 100 Percent...

  • RE: strange problem with varchar(8000) getting cut at 4000 characters

    Can you try below steps

    1. Ensure that the 3 variables are declared as below

    DECLARE @SQL1 Varchar(4000)

    DECLARE @SQL2 Varchar(4000)

    ...

  • RE: IF, THEN in T-SQL?

    I guess you need to refer DEPTCode without prefixing it with P. as Deptcode is not present in the stage_chris21.PSDET table. Try the below code and see if it...

  • RE: Difference between Stored procedure and functions

    Good point .. this is another difference between procedure and a function

    When you create a function ,SQL server will allow you to call a procedure from the Function.

    However when...

Viewing 12 posts - 1 through 12 (of 12 total)