What can be done when Cold Fusion 9 ODBC Services will not install?

Copy link to clipboard
Copied
What can be done when 64-bit Cold Fusion 9 ODBC Service will not install on a Windows Server 2008-R2 64-bit machine? Yes, most of the things in other discussions have been tried.
Copy link to clipboard
Copied
Hi GDMVU,
Save the below code as CF9_RemoveOdbc.cfm
<cfscript>
//login using admin
//createObject("component","cfide.adminapi.administrator").login("administrator_password");
createObject("component","cfide.adminapi.administrator").login("admin");
//instantiate datasource object
myObj = createObject("component","cfide.adminapi.datasource");
</cfscript>
<cfscript>
writeOutput("Removing ODBC Services...<br>");
returnValue = myObj.removeODBCservice();
writeOutput("ODBC Services removed");
</cfscript>
Save the below code as CF9_InstallOdbc.cfm
<cfscript>
//login using admin
//createObject("component","cfide.adminapi.administrator").login("administrator_password");
createObject("component","cfide.adminapi.administrator").login("admin");
//instantiate datasource object
myObj = createObject("component","cfide.adminapi.datasource");
</cfscript>
<cfscript>
writeOutput("Installing ODBC Services...<br>");
returnValue = myObj.installODBCservice();
writeOutput("ODBC Services installed");
</cfscript>
Now try the following steps:-
- Change admin password in above .cfm pages for your CF 9 server.
- Use RemoveObdc cfm page first to remove any existing faulty/corrupted Odbc services.
- Use InstallOdbc Odbc services to install Odbc services there.
Hope this helps.
Regards,
Anit Kumar

Copy link to clipboard
Copied
I had tried these scripts before but tried them again. The removal script works fine. But there is a error returned for the second script:
"Unable to set value HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ColdFusion 9 ODBC Server\Description: Windows error number 0 occurred.The handle is invalid."
I had searched this error message before and found a discussion about a different matter where it was suggested that the permissions on the key area in the registry might need to be changed due the the lockdown process which changes the service account from the default. If this is true the lockdown instructions distributed by Adobe are incomplete. I am unsure of what needs to be changed and to what extent. Does the Services area of the registry need permissions added for the new CF service account to read and write or what? Maybe this has nothing to do with it, but it sounds credible. But I do not want to be messing with the registry without better guidance. And I would want to reverse this action after ODBC Server is installed.
Copy link to clipboard
Copied
Hi GDMVU,
Can you run the remove script first and then go to the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\. Rename the "ColdFusion 9 ODBC Server" to "ColdFusion 9 ODBC Server_old". Run the Install script thereafter.
Regards,
Anit Kumar

Copy link to clipboard
Copied
The ColdFusion 9 ODBC Server key doesn't exist in the registry. I do have a ColdFusion 9 ODBC Server registry key from a Windows Server 2003 machine with CF9, but I am not sure the registry entries would be the same as for this 2008-R2 64-bit machine. Anyway, I did try importing that key but got the same error message.

Copy link to clipboard
Copied
I should add that I have a license for CF10. Should I uninstall CF9 and install 10 instead. Will the lockdown prep work that I have done be good for CF10 or must I start all over again? I only am willing to do this if there is no other way to get CF9 up and running with ODBC.
Copy link to clipboard
Copied
Hi GDMVU,
Can you please send an email to cfinstal@adobe.com with your preferred contact details.
Regards,
Anit Kumar

Copy link to clipboard
Copied
It appears that the CF ODBC Server and Agent installation has been resolved on this machine and it was indeed related to the change of the runs-as account recommended in the lockdown procedures. Here are the steps we took:
1) Export & Import ODBC Server and Agent Registry keys from another CF9 Windows server
2) In the administrator change Client variables from registry to cookie
3) Add full permissions to new CF service account for HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia
4) Add full permissions to new CF service account for HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
5) Remove ODBC Services using the script above and restart
6) Install ODBC Services using the script above (and possibly restart)
7) Change all CF services to run with new CF service account

