CodeIgniter Forums
Problems with ms sql server connection from codeigniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Problems with ms sql server connection from codeigniter (/thread-60293.html)



Problems with ms sql server connection from codeigniter - El Forum - 02-24-2014

[eluser]Unknown[/eluser]
Hi...
i'm using a codeigniter installation on a centos server (LAMP)
This works really good, but my application need to connect also to another DB (MS SQL SERVER 2008).

The only way i found to connect is to use these parameters with PDO driver:

Code:
$db['mygroupname']['hostname'] = 'dblib:host=myhost';
$db['mygroupname']['username'] = 'myuser';
$db['mygroupname']['password'] = 'mypass';
$db['mygroupname']['database'] = 'mydbname';
$db['mygroupname']['dbdriver'] = 'pdo';

But it's really slowly... anyone know why?
I've tried to use sqlsrv driver or mssql but it not works, i can't connect to that db with these drivers... why?
Why it workis only with PDO dblib? Could this causes that slow performace?

Please help me...
Thank you all.


Problems with ms sql server connection from codeigniter - El Forum - 02-25-2014

[eluser]noideawhattotypehere[/eluser]
I have no idea if slow performance is because of PDO dblib, but i can bet there might be slow connection between your server and db server, unless they are connected in lan.
Linux does not have direct MSSQL support, you can either switch it to Windows enviroment or keep using PDO dblib.