Hello,
I'm making my first steps with Django (and Python) development and I'm still struggling with the tutorial. The back end database I'm using is DB2 (installed on Windows Sever 2008), I am connecting to it from my Windows 7 Professional machine using IBM DB2 ODBC Driver. The database name is POLLS, the ALIAS is POLLS and the System DSN Name is ... well, also POLLS.
This is the DATABASES section from the settings.py:
DATABASES = {
'default': {
'ENGINE' : 'ibm_db_django',
'NAME' : 'POLLS',
'USER' : '********',
'PASSWORD' : '********',
'HOST' : 'xxxxxxx',
'PORT' : '50000',
'PCONNECT' : True,
}
}
The problem I have encountered when running the 'manage runserver' command with this configuration:
django.db.utils.ProgrammingError: [IBM][CLI Driver] SQL1042C An unexpected system error occurred. SQLSTATE=58004\r SQL CODE=-1042
Running 'manage migrate' resulted in the same error.
Then after playing with the DB2 connection string I found that replacing 'NAME' by 'DBALIAS'
DATABASES = {
'default': {
'ENGINE' : 'ibm_db_django',
'DBALIAS' : 'POLLS',
'USER' : '********',
'PASSWORD' : '********',
'HOST' : 'xxxxxxx',
'PORT' : '50000',
'AUTHENTICATION' : 'SERVER',
'PCONNECT' : True,
}
}
allows me to run server without a problem, but an attempt to create tables with 'manage migrate' results in: File "C:\Python34\lib\site-packages\ibm_db_django-1.0.9.2-py3.4.egg\ibm_db_django\base.py", line 212, in get_connection_params
raise ImproperlyConfigured( "Please specify the valid database Name to connect to" )
Can anybody, please, help me out of this> Any help will be highly appreciated.
Best,
Alexander