3
votes

When I use CFDBINFO on my local system, it accurately picks up default column values and returns them. On a different system, it does not (it doesn't seem to notice any default constraints).

Both systems are using CF 9,0,1,274733 and both are connecting to MSSQL Server 2008. The code on both systems, including the scripts that build the tables, are identical (same repo, same version #). (I also ran the test on a third system and got accurate results)

I've tested this issue with multiple different tables and it occurs every time: default values are never returned on the wayward server. I've made fresh tables, from scratch, totally new names, totally new database, still see the issue. I don't see any other differences in the introspection results- in fact FKs and other constraints appear fine.

Just have no idea how to debug this. Doesn't appear to be cache related. Systems are pretty identical. Is there some byzantine setting? Perhaps an issue with the sql connector? Or java version? Suggestions??? Thanks!


Adding notes based on suggestions below here for better formatting:

Looking at MSSQL Versions, I get:

Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64) Apr 2 2010 15:48:46 Copyright (c) Microsoft Corporation Express Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1)

Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64) Apr 2 2010 15:48:46 Copyright (c) Microsoft Corporation Express Edition with Advanced Services (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1) (Hypervisor)

Pretty much the same, except that (Hypervisor) bit-- not sure that's worth pursuing.


answer: make sure the db user has ddl_admin permissions.

1
I wonder if it has something to do with how the default values were setup. I wonder if they are differentJames A Mohler
@jbd - Might want to post the solution as a separate "answer", so it is more visible.Leigh

1 Answers

1
votes

I would try the following:

  1. Do a side by side compare of the cf_root/lib/neo-datasource.xml files on each server. They are probably different.

  2. Check to see if the MSSQL servers have a slightly different version. You may be looking at a service pack issue

Addendum

3) On each of the DBs, use the "Generate Script" functionality to generate the scripts to build all the tables, views, defaults, etc. Compare what each of the resulting scripts have

For additional info on 1, see http://helpx.adobe.com/coldfusion/kb/purpose-location-xml-configuration-files.html