SQL Server 2005 在哪里保存 .mdf 文件?

发布于 2024-09-14 18:54:23 字数 102 浏览 2 评论 0原文

我正在从 SQL Server 2005 升级到 2008。我已经分离了所需的数据库,但在文件系统上找不到它。

SQL Server 2005 的默认安装将这些存储在哪里?

I'm upgrading from SQL Server 2005 to 2008. I've detached the database I need, but can't find it on the file system.

Where does a default installation of SQL Server 2005 store these?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

踏月而来 2024-09-21 18:54:23

您还可以使用 Management Studio 查看任何数据库的属性>文件 - 这将显示文件及其增长设置。

You can also use management studio to look at the properties>files of any database - that will show the files and their growth settings.

○闲身 2024-09-21 18:54:23

运行此查询,

use model
go
SELECT physical_name FROM sys.database_files

尝试一下,在我的笔记本电脑上

它位于此文件夹C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\

try this, run this query

use model
go
SELECT physical_name FROM sys.database_files

in my case on my laptop it is in this folder

C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\

热风软妹 2024-09-21 18:54:23

默认情况下,位于 \Program Files\Microsoft SQL Server\

By default, in \Program Files\Microsoft SQL Server\

屋檐 2024-09-21 18:54:23

SQL Server 2005 的默认位置为:

  • \Microsoft SQL Server\MSSQL.1\MSSQL\ 对于数据库引擎
  • \Microsoft SQL Server\MSSQL.2\OLAP\ 对于 Analysis Services
  • \Microsoft SQL Server\MSSQL.3\RS\ 对于报告服务

请参阅此处了解更多详细信息。

有时,如果系统文件之一损坏,您将无法查看属性。

The default locations for SQL Server 2005 are:

  • \Microsoft SQL Server\MSSQL.1\MSSQL\ for the Database Engine
  • \Microsoft SQL Server\MSSQL.2\OLAP\ for Analysis Services
  • \Microsoft SQL Server\MSSQL.3\RS\ for Reporting Services

See HERE for more details.

Sometimes you can't look at the properties if one of the systems files is corrupt.

心房敞 2024-09-21 18:54:23

您始终可以转到SQL Server Management Studio并右键单击数据库,然后选择属性,然后转到文件角度,您将看到两个文件显示在表格中,分别是MDF文件和Log文件,检查路径!转到该文件夹​​,您的数据库是MDF 文件

PS:为了能够复制,我认为你必须终止 SqlServer 进程,这有点肮脏,不是,但它很快,我使用它,对我有用!

you can always go to SQL Server Management Studio and right click on the database, than select proprieties, than go on the angle Files, you will see two files displayed in a table on is MDF file and Log file , check the path ! go to that folder, your database is the MDF file !

PS : to be able to copy i think you have to terminate the SqlServer Processes, that's a little dirty way isn't, but it's fast and i use it, works for me !

神妖 2024-09-21 18:54:23

进入C盘-->程序文件 -->微软 SQL Server --> MSSQLXX --> MSSQL——> DATA

数据文件夹包含 mdf 和日志文件。

Go to C Drive --> Program Files --> Microsoft SQL Server --> MSSQLXX --> MSSQL -- > DATA

The Data Folder has mdf and log files both.

或十年 2024-09-21 18:54:23

您可能应该从 Management Studio 导出数据库,这样就不会有任何兼容性问题。

You should probably do a database export from management studio so there aren't any compatibility issues.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文