当前位置: 动力学知识库 > 问答 > 编程问答 >

SQL Server - Sharing database over different boots on local machine

问题描述:

Suppose I have 2 bootable partitions on my local machine with Windows 7 running SQL Server 2008 R2 on one and Windows 8 with SQL Server 2012 on the other.

Is it possible to run/attach the same database (created under SQL Server 2008 R2) on both versions of Windows so if I boot up Windows 7 I can run my application against it. And if I run up Windows 8 I can run my application up against that? Would there be any issues if I tried it - i.e logins?

Thanks,

Andez

网友答案:

No, that won't work.

As soon as your SQL Server 2012 version would access one of the database, it will upgrade it to the latest internal database version for the 2012 version.

And once that's happened, the SQL Server 2008 R2 cannot use that database file anymore.

The best solution for this would be to put the database on a separate server which you can access from both your partitions - and consolidate on one SQL Server version (preferably 2012). The other obvious option would be to install the same version of SQL Server on both partitions.

网友答案:

Everything is stored within database, so no you will not have any issues. Just remember to use not only main application database, but use the same meta-databases (aka System dbs).

In fact it works this way on failover clusters.

EDIT: Haven't noticed you are going to run 2 different db systems. I would recommend you to use exactly the same versions of SQL server.

分享给朋友:
您可能感兴趣的文章:
随机阅读: