I am adding this follow up, so anyone with an Microsoft SQL server database
will get the final outcome of this issue.
XWiki devs team does not officially support MS-SQL, however, with the great
help provided by Rob, I have been able to add basic support of MS-SQL into
the migration R40000XWIKI6990. See
 details. This fix will be
released in version 4.1.4 and 4.2M3. This
does not change our policy about supported databases, but it will surely
help those that have been successful running XWiki on MS-SQL up to now.
Many thanks to Rob for its very useful inputs and tests.
On Fri, Aug 3, 2012 at 4:19 PM, Denis Gervalle <dgl(a)softec.lu> wrote:
  Hi,
 At least, you have progressed, you achieved the configuration so that the
 migration was tried, but has failed.
 Your diagnosis about what happened seems to me quite right. We drop only
 FK constraints, and we do not care about any PK constraints, since our
 supported databases are not affected by this.
 Hopelessly, I cannot provide you with the liquibase changelogs, since
 these are generated on the fly for R40000XWIKI6990, depending on the source
 databases. Basically, it does <dropForeignKeyConstraint> for all FK found
 in the hibernate mapping table concerned by the ID changes, then
 <modifyDataType> to BIGINT for those IDs which have to be enlarged, and
 finally it <addForeignKeyConstraint> back with an onUpdate="CASCADE"
 (except for Oracle where it use initiallyDeferred=true).
 The above is probably not helping much. Since MSSQL is unsupported, you
 are on a little bit on your own with this, and I could only suggest some
 tricky ideas that may absolutely not work. Here is what you may try:
 1) from a fresh DB, launch the migration, it will fail but will have
 dropped the FK and it should not try again. This is your current state. You
 may check it does not try again by restarting the wiki again, and ensure
 that it fails at the same point.
 2) manually drop the PK constraints for all table having such definition
 for an IDs that has his datatype changed. Enlarged IDs are all those that
 are related to objects, and statistics.
 3) Restart the wiki, it should hopefully go further, and may probably fail
 when we try to put FK constraints back.
 4) manually recreate the PK constraints for all drop you have made.
 5) Restart the wiki again, and cross fingers ! If you are lucky, it will
 terminate liquibase updates, and start the data migration.
 Once again, these are only suggestions, and your chances for success
 are honestly quite low. Anyway, please let me know the outcome. If it does
 not work and you are willing to collaborate and could provide needed inputs
 and testing supports, I will try to find some time to work with you on
 improving our migration procedure. Contact me in private regarding this
 last point.
 Regards,
 On Fri, Aug 3, 2012 at 3:31 PM, rheim651 <rob.heim(a)mckesson.com> wrote:
  Okay, here is an Update:  Using the xwiki.cfg
file I posted to pastebin, I
 modified
 xwiki.store.migration=1
 After restarting the server I am still getting the exact same error
 message
 in the browser.
 Looking at the DATABASECHANGELOG from inside the target database, the
 Liquibase executions  get as far as removing the Foreign Keys.  It seems
 to
 fail when attempting to change the datatype on the Primary Key for
 xwikiobjects.
 In the stdout file I am now seeing the following liquibase error when
 attempting to change the datatype on the Primary Key for xwikiobjects to
 BIGINT.
 2012-08-03 08:21:00,691 [
http://10.43.30.38:9080/xwiki/bin/view/Main/]
 ERROR
 c.x.x.s.m.liquibase            - Change Set
 liquibase.xml::R40000-009::dgervalle failed.  Error: Error executing SQL
 ALTER TABLE [dbo].[xwikiobjects] ALTER COLUMN [XWO_ID] BIGINT: The object
 'PK__xwikiobj__6F7E67F86383C8BA' is dependent on column 'XWO_ID'.
 I believe the reason for this error is that on SQL Server the Primary Key
 constraint should to be dropped first before you can change the datatype.
 (At least that's what I found in my script testing).
 Would it be possible to see the liquibase changelogs for this migration?
 I'm not sure where in the package this information is stored.
 --
 View this message in context:
http://xwiki.475771.n2.nabble.com/Problem-Migrating-Database-from-XWiki-Ent…
 Sent from the XWiki- Users mailing list archive at 
Nabble.com.
 _______________________________________________
 users mailing list
 users(a)xwiki.org
 
http://lists.xwiki.org/mailman/listinfo/users
 
 --
 Denis Gervalle
 SOFTEC sa - CEO
 eGuilde sarl - CTO