Laravel Oracle Error Code : 2248 Error Message : ORA-02248: invalid option for ALTER SESSION Position : 231 Statement : ALTER SESSION SET NLS_TIME_FORMAT = 'HH24:MI:SS' NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS' NLS_TIMESTAMP_FORMAT = 'YYYY-MM-


 

Error Code : 2248 Error Message : ORA-02248: invalid option for ALTER SESSION Position : 231 Statement : ALTER SESSION SET NLS_TIME_FORMAT = 'HH24:MI:SS' NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS' NLS_TIMESTAMP_FORMAT = 'YYYY-MM-....

 

add this line DB_EDITION = null on your .env

DB_CONNECTION=oracle
DB_HOST=yourhost
DB_PORT=1521(yourport)
DB_SERVICE_NAME=(your service name)
DB_DATABASE=yourdb
DB_USERNAME=user
DB_PASSWORD=pass

DB_EDITION = null

 

i fixed by adding : /*'edition' => env('DB_EDITION', 'ora$base'),*/
(Oracle 9i,10g)

return [
    'oracle' => [
        'driver'         => 'oracle',
        'tns'            => env('DB_TNS', ''),
        'host'           => env('DB_HOST', ''),
        'port'           => env('DB_PORT', '1521'),
        'database'       => env('DB_DATABASE', ''),
        'username'       => env('DB_USERNAME', ''),
        'password'       => env('DB_PASSWORD', ''),
        'charset'        => env('DB_CHARSET', 'AL32UTF8'),
        'prefix'         => env('DB_PREFIX', ''),
        'prefix_schema'  => env('DB_SCHEMA_PREFIX', ''),
       /* 'edition'        => env('DB_EDITION', 'ora$base'),*/
        'server_version' => env('DB_SERVER_VERSION', '11g'),
    ],
]

or add this line on .env file

DB_EDITION=null
 

https://docs.oracle.com/en/database/oracle/oracle-database/21/lacli/instant-client-shared-libraries.html#GUID-1D801ED9-D7DD-42D7-8BA1-1993A6CD6356