Installation of moodle with MSSQL 2008

Installation of moodle with MSSQL 2008

by Sudip Das -
Number of replies: 11
I want to install moodle 1.9.9+ with mssql 2008. Please any one tell me what are the changes i have to do for this. Please tell me each an every step for installation

Thanks in advance
Average of ratings: -
In reply to Sudip Das

Re: Installation of moodle with MSSQL 2008

by Colin Fraser -
Picture of Documentation writers Picture of Testers
Sorry, but you will be in a minority there I suspect. Your best bet is to install, do it as best you can, if it does not work, then uninstall and try again, trying something different. Test. test, trial, error, test, push it as far as you can go. Keep a log of everything you have done. When you can get it to work, then you will have a complete record of what you did, what worked what did not.

In this you can be the trail blazer, leading the rest of us along the right way.

I know this is not a lot of comfort, but someone has to be first, and maybe that is you. But i can tell you that a lot of people who come after you will be very grateful if you share with them what you have done. Up to you... thoughtful
In reply to Colin Fraser

Re: Installation of moodle with MSSQL 2008

by Sudip Das -
thanks for your post. I am trying to do the same. if any one has any suggestion or any refference for installing moodle with sql server he/she can help me.
In reply to Sudip Das

Re: Installation of moodle with MSSQL 2008

by Jonathan Evans -

I've tried installing MS SQL 2008.

The problem seems to be an unwillingness to accept that a very high percentage of production servers in large enterprise environments are using Server 2008, IIS 7.0, & MS SQL 2005/2008.

I don't care how many Linux/Open Source heads think Apache & MySQL deliver "far superior" performance, etc, etc. In the environment I'm working in, they are not, cannot, and will not be allowed.

Therefore I have no choice but to try and install Moodle using IIS 7.0 & MS SQL.

In my opinion, MS SQL 2008 has a FAR MORE intuitive and user friendly GUI than MYSQL Workbench, which doesn't even come with the MySQL install!

Goes back to the dark old days of DB Admins not wanting anyone else to know what they do, and uber geeks considering enormous command lines as the only way to configure a server!

Anyway, the latest obstacle I've encountered (apart from a complete lack of decent docco) is getting Moodle to "talk" via PHP to MS SQL 2008.

After doing days of research, it appears that for Moodle to to talk to MS SQL via PHP, you need to use Microsoft's PHP "drivers" for Microsoft SQL Server.

The initial release was 1.1, which purports to work with MS SQL 2005 & 2008. However, I couldn't get it to work with MS SQL 2008 myself : (

Version 2.0 was only released a few days ago:

http://blogs.technet.com/b/dataplatforminsider/archive/2010/08/05/microsoft-drivers-for-php-for-sql-server-2-0-released.aspx

I've downloaded version 2.0, copied the relevant .dll file into my PHP entensions folder, and created an uncommented entry for it in my php.ini file, but it just won't load?

All my other enabled .dll files are working, so my php.ini file is definitely being read? 

Has anyone else had any luck getting the 2.0 .dll files to work? Or the earlier 1.1 version release maybe?

So close, yet so far - all extremely frustrating...

In reply to Jonathan Evans

Re: Installation of moodle with MSSQL 2008

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I know Eloy Lafuente, who is the main developer for XMLDB and Moodle's database layer, regularly runs all the automated database tests (which, in Moodle 2.0, are very thorough) on all the supported databases. So, it must be possible to get it to work. But I am afraid I don't know now, so I can't help, sorry.
In reply to Tim Hunt

Re: Installation of moodle with MSSQL 2008

by Sudip Das -
Hello every one. I have installed moodle using sql server 2008 using ODBTP. Following is the link which i followed.

http://docs.moodle.org/en/Installing_MSSQL_for_PHP


But now fetching one problem. I want to migrate exsisting data of mysql to sql server 2008. Can any one help me how can i transfer data only( not structure) from mysql to sql server 2008.
Thanks in advance.
In reply to Sudip Das

Re: Installation of moodle with MSSQL 2008

by Colin Fraser -
Picture of Documentation writers Picture of Testers
Sudip,
How about you backup the existing database and then restore it to the new structure, then before you do anything else, copy the moodledata file over, or do that first if you can, might be better. You may have to run an SQL update to ensure the links are reflecting the new environment, but should be OK.

And Jonathan,

I don't care how many Linux/Open Source heads think Apache & MySQL deliver "far superior" performance, etc, etc. In the environment I'm working in, they are not, cannot, and will not be allowed.

I do not understand the vehemence. Linux can be modified to prevent external hacking in ways that Windows Server xxx cannot and never could be. From a security point of view, I would have thought that Linux would have been a better option. MySQL does not deliver "far superior" performance, btw. What it does do is to use a rather gentle implementation of SQL, with little artifice. I understand that MSSQL is full of pedantic little MSisms, and not all that user friendly at times. That is all. I do know that MS-Access is a toy compared to MySQL, and I think I have always had this image of MSSQL as being a development of Access, but not having spent much time with it, as I really cannot be bothered more than anything, I do not know that it is. However, I am sure if I asked, I could probably get a copy of it to play around with.

