There are a couple of problems with the Microsoft SqlServer upgrade scripts for the Openfire Enterprise plugin, which should be patched if you are upgrading to version 3.4.1 or earlier of the plugin. Later versions of the plugin should already have these fixes in place.
If, on startup, the openfire server is complaining that there were errors upgrading the openfire enterprise plugin database schema, you must replace the plugin upgrade scripts with the ones I have attached to this document. Remember to back up your database prior to attempting this repair, so that you can easily revert if something goes wrong.
Check the jiveVersion table in your database. If the version is '6' for enterprise, then this patch is for you. Otherwise, you have a different problem, and you should contact Jivesoftware support.
Stop the openfire server.
Go to the database upgrades folder for your enterprise plugin in the the openfire server installation directory:
openfire install directory\plugins\enterprise\database\upgrade
Find the upgrade folders with numbers matching the ones in the zip file. Replace the enterprise_sqlserver.sql file in those folders with the ones from the corresponding folders from the zip file. Notice that the zipped folder contains folders 7, 8, and 9. Only replace contents for those folders in your server install directories if they exist there! For example, if folders 8 and 9 don't exist in your server install directory, ignore those folders in the zip file.
Restart the openfire server, and observe that the enterprise plugin schema upgrade makes it all the way through 10. Verify in the jiveVersion table in your database that the version is now '10'.