venneker.net

.NET, BIZTALK, ESB, AZURE

Month: October 2019

Remove BizTalk orphans from tracking

Here a SQL Script to remove orphans from your BizTalk tracking. It sets an end date so they can be removed.

USE [biztalkDTADb]


UPDATE
    [dbo].[dta_ServiceInstances]

SET
    [dtEndTime] = GetUTCDate()
WHERE
    dtEndTime is NULL
    AND
    [uidServiceInstanceId] NOT IN
    (
    SELECT
        [uidInstanceID]
    FROM
        BizTalkMsgBoxDb.[dbo].[Instances] WITH (NOLOCK)
    UNION
    SELECT
        [StreamID]
    FROM
        BizTalkMsgBoxDb.[dbo].[TrackingData] WITH (NOLOCK)
    )

Lost admin rights on SQL Server

If you somehow lost your admin right on your dev SQL Server, here’s how you can add the logged in user account again.

You will have to start SQL Server in single user mode and than add the local account in the sysadmin role.

Start SQL Single user:
SQLServr.Exe –m

Add your account:
SQLCMD
1> SP_ADDSRVROLEMEMBER ‘’,’SYSADMIN’
2>go

© 2019 venneker.net

Theme by Anders NorénUp ↑