简体   繁体   English

无法使用django-mssql迁移django数据库

[英]Unable to migrate django database using django-mssql

I am trying to migrate my django database to MS SQL Server 10.50.2500 using django-mssql. 我正在尝试使用django-mssql将django数据库迁移到MS SQL Server 10.50.2500。 When I try to run python manage.py migrate I get this error: 当我尝试运行python manage.py migrate以下错误:

django.db.utils.OperationalError: (com_error(-2147352567, 'Exception occurred.', (0, 'ADODB.Connection', 'Provider canno
t be found. It may not be properly installed.', 'C:\\Windows\\HELP\\ADO270.CHM', 1240655, -2146824582), None), 'Error op
ening connection: DATA SOURCE=10.1.4.100;Initial Catalog=(REMOVED);UID=(REMOVED);PWD=******;PROVIDER=sqlncli10;DataT
ypeCompatibility=80;MARS Connection=True')

The documentation for django-mssql says to install SQL Server Management Studio first, which I have done (version 2012). django-mssql的文档说首先安装SQL Server Management Studio,我已经完成了安装(2012版)。 What am I missing? 我想念什么? Should I be using SSMS version 2008, given that's the version of the server? 如果服务器的版本是我的版本,我应该使用SSMS 2008吗? Do I need to separately install sqlncli10? 我是否需要单独安装sqlncli10?

In settings.py, I have also tried entering the alphanumeric server name, the IP address alone, and the IP address and the port, all to no avail. 在settings.py中,我也尝试输入字母数字服务器名称,仅IP地址以及IP地址和端口,但无济于事。

Thanks for the help 谢谢您的帮助

Your error log shows there is an error connecting to 10.1.4.100. 您的错误日志显示连接到10.1.4.100时出错。 It can mean that your mssql server isn't running or you do not have access to it. 这可能意味着您的mssql服务器未运行或您无权访问它。

You have mentioned that you have installed SQL Server management studio but haven't mentioned whether you have started an instance of SQL server. 您已经提到已经安装了SQL Server Management Studio,但是没有提到是否已启动SQL Server实例。 If you haven't yet, you can do that using SQL server configuration manager for Windows. 如果尚未安装,则可以使用Windows的SQL Server配置管理器来完成。 This topic from Microsoft Technet will guide you through starting an instance. Microsoft Technet的本主题将指导您启动实例。

To start the default instance of SQL Server 启动SQL Server的默认实例

  1. On the Start menu, point to All Programs, point to Microsoft SQL Server 2008 R2, point to Configuration Tools, and then click SQL Server Configuration Manager. 在“开始”菜单上,指向“所有程序”,再指向“ Microsoft SQL Server 2008 R2”,再指向“配置工具”,然后单击“ SQL Server配置管理器”。
  2. In SQL Server Configuration Manager, in the left pane, click SQL Server Services. 在“ SQL Server配置管理器”的左窗格中,单击“ SQL Server服务”。
  3. In the details pane, right-click SQL Server (MSSQLServer), and then click Start. 在详细信息窗格中,右键单击“ SQL Server(MSSQLServer)”,然后单击“启动”。 A green arrow on the icon next to the server name and on the toolbar indicates that the server started successfully. 服务器名称旁边的图标和工具栏上的绿色箭头表示服务器已成功启动。
  4. Click OK to close SQL Server Configuration Manager. 单击“确定”关闭SQL Server配置管理器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM