Problem in connecting with oracle database through laravel

946 Views Asked by At

I am getting the following error while connecting with the oracle database through laravel8 -

ORA-12154: TNS:could not resolve the connect identifier specified
1

There are 1 best solutions below

1
Mauricio On BEST ANSWER

You have to check your oracle connection's configuration. According to this a valid format on config/database.php is:

'oracle' => [
    'driver' => 'oracle',
    'host' => 'oracle.host.ip.here',
    'port' => '1521',
    'database' => 'xe',
    'service_name' => 'sid_alias',
    'username' => 'hr',
    'password' => 'hr',
    'charset' => '',
    'prefix' => '',
]

Ask your DBA if you are not sure of the database or service name you have to use in your case.