repaced the creation of replica generation table with the code that uses normal DBAgent instance.
repaced the creation of replica tables with the code that uses normal DBAgent instance.
fixed updateDBIfNeeded() and getDBVersion() to use normal DBAgent instance.