Therefore I have no choice but to try and install Moodle using IIS 7.0 & MS SQL.

I know this is frustrating, people who do this are seriously unwilling to share their success with anyone else. This Secret Squirrel stuff is more than a little disappointing in the Moodle environment. I would love for someone who has this working to provide documentation on just how they did it. My suspicion is that they can get so little help that they get all annoyed, so if they get it working, they do not want to share. Alternatively, they cannot get it working so find something else, something proprietal probably.

In my opinion, MS SQL 2008 has a FAR MORE intuitive and user friendly GUI than MYSQL Workbench, which doesn't even come with the MySQL install!

That is why I prefer to use the phpMyAdmin interface. The MySQL Workbench, for me, is clumsy and while phpMyAdmin is not a great deal better, it is a slice and dice set up, which is OK for my needs. Simple and sweet, and does what I want it to.

Having worked with other MS tools, I have trouble getting past that MS attitude of "we know better". I like to think I have some control over my destiny, and I do not like some faceless corporation like MS telling me that all their "wizards" and "security" is for my benefit - it is not, it is their marketing response just getting in my way. It really does not prevent a determined hacker getting through - in fact I suspect it encourages them to hack a MS system, the wannabes at least.

Goes back to the dark old days of DB Admins not wanting anyone else to know what they do, and uber geeks considering enormous command lines as the only way to configure a server!

Yes, this is true across a raft of things in Linux, and I have certainly made my argument against this kind of thinking known - to no avail. If someone was to develop a decent GUI for Linux, an easier method for file management, a seriously intuitive interface, although some would argue they are already here, and a non-geek way of installing upgrades, new programs and games, Windows days would be numbered, very quickly I suspect.

So bear with it, I do hope it comes together for you quickly, if and when. So please, do not be backward, help others if you can.

In reply to Sudip Das

Re: Installation of moodle with MSSQL 2008

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
If you are using Moodle 2.0, you can use the new tool: Site administration Development Experimental Database transfer that is designed to do exactly that.

