Oracle Case Insensitive Searches

i want to use case insensitive searche in my app,

i’m using oracle db

so i need to execute this two commands.


alter session set NLS_SORT=BINARY_CI;

alter session set NLS_COMP=LINGUISTIC;

and this command not working


\Yii::$app->db->createCommand("

alter session set NLS_SORT=BINARY_CI;

alter session set NLS_COMP=LINGUISTIC;

")->execute();

what should i do ?

solved


Yii::$app->db->createCommand("ALTER SESSION SET NLS_SORT=BINARY_CI")->execute();

Yii::$app->db->createCommand("ALTER SESSION SET NLS_COMP=LINGUISTIC")->execute();

but maybe there’s a way to make it globally? for all forms?