简体   繁体   English

从SQL Server 2008迁移到2012

[英]Migrate from SQL server 2008 to 2012

I have successfully migrated all my databases from 2008 to 2012 and mapped the user to the specific databases. 我已成功将所有数据库从2008迁移到2012,并将用户映射到特定数据库。

My problem being is 2008 expired (hence why I got 2012) and I was using a web service to call/edit data in the tables. 我的问题是2008年到期(因此我为什么要获得2012年),并且我正在使用Web服务来调用/编辑表中的数据。

When I run a web service function it just times out which suggests to me that it is still trying to talk to 2008. 当我运行Web服务功能时,它只是超时,这向我表明它仍在尝试与2008对话。

I am using - 我在用 -

using System.Data.OleDb;
using System.Data.SqlClient;

with connection - 与连接-

OleDbConnection objConnection = null;
OleDbCommand objCmd = null;
String strConnection, strSQL;
strConnection = "Provider=sqloledb;Data Source=.;Initial Catalog=NSN;User Id=userID;Password=password;Connect Timeout=300";

My question being, how can I tell the web service to point at SQL server 2012 now that I have migrated all the databases? 我的问题是,既然我已经迁移了所有数据库,那么如何告诉Web服务指向SQL Server 2012?

Try to change your connection string to the following: 尝试将您的连接字符串更改为以下内容:

strConnection = "Provider=sqloledb;Data Source=.\<INSTANCENAME>;Initial Catalog=NSN;User Id=userID;Password=password;Connect Timeout=300";

Where is the name of your SQL Server 2012 instance. SQL Server 2012实例的名称在哪里。 It should be the same as you type in the 'Server name' in management studio login dialog. 它应该与您在Management Studio登录对话框中输入“服务器名称”时相同。

The problem is that you are trying to connect to the default instance which is your SQL Server 2008 installation. 问题是您正在尝试连接到默认实例,即SQL Server 2008安装。

If your SQL Server 2008 has expired why dont you then remove the access for the user mentioned in your connection string to the SQL 2008 Db or best make it offline. 如果您的SQL Server 2008已过期,那么为什么不删除对SQL 2008 Db的连接字符串中提到的用户的访问权限,或者最好使其脱机。 If the application fails then you know that it was still pointing to SQL2008. 如果应用程序失败,则说明它仍指向SQL2008。

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

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