1
I have a system made in CODEIGNITER where several users access simultaneously, and lately I’m receiving complaints that on several pages of the portal, appears the following error:
"Unable to connect to your database using the provided settings"
Seems like a pretty generic mistake, so I don’t know what the problem is.
On every page this error appears randomly, and always indicating the error in different lines and files, and it disappears right when the page is updated.
I researched this error and found this: "It’s in single-user mode and the only available connection is already being used by someone or something else." but I don’t know how to fix it, and I don’t know if it has anything to do with the problem.
Database file.php
$db['MKTM'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'usuario',
'password' => 'senha',
'database' => 'banco',
'dbdriver' => 'sqlsrv',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'development'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
Please turn this command and tell me the result
SELECT DATABASEPROPERTYEX('TABELA','UserAccess');
where table is the name of your table– Bulfaitelo
The result was: NULL
– Beatriz Sgavioli
there is an unscheduled result, I will respond with the change test mode and tell me if it resolves.
– Bulfaitelo
uses this select here and sees the maximum number of simultaneas connectives SELECT * FROM sys.Configurations c WHERE c.name = 'user Connections'; if you have a low number, to increase just use this command here EXEC sp_configure 'user Connections', 0; RECONFIGURE (setting zero it goes to default which is the maximum)
– Lucas Miranda