Aldrich Blog

C# | BizTalk

BizTalk Database Customization

One of the problems we face during the development of BizTalk Application is that lack of space in the main drive C:\, Since we do default installation for MSSQL and BizTalk 2004, the Data File and Log Files is of course is installed in C:\Program Files\Microsoft SQL Server\MSSQL\Data.

To solve this is we have to move all BizTalk's DB from C:\ to another drive. Another thing is, we also do have the CovastDB which is used in X12 parsing which has to be moved also.

Note: Before performing this operation you should first stop the following services:

Enterprise Single Sign-On Services

BizTalk Service BizTalk Group : BizTalkServerApplication

Covast EDI Service

Script:

sp_detach_db 'BAMArchive'
sp_detach_db 'BAMPrimaryImport'
sp_detach_db 'BizTalkDTADB'
sp_detach_db 'BizTalkEDIDb'
sp_detach_db 'BizTalkHwsDb'
sp_detach_db 'BizTalkMgmtDb'
sp_detach_db 'BizTalkMsgBoxDb'
sp_detach_db 'BizTalkRuleEngineDb'
sp_detach_db 'SSODB'
sp_detach_db 'CovastDB'


sp_attach_db 'BAMArchive',
'E:\DBDat\BAMArchive.mdf',
'F:\DBLOG\BAMArchive_log.LDF'

sp_attach_db 'BAMPrimaryImport',
'E:\DBDat\BAMPrimaryImport.mdf',
'F:\DBLOG\BAMPrimaryImport_log.LDF'


sp_attach_db 'BizTalkDTADB',
'E:\DBDat\BizTalkDTADB.mdf',
'F:\DBLOG\BizTalkDTADB_log.LDF'

 

sp_attach_db 'BizTalkEDIDb',
'E:\DBDat\BizTalkEDIDb.mdf',
'F:\DBLOG\BizTalkEDIDb_log.LDF'

 

sp_attach_db 'BizTalkHwsDb',
'E:\DBDat\BizTalkHwsDb.mdf',
'F:\DBLOG\BizTalkHwsDb_log.LDF'


sp_attach_db 'BizTalkMgmtDb',
'E:\DBDat\BizTalkMgmtDb.mdf',
'F:\DBLOG\BizTalkMgmtDb_log.LDF'

sp_attach_db 'BizTalkMsgBoxDb',
'E:\DBDat\BizTalkMsgBoxDb.mdf',
'F:\DBLOG\BizTalkMsgBoxDb_log.LDF'

sp_attach_db 'BizTalkRuleEngineDb',
'E:\DBDat\BizTalkRuleEngineDb.mdf',
'F:\DBLOG\BizTalkRuleEngineDb_log.LDF'

sp_attach_db 'SSODB',
'E:\DBDat\SSODB.mdf',
'F:\DBLOG\SSODB_log.LDF'


sp_attach_db 'CovastDB',
'E:\DBDat\CovastDB.mdf',
'F:\DBLOG\CovastDB_log.LDF'

Luckily, BizTalk 2004 and Covast still work.