問題描述
我希望能夠打開 .mdf 文件.我正在使用 WebMatrix,我可以在那里查看查詢.我也可以閱讀架構(gòu).但是如何在不使用 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.
我搜索了網(wǎng)絡(luò)幫助(通過窗口).但一切都是徒勞的.我更喜歡任何鏈接或任何方法來閱讀基本查詢.
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 文件(除非您更改了會出現(xiàn)問題的擴(kuò)展名).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
.
您可以將數(shù)據(jù)庫附加到您的本地 SQLEXPRESS 實例并查看它.可以在 msdn 上找到附加它的示例:如何:將數(shù)據(jù)庫文件附加到 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
)
我發(fā)現(xiàn)打開它們的最佳工具是 CompactView.
這篇關(guān)于使用什么打開 .mdf(SQL 數(shù)據(jù)庫)文件的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!