How to connect Codeigniter with MSSQL (SQL Server)

$active_group = ‘my_mssql’;
$active_record = TRUE;

$db[‘my_mssql’][‘hostname’] = ‘Driver={SQL Server Native Client 11.0};Server=Host\Instance;Database=queue_sys;’;
$db[‘my_mssql’][‘username’] = ‘wow_queue’;
$db[‘my_mssql’][‘password’] = ‘wow12345’;
$db[‘my_mssql’][‘database’] = ”;
$db[‘my_mssql’][‘dbdriver’] = ‘odbc’;
$db[‘my_mssql’][‘dbprefix’] = ”;
$db[‘my_mssql’][‘pconnect’] = FALSE;
$db[‘my_mssql’][‘db_debug’] = TRUE;
$db[‘my_mssql’][‘cache_on’] = FALSE;
$db[‘my_mssql’][‘cachedir’] = ”;
$db[‘my_mssql’][‘char_set’] = ‘utf8’;
$db[‘my_mssql’][‘dbcollat’] = ‘utf8_general_ci’;
$db[‘my_mssql’][‘swap_pre’] = ”;
$db[‘my_mssql’][‘autoinit’] = TRUE;
$db[‘my_mssql’][‘stricton’] = FALSE;

Note:
SQL Server Native Client 11.0 or SQL Server Native Client 10.0, just play with both settings.
Server=xx.xx.xx.x usually is in the format Server=Host\Instance

 

Free Web Hosting