Re: ms sql server connectivity to django

2019-01-07 Thread Ivan Martić
Hi mate,

I had the same issue with MS SQL.

This worked for me:
DATABASES = {
'default': {
'ENGINE': 'sql_server.pyodbc',
'HOST': 'xxx',
'PORT': '1433',

'USER': 'xxx',
'PASSWORD': 'xxx',
'NAME': 'xx',#table name
'CONN_MAX_AGE': 0,
'AUTOCOMMIT': True,

'OPTIONS': {
'driver': 'ODBC Driver 17 for SQL Server',
'host_is_server': True,
'autocommit': True,
'driver_needs_utf8': True,
'use_legacy_date_fields' : True,
},
}
}

You need to have pyodbc azure installed.

GL,
Ivan

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7b00ad3b-8964-4b39-9eaa-4a204f45eb92%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ms sql server connectivity to django

2019-01-07 Thread Ivan Martić
Hi Mate,

I had the same issues with connecting to MS SQL.
This is the configuration which worked for me...

DATABASES = {
'default': {
'ENGINE': 'sql_server.pyodbc',
'HOST': 'XXX',
'PORT': '1433',

'USER': 'XXX',
'PASSWORD': 'XXX',
'NAME': 'XXX', #name of your table
'CONN_MAX_AGE': 0,
'AUTOCOMMIT': True,

'OPTIONS': {
'driver': 'ODBC Driver 17 for SQL Server',
'host_is_server': True,
'autocommit': True,
'driver_needs_utf8': True,
'use_legacy_date_fields' : True,
},
}
}
You need to have pyodbc installed.

BR,
Ivan

On Sunday, January 6, 2019 at 6:56:09 PM UTC+1, Praveen Kumar wrote:
>
> Hi All,
>
> Changed DATABASE code as under in setting.py in Django project. But not 
> getting able to connect to MS SQL Server. Please suggest.
>
> ATABASES = {
> 'default': {
> 'NAME': 'APJ_AIM_LITE',
> 'ENGINE': 'sqlserver_ado',
> 'HOST': 'DB_SERVER',
> 'USER': '',
> 'PASSWORD': '',
> }
> }
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c8366067-faf8-426a-b6d1-3b0e37a35e15%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: ms sql server connectivity to django

2019-01-07 Thread pahlawanto.pancawindu
Make sure the port MSSQL is open.

 

From: django-users@googlegroups.com  On Behalf 
Of BALA KRISHNAN
Sent: 07 January 2019 13:34
To: django-users@googlegroups.com
Subject: Re: ms sql server connectivity to django

 

Create your database in MySQL

Migrate your files 

 

On Sun, 6 Jan 2019 at 23:25, Praveen Kumar mailto:kumar.pravee...@gmail.com> > wrote:

Hi All,

 

Changed DATABASE code as under in setting.py in Django project. But not getting 
able to connect to MS SQL Server. Please suggest.

 

ATABASES = {

'default': {

'NAME': 'APJ_AIM_LITE',

'ENGINE': 'sqlserver_ado',

'HOST': 'DB_SERVER',

'USER': '',

'PASSWORD': '',

}

}

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com 
<mailto:django-users+unsubscr...@googlegroups.com> .
To post to this group, send email to django-users@googlegroups.com 
<mailto:django-users@googlegroups.com> .
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ee503251-d646-4585-b773-0b1fc5b11c66%40googlegroups.com
 
<https://groups.google.com/d/msgid/django-users/ee503251-d646-4585-b773-0b1fc5b11c66%40googlegroups.com?utm_medium=email&utm_source=footer>
 .
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com 
<mailto:django-users+unsubscr...@googlegroups.com> .
To post to this group, send email to django-users@googlegroups.com 
<mailto:django-users@googlegroups.com> .
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGxtV7ZZ-kEPQ7xuyOa%2B6wOOdzJmcNcDR2vihNNPLuqyQ%3DCuOQ%40mail.gmail.com
 
<https://groups.google.com/d/msgid/django-users/CAGxtV7ZZ-kEPQ7xuyOa%2B6wOOdzJmcNcDR2vihNNPLuqyQ%3DCuOQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
 .
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/002801d4a654%248f32ecd0%24ad98c670%24%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: ms sql server connectivity to django

2019-01-07 Thread Jani Tiainen
Hi,

What happens? Do you get errors? Nothing?

On Sun, Jan 6, 2019 at 7:56 PM Praveen Kumar 
wrote:

> Hi All,
>
> Changed DATABASE code as under in setting.py in Django project. But not
> getting able to connect to MS SQL Server. Please suggest.
>
> ATABASES = {
> 'default': {
> 'NAME': 'APJ_AIM_LITE',
> 'ENGINE': 'sqlserver_ado',
> 'HOST': 'DB_SERVER',
> 'USER': '',
> 'PASSWORD': '',
> }
> }
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/ee503251-d646-4585-b773-0b1fc5b11c66%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Jani Tiainen

- Well planned is half done, and a half done has been sufficient before...

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHn91odB0TRc%2BKK1F5aER0FFuW3afeYZSC7ZM9tzsT%3D_s6ZUBw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: ms sql server connectivity to django

2019-01-06 Thread BALA KRISHNAN
Create your database in MySQL
Migrate your files

On Sun, 6 Jan 2019 at 23:25, Praveen Kumar 
wrote:

> Hi All,
>
> Changed DATABASE code as under in setting.py in Django project. But not
> getting able to connect to MS SQL Server. Please suggest.
>
> ATABASES = {
> 'default': {
> 'NAME': 'APJ_AIM_LITE',
> 'ENGINE': 'sqlserver_ado',
> 'HOST': 'DB_SERVER',
> 'USER': '',
> 'PASSWORD': '',
> }
> }
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/ee503251-d646-4585-b773-0b1fc5b11c66%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGxtV7ZZ-kEPQ7xuyOa%2B6wOOdzJmcNcDR2vihNNPLuqyQ%3DCuOQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.