Moodle 1.7 and MSSQL Frustration

Moodle 1.7 and MSSQL Frustration

από Aaron Smith -
Αριθμός απαντήσεων: 5
This is starting to drive me crazy. χαμόγελο
I have tried using the FreeTDS extension AND the ODBTP extension and end up with the same result. Everytime I pull up the moodle site, I get a "Database Connection failed". I can connect to the database using other methods (SQL Query analyzer and ODBC connections) using the same username/password that is configured in moodle's config.php.

Has anyone...at all...gotten this to work? I'm close to just scrapping the entire thing and installing MySQL on the server. I really don't want to do that since we have this nice, shiny MSSQL server here, but if Moodle is going to be such a pain in the rear....well, I have better things to do.

One specific question is, if I'm using the ODBTP set up, what are the proper moodle config.php settings to make use of it? THis was left out of the moodle installation instructions from what I can see.


Μέσος όρος βαθμολογίας: -
Σε απάντηση σε Aaron Smith

Re: Moodle 1.7 and MSSQL Frustration

από Matt Lyons -

Hi Aaron,

I feel your pain and have had no success with ODBTP and was unable to find the FreeTDS dll. I've been watching your posts hoping someone who knows would offer some help. I was finally able to complete the install using ODBC though. Have you seen my post at this thread? http://moodle.org/mod/forum/discuss.php?d=58049#268794

I'd be curious to know if you can get ODBC to work too or have any reasons not to use ODBC. Anyone else have any thoughts?

Σε απάντηση σε Aaron Smith

Re: Moodle 1.7 and MSSQL Frustration

από Judi Evans -
I had similar problems but got it working with ODBTP when I realised that MSSQL 2005 Express installed with the instance name of SQLEXPRESS.  I needed to use the instance name eg SERVER-NAME\SQLEXPRESS to connect to the database and not just SERVER-NAME.  Also ensured ODBTP loaded in PHP using phpinfo in a test.php script.  I let the Moodle install create the config.php file for me.
Σε απάντηση σε Judi Evans

Re: Moodle 1.7 and MSSQL Frustration

από Aaron Smith -
Judi: We're not using MSSQL Express, we have a full installation of Microsoft SQL server, but I'll take a look at your suggestion.

Matt: Yeah, I remember reading your post as well. I've been reluctant to do any sort of set up that's marked as "experimental", but I think I'll try doing it today just to see if it will work at all and let you know. If I do get either of the other methods to work, I'll certainly post here. As for not finding the FreeTDS dll, I think I just clicked the link that was in the HOWTO page on setting up moodle with MSSQL.
Σε απάντηση σε Aaron Smith

[Solved] Re: Moodle 1.7 and MSSQL Frustration

από Aaron Smith -
I Did IT!!

The directions for setting up MSSQL with ODBTP appear to be incorrect. Anyway, my problem was the config file for ODBTP. First some background. My moodle site is running on an IIS 6 web server and the database for moodle is running on a seperate Microsoft SQL server. I have PHP 5.1.2 and moodle version 1.7.

The key was the specification of the host servers. In the moodle config.php, I set it up exactly as the directions say. Well, actually, there wasn't an example for the correct database settings for ODBTP but they're the same as the FreeTDS ones. For the dbhost variable, I put in the full hostname of my MS-SQL server.

However, the directions for configuring the odbtp.conf file incorrectly tell you to put the name of your MS-SQL server host in for the "odbtp host" variable. What you need to put in there (oddly enough considering the variable name) is the name of the server where the ODBTP service is running. In my case, it was running on my web server so I had to enter "localhost". Once I did that, everything clicked and it worked great.