CodeIgniter Forums

Full Version: Problems with ms sql server connection from codeigniter
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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.

El Forum

[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.