title: How do I force Django to connect to Oracle using Service Name
body: <p>Q : How do specify that Django needs to connect to Oracle DB using the service name and not SID ?</p>
  
  <p>Hi,</p>
  
  <p>I am currently telling my Django configuration to connect to Oracle using my SID. </p>
  
  <p>However, I'll need to connect using the service name and not the SID. </p>
  
  <pre><code>APP_DATABASES={
      'default': {
              'ENGINE': 'django.db.backends.oracle',
              'NAME': 'myservice',
              'USER': 'system',
              'PASSWORD': 'admin123',
              'HOST': '192.168.1.45',
              'PORT': '1699',
      }
  }
  </code></pre>
  
  <p>This works fine. </p>
  
  <p>However, When I replace the 'NAME' with the service name as follows </p>
  
  <pre><code> 'default': {
                  'ENGINE': 'django.db.backends.oracle',
                  'NAME': 'myservice.bose.com',
                  'USER': 'system',
                  'PASSWORD': 'admin123',
                  'HOST': '192.168.1.45',
                  'PORT': '1699',
          }
  </code></pre>
  
  <p>I get a </p>
  
  <pre><code>ORA-12505: TNS:listener does not currently know of SID given in connect descriptor
  </code></pre>
  
  <p>Clearly Django is telling Oracle to connect using the SID which is not what I want Django to do.</p>
  
  <p>How do specify that Django needs to connect to Oracle DB using the service and not SID ?</p>
  
  <p>Note : I've tested that the service name mentioned above. It works great from Oracle SQL Developer.</p>
  
  <p>Thanks - would really appreciate leads.</p>