Tuesday, 19 September 2017

Automate GAC dll by Post-Build Event Command Line in Visual Studio

Batch Script:

echo off
set GAC_UTIL="C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\"
cd\
C:
cd\
cd
cd %GAC_UTIL%
cd
call GacUtil.exe -i %1

Post-Build Event Command Line:
call C:\xxxx\xxxx\xxxxx\test.bat $(TargetPath)

BRE:

Fact :

Facts are discrete pieces of information about the world.

Facts can originate from:
.NET objects (methods, properties, and fields)
XML documents (elements, attributes, and document subsections)
Database rowsets (values from table column)

In the Business Rule Composer, you can use the Facts Explorer to browse and bring data into your rules from various sources.

https://msdn.microsoft.com/en-us/library/aa561464.aspx
https://msdn.microsoft.com/en-us/library/aa560118.aspx


Vocabulary :

A vocabulary is a collection of definitions consisting of friendly names for the facts used in rule conditions and actions. Vocabulary definitions make the rules easier to read, understand, and share by people in a particular business domain.

Monday, 9 January 2017

BizTalk BRE SQL Script: Get rule set details by policy name


declare @vRuleSetID int
declare @publish int = 0
declare @policyName varchar(200)
set @policyName = '%Policy_ProductDetails_v1%'

SELECT @vRuleSetID  = nRuleSetID FROM [dbo].[re_ruleset]
where strName like @policyName


SELECT * FROM [dbo].[re_ruleset] where nRuleSetID = @vRuleSetID
SELECT * FROM [dbo].[re_tracking_id] where nRuleSetID = @vRuleSetID

Wednesday, 4 January 2017

Biztalk SQL Queries: Get List of receive locations , receive ports and host instance details by application name




select

   app.nvcName as ApplicationName,
   rp.nvcName,
   rl.Name,
   rl.InboundTransportURL
   ,host.Name

from bts_application as app

left join dbo.bts_receiveport as rp on rp.nApplicationID = app.nID
left join dbo.adm_ReceiveLocation as rl on rl.ReceivePortId = rp.nID

join [dbo].[adm_HostInstance] hi on hi.Id = rl.ReceiveHandlerId
join [dbo].[adm_Server2HostMapping]  hm on hi.Svr2HostMappingId =  hm.Id
join [dbo].[adm_Host] host  on hm.HostID = host.Id

where

app.nvcName like 'Application Name'


Biztalk SQL Queries: Get List of receive locations and receive ports details by application name

Biztalk SQL Queries: Get List of receive locations , receive ports and host instance details by application name





Tuesday, 3 January 2017

Biztalk SQL Queries: Get List of receive locations and receive ports details by application name




By Application Name:

select
   app.nvcName as ApplicationName,
   rp.nvcName,
   rl.Name,
   rl.InboundTransportURL

from bts_application as app

left join dbo.bts_receiveport as rp on rp.nApplicationID = app.nID
left join dbo.adm_ReceiveLocation as rl on rl.ReceivePortId = rp.nID
left join dbo.bts_receiveport_transform as rpt on rpt.nReceivePortID = rp.nID

where

app.nvcName like 'Application Name'


Biztalk SQL Queries: Get List of receive locations and receive ports details by application name

Wednesday, 5 October 2016

POWERSHELL: SQL Powershell script for table creation in database

[string] $Server= "database server name"
[string] $Database = "data base name"

[string] $cmdText = $("BEGIN TRY " +
"CREATE TABLE [dbo].[table_name]( [SAPID] [nvarchar](50) NULL, [Exception] [bit] NULL) " +
"END TRY  " +
"BEGIN CATCH  " +
      "print 'WARNING: ALREADY [table_name] TABLE EXIST'" +
"END CATCH  ")


$sqlConnection = new-object System.Data.SqlClient.SqlConnection $(“server={0};database={1};Integrated Security=sspi” -f $Server,$Database)


$Command = New-Object System.Data.SQLClient.SQLCommand
$Command.connection = $sqlConnection
$Command.commandtext = $cmdText

$sqlConnection.Open()

$Command.executescalar()

$sqlConnection.Close()



POWERSHELL SCRIPT: STRING.FORMAT

[string] $Server = ""
[string] $Database = ""

$(“server={0};database={1};Integrated Security=sspi” -f $Server,$Database)