title: Symfony connect to oracle oci8
body: <p>I'm on Symfony and I can't connect to a Oracle database, but I don't know why. Maybe you can help me a little.</p>
  
  <p>Here my doctrine.yaml</p>
  
  <pre><code>doctrine:
  dbal:
      default_connection: default
      connections:
          default:
              # configure these for your database server
              url: '%env(DATABASE_URL)%'
              server_version: '5.7'
              charset: utf8mb4
          test:
              # configure these for your database server
              url: '%env(DATABASE_TEST_URL)%'
              driver: 'oci8'
              server_version: ~
              charset: utf8mb4
  
  
  orm:
      default_entity_manager: default
      entity_managers:
          default:
              connection: default
              naming_strategy: doctrine.orm.naming_strategy.underscore
              auto_mapping: true
              mappings:
                  App:
                      is_bundle: false
                      type: annotation
                      dir: '%kernel.project_dir%/src/Entity'
                      prefix: 'App\Entity'
                      alias: App
          test:
              connection: test
              mappings:
                  test:
                      is_bundle: false
                      type: annotation
                      dir: '%kernel.project_dir%/src/Entity/Test'
                      prefix: 'App\Entity\Test'
                      alias: Test
  </code></pre>
  
  <p>My .env file with 2 database:</p>
  
  <pre><code>   DATABASE_URL=mysql://xxx:xxx@mysql:3306/pivot
     DATABASE_TEST_URL=//user:owd@host:port/dbname
  </code></pre>
  
  <p>And here my controller </p>
  
  <pre><code>public function xxx() {
   $entityManager = $this-&gt;getDoctrine()-&gt;getConnection('test');
          $sql = 'SELECT * FROM xxx.O2_ADRESSE WHERE ROWNUM = 1';
          $stmt = $entityManager-&gt;prepare($sql);
          $stmt-&gt;execute();
  
          dump($stmt-&gt;fetchAll());
  }
  </code></pre>
  
  <p>I get the following error :</p>
  
  <pre><code>An exception occurred in driver: ORA-12505: TNS:listener does not currently know of SID given in connect descriptor
  </code></pre>
  
  <p>Any help on what im doing wrong?</p>