1
0
mirror of https://github.com/django/django.git synced 2025-03-25 08:40:45 +00:00

[1.6.x] Fixed #22368 -- clarified connecting to Oracle DB using service name

Used the official terminology listed in
http://docs.oracle.com/cd/B19306_01/network.102/b14212/glossary.htm#i997309

Thanks michael.cherkasov for the report.

Backport of bfac6bef83 from master
This commit is contained in:
Moayad Mardini 2014-05-19 10:33:12 +03:00 committed by Tim Graham
parent f3b0829017
commit 26221445df

View File

@ -730,7 +730,8 @@ by default, but in case it is not, you'll need to grant permissions like so:
Connecting to the database Connecting to the database
-------------------------- --------------------------
Your Django settings.py file should look something like this for Oracle:: To connect using the service name of your Oracle database, your ``settings.py``
file should look something like this::
DATABASES = { DATABASES = {
'default': { 'default': {
@ -744,8 +745,9 @@ Your Django settings.py file should look something like this for Oracle::
} }
If you don't use a ``tnsnames.ora`` file or a similar naming method that In this case, you should leave both :setting:`HOST` and :setting:`PORT` empty.
recognizes the SID ("xe" in this example), then fill in both However, if you don't use a ``tnsnames.ora`` file or a similar naming method
and want to connect using the SID ("xe" in this example), then fill in both
:setting:`HOST` and :setting:`PORT` like so:: :setting:`HOST` and :setting:`PORT` like so::
DATABASES = { DATABASES = {
@ -759,8 +761,9 @@ recognizes the SID ("xe" in this example), then fill in both
} }
} }
You should supply both :setting:`HOST` and :setting:`PORT`, or leave both You should either supply both :setting:`HOST` and :setting:`PORT`, or leave
as empty strings. both as empty strings. Django will use a different connect descriptor depending
on that choice.
Threaded option Threaded option
---------------- ----------------