What to use to open an .mdf (SQL Database) file(使用什么打开 .mdf(SQL 数据库)文件)
问题描述
我希望能够打开 .mdf 文件.我正在使用 WebMatrix,我可以在那里查看查询.我也可以阅读架构.但是如何在不使用 WebMatrix 的情况下读取文件.它的 SQL Server 文件不是 Compact 版本.
I was hoping to be able to open .mdf file. I am using WebMatrix, I can view the queries there. I can read the schema too. But how can I read the file without using WebMatrix. Its SQL Server file not the Comptact edition.
我搜索了网络帮助(通过窗口).但一切都是徒劳的.我更喜欢任何链接或任何方法来阅读基本查询.
I have searched for web help (Through windows). But all in vain. I will prefer any link or any method to read the basic queries.
推荐答案
.sdf 实际上是一个 Compact Database 文件(除非您更改了会出现问题的扩展名).SQL Server 将是 .mdf.
.sdf is, in fact, a Compact Database file (unless you've changed the extension which would be problematic). SQL Server would be .mdf.
您可以将数据库附加到您的本地 SQLEXPRESS 实例并查看它.可以在 msdn 上找到附加它的示例:如何:将数据库文件附加到 SQL Server Express.基本上你是在打电话:
You can attach the database to your local SQLEXPRESS instance and view it. An example of attaching it can be found on msdn: How to: attach a Database File to SQL Server Express. Essentially you're calling:
USE [master]
GO
CREATE DATABASE [database_name] ON
( FILENAME = N'C:\Path\To\<database name>.mdf' ),
( FILENAME = N'C:\Path\To\<database name>.ldf' )
FOR ATTACH ;
GO
SQL 精简版 (.sdf)
我发现打开它们的最佳工具是 CompactView.
这篇关于使用什么打开 .mdf(SQL 数据库)文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用什么打开 .mdf(SQL 数据库)文件
基础教程推荐
- 将 SQL Server DateTime 列迁移到 DateTimeOffset 2021-01-01
- SQL:使用来自具有相同列名的两个表中的数据... 2021-01-01
- SQL 效率:WHERE IN 子查询 vs. JOIN 然后 GROUP 2021-01-01
- 如何使用 mysql.connector 禁用查询缓存 2022-01-01
- 无法解决整理冲突 2021-01-01
- 是否可以执行按位分组功能? 2021-01-01
- SSMS 中的权限问题:“对象 'extended_properties'、数据库 'mssqlsystem_resource'、... 错误 229)上的 SELECT 权限被拒绝" 2022-01-01
- 在 SQL 中连接多个表 2021-01-01
- 需要 MySQL 5.1 中的抽象触发器来更新审计日志 2021-01-01
- SQL Server 实例在登录协商期间返回无效或不受支持的协议版本 2021-01-01
