Trying to report bug in SQL Server Replication with sp_MSdetect_nonlogged_shutdown stored procedure

I've just tried to "Submit Feedback" but the page just gives me an error which means nothing to anyone which says "You are not authorized to submit the feedback for this connection.". Why am I not authorised how do I become authorised etc
etc. Anyway :-)
I've trying to report that the stored procedure in Sql Server Replication in 12.0.2000 has an issue with data type lengths. This procedure sp_MSdetect_nonlogged_shutdown uses data lengths of nvarchar(2048) but the MSDB sysjobhistory table has a message field
length of 4000. Which causes the above stored procedure to crash.
Best Regards
Richard

This is the work around
1. Stop SQL Server service.
2. On command prompt run the following command to run the server in single user mode – be sure to replace the MSSQLSERVER with the actual instance name
C:\>”C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\sqlservr.exe” -sMSSQLSERVER -m
3. Connect to SQL server with SSMS as the server administrator
4. Run the following to change the database to the system resource database: “USE mssqlsystemresource”
5. Run the following to update the stored procedure (only change is to make NVARCHAR(4000))
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
ALTER procedure [sys].[sp_MSdetect_nonlogged_shutdown]
    @subsystem nvarchar(60),
    @agent_id int
as
begin
    declare @job_id binary(16)
    declare @agent_name sysname
    declare @message nvarchar(4000)
    declare @retcode int
    declare @runstatus int
    declare @run_date int
    declare @run_time int
    declare @run_date_orig int
    declare @run_time_orig int
    declare @merge_session_id int
    -- security check
    -- only db_owner can execute this
    if (is_member ('db_owner') != 1) 
    begin
        raiserror(14260, 16, -1)
        return (1)
    end
    -- Detect if the agent was shutdown without a logged reason
    if UPPER(@subsystem collate SQL_Latin1_General_CP1_CS_AS) = 'SNAPSHOT'
    begin
        if exists (select runstatus from MSsnapshot_history where 
            agent_id = @agent_id and
            runstatus <> 2 and 
--CAC       runstatus <> 5 and 
            runstatus <> 6 and
            timestamp = (select max(timestamp) from MSsnapshot_history where agent_id = @agent_id))
            begin
                select @job_id = job_id, @agent_name = name from MSsnapshot_agents where id = @agent_id
            end
    end
    else if UPPER(@subsystem collate SQL_Latin1_General_CP1_CS_AS) = 'LOGREADER'
    begin
        if exists (select runstatus from MSlogreader_history where 
            agent_id = @agent_id and
            runstatus <> 2 and 
--CAC           runstatus <> 5 and 
            runstatus <> 6 and
            timestamp = (select max(timestamp) from MSlogreader_history where agent_id = @agent_id))
            begin
                select @job_id = job_id, @agent_name = name from MSlogreader_agents where id = @agent_id
            end
    end
    else if UPPER(@subsystem collate SQL_Latin1_General_CP1_CS_AS) = 'DISTRIBUTION'
    begin
        if exists (select runstatus from MSdistribution_history where 
            agent_id = @agent_id and
            runstatus <> 2 and 
--CAC           runstatus <> 5 and 
            runstatus <> 6 and
            timestamp = (select max(timestamp) from MSdistribution_history where agent_id = @agent_id))
            begin
                select @job_id = job_id, @agent_name = name from MSdistribution_agents where id = @agent_id
            end
    end
    else if UPPER(@subsystem collate SQL_Latin1_General_CP1_CS_AS) = 'MERGE'
    begin
        if exists (select runstatus from dbo.MSmerge_sessions where 
            agent_id = @agent_id and
            runstatus <> 2 and 
--CAC           runstatus <> 5 and 
            runstatus <> 6 and
            session_id = (select top 1 session_id from dbo.MSmerge_sessions where agent_id = @agent_id order by session_id desc))
            begin
                select @job_id = job_id, @agent_name = name from dbo.MSmerge_agents where id = @agent_id
                select top 1 @merge_session_id = session_id from dbo.MSmerge_sessions 
where agent_id = @agent_id 
order by session_id desc
            end
    end
    else if UPPER(@subsystem collate SQL_Latin1_General_CP1_CS_AS) = 'QUEUEREADER'
    begin
        if exists (select runstatus from MSqreader_history where 
            agent_id = @agent_id and
            runstatus <> 2 and 
--CAC       runstatus <> 5 and 
            runstatus <> 6 and
            timestamp = (select max(timestamp) from MSqreader_history where agent_id = @agent_id))
            begin
                select @job_id = job_id, @agent_name = name from MSqreader_agents where id = @agent_id
            end
    end
    -- If no job_id assume shutdown was logged properly
    if @job_id is null
        return 0
    -- Get last message from SQL Agent History table
    create table #JobHistory (
        instance_id int NOT NULL, 
        job_id uniqueidentifier NOT NULL,
        job_name sysname NOT NULL,
        step_id int NOT NULL,
        step_name nvarchar(100) NOT NULL, 
        sql_message_id int NOT NULL,
        sql_severity int NOT NULL,
        message nvarchar(4000) NOT NULL,
        run_status int NOT NULL,
        run_date int NOT NULL,
        run_time int NOT NULL,
        run_duration int NOT NULL,
        operator_emailed sysname NULL,
        operator_netsent sysname NULL,
        operator_paged sysname NULL,
        retries_attempted int NOT NULL,
        server sysname NOT NULL
    if @@error <> 0
        return 1
    -- Insert last history for step_id 2 (Agent running)
    insert TOP(2) into #JobHistory exec sys.sp_MSreplhelp_jobhistory @job_id = @job_id, @step_id = 2, 
        @mode = 'FULL'          
declare cursorHistory cursor local fast_forward for
    select message, 
    run_status,
    run_date,
    run_time
    from #JobHistory
    order by run_date desc, 
    run_time desc, 
    instance_id asc
    open cursorHistory
    fetch cursorHistory into @message, @runstatus, @run_date, @run_time
    select @run_date_orig = @run_date, 
  @run_time_orig = @run_time
    while @@fetch_status <> -1
    begin   
    -- as long as we are looking at the history for the same run 
    -- date and time then we should log all rows. there should 
    -- be 2 rows since we perform a TOP on exec sp_help_jobhistory
if @run_date_orig = @run_date
  and @run_time_orig = @run_time
begin
   -- Map SQL Agent runstatus to Replication runstatus
   set @runstatus = 
   case @runstatus
       when 0 then 6   -- Fail mapping
       when 1 then 2   -- Success mapping
       when 2 then 5   -- Retry mapping
       when 3 then 2   -- Shutdown mapping
       when 4 then 3   -- Inprogress mapping
       when 5 then 0   -- Unknown is mapped to never run
   end
   -- If no message, provide a default message
