Sunday, 13 October 2013

enterprise library 5.0 logging and caching DB creation with Azure SQL Database

Step 1:
Download  and install the Enterprise library Azure integration packages from the below link
http://www.microsoft.com/en-us/download/details.aspx?id=28189

Step 2:
During the installation of EnterpriseLibraryIntegrationPack-WindowsAzure-sqlscripts, Installer will ask you to provide the location to extract the sql scripts.

Step 3:
There are certain script files will be created in the installation location.
CreateCachingDatabase.sql
CreateCachingDatabaseObjects.sql
CreateLoggingDatabase.sql
CreateLoggingDatabaseObjects.sql
savemessages.vbs
savemessages1.vbs
savemsg.bat
savemsg1.bat

Step 4:
Open MS-SSMS 2012 and connect your Azure SQL DB and Run  SQL scripts. First run the create database scripts and then run the relevant Object sql script by right click and selecting the new query in the relevant Database.

Step 5:
After the successful run, you can see the below tables created in your Azure SQL database instance.
DB: Logging

  • Category
  • CategoryLog
  • Log


DB:Caching
  • CacheData
I Hope this will be useful for you.  if you have any suggestions or comment, Kindly add it.

Regards,
-Gopal



Wednesday, 25 July 2012

Check DB size...


SELECT DB_NAME(database_id) AS DatabaseName,
Name AS Logical_Name,
Physical_Name, (size*8)/1024 SizeMB
FROM sys.master_files
WHERE DB_NAME(database_id) = 'BizTalkDTADb'
GO

Monday, 9 April 2012

VB Script to start send ports/enable receive locations in Biztalk.



strComputer = "."
Set oMessage = CreateObject("CDO.Message")
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\MicrosoftBizTalkServer")
Set colItems = objWMIService.ExecQuery( _
    "SELECT * FROM MSBTS_SendPort where   Status=2",,48)
For Each objItem in colItems
      objItem.Start
     oMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
      oMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.urmailserver.com"
      oMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
      oMessage.Configuration.Fields.Update
      oMessage.Subject = "Alerting text " &  objItem.Name
      oMessage.From = "myemailid@mymail.com"
      oMessage.To =  " myemailid@mymail.com ; myemailid1@mymail.com ; myemailid2@mymail.com "
      oMessage.TextBody = " Alerting text  " &  objItem.Name
      oMessage.Send
Next

VB Script to enable receive locatios in Biztalk.


strComputer = "."
Set oMessage = CreateObject("CDO.Message")
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\MicrosoftBizTalkServer")
Set colItems = objWMIService.ExecQuery( _
    "SELECT * FROM MSBTS_ReceiveLocation WHERE IsDisabled = True",,48)
For Each objItem in colItems
      objItem.Enable

  oMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
      oMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.urmailserver.com"
      oMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
      oMessage.Configuration.Fields.Update
      oMessage.Subject = "Alerting text " &  objItem.Name
      oMessage.From = "myemailid@mymail.com"
      oMessage.To =  " myemailid@mymail.com ; myemailid1@mymail.com ; myemailid2@mymail.com "
      oMessage.TextBody = " Alerting text  " &  objItem.Name
      oMessage.Send

Next

Just configure the above scripts with windows task scheduler, If any of send port/ receive locations stopped/disabled will send alert to E-mails mentioned in   oMessage.To and before sending e-mail alert, script also enable to receive location / start the send port.

If you have any issue to configure this , please let me know.

Thanks,
-Gopal 




Biztalk Terminator

Instead of terminate script or download script. Biztalk team recently released the tool called Biztalk terminator. it is very useful for biztalk instance termination, Message download and We can easily integrate Biztalk messagebox viewer. this  can be downloaded from the below link. More info or download please follow the below link

Friday, 13 January 2012


Biztalk 2009 MMC snap-IN

May be many of us seen that Biztalk 2009 have issue of MMC snap-in error. specifically after the application deployment or import the config file. There are some quick fix.

Fix 1: Just referesh the Admin console, if this fail
Fix 2: Restart WMI service, if this too fail
Fix 3 : Restart DTC service, this is the last option, but surely it will and it's worked for us.

If you know any best option other than these , please leave as a comment. 

Friday, 23 December 2011

Thursday, 22 December 2011


SSO error while start and stopping the application

An error of this form appears while trying to start/delete/restart the BizTalk application in Administration console:
"Could not store transport type data for Receive Location 'Recv.Loc' to config store. Primary SSO Server 'Sql-server' failed. The external credentials in the SSO database are more recent."
Error details are:
SSO AUDIT
Function: SetConfigInfo
Tracking ID: df1dd0b0-c9d5-4012-bb97-336aa8df78b3
Client Computer: BTS06-Platform.contoso.com (mmc.exe:1884)
Client User: BTS06-PLATFORM\Administrator
Application Name: {D2241406-0767-4C13-98EB-43EECE80F8A0}
Error Code: 0xC0002A40, The external credentials in the SSO database are more recent.
Description
This error arises when the system date is not correct.
·         Run the following query in SSODB database.
select dateadd(m,-1,ec_timestamp),* from SSODB..SSOX_ExternalCredentials
where datediff(m,ec_timestamp,getdate())<>0
select dateadd(year,-1,ec_timestamp),* from SSODB..SSOX_ExternalCredentials
where datediff(year,ec_timestamp,getdate())<>0
·         If any rows are retrieved then there has been some changes in the system date. Run the following query in case any rows are retrieved in the first case.
update SSODB..SSOX_ExternalCredentials set  ec_timestamp = dateadd(m,-1,ec_timestamp) where datediff(m,ec_timestamp,getdate())<>0
update SSODB..SSOX_ExternalCredentials set  ec_timestamp = dateadd(year,-1,ec_timestamp) where datediff(year,ec_timestamp,getdate())<>0
·         Now restart Host Instances and continue with the application.