无法使用Djangomssq迁移Django数据库

2024-09-28 16:18:53 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试使用django mssql将我的django数据库迁移到mssqlserver10.50.2500。当我试图运行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')

django mssql的文档中说首先安装sqlservermanagementstudio,我已经完成了(2012版)。我错过了什么?考虑到服务器的版本,我应该使用2008版的SSMS吗?我需要单独安装sqlncli10吗?在

在设置.py,我也尝试过输入字母数字服务器名,仅输入IP地址,以及IP地址和端口,但都没有用。在

谢谢你的帮助


Tags: djangopy服务器数据库dbmanage错误utils
1条回答
网友
1楼 · 发布于 2024-09-28 16:18:53

错误日志显示连接到10.1.4.100时出错。这可能意味着你的mssql服务器没有运行,或者你没有访问它的权限。在

您已经提到您已经安装了SQLServerManagementStudio,但没有提到是否启动了SQLServer实例。如果还没有,可以使用SQLServerConfigurationManager for Windows来完成。^来自Microsoft Technet的{a1}将指导您启动实例。在

To start the default instance of 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.
  2. In SQL Server Configuration Manager, in the left pane, click SQL Server Services.
  3. In the details pane, right-click SQL Server (MSSQLServer), and then click Start. 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.

相关问题 更多 >