You might get the following whilst trying to attach a .sdf file (SQL Server Compact) in SQL Server Management Studio:

Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)

Additional Information:

An exception occurred while executing a Transact-SQL statement or batch.

‘path’.sdf is not a primary database file.

Microsoft SQL Server, Error: 5171

image

 

What has happened – you tried to attach a SQL Server Compact Edition file to SQL Server Management Studio, but in the wrong connection method. Don’t do a connect within the SQL Engine. Go to the menu and do File >>Connect Object Explorer, and then in Server Type choose SQL Server Compact.

Thanks,

Lee

 

-----------------------

SQL Server Compact Edition – oh the power at-hand!


Posted in: SQL Administration  Tags:
blog comments powered by Disqus

by Lee Everest, M.S.

Poll

Do you use Azure or cloud in your organization?



Show Results

Ads

Search


Month List

Calendar

«  February 2012  »
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
2728291234
567891011
View posts in large calendar

Tags

Disclaimer
The opinions, code, examples, et.al. expressed herein are my own personal opinions and do not represent my employer's view in any way, shape form, or fashion.  All code for demonstration purposes - no guarantees, either written or implied, are made.

© Copyright 2012 Lee Everest's SQL Server, etc. weblog