OK. I see we where loading a compiled library. In this case you need to hint CINT to create the necessary entries in the dictionary for the template function instances.
// In UniDbTemplate.h
#ifdef __CINT__
#pragma link C++ function UniDbTemplate::template_example(int);
#pragma link C++ function UniDbTemplate::template_example(char*);
#else
template void UniDbTemplate::template_example(int);
template void UniDbTemplate::template_example(char*);
#endif
root [0]
Processing UniDbTemplate.cxx+...
Info in <TMacOSXSystem::ACLiC>: creating shared library /Users/mato/Development/ROOT/build.v5-34-00-patches/./UniDbTemplate_cxx.so
(class UniDbTemplate)140554436792496
root [1] UniDbTemplate::template_example(1);
1
root [2] UniDbTemplate::template_example("abc");
abc