You do not need to build alfresco-repository to add DB mappings for an alternative database. Even Alfresco does not do this for their support of MS SQL / Oracle / DB2. They bundle these additional mappings in a separate JAR. So Jeff's advice about using the SDK to build your extension is the best possible way. And as you may hopefully gleam from that other thread he linked to, you only need to provide the MS SQL specific mappings in a specific classpath location (bundled in your JAR) to be loaded based on the detected DB dialect (and inheritance from standard mappings). For MS SQL using the AlfrescoSQLServerDialect (dialect class already bundled in Community), the classpath location would be alfresco/ibatis/org.alfresco.repo.domain.hibernate.dialect/ for mapping XMLs, and alfresco/dbscripts/create/org.alfresco.repo.domain.hibernate.dialect/ as well as alfresco/dbscripts/update/org.alfresco.repo.domain.hibernate.dialect/ for bootstrapping SQL files.