Why SQL Server @@spid is same for all session when connecting from Codeigniter 3.0 PHP ?
I have successfully connected to SQL Server from Codeigniter 3.0.2. I am using the sqlserv Driver.
Why is the SQL Server @@spid always returning the same for different user sessions.
My database connection is not set to Persist.
How can i make it not persist. Here is my DB connection.
$db['default'] = array(
'dsn' => '',
'hostname' => '127.0.0.1',
'username' => 'user',
'password' => 'password',
'database' => 'Testdb',
'dbdriver' => 'sqlsrv',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
I tried the same for Mysql Connection from codeigniter. It works non persistent as expected. ?