-- Also overwrite all inprogress messages to be "See SQL Agent history log".
-- This is to prevent "Agent running. See monitor" to be logged into repl monitor.
-- In this case (the last job history message is InProgress), we know that
-- there have been failures of SQL Server Agent history logging.
-- In fact, the only possible "in progress" msg in SQL Agent job step
-- history for push jobs is "Agent running. See monitor". It is confusing that those
-- messages showed up in repl monitor.
   if @message is null or @runstatus = 3
   begin
       raiserror(20557, 10, -1, @agent_name)
       select @message = formatmessage(20557, @agent_name)
   end
   if UPPER(@subsystem collate SQL_Latin1_General_CP1_CS_AS) = 'SNAPSHOT'
       exec @retcode = sys.sp_MSadd_snapshot_history @agent_id = @agent_id, @runstatus = @runstatus,
               @comments = @message
   else if UPPER(@subsystem collate SQL_Latin1_General_CP1_CS_AS) = 'LOGREADER'
       exec @retcode = sys.sp_MSadd_logreader_history @agent_id = @agent_id, @runstatus = @runstatus,
               @comments = @message
   else if UPPER(@subsystem collate SQL_Latin1_General_CP1_CS_AS) = 'DISTRIBUTION'
       exec @retcode = sys.sp_MSadd_distribution_history @agent_id = @agent_id, @runstatus = @runstatus,
               @comments = @message
   else if UPPER(@subsystem collate SQL_Latin1_General_CP1_CS_AS) = 'MERGE'
exec @retcode = sys.sp_MSadd_merge_history @agent_id = @agent_id, @runstatus = @runstatus,
               @comments = @message, @called_by_nonlogged_shutdown_detection_agent = 1, @session_id_override = @merge_session_id
   else if UPPER(@subsystem collate SQL_Latin1_General_CP1_CS_AS) = 'QUEUEREADER'
       exec @retcode = sys.sp_MSadd_qreader_history @agent_id = @agent_id, @runstatus = @runstatus,
               @comments = @message
   if @@error <> 0 or @retcode <> 0
       return 1
end
fetch cursorHistory into @message, @runstatus, @run_date, @run_time
end
close cursorHistory
deallocate cursorHistory
    drop table #JobHistory
end
6. Return the system resource database to read-only – “alter database mssqlsystemresource set read_only”
7. Shutdown the instance – “shutdown”
8. Start the instance using the service as usual

