简体   繁体   English

从SQL Server 2014 Express降级到SQL Server 2012 Express

[英]Downgrade from SQL Server 2014 Express to SQL Server 2012 Express

I had SQL Server 2012 Express installed on my PC at work, but we received a file from a client the was created in SQL Server 2014. Please keep in mind, I am newbie, and I only made this mistake about 7 months ago 我在工作中的PC上安装了SQL Server 2012 Express,但是我们从客户端接收到了在SQL Server 2014中创建的文件。请记住,我是新手,大约7个月前才犯此错误

I tried to install SQL Server 2014 Express as another instance on my PC along with SQL Server 2012. After noticing that my new SQL Server instance did not work and my old SQL Server did not work, I looked online and found that what I did was a step up from what an ape would do. 我尝试将SQL Server 2014 Express作为SQL Server 2012的另一个实例安装在我的PC上。注意到我的新SQL Server实例不起作用并且旧的SQL Server不起作用之后,我上网查看并发现我所做的是从猿猴的行为上进步。 Always read before attempting an install. 在尝试安装之前,请务必先阅读。

After un-installing SQL Server 2014 I tried to relaunch SQL Server 2012, but it would not connect to my instance that I was able to just before. 卸载SQL Server 2014之后,我尝试重新启动SQL Server 2012,但是它无法连接到我之前能够访问的实例。

I now get this error: 我现在收到此错误:

Cannot connect to STID02\\SQLEXPRESS. 无法连接到STID02 \\ SQLEXPRESS。

A network-related or instance-specific error occurred while establishing a connection to SQL Server. 建立与SQL Server的连接时发生与网络相关或特定于实例的错误。 The server was not found or was not accessible. 服务器未找到或无法访问。 Verify that the instance name is correct and that SQL Server is configured to allow remote connections. 验证实例名称正确,并且已将SQL Server配置为允许远程连接。 (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (.Net SqlClient Data Provider) (提供程序:SQL网络接口,错误:26-指定服务器/实例时出错)(。Net SqlClient数据提供程序)

I have also read this thread Can't connect to SQL Server 2014 Express and found that the SQL Server service is stopped and I cannot start it, and the SQL Server Agent Service is stopped and won't start either. 我还阅读了该线程无法连接到SQL Server 2014 Express ,发现SQL Server服务已停止并且无法启动,并且SQL Server代理服务也已停止并且也无法启动。

I have not been effected by this until recently, I need to do some testing with DB's but I need my local instance to do the testing. 直到最近我还没有受到影响,我需要对数据库进行一些测试,但是我需要本地实例进行测试。 I would appreciate any advice, as I am still new to SQL Server and most computer related things I would be very thankful to those how can dumb it down extremely low. 我将不胜感激任何建议,因为我还是SQL Server和大多数与计算机相关的事物的新手,我将非常感谢那些能够将其降低到极低水平的人。

Thank you -Anthony 谢谢-安东尼

In short, uninstall everything, then reinstall the version you want to use. 简而言之,请卸载所有内容,然后重新安装要使用的版本。

Some configuration files must have been overwritten by SQL Server 2014. Don't worry, it can be fixed. 某些配置文件必须已被SQL Server 2014覆盖。不用担心,可以将其修复。

First: do you need any of your existing databases? 第一:您是否需要任何现有数据库? I assume not as you haven't been using SQL Server for the last 7 months. 我认为不是,因为您过去7个月没有使用SQL Server。 If you do need some of the databases you'll find the .mdf , .ldf files in you SQL Server installation folder somewhere in the DATA folder. 如果确实需要某些数据库,则可以在DATA文件夹中的SQL Server安装文件夹中找到.mdf.ldf文件。

Then: Uninstall SQL Server 2012 - note that since you've corrupted your current installation it might happen that some registry entries will be bad and/or services or libraries won't be removed. 然后:卸载SQL Server 2012-请注意,由于您破坏了当前的安装,可能会发生某些注册表项错误和/或服务或库无法删除的情况。 In that case fix the registry entries using some tool, like CCleaner , and try again to remove those programs/services. 在这种情况下,请使用CCleaner类的工具修复注册表项,然后再次尝试删除这些程序/服务。

Last step: reinstall whichever version you want. 下一步:重新安装所需的任何版本。 If you needed your previous databases overwriting the new mdf/ldf files should do the trick (of course while the server is not running). 如果您需要以前的数据库,则覆盖新的mdf/ldf文件应该可以解决问题(当然,当服务器未运行时)。 You can check the server's state from the SQL Server Configuration Manager or from Services. 您可以从SQL Server配置管理器或服务中检查服务器的状态。

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

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