External database not connected

Re: External database not connected

by Howard Miller -
Number of replies: 3
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Yes - as I said. You really need to properly test the connectivity. It's not especially straightforward but a quick Google turns up things like this... http://richbs.org/post/43142767072/connecting-to-microsoft-sql-server-from-unix

Either...

- you don't have connectivity to the server (port is blocked, IP is blocked etc.)
- your username / password is wrong
- the hostname isn't correct for the server
- the sql server is rejecting your connection

You have to systematically exclude all of those. It must be one of them. Don't just say "it's right" you have to *prove* it wink

In reply to Howard Miller

Re: External database not connected

by Aditya Dubay -

Hi Howard,

 

I checked so many times and details are right as I am able to connect mssql database from other methods.

Ports/ips are not blocked on both servers.

Details are right.

SQL server is not receiving connection from moodle so there is no matter of accepting/rejecting.

I checked so many times before writing all these here.

 

In reply to Aditya Dubay

Re: External database not connected

by Olumuyiwa Taiwo -
Picture of Plugin developers

Earlier, you said:

   > SQL server is not receiving connection from moodle so there is no matter of accepting/rejecting

Is SELinux enabled on your Moodle server by any chance and blocking outbound connections? If so you'll need to either disable it, or configure it to allow outbound connections.

Other things you may want to check:

  • IPtables (or Firewalld, or some other firewall application, depending on your Linux distribution & version) is not blocking outgoing connections from your Moodle server.
  • The relevant MS SQL Server instance on the Windows box is actually listening on port 1433. I'm not a MS SQL Server expert, but it seems instances of MS SQL Server are able to listen on ports other than 1433 - see http://stackoverflow.com/questions/1518823/how-to-find-the-port-for-ms-sql-server-2008 for example.


In reply to Olumuyiwa Taiwo

Re: External database not connected

by Salman Zaidi -

I have same problem. In my case external db is MSSQL Server and i have tested the setting in moodle external db view thats perfectly connected. I tested my auth with test db and test table having less user records and it worked well. BUT when i connected with actual table having large amount of users and run sync_users.php file  its takes lot of time first (as i set appropriate max execution time settings in php.ini file) then it gives this error Warning: mssql_connect(): Unable to connect to server /lib/adodb/drivers/adodb-mssql.inc.php on line 616. My moodle intance and external db both are on windows OS.

Have you resolved this problem? Or any one can please tell me about the resolution of this issue.