Similar Messages

  • Bug? SQL server 7 - Oracle 8i stored procedures

    I'm having a problem converting some SQL 7 stored procedures to Oracle using MW. The cursor definition appears to be garbage in some cases. See example as follows:
    *********** SQL 7 stored procedure *********
    CREATE PROCEDURE CLCClaim
    /* Procedure: CLCClaim */
    /* Description: Cascading delete to child tables */
    /* Table: CLClaim */
    /* Generated: 4/23/01 2:31:21 PM */
    @AuditUserId int,
    @AuditLctn varchar(20),
    @ClaimId int
    AS
    DECLARE
    @Trncnt int,
    @ErrorNumber int,
    @Id int,
    @Rows int,
    @ClsnId int
    SELECT @ErrorNumber = -1
    /* Save transaction count value */
    SELECT @Trncnt = @@TRANCOUNT
    /* Issue begin transaction if not already in a transaction */
    If @Trncnt = 0
    BEGIN TRANSACTION T1
    /* Build a cursor for finding child CLClaimAtchm rows */
    DECLARE CLClaimAtchmCursor Cursor For
    SELECT ClaimAtchmId, ClsnId
    FROM dbo.CLClaimAtchm
    WHERE ClaimId = @ClaimId
    /* Open the cursor */
    OPEN CLClaimAtchmCursor
    SELECT @ErrorNumber = @@ERROR
    If @ErrorNumber <> 0 GoTo ErrorHandler
    FETCH Next
    FROM CLClaimAtchmCursor
    INTO @Id, @ClsnId
    ... more follows, but this is the gist of it
    **** Oracle Procedure created by MW
    CREATE OR REPLACE PROCEDURE CLCClaim(
    AuditUserId NUMBER ,
    AuditLctn VARCHAR2 ,
    ClaimId NUMBER )
    AS
    StoO_selcnt INTEGER;
    StoO_error INTEGER;
    StoO_rowcnt INTEGER;
    StoO_crowcnt INTEGER := 0;
    StoO_fetchstatus INTEGER := 0;
    StoO_errmsg VARCHAR2(255);
    StoO_sqlstatus INTEGER;
    Trncnt NUMBER(10,0);
    ErrorNumber NUMBER(10,0);
    Id NUMBER(10,0);
    Rows_ NUMBER(10,0);
    ClsnId NUMBER(10,0);
    CURSOR CLClaimAtchmCursor IS SELECT omwb_emulation.globalPkg.trancount
    FROM CLClaimAtchm
    WHERE ClaimId = CLCClaim.ClaimId;
    CURSOR CLClaimDiagCursor IS SELECT StoO_error
    FROM CLClaimDiag
    WHERE ClaimId = CLCClaim.ClaimId;
    CURSOR CLClaimAdjdCursor IS SELECT StoO_error
    FROM CLClaimAdjd
    WHERE ClaimId = CLCClaim.ClaimId;
    CURSOR CLSvcLineCursor IS SELECT StoO_error
    FROM CLSvcLine
    WHERE ClaimId = CLCClaim.ClaimId;
    /* Procedure: CLCClaim */
    /* Description: Cascading delete to child tables */
    /* Table: CLClaim */
    /* Generated: 4/23/01 2:31:21 PM */
    /* Save transaction count value */
    BEGIN
    CLCClaim.ErrorNumber := -1;
    /* Issue begin transaction if not already in a transaction */
    CLCClaim.Trncnt := omwb_emulation.globalPkg.trancount;
    IF CLCClaim.Trncnt = 0 THEN
    /* Build a cursor for finding child CLClaimAtchm rows */
    /* Emulating @@TRANCOUNT functionality in Oracle model */
    omwb_emulation.globalPkg.trancount:=omwb_emulation.globalPkg.trancount+1;
    SAVEPOINT T1;
    END IF;
    NULL;/*DECLARE CURSOR CLClaimAtchmCursor */
    /* Open the cursor */
    BEGIN
    StoO_error := 0;
    StoO_rowcnt := 0;
    StoO_crowcnt := 0;
    OPEN CLClaimAtchmCursor;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    NULL;
    WHEN OTHERS THEN
    StoO_error := SQLCODE;
    StoO_errmsg := SQLERRM;
    END;
    CLCClaim.ErrorNumber := StoO_error;
    IF CLCClaim.ErrorNumber <> 0 THEN
    GOTO ErrorHandler;
    END IF;
    BEGIN
    StoO_error := 0;
    StoO_rowcnt := 0;
    StoO_crowcnt := 0;
    FETCH CLClaimAtchmCursor INTO CLCClaim.Id, CLCClaim.ClsnId;
    EXCEPTION
    WHEN OTHERS THEN
    StoO_rowcnt := 0;
    StoO_selcnt := 0;
    StoO_error := SQLCODE;
    StoO_errmsg := SQLERRM;
    END;
    ...more follows, but the error is in the SELECT clause of the CURSOR declaration
    I'm having to manually fix the CURSOR declarations for these converted procedures.
    Is there a fix or workaround to prevent me from growing my collection of gray hairs?
    Thanks,
    Billy Smith

    William,
    I did a quick check on our latest code and got the following output:
    CREATE OR REPLACE PROCEDURE CLCClaim(
    AuditUserId INTEGER DEFAULT NULL,
    AuditLctn VARCHAR2 DEFAULT NULL,
    ClaimId INTEGER DEFAULT NULL)
    AS
    StoO_selcnt INTEGER;
    StoO_error INTEGER;
    StoO_rowcnt INTEGER;
    StoO_crowcnt INTEGER := 0;
    StoO_fetchstatus INTEGER := 0;
    StoO_errmsg VARCHAR2(255);
    StoO_sqlstatus INTEGER;
    Trncnt INTEGER;
    ErrorNumber INTEGER;
    Id INTEGER;
    Rows INTEGER;
    ClsnId INTEGER;
    CURSOR CLClaimAtchmCursor IS
    SELECT ClaimAtchmId, ClsnId
    FROM /*standalone*/sa.CLClaimAtchm
    WHERE ClaimId = CLCClaim.ClaimId;
    /* Procedure: CLCClaim */
    /* Description: Cascading delete to child tables */
    /* Table: CLClaim */
    /* Generated: 4/23/01 2:31:21 PM */
    /* Save transaction count value */
    BEGIN
    CLCClaim.ErrorNumber := -1;
    /*[SPCONV-ERR(26)]:('@TRANCOUNT') Global Variable treated as variable*/
    /* Issue begin transaction if not already in a transaction */
    CLCClaim.Trncnt := CLCClaim.TRANCOUNT;
    IF CLCClaim.Trncnt = 0 THEN
    /* Build a cursor for finding child CLClaimAtchm rows */
    SAVEPOINT T1;
    END IF;
    NULL;/*DECLARE CURSOR CLClaimAtchmCursor */
    /* Open the cursor */
    BEGIN
    StoO_error := 0;
    StoO_rowcnt := 0;
    StoO_crowcnt := 0;
    OPEN CLClaimAtchmCursor;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    NULL;
    WHEN OTHERS THEN
    StoO_error := SQLCODE;
    StoO_errmsg := SQLERRM;
    END;
    CLCClaim.ErrorNumber := StoO_error;
    IF CLCClaim.ErrorNumber <> 0 THEN
    GOTO ErrorHandler;
    END IF;
    BEGIN
    StoO_error := 0;
    StoO_rowcnt := 0;
    StoO_crowcnt := 0;
    FETCH CLClaimAtchmCursor INTO
    CLCClaim.Id, CLCClaim.ClsnId;
    EXCEPTION
    WHEN OTHERS THEN
    StoO_rowcnt := 0;
    StoO_selcnt := 0;
    StoO_error := SQLCODE;
    StoO_errmsg := SQLERRM;
    END;
    IF CLClaimAtchmCursor%NOTFOUND THEN
    StoO_sqlstatus := 2;
    StoO_fetchstatus := -1;
    ELSE
    StoO_sqlstatus := 0;
    StoO_fetchstatus := 0;
    END IF;
    END CLCClaim;
    If this is not sufficient please give a complete testcase and migration workbench version to support email address: [email protected] so the bug can be reproduced and logged.
    Turloch
    Oracle Migration Workbench Team

  • [Microsoft][ODBC SQL Server Driver][SQL Server]Could not find stored procedure 'dbo.sp_SPNAMEHERE'.

    OK, something seemed to have changed with my system because this error is NEW. It might be related to my system upgrade from Vista to Win7, but just guessing here.
    I run a database on a corporate MS Sql Server (2005) and an ASP application that connects via ODBC. The real world application works fine, however when I attempt to access Stored Procedures from Dreamweaver (on my development machine)  I am getting the following error:
    [Microsoft][ODBC SQL Server Driver][SQL Server]Could not find stored procedure 'dbo.sp_SPNAMEHERE'.
    This only seems to happen on Stored procedures that RETURN a recordset.
    system:
    Win7
    Dreamweaver CS4
    Code: VBScript/Classic ASP
    SQL Server 2005
    Connecting via ODBC: MM_MY_STRING = "Driver={SQL Server};Server=wscxxxxxxxxx;Database=dbsystem;Uid=username;Pwd=XXXXXXXXXXXX"
    Stored procedures that do not return a recordset are not an issue.... this has put my development work at a standstill!!
    Thanks in advance!

    Well, I hate bumps, but I am really running out of solutions. I have now tried to use a system DSN on my development machine and that didnt solve the problem. I just un-installed DW and re-installed it and that didnt solve my problem either.
    This is very frustrating, because I cannot use any stored procs that return recordsets... I am stuck... can anybody think of a relatively easy work-around to working in DW w/ recordsets that come from SPs when you cant actually access them?
    The really weird thing is, when I build the command, and choose the stored proc, and give it valid input variables, and TEST it from the TEST button, everything works and data is returned as expected. Once I click "OK" and actually add it to the ASP page the recordset that should be visible isnt... and when I click the plus sign in the bindings window I get the error...
    Help!!

  • How do I merge data from table1 on server 1 to final table on server 2 with a stored procedure to execute every so many hours.

    How do I merge data from table1 on server 1 to final table on server 2 with a stored procedure to execute every so
    many hours.

    How big is the table on server B? Is that possible to bring the all data into a server A and merge the data locally?
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How do I merge data from table1 on server 1 to final table on server 2 with a stored procedure to execute every 4 hours.

    How do I merge data from table1 on server 1 to final table on server 2 with a stored procedure to execute every so many hours.

    Hello,
    If you had configure server2 as
    linked server on the server1, you can run the following statement inside stored proceduce to copy table data. And then create a job to the run stored proceduce every 4 hours.
    Insert Into Server2.Database2.dbo.Table2
    (Cols)
    Select Cols From Server1.Database1.dbo.Table1
    Or you can use the SQL Server Import and Export Wizard to export the data from server1 to server2, save the SSIS package created by the wizard on the SQL Server, create a job to run the SSIS package. 
    Reference:http://technet.microsoft.com/en-us/library/ms141209.aspx
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Trying to install features for PowerPivot and Reporting Services from SQL Server 2012 with SP2, but no access to key?

    Hi,
    I had installed SQL Server 2012 PowerPivot on WFE and App Server. This is test farm with 1 WFE and 1 APP and 1 SQL Server.
    However, we had a heap of issues with Windows Claims Authentication and PowerPivot - issues were raised with "unable to make a connection to EntityDataSource" . Now we uninstalled the PowerPivot and Reporting Services features and wanted to install
    with the SQL Server 2012 with SP2. Originally SP2 was installed seperately and we had read there had been issues.
    Anyway on trying to install the features again using the SQL Server 2012 with SP2 iso I get 
    Could not open key UNKNOWN\Components
    I don't want to start deleting or changing permissions as quite dodgey. What is this key for anyway and how do I resolve my issue.
    Thanks.
    John.

    Hi John,
    Did you meet the error message during the process of configuring the PowerPivot for SharePoint?
    If yes, I suppose that the existing features or components have not been uninstalled completely.
    I recommend to delete the two keys left when uninstalling the PowerPivot and please make a copy of the registry keys before you delete the two keys:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\15.0\WSS\ServiceProxies\Microsoft.AnalysisServices.Sharepoint.Integration.MidTierServiceProxy
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\15.0\WSS\ServiceProxies\Microsoft.AnalysisServices.Sharepoint.Integration.MidTierServicea
    Please check the steps in the link below to see if there anything wrong when you uninstalling the PowerPivot and then re-install it to see how it works:
    https://technet.microsoft.com/en-us/library/ff487866(v=sql.110).aspx
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • SQL Server Replication with MYSQL DB on web

    Hi Friends,
    I want to inquire that using sqlserver 2012 we can configure transactional replication between MYSQL DB on web to sqlserver 2012. Tables will be residing on MYSQL DB web to SQLSERVER 2012. using sqlserver replication as option (publisher and subscriber)
    thank you.
    regards,
    asad
    asad

    Hi Asad,
    I suspect you want the replication done using a SSIS package, this is why you posted your question here.
    I then need to disappoint you, neither SSIS nor anything in the standard SQL Server distribution exists that will make this happen.
    In the field the devs typically use 3rd party tools, or write a lot of custom code which results in a custom tailored application
    Thread https://social.msdn.microsoft.com/Forums/sqlserver/en-US/fbfeb2a8-9875-4590-b367-018bb7777b3c/is-it-possible-to-set-up-a-replication-between-sql-server-2008r2-and-mysql-v4?forum=transactsql has many such options listed.
    Arthur
    MyBlog
    Twitter

  • Permissions needed for sql server job to execute stored procedure on linked server?

    Hi all
    I have a job step which attempts to call a stored procedure on a linked server.
    This step is failing with a permission denied error. How can I debug or resolve this?
    The job owner is sysadmin on both servers so should have execute permission to the database/proc I'm calling, right?
    The error is:
    The EXECUTE permission was denied on the object 'myProc', database 'myDatabase', schema 'dbo'. [SQLSTATE 42000] (Error 229).  The step failed.
    My code is:
    EXEC [LinkedServer].myDatabase.dbo.myProc
    Also tried:
    SELECT * FROM OPENQUERY([LinkedServer], 'SET FMTONLY OFF EXEC myDatabase.dbo.myProc')
    With the same result.
    Any help appreciated.

    The job owner may be sysadmin on the remote server. The service account for SQL Server Agent may not. And it is the latter that counts, since the it the service accounts that logs in and impersonates the job owner. But the impersonation inside SQL Server
    does not count much in Windows, and it is through Windows connection is made to the other site.
    One way to resolve this is to set up a login mapping for the job owner. The login mapping must be for an SQL login on the remote server.
    You can verify the theory, but running this query from the job:
       SELECT * FROM OPENQUERY([LinkedServer], 'SELECT SYSTEM_USER')
    By the way, putting SET FMTONLY OFF in OPENQUERY is a terrible idea. This has the effect that the procedure is executed twice. (Unless both servers are SQL 2012 or higher in which case FMTONLY has no effect at all.)
    Erland Sommarskog, SQL Server MVP, [email protected]

  • SQL Server Service Broker Updating Stored procedure

    how can you update the service broker stored procedure. when i update the stored procedure the changes dont come into affect. i have tried to alter the queue, waited for all jobs to finish, but some how still the old stored procedure is running. is there any
    way i can force changes to the stored procedure.
    i have tried sql profiler tracing but that didnt show any changes.
    I cannot alter the service broker stored procedure, when I update the stored procedure it does not show any error and successfully gets updated but the changes does not come into affect.
    Is it because I need to stop the queue of the service broker on both databases before the changes could come into affect?
    Note: the service broker stored procedures produce and read xmls.

    Presumably, this is because the procedure is executing when you alter the procedure. And if the procedure never exits, the old code will keep on running. One way to address this is to have the procedure to return if a new message has not been picked up in,
    say, 1000 milliseconds.
    Here is a repro to shows what I'm talking about.
    ------------------------------- Service Broker Objects ------------------------------------------
    CREATE MESSAGE TYPE OrderRequest VALIDATION = NONE
    CREATE MESSAGE TYPE OrderResponse VALIDATION = NONE
    go
    CREATE CONTRACT OrderContract
       (OrderRequest SENT BY INITIATOR,
        OrderResponse SENT BY TARGET)
    go
    CREATE QUEUE OrderRequests WITH STATUS = OFF
    CREATE QUEUE OrderResponses WITH STATUS = ON
    go
    CREATE SERVICE OrderRequests ON QUEUE OrderRequests (OrderContract)
    CREATE SERVICE OrderResponses ON QUEUE OrderResponses (OrderContract)
    go
    -- Procedure to send a message and receive a response.
    CREATE PROCEDURE send_and_get_answer AS
    DECLARE @handle uniqueidentifier,
             @binary varbinary(MAX)
          SELECT @binary = CAST (N'Kilroy was here' AS varbinary(MAX))
          BEGIN DIALOG CONVERSATION @handle
          FROM  SERVICE OrderResponses
          TO    SERVICE 'OrderRequests'
          ON    CONTRACT OrderContract
          WITH ENCRYPTION = OFF
          ;SEND ON CONVERSATION @handle
          MESSAGE TYPE OrderRequest (@binary)
       WAITFOR (RECEIVE TOP (1)
                         @handle = conversation_handle,
                         @binary = message_body
                FROM    OrderResponses)
       SELECT cast(@binary AS nvarchar(MAX)) AS response
       END CONVERSATION @handle
    go
    -- Procedure to process a message
    CREATE PROCEDURE ProcessOrders AS
    SET NOCOUNT, XACT_ABORT ON
    DECLARE @DialogHandle  uniqueidentifier,
            @MessageType   sysname,
            @binarydata    varbinary(MAX)
    -- Get next message of the queue.
    WAITFOR (
       RECEIVE TOP (1) @DialogHandle = conversation_handle,
                         @MessageType  = message_type_name,
                         @binarydata   = message_body
       FROM    OrderRequests
    SELECT @binarydata = CAST( reverse( CAST( @binarydata AS nvarchar(MAX) )) AS varbinary(MAX))
    ; SEND ON CONVERSATION @DialogHandle
    MESSAGE TYPE OrderResponse (@binarydata)
    END CONVERSATION @DialogHandle
    go       
    -- Make this an activaton procedure.
    ALTER QUEUE OrderRequests WITH
          STATUS = ON,
          ACTIVATION (STATUS = ON,
                      PROCEDURE_NAME = ProcessOrders,
                      MAX_QUEUE_READERS = 1,
                      EXECUTE AS OWNER)
    go
    -------------------------------- Send a message  -------------------------------------------
    EXEC send_and_get_answer
    go
    ------------------------ Change the procedure --------------------------------
    ALTER PROCEDURE ProcessOrders AS
    SET NOCOUNT, XACT_ABORT ON
    DECLARE @DialogHandle  uniqueidentifier,
            @MessageType   sysname,
            @binarydata    varbinary(MAX)
    -- Get next message of the queue.
    WAITFOR (
       RECEIVE TOP (1) @DialogHandle = conversation_handle,
                         @MessageType  = message_type_name,
                         @binarydata   = message_body
       FROM    OrderRequests
    SELECT @binarydata = CAST( upper( CAST( @binarydata AS nvarchar(MAX) )) AS varbinary(MAX))
    ; SEND ON CONVERSATION @DialogHandle
    MESSAGE TYPE OrderResponse (@binarydata)
    END CONVERSATION @DialogHandle
    go
    -------------------------------- Send new message -------------------------------------------
    EXEC send_and_get_answer    -- Still produces a message in reverse.
    EXEC send_and_get_answer    -- Now we get the expected result.
    go
    DROP SERVICE OrderRequests
    DROP SERVICE OrderResponses
    DROP QUEUE OrderRequests
    DROP QUEUE OrderResponses
    DROP PROCEDURE ProcessOrders
    DROP PROCEDURE send_and_get_answer
    DROP CONTRACT OrderContract
    DROP MESSAGE TYPE OrderRequest
    DROP MESSAGE TYPE OrderResponse
    go
    Erland Sommarskog, SQL Server MVP, [email protected]

  • SQL Server connection in Java Stored Procedures

    Is it possible to establish a connection to microsoft sql server through java stored procedures. When I try to create a connetion to SQL Server I am getting the following exception in trace file
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
    at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)
    at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)
    at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)
    at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
    at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(DriverManager.java)
    at java.sql.DriverManager.getConnection(DriverManager.java)
    The connection details are correct and I am able to connect when I run the java code externally. Thanks in advance for the help

    Can you connect to the MSSQL database from inside Oracle in (say) a SQL*Plus or SQL Developer session?
    In other words, is the problem in the Java or the database linkages? Are you using Heterogeneous Services or Transparent Gateways?
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • How to stop SQL Server Agent Job if Stored Procedure returns value 0

    I have SQL Server 2012 SSIS.
    I have 2 SSIS packages.
    I have created SQL Server Agent Job for running packages.
    I have created steps. If first step have run succesfully next step is run.
    I have need to add new logic.
    I have validation stored procedure, which validate DB table values and returns 1 or 0.
    I would like to create logic where first of all this SP is runned. Return value of SP determines if steps are run or not.
    I was thinking to use Execute SQL Task for running SP.
    If value 1 is returned, then run rest of Tasks is run.
    If value 0 is returned, what should I do so that Job is stopped? I need assistance! 
    I want current step to stop never moved to next step.
    Is there any SSIS tasks, which can stop the Job?
    Or should I make Step for running validation SP?
    How to do so that if value 0 is returned stop Job.
    Kenny_I

    Please refer the below link:
    http://technet.microsoft.com/en-us/library/aa260308(v=sql.80).aspx
    Please read Remarks carefully!!!
    Remarks
    If a job is currently executing a step of type CmdExec, the process being run (for example, MyProgram.exe) is forced to end prematurely. Premature ending can result in unpredictable behavior such as files in use by the process being held open. Consequently,
    sp_stop_job should be used only in extreme circumstances if the job contains steps of type CmdExec.
    Permissions
    Execute permissions default to the public role in the
    msdb database. A user who can execute this procedure and is a member of the
    sysadmin fixed role can stop any job. A user who is not a member of the
    sysadmin role can use sp_stop_job to stop only the jobs he/she owns.
    When sp_stop_job is invoked by a user who is a member of the
    sysadmin fixed server role, sp_stop_job will be executed under the security context in which the SQL Server service is running. When the user is not a member of the
    sysadmin group, sp_stop_job will impersonate the SQL Server Agent proxy account, which is specified using
    xp_sqlagent_proxy_account. If the proxy account is not available,
    sp_stop_job will fail. This is only true for Microsoft® Windows® NT 4.0 and Windows 2000. On Windows 9.x, there is no impersonation and
    sp_stop_job is always executed under the security context of the Windows 9.x user who started SQL Server.

  • Network requirements for SQL Server Replication

    Hi,
    Can any one tell me what is network requirements for SQL Server replication.
    I have successfully configured the replication on LAN with active directory but I am unable to configure it on WAN.
    Can anyone tell me how WAN can be configured for sql server replication. 
    Any help in this regard will be highly appreciated.
    Regards,
    Muhammad Imran

    Hi Muhammad,
    In addition to Prashanth’s post, please also check the following things  to optimize SQL Server replication with a WAN link.
    • Initialize the Subscriber from a backup.
    Publishing the execution of stored procedures as opposed to replicating each operation performed by the stored procedure.
    Leveraging Subscription Streams.
    For more information, please review the following blog:
    http://sqlblog.com/blogs/argenis_fernandez/archive/2011/05/31/transactional-replication-and-wan-links.aspx
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • Database Services Engine Failed, SQL Server Replication Failed, Full Text Search Failed, Reporting Services Failed

    Hello,
    I am trying to install Microsoft SQL Server 2008 R2. I get the error bellow (Database Services Engine Failed, SQL Server Replication Failed, Full Text Search Failed, Reporting Services Failed). I already have a copy of SQL Server 2008 R2 on the machine.
    I want to create a new named instance of SQL Server for some software I'm installing.
    The error is below.
    Any help would be much appreciated, thanks!
    Overall summary:
      Final result:                  SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then
    rerun SQL Server Setup.
      Exit code (Decimal):           -595541211
      Exit facility code:            1152
      Exit error code:               49957
      Exit message:                  SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then
    rerun SQL Server Setup.
      Start time:                    2014-02-06 09:14:09
      End time:                      2014-02-06 11:18:16
      Requested action:              Install
      Log with failure:              C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140206_091302\Detail.txt
      Exception help link:           http%3a%2f%2fgo.microsoft.com%2ffwlink%3fLinkId%3d20476%26ProdName%3dMicrosoft%2bSQL%2bServer%26EvtSrc%3dsetup.rll%26EvtID%3d50000%26ProdVer%3d10.50.2500.0%26EvtType%3d0x44D4F75E%400xDC80C325
    Machine Properties:
      Machine name:                  BAHPBZ52TY
      Machine processor count:       4
      OS version:                    Windows 7
      OS service pack:               Service Pack 1
      OS region:                     United States
      OS language:                   English (United States)
      OS architecture:               x64
      Process architecture:          64 Bit
      OS clustered:                  No
    Product features discovered:
      Product              Instance             Instance ID                   
    Feature                                  Language            
    Edition              Version         Clustered
      Sql Server 2008 R2   SQLEXPRESS           MSSQL10_50.SQLEXPRESS          Database Engine Services                
    1033                 Express Edition      10.50.1600.1    No        
      Sql Server 2008 R2                                                      
    Management Tools - Basic                 1033                 Express Edition     
    10.50.1600.1    No        
    Package properties:
      Description:                   SQL Server Database Services 2008 R2
      ProductName:                   SQL Server 2008 R2
      Type:                          RTM
      Version:                       10
      Installation location:         c:\c7ced2c86d6b9813b28186cc831c2054\x64\setup\
      Installation edition:          EXPRESS_ADVANCED
      Slipstream:                    True
      SP Level                       1
    User Input Settings:
      ACTION:                        Install
      ADDCURRENTUSERASSQLADMIN:      True
      AGTSVCACCOUNT:                 NT AUTHORITY\NETWORK SERVICE
      AGTSVCPASSWORD:                *****
      AGTSVCSTARTUPTYPE:             Disabled
      ASBACKUPDIR:                   Backup
      ASCOLLATION:                   Latin1_General_CI_AS
      ASCONFIGDIR:                   Config
      ASDATADIR:                     Data
      ASDOMAINGROUP:                 <empty>
      ASLOGDIR:                      Log
      ASPROVIDERMSOLAP:              1
      ASSVCACCOUNT:                  <empty>
      ASSVCPASSWORD:                 *****
      ASSVCSTARTUPTYPE:              Automatic
      ASSYSADMINACCOUNTS:            <empty>
      ASTEMPDIR:                     Temp
      BROWSERSVCSTARTUPTYPE:         Disabled
      CONFIGURATIONFILE:             
      CUSOURCE:                      
      ENABLERANU:                    True
      ENU:                           True
      ERRORREPORTING:                False
      FARMACCOUNT:                   <empty>
      FARMADMINPORT:                 0
      FARMPASSWORD:                  *****
      FEATURES:                      SQLENGINE,REPLICATION,FULLTEXT,RS,SSMS,SNAC_SDK,OCS
      FILESTREAMLEVEL:               0
      FILESTREAMSHARENAME:           <empty>
      FTSVCACCOUNT:                  NT AUTHORITY\LOCAL SERVICE
      FTSVCPASSWORD:                 *****
      HELP:                          False
      INDICATEPROGRESS:              False
      INSTALLSHAREDDIR:              c:\Program Files\Microsoft SQL Server\
      INSTALLSHAREDWOWDIR:           c:\Program Files (x86)\Microsoft SQL Server\
      INSTALLSQLDATADIR:             <empty>
      INSTANCEDIR:                   C:\Program Files\Microsoft SQL Server\
      INSTANCEID:                    aedt2bSQL
      INSTANCENAME:                  AEDT2BSQL
      ISSVCACCOUNT:                  NT AUTHORITY\NetworkService
      ISSVCPASSWORD:                 *****
      ISSVCSTARTUPTYPE:              Automatic
      NPENABLED:                     0
      PASSPHRASE:                    *****
      PCUSOURCE:                     c:\c7ced2c86d6b9813b28186cc831c2054\PCUSOURCE
      PID:                           *****
      QUIET:                         False
      QUIETSIMPLE:                   False
      ROLE:                          AllFeatures_WithDefaults
      RSINSTALLMODE:                 DefaultNativeMode
      RSSVCACCOUNT:                  NT AUTHORITY\NETWORK SERVICE
      RSSVCPASSWORD:                 *****
      RSSVCSTARTUPTYPE:              Automatic
      SAPWD:                         *****
      SECURITYMODE:                  SQL
      SQLBACKUPDIR:                  <empty>
      SQLCOLLATION:                  SQL_Latin1_General_CP1_CI_AS
      SQLSVCACCOUNT:                 NT AUTHORITY\NETWORK SERVICE
      SQLSVCPASSWORD:                *****
      SQLSVCSTARTUPTYPE:             Automatic
      SQLSYSADMINACCOUNTS:           BAH\568385
      SQLTEMPDBDIR:                  <empty>
      SQLTEMPDBLOGDIR:               <empty>
      SQLUSERDBDIR:                  <empty>
      SQLUSERDBLOGDIR:               <empty>
      SQMREPORTING:                  False
      TCPENABLED:                    0
      UIMODE:                        AutoAdvance
      X86:                           False
      Configuration file:            C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140206_091302\ConfigurationFile.ini
    Detailed results:
      Feature:                       Database Engine Services
      Status:                        Failed: see logs for details
      MSI status:                    Passed
      Configuration status:          Failed: see details below
      Configuration error code:      0xDC80C325
      Configuration error description: Access is denied
      Configuration log:             C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140206_091302\Detail.txt
      Feature:                       SQL Client Connectivity SDK
      Status:                        Passed
      MSI status:                    Passed
      Configuration status:          Passed
      Feature:                       SQL Server Replication
      Status:                        Failed: see logs for details
      MSI status:                    Passed
      Configuration status:          Failed: see details below
      Configuration error code:      0xDC80C325
      Configuration error description: Access is denied
      Configuration log:             C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140206_091302\Detail.txt
      Feature:                       Full-Text Search
      Status:                        Failed: see logs for details
      MSI status:                    Passed
      Configuration status:          Failed: see details below
      Configuration error code:      0xDC80C325
      Configuration error description: Access is denied
      Configuration log:             C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140206_091302\Detail.txt
      Feature:                       Reporting Services
      Status:                        Failed: see logs for details
      MSI status:                    Passed
      Configuration status:          Failed: see details below
      Configuration error code:      0xDC80C325
      Configuration error description: Access is denied
      Configuration log:             C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140206_091302\Detail.txt
      Feature:                       Management Tools - Basic
      Status:                        Passed
      MSI status:                    Passed
      Configuration status:          Passed
      Feature:                       Microsoft Sync Framework
      Status:                        Passed
      MSI status:                    Passed
      Configuration status:          Passed
    Rules with failures:
    Global rules:
    Scenario specific rules:
    Rules report file:               C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140206_091302\SystemConfigurationCheck_Report.htm

    Hello,
    If you see error descriptioon it gives access denied so basically it is because of some access issue.I guess You must be using some domin account for installation make sure it is  added as local administrator also instead of using NT Authority network
    service  as SQL server service account use local system account .
    Below link would help
    http://serverfault.com/questions/212135/access-is-denied-error-installing-sql-server-2008-on-windows-7
    You can also browse to setup.exe file and RK on it and select run as administrator
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Database engine services and sql server replication failed in installation

    hi im trying to setup sql server on my laptop but it says the 'database engine services' and 'sql server replication' have failed due to some specified module being missing can anyone help me out?
    log file:
    Overall summary:
      Final result:                  Failed: see details below
      Exit code (Decimal):           -2147467259
      Start time:                    2015-03-17 10:47:47
      End time:                      2015-03-17 11:08:11
      Requested action:              Install
    Setup completed with required actions for features.
    Troubleshooting information for those features:
      Next step for SQLEngine:       Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Next step for Replication:     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
    Machine Properties:
      Machine name:                  SHARI
      Machine processor count:       2
      OS version:                    Future Windows Version
      OS service pack:               
      OS region:                     United States
      OS language:                   English (United States)
      OS architecture:               x64
      Process architecture:          32 Bit
      OS clustered:                  No
    Product features discovered:
      Product              Instance             Instance ID                   
    Feature                                  Language            
    Edition              Version         Clustered
      SQL Server 2008      SQLEXPRESS           MSSQL10.SQLEXPRESS             Database Engine Services                
    1033                 Express Edition      10.1.2531.0     No        
      SQL Server 2008      SQLEXPRESS           MSSQL10.SQLEXPRESS             SQL Server Replication                  
    1033                 Express Edition      10.1.2531.0     No        
      SQL Server 2012                                                         
    Management Tools - Basic                 1033                 Express Edition     
    11.0.2100.60    No        
      SQL Server 2012                                                         
    LocalDB                                  1033                
    Express Edition      11.0.2100.60    No        
    Package properties:
      Description:                   Microsoft SQL Server 2012 Service Pack 1
      ProductName:                   SQL Server 2012
      Type:                          RTM
      Version:                       11
      SPLevel:                       0
      Installation location:         c:\efa3a640a9b59ee651913f55719bf3b1\x86\setup\
      Installation edition:          Express
    Product Update Status:
      None discovered.
    User Input Settings:
      ACTION:                        Install
      ADDCURRENTUSERASSQLADMIN:      true
      AGTSVCACCOUNT:                 NT AUTHORITY\NETWORK SERVICE
      AGTSVCPASSWORD:                *****
      AGTSVCSTARTUPTYPE:             Disabled
      ASBACKUPDIR:                   Backup
      ASCOLLATION:                   Latin1_General_CI_AS
      ASCONFIGDIR:                   Config
      ASDATADIR:                     Data
      ASLOGDIR:                      Log
      ASPROVIDERMSOLAP:              1
      ASSERVERMODE:                  MULTIDIMENSIONAL
      ASSVCACCOUNT:                  <empty>
      ASSVCPASSWORD:                 <empty>
      ASSVCSTARTUPTYPE:              Automatic
      ASSYSADMINACCOUNTS:            <empty>
      ASTEMPDIR:                     Temp
      BROWSERSVCSTARTUPTYPE:         Manual
      CLTCTLRNAME:                   <empty>
      CLTRESULTDIR:                  <empty>
      CLTSTARTUPTYPE:                0
      CLTSVCACCOUNT:                 <empty>
      CLTSVCPASSWORD:                <empty>
      CLTWORKINGDIR:                 <empty>
      COMMFABRICENCRYPTION:          0
      COMMFABRICNETWORKLEVEL:        0
      COMMFABRICPORT:                0
      CONFIGURATIONFILE:             
      CTLRSTARTUPTYPE:               0
      CTLRSVCACCOUNT:                <empty>
      CTLRSVCPASSWORD:               <empty>
      CTLRUSERS:                     <empty>
      ENABLERANU:                    true
      ENU:                           true
      ERRORREPORTING:                true
      FEATURES:                      SQLENGINE, REPLICATION
      FILESTREAMLEVEL:               0
      FILESTREAMSHARENAME:           <empty>
      FTSVCACCOUNT:                  <empty>
      FTSVCPASSWORD:                 <empty>
      HELP:                          false
      IACCEPTSQLSERVERLICENSETERMS:  true
      INDICATEPROGRESS:              false
      INSTALLSHAREDDIR:              c:\Program Files\Microsoft SQL Server\
      INSTALLSHAREDWOWDIR:           c:\Program Files (x86)\Microsoft SQL Server\
      INSTALLSQLDATADIR:             <empty>
      INSTANCEDIR:                   C:\Program Files (x86)\Microsoft SQL Server\
      INSTANCEID:                    SHARIINSTANCE
      INSTANCENAME:                  SHARIINSTANCE
      ISSVCACCOUNT:                  NT AUTHORITY\Network Service
      ISSVCPASSWORD:                 <empty>
      ISSVCSTARTUPTYPE:              Automatic
      MATRIXCMBRICKCOMMPORT:         0
      MATRIXCMSERVERNAME:            <empty>
      MATRIXNAME:                    <empty>
      NPENABLED:                     0
      PID:                           *****
      QUIET:                         false
      QUIETSIMPLE:                   false
      ROLE:                          AllFeatures_WithDefaults
      RSINSTALLMODE:                 DefaultNativeMode
      RSSHPINSTALLMODE:              DefaultSharePointMode
      RSSVCACCOUNT:                  <empty>
      RSSVCPASSWORD:                 <empty>
      RSSVCSTARTUPTYPE:              Automatic
      SAPWD:                         <empty>
      SECURITYMODE:                  <empty>
      SQLBACKUPDIR:                  <empty>
      SQLCOLLATION:                  SQL_Latin1_General_CP1_CI_AS
      SQLSVCACCOUNT:                 NT Service\MSSQL$SHARIINSTANCE
      SQLSVCPASSWORD:                <empty>
      SQLSVCSTARTUPTYPE:             Automatic
      SQLSYSADMINACCOUNTS:           SHARI\Shari Donald
      SQLTEMPDBDIR:                  <empty>
      SQLTEMPDBLOGDIR:               <empty>
      SQLUSERDBDIR:                  <empty>
      SQLUSERDBLOGDIR:               <empty>
      SQMREPORTING:                  true
      TCPENABLED:                    0
      UIMODE:                        AutoAdvance
      UpdateEnabled:                 true
      UpdateSource:                  MU
      X86:                           true
      Configuration file:            C:\Program Files (x86)\Microsoft SQL Server\110\Setup Bootstrap\Log\20150317_104244\ConfigurationFile.ini
    Detailed results:
      Feature:                       Database Engine Services
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred during the setup process of the feature.
      Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          0x80004005
      Error description:             The specified module could not be found.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xEC717F7D%400xC24842DB&EvtType=0xEC717F7D%400xC24842DB
      Feature:                       SQL Server Replication
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          0x80004005
      Error description:             The specified module could not be found.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xEC717F7D%400xC24842DB&EvtType=0xEC717F7D%400xC24842DB
      Feature:                       SQL Browser
      Status:                        Passed
      Feature:                       SQL Writer
      Status:                        Passed
    Rules with failures:
    Global rules:
    Scenario specific rules:
    Rules report file:               C:\Program Files (x86)\Microsoft SQL Server\110\Setup Bootstrap\Log\20150317_104244\SystemConfigurationCheck_Report.htm

    Hello,
    As per the log details shared, installing version is SQL server express. Please go to control panel - add and remove programs and uninstall the
    SQL Server Database Engine Services Instance Features, and also Uninstall all SQL Services.
    Reboot and start the start the installation with RUN as Administrator.
    Thank You.
    Regards, Pradyothana DP. Please Mark This As Helpful if it helps to solve your issue. ========================================================== http://www.dbainhouse.blogspot.in/

  • SQL Server 2012 express istallation failing to install "Database Engine Service" and "SQL Server Replication"

    I ran SQL Server 2012 express setup as user with administrator privileges and still it's failing to install "Database Engine Service" and "SQL Server Replication".
    Any and every ideas on how to resolve this issue is greatly appreciated.

    Three weeks passed and I am yet to find a fix for the the failed installation of the database engine on sql server 2012 express installation. I have tried various work-around including uninstalling, deleting all the directory paths, and reinstallation. Still
    not able to successfully install sql server 2012 express.
    I will greatly appreciate any and every contribution towards resolving this issue. Thanks in advance.
    Here is the content of log file after the latest failed installation:
    Overall summary:
      Final result:                  Failed: see details below
      Exit code (Decimal):           -2061893607
      Start time:                    2013-12-23 14:42:45
      End time:                      2013-12-23 15:07:51
      Requested action:              Install
    Setup completed with required actions for features.
    Troubleshooting information for those features:
      Next step for SQLEngine:       Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Next step for Replication:     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
    Machine Properties:
      Machine name:                  mymachine1
      Machine processor count:       4
      OS version:                    Windows 7
      OS service pack:               Service Pack 1
      OS region:                     United States
      OS language:                   English (United States)
      OS architecture:               x86
      Process architecture:          32 Bit
      OS clustered:                  No
    Product features discovered:
      Product              Instance             Instance ID                   
    Feature                                  Language            
    Edition              Version         Clustered
      SQL Server 2012      SQLEXPRESS_GT        MSSQL11.SQLEXPRESS_GT          Database Engine Services                
    1033                 Express Edition      11.0.2100.60    No        
      SQL Server 2012      SQLEXPRESS_GT        MSSQL11.SQLEXPRESS_GT          SQL Server Replication                  
    1033                 Express Edition      11.0.2100.60    No        
      SQL Server 2012                                                         
    Management Tools - Basic                 1033                 Express Edition     
    11.0.2100.60    No        
    Package properties:
      Description:                   Microsoft SQL Server 2012 Service Pack 1
      ProductName:                   SQL Server 2012
      Type:                          RTM
      Version:                       11
      Installation location:         C:\9b6607e524727c7fe1defd80\x86\setup\
      Installation edition:          Express
      Slipstream:                    True
      SP Level                       1
    Product Update Status:
      Success: KB 2674319
    Product Updates Selected for Installation:
      Title:                         Service Pack 1
      Knowledge Based Article:       KB 2674319
      Version:                       11.1.3000.0
      Architecture:                  x86
      Language:                      1033
      Update Source:                 MU
    User Input Settings:
      ACTION:                        Install
      ADDCURRENTUSERASSQLADMIN:      true
      AGTSVCACCOUNT:                 NT AUTHORITY\NETWORK SERVICE
      AGTSVCPASSWORD:                *****
      AGTSVCSTARTUPTYPE:             Disabled
      ASBACKUPDIR:                   Backup
      ASCOLLATION:                   Latin1_General_CI_AS
      ASCONFIGDIR:                   Config
      ASDATADIR:                     Data
      ASLOGDIR:                      Log
      ASPROVIDERMSOLAP:              1
      ASSERVERMODE:                  MULTIDIMENSIONAL
      ASSVCACCOUNT:                  <empty>
      ASSVCPASSWORD:                 <empty>
      ASSVCSTARTUPTYPE:              Automatic
      ASSYSADMINACCOUNTS:            <empty>
      ASTEMPDIR:                     Temp
      BROWSERSVCSTARTUPTYPE:         Disabled
      CLTCTLRNAME:                   <empty>
      CLTRESULTDIR:                  <empty>
      CLTSTARTUPTYPE:                0
      CLTSVCACCOUNT:                 <empty>
      CLTSVCPASSWORD:                <empty>
      CLTWORKINGDIR:                 <empty>
      COMMFABRICENCRYPTION:          0
      COMMFABRICNETWORKLEVEL:        0
      COMMFABRICPORT:                0
      CONFIGURATIONFILE:             
      CTLRSTARTUPTYPE:               0
      CTLRSVCACCOUNT:                <empty>
      CTLRSVCPASSWORD:               <empty>
      CTLRUSERS:                     <empty>
      ENABLERANU:                    true
      ENU:                           true
      ERRORREPORTING:                false
      FEATURES:                      SQLENGINE, REPLICATION, CONN, BC, SDK, ADV_SSMS, SNAC_SDK
      FILESTREAMLEVEL:               0
      FILESTREAMSHARENAME:           <empty>
      FTSVCACCOUNT:                  <empty>
      FTSVCPASSWORD:                 <empty>
      HELP:                          false
      IACCEPTSQLSERVERLICENSETERMS:  true
      INDICATEPROGRESS:              false
      INSTALLSHAREDDIR:              c:\Program Files\Microsoft SQL Server\
      INSTALLSHAREDWOWDIR:           <empty>
      INSTALLSQLDATADIR:             <empty>
      INSTANCEDIR:                   C:\Program Files\Microsoft SQL Server\
      INSTANCEID:                    SQLEXPRESS
      INSTANCENAME:                  SQLEXPRESS
      ISSVCACCOUNT:                  NT AUTHORITY\Network Service
      ISSVCPASSWORD:                 <empty>
      ISSVCSTARTUPTYPE:              Automatic
      MATRIXCMBRICKCOMMPORT:         0
      MATRIXCMSERVERNAME:            <empty>
      MATRIXNAME:                    <empty>
      NPENABLED:                     0
      PID:                           *****
      QUIET:                         false
      QUIETSIMPLE:                   false
      ROLE:                          <empty>
      RSINSTALLMODE:                 DefaultNativeMode
      RSSHPINSTALLMODE:              DefaultSharePointMode
      RSSVCACCOUNT:                  <empty>
      RSSVCPASSWORD:                 <empty>
      RSSVCSTARTUPTYPE:              Automatic
      SAPWD:                         <empty>
      SECURITYMODE:                  <empty>
      SQLBACKUPDIR:                  <empty>
      SQLCOLLATION:                  SQL_Latin1_General_CP1_CI_AS
      SQLSVCACCOUNT:                 NT Service\MSSQL$SQLEXPRESS
      SQLSVCPASSWORD:                <empty>
      SQLSVCSTARTUPTYPE:             Manual
      SQLSYSADMINACCOUNTS:           MH\gt038676t
      SQLTEMPDBDIR:                  <empty>
      SQLTEMPDBLOGDIR:               <empty>
      SQLUSERDBDIR:                  <empty>
      SQLUSERDBLOGDIR:               <empty>
      SQMREPORTING:                  false
      TCPENABLED:                    0
      UIMODE:                        AutoAdvance
      UpdateEnabled:                 true
      UpdateSource:                  MU
      X86:                           false
      Configuration file:            C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20131223_144132\ConfigurationFile.ini
    Detailed results:
      Feature:                       Management Tools - Complete
      Status:                        Passed
      Feature:                       Client Tools Connectivity
      Status:                        Passed
      Feature:                       Client Tools SDK
      Status:                        Passed
      Feature:                       Client Tools Backwards Compatibility
      Status:                        Passed
      Feature:                       Management Tools - Basic
      Status:                        Passed
      Feature:                       Database Engine Services
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred during the setup process of the feature.
      Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          0x851A0019
      Error description:             Could not find the Database Engine startup handle.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3000.0&EvtType=0xE53883A0%400xBE03358B%401306%4025&EvtType=0xE53883A0%400xBE03358B%401306%4025
      Feature:                       SQL Server Replication
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          0x851A0019
      Error description:             Could not find the Database Engine startup handle.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3000.0&EvtType=0xE53883A0%400xBE03358B%401306%4025&EvtType=0xE53883A0%400xBE03358B%401306%4025
      Feature:                       SQL Browser
      Status:                        Passed
      Feature:                       SQL Writer
      Status:                        Passed
      Feature:                       SQL Client Connectivity
      Status:                        Passed
      Feature:                       SQL Client Connectivity SDK
      Status:                        Passed
    Rules with failures:
    Global rules:
    Scenario specific rules:
    Rules report file:               C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20131223_144132\SystemConfigurationCheck_Report.htm

Maybe you are looking for

  • Implemnet LYNC functionality in Sharepoint

    Hi All, I am new to sharepoint 2013 and LYNC , My requirement is as. 1. On home page we have a webpart on click of button inside that  a new page will load . This page will show all  LYNC contacts  of currently logged in user with there presence. 2.

  • PDF attachments in gmail

    Unable to open PDF file in Adobe application.  PDPs open in gmail but image size is fixed. Ipad2 iOS5 does not display open icon shown in Adobe reader app.

  • Second display problems

    I've tried to hook my macbook pro to 2 different displays, they both showed a very pink image, that gets more and more pink around the contours, I've tried calibration but it didn;t work

  • PO : Invoice value in ME23N is not matching with 2LIS_02_SCL field BWGEO

    Hi Expert,               1) Invoice value in ME23N tcode is not matching with datasource 2LIS_02_SCL field BWGEO in item level for few item BWGEO field contain the data with tax but for few item the value is not coming correctly. 2) The value is not

  • How to download a previous version of an object.

    Hi, one quick question: what is the easiest way to download a previous version of a source file in SCM? Say, for example, that I want to download v1.2 when the current (last) version is 1.4. Thanks in advance.