• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems with ms sql server connection from codeigniter

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:

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

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.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.