If you are still using 1.9 (which is likely), and if you are brave, see Hacking the Moodle 2.0 database transfer script to convert a Moodle 1.9 site. (I wrote that a while ago, so I don't know if it still works.)
In reply to Jonathan Evans

Re: Installation of moodle with MSSQL 2008

by James McLean -
"The problem seems to be an unwillingness to accept that a very high percentage of production servers in large enterprise environments are using Server 2008, IIS 7.0, & MS SQL 2005/2008.

I don't care how many Linux/Open Source heads think Apache & MySQL deliver "far superior" performance, etc, etc. In the environment I'm working in, they are not, cannot, and will not be allowed.

In my opinion, MS SQL 2008 has a FAR MORE intuitive and user friendly GUI than MYSQL Workbench, which doesn't even come with the MySQL install!

Goes back to the dark old days of DB Admins not wanting anyone else to know what they do, and uber geeks considering enormous command lines as the only way to configure a server!"

I'll give you a free tip smile Bashing the tools that many of us earn our living using and developing with is not the way to ask for help. You may have a requirement to use MSSQL on Windows with Moodle - that's great and I wish you luck with it - but we don't want to be bashed about the head as to why YOU think OUR CHOICE of platform is not suitable.

I myself work in a large educational institution here in Adelaide and we have been down the Windows/MSSQL path. We investigated Moodle on Windows 2003 server with MSSQL in the backend, but it did not provide the performance and stability required, and you're not going to like hearing this, due to MSSQL... For our production environment we ended up moving to a load-balanced GNU/Linux cluster running Apache on each node with an Oracle 10g RAC backend - the system is very easily supporting over 10,000 individual students per day with peaks as high as 450 - 500 distinct users every 5 minutes. Performance is excellent.

We had the advantage of having Unix and Oracle environments and administrators on staff so with that in mind, and the fact that we tested this prior to going into production, moving to Linux and Oracle was relatively simple. Having said all that, there is some hope if you really can't move OS, Moodle does work on Windows with IIS, we had a Moodle sandbox in a VM for many months even after our other environments went to Linux, stability was acceptable but performance was average (a lot of that is probably due to the Virtual Machine, to be honest), but it was using an Oracle 10g database backend. Is Oracle an option for you at all?

As for helping with your specific issue of loading the MSSQL driver into PHP, I am sorry but I can't help with that. I have never used MSSQL with PHP myself, however you may have more luck on a specific PHP mailing list - have a look at http://www.php.net/mailing-lists.php for the various lists.

Forums, Mailing lists and the like is how lots of support is done in the Open Source world - which PHP and Moodle are very much apart of. It's a different way of getting support than you may be used to from the Microsoft closed-source corporate (expensive) way of doing things - but when you open your mind to it I think you will find it works well, and can even work well with the Microsoft world.

If you require Corporate Support for PHP, contact Zend via http://www.zend.com/en/support-center/, they offer a Commercial version of the PHP engine called Zend Server and may be able to provide some help for your environment.

HTH.
In reply to James McLean

Re: Installation of moodle with MSSQL 2008

by Jonathan Evans -

I don't have a "closed mind" about open source software.

If anything, my frustration stems from being treated like a leper by "closed minded"  "Open source/Linux are the ONLY platforms in existence" people on this forum whenever I ask for help, or even find decent docco, on installing & configuring Moodle in a Windows environment.

I also don't see how I was "bashing people about the head".

I was merely trying to head comments like this off at the pass straight away, by stating that none of these are an option in the environment I'm in, so don't waste your breath.

I'm certainly not the first person to have made a statement like this at the start of my post either, as it seems to happen all the time the moment anyone makes a Micorost based enquiry on here...

I've just seen post after post of Microsoft based enquiries get condescending, smug lectures on why you shouldn't be using <Microsoft\IIS\MSSQL> & why you should be using <Apache/MySQL/Linux>.

I'm anything but "Pro Microsoft". I think choosing a "side" i.e. Microsoft Only, Open Source / Linux Only, or "Apple ONLY" is absolutely pathetic and a highly unproffesional way to go about IT. You'd only be hurting yourself.

The fact of the matter is my institution is a Microsoft one. That's what was in place when I got there, that's what we all have training and experience in.

I'm not even used to getting "Corporate" help for dealing with Microsoft products, so that rules out that argument. We have anything but a large IT budget where I work.

What I don't have to put up with when I post on a Microsoft related forum is this elitist, condescending attitude from Linux users whenver I need to ask about problems I'm having!!

Oracle is not an option where I work, we are not a huge institution with an infinite IT budget. We have 3 IT Staff, who have to deal with all facets of IT administration, for 1500 users and over 800 client machines, spread between two seperate physical sites.

I can't even get training on the Microsoft & Apple software products we currently use, so there's definitely no chance getting trained up overnight to use Oracle!!

If I want to say I feel you're sticking your heads in the sand and preventing Moodle being more accessible and easier to incorporate into Microsoft educational institutions, I'll damn well say so. Maybe YOU should listen to what others have to say, instead of constantly poo-pooing anything else that isn't Open source / Linux. 

In reply to Jonathan Evans

Re: Installation of moodle with MSSQL 2008

by James McLean -
Ease up Turbo!

Let's get things in context here for a moment. Moodle and PHP are Open Source. Apache, MySQL and Linux, the platforms many will reccomend and stand behind, are also Open Source. Most of the people here are the kind of people who value software openness and freedom and that has a lot to do with why they will reccomend Linux - and in some cases their dislike for other 'closed' platforms may become aparrent. It just so happens that Moodle works best in the LAMP environment, but it DOES work on Windows, with IIS7 and MSSQL as people have seen in the past. I'm not trying to make excuses for people, you are right that a lot of people in this world respond incorrectly and I have been one of them in the past...

Hopefully now that you have more of an understanding as to why people may respond as they do, please move on and allow me to try and help. I apologise if you see this as condesending, but I'm not sure what exactly is failing in your setup and we need to work that out so we can fix the problem.

You've got a problem with PHP loading the MSSQL driver, in the PHP world it's actually called a PHP Module. This could be caused by a number of issues, but firstly how do you know the module is not working? What Errors are you seeing? Are they in your IIS logs or displayed within Moodle itself?

First, I am assuming when you mentioned that you have added the config to the php.ini file that at least one of the lines looked like 'extension=<modulename>.dll' and that the webserver was restarted prior to testing.

To determine weather the problem lies within PHP (such as the module not being loaded) or inside Moodle, there is a few things to try.

To see if the module is loading, create a PHP script with the following code in it:
<?php phpinfo(); ?>

This will give you a list of the current PHP configuration settings, a list of the loaded modules and the configuration for each. If you can see your module loaded here, then as you may guess the module is loaded and working, and it may simply be a configuration problem elsewhere.

Give that a shot first, or give us any errors you are encountering so that we can see where the problem lies.
In reply to James McLean

Re: Installation of moodle with MSSQL 2008

by Jonathan Evans -

I'm afraid I just don't have the LAMP experience and skills necessary to set up a Moodle production environment in the extremely short timeframe I've been given.

Apologies if I seem too OTT. Maybe my frustration should be directed more at Management for making such rash decisions and setting deadlines without consulting their IT Dept first!

That way I would have had much more time to set this up & test it using the recommended specs.

As I said, I have absolutely no issues with open source software, it's people who are so pro "one way over all others" that are the issue.

Regarding MS SQL 2008 & Moodle, I can't even get the SQL 2008 PHP modules to load when I ran my phpinfp.php file. All of the other modules I've uncommented are working though, so I'm stumped? I'm pretty sure I definitely downloaded the correct version of the .dll (VC9 Non-Thread Safe) ?

I don't know anyting about this database product. Is it safe to have the "non commercial" version of this running the backend of a website, or should we be paying for the Enterprise version? Does that have more security features?

Thanks for listening.