I have upgraded to python 3.9 and it requires Postgressql 11 to work. I was using Postgressql 10 already and I found out that I have 11 installed.. but I don't know how to force Django to use this version
$ dpkg -l | grep PostgreSQL
ii pgdg-keyring 2018.2 all keyring for apt.postgresql.org
ii postgresql 10+190ubuntu0.1 all object-relational SQL database (supported version)
ii postgresql-10 10.22-0ubuntu0.18.04.1 amd64 object-relational SQL database, version 10 server
ii postgresql-11 11.17-1.pgdg18.04+1 amd64 The World's Most Advanced Open Source Relational Database
ii postgresql-client-10 10.22-0ubuntu0.18.04.1 amd64 front-end programs for PostgreSQL 10
ii postgresql-client-11 11.17-1.pgdg18.04+1 amd64 front-end programs for PostgreSQL 11
ii postgresql-client-common 242.pgdg18.04+1 all manager for multiple PostgreSQL client versions
ii postgresql-common 242.pgdg18.04+1 all PostgreSQL database-cluster manager
ii postgresql-contrib 10+190ubuntu0.1
Related
I'm trying to make a rest API with Django Rest on Debian,
but when I run the command "python3 manage.py migrate" throws this exception
Error: The database driver doesn't support modern datatime types.")
django.core.exceptions.ImproperlyConfigured: The database driver doesn't support modern datatime types.
Already installed:
msodbcsql17 is already the newest version (17.3.1.1-1).
freetds-bin is already the newest version (0.91-6.1+b4).
freetds-dev is already the newest version (0.91-6.1+b4).
tdsodbc is already the newest version (0.91-6.1+b4).
unixodbc-dev is already the newest version (2.3.7).
unixodbc is already the newest version (2.3.7).
file:odbc.ini
[MYSERVER]
Description = Django SQLServer
Driver = FreeTDS
Trace = Yes
TraceFile = /tmp/sql.log
Database = DjangoDB
Servername = MYSERVER
UserName = sa
Password = *******
Port = 1433
Protocol = 8.0
file:odbcinst.ini
[FreeTDS]
Description=FreeTDS Driver for Linux & MSSQL on Win32
Driver=/usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
Setup =/usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
UsageCount=1
[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.3.so.1.1
UsageCount=1
file:freetds.conf
[global]
# TDS protocol version
tds version = 8.0
[MYSERVER]
host = localhost
port = 1433
tds version = 8.0
The problem is with your TDS Version. Version 8.0 isn't actually a valid version, despite a lot of bad advice existing across the Internet. There are a lot of reasons for this, but Version 8.0 actually maps to TDS Version 7.1, which was before Microsoft adding new date and time field types in SQL Server 2008. See the footnote here:
https://www.freetds.org/userguide/tdshistory.htm
You're running a pretty old version of FreeTDS (0.91). It only supports TDS Version 7.2, which was introduced in SQL Server 2005. I would recommend upgrading your version of FreeTDS, and using TDS Version 7.3. Details here:
https://www.freetds.org/userguide/choosingtdsprotocol.htm
The other option is to use the MS ODBC driver you seem to have installed already, which is much more up-to-date than the version of FreeTDS you have.
Good luck!
Im a beginner to django.
Someone help to connect Oracle 11g db with django 2.0 in windows. What is the requirements and how to connect and what are the changes to be done.
According to the manual,
Django supports Oracle Database Server versions 12.1 and higher. Version 5.2 or higher of the cx_Oracle Python driver is required.
You may run in to trouble with version 11g -- but if you want to give it a shot, that link has the instructions.
I'm new to the MongoDB. My virtual machine runs Ubuntu 14.04.5 with mongod, which is standard for this OS:
hekto#ubuntu:~$ mongod --version
db version v2.4.9
Tue Jun 5 18:00:23.923 git version: nogitversion
I've built a Mongo C++ Driver Ver 3.2.0 from sources and tried to write some tests. All of them output an exception below:
Server at localhost:27017 reports wire version 0, but this version of libmongoc requires at least 3 (MongoDB 3.0): generic server error
It looks like the C++ client and the server are incompatible.
Are there any tricks, which can be used with the Mongo C++ Driver to force it to work with older Mongo servers?
I can't convert the database itself to any new format for now, but also wouldn't like to learn the obsolete driver API.
MongoDB 2.4.9 has been end-of-life for quite some time: https://www.mongodb.com/support-policy, and most drivers have dropped support for talking to it.
If you are just starting with MongoDB, you should start with the newest available stable version, which is currently 3.6.5.
You can obtain packages for Ubuntu 14.04 according to the instructions here https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
I am trying to use oracle 12c as database for my application using Django framework. But I am struck in version related issue
Following are the version of library used:
Python 3.6
cx_Oracle 6
Oracle instant client 12.2
Oracle 12 C database on server
Oracle 10 g on local machine where the cx_oracle
is installed
OS is windows 7
Following are the steps which I did to install cx_oracle
pip install cx_Oracle
Download Oracle instant client 12.2 zip file for windows
Extracted the zip file
Added the above unzipped folder to user PATH variable
From CMD I try to execute
python
import cx_Oracle
con = cx_Oracle.connect(uname, pwd, server_ip:port/name)
I am getting the error:
cx_oracle.databaseerror: dpi-1050: oracle client library must be at version 11.2 or higher
Is cx_Oracle having any conflict with oracle 10 g installed at local machine
I cannot upgrade the local oracle 10g db because(no rights given)
How do I resolved the above issue.
How can I make sure cx_Oracle uses the correct Oracle instant client( i.e, 12.2) to connect to server db.
Make sure that the directory containing the instant client is earlier in the PATH environment variable than your 10g installation. That should resolve it for you.
you use set ORACLE_HOME too:
SET ORACLE_HOME=C:\Oracle\client_12_1
SET PATH=C:\Oracle\client_12_1\bin;%PATH%
python
import cx_Oracle
con = cx_Oracle.connect(uname, pwd, server_ip:port/name)
i try to install jetty from the Debian (wheezy) packages. But instead of default Openjdk i installed Oracle Java.
Download tar.gz. and build a deb package
(https://wiki.debian.org/Java/Sun or http://www.webstimme.de/2013/02/05/linux-java-unter-debian-wheezy-installieren-anleitung/)
$java -v
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
Afterwards i istalled jetty with apt-get, but it also installes the packages
openjdk-6-jre-headless openjdk-6-jre-lib
so Java is then
java -version
java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.6) (6b27-1.12.6-1~deb7u1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
I will give it a second try with installing the Oracle Java version 1.6.
Any Experiences with installing the jetty package repo and use an Oracle Java, will this ever works?
Edit:
It's possible with Oracle Java 6 (1.6) but not with Oracle Java 7 (1.7)
I tried to run it with Oracle Java because of potential better performance for Solr. I somebody has knowledge about the difference in perfomance with Open JDK and Oracle Java it would be nice to post it here :) Thanks
Edit:
I was wrong. It runs also with Oracle JDK 7.
Just download and extract it e.g. to /opt/Oracle_Java and put the path in the /etc/default/jetty as JAVA_HOME
JAVA_HOME="/opt/Oracle_Java"
Which jre is used by default is controlled by alternatives system. Use the command update-java-alternatives -l to list which JREs are installed and then use update-java-alternatives -sto choose which JRE to use.
I have two JDKs on my machine:
# update-java-alternatives -l
j2sdk1.6-oracle 315 /usr/lib/jvm/j2sdk1.6-oracle
jdk-7-oracle-x64 317 /usr/lib/jvm/jdk-7-oracle-x64
To use jdk-7 as my default JDK I would run update-java-alternatives -s jdk-7-oracle-x64
It is possible to run Jetty 6 from Debian or Ubuntu package repository with Oracle Java 6 and Oracle Java 7.