Cannot open .sdf files in SQL Server Management Studio 2008 SP3 - sql-server

Has made a .sdf database file in Microsoft Visual Web Developer 2010. When I try to open it in SQL Server Management Studio 2008 Service Pack 3, it displays error message:
Cannot connect to C:\Users\Xtreme\Documents\Dishes.sdf.
Incompatible Database Version. If this was a compatible file, run
repair. For other cases refer to documentation. [ Db version =
4000000,Requested version = 3505053,File name =
\?\C:\Users\Xtreme\Documents\Dishes.sdf ] (SQL Server Compact ADO.NET
Data Provider)
What is wrong? There is no problem to work with the .sdf in Microsoft Visual Web Developer 2010.

You cannot use SSMS to open SQL CE 4.0 Database files.
You can use the Microsoft Web Platform Installer to load VS Tools for SQL CE 4 however.
source: http://social.msdn.microsoft.com/Forums/en/sqlce/thread/a9fca12d-6403-47ff-ab6b-fc1db42205c3
WebMatrix should be able to view/edit these database files as well.

Check out Erik EJ's web log - he has a ton of tools for handling all sorts of operations with .sdf files, and also an extensive list of third-party tools that work with SQL Server Compact Edition's .sdf files.

1.Open SQL Server Management Studio, or if it's running select File -> Connect Object Explorer...
2.In the Connect to Server dialog change Server type to SQL Server Compact Edition
From the Database file dropdown select
3. Open your SDF file.

Related

SSIS on SQL Server 2017 Developer edition

I'm new to SSIS. I developed an SSIS package in VS2017 and trying to deploy on my local SQL Server Db. I installed SQL Server 2017 developer edition. When I'm trying to connect to SSIS on my local machine it runs into error:
Error:
"The specified service does not exist as an installed service".
I want to ask, whether this service is available in developer edition?
SSIS is available as part of the Sql Server 2017 Developer Edition.
Source: See SQL Server 2017 Developer Edition Datasheet.
Is it possible that you didn't select SSIS when you installed the Developer Edition?
Try running the Installer again from Add Remove Programs and see if SSIS appears in the allowable installations with a checkbox in front of it.
The "SSIS Service" is legacy. Don't use it.
SSIS packages from about SQL 2014 onwards are instead stored inside the 'SSIS Catalog'
To access this:
Connect to the SQL Server object explorer (using server type: database engine)
In the object explorer, look under the "Integration Services Catalogs" folder. You may actually have to create the SSISDB catalog at this point
There's a screenshot here
https://www.sqlshack.com/execute-deployed-package-ssis-catalog-various-options/
MS need to improve their documentation.
Also see here:
can not access sql server developer sp1 ssis from ssms

How to convert server based database to local database(MDF to SDF) C#?

Windows application in C# cannot connect to database without SQL Server installed. I created a Windows Forms application in Visual Studio (2013) using C#, for customers info. I created the database with SQL Server and then imported to Visual Studio with data sources.
But it's not working without SQL Server installed. Maybe I need some sort of .MDF to .SDF conversion, but do not need a server database just local database is required.
You can use my SQL Server Compact Toolbox to move schema and data from SQL Server to SQL Server Compact

How do I open Localdb SQL ProjectV12

Short question: I have a visual studio 2015 database project. In my solution. I am using the database first approach for handling my datalayer. How do I open the actual database for management. I can not seem to find any type of SQL server database management tool.
Long question: I am creating a visual studio 15 web application. I am using the visual studio database project for creating and managing the database schema. I was able to create the database during the database compare and update. My server name was "(localdb)\ProjectsV12". I was also able to create my entities from the database. So I know the database exists somewhere. I have never installed anything more than the SQL server express on my local box (I usually use Azure SQL).
According to the error log it is a Microsoft SQL Server 2014 - 12.0.2000.8 (X64) ,Express Edition (64-bit) on Windows NT 6.3 (Build 10240: )
I also have a windows 10 box running Visual Studio 15. So where is the sql management tool?
The localDB is only for development
it can be accessed from server explorer in VS2015 --> Data Connections
connect to server "(localdb)\ProjectsV12" and your DB name
Be aware that you can have multiple SqlLocalDB instances installed on your computer and you can list them by opening up a CMD Window and executing the following command
sqllocaldb versions
For your reference:
The Visual Studio Server Explorer probably gives you all you need, but note you can also connect to localdb from SQL Server Management Studio (download), which is the de facto standard for managing SQL Server databases.

Visual studio 2010 and Sql Server

Do visual studio 2010 include already Sql Server instance, or I need to install Sql Server developer edition to develop an application that need a Sql Server db.
If it installs a Sql Server express edition, it this enough or it's better to have Sql Server developer edition?
I would second that installing the "full" SQL Server Development Edition makes sense if you do serious database development.
However you can have both installed side by side, and having SQL Server Express is very useful for one reason - it supports placing database files in the App_Data folder of ASP.NET applications. While I don't do this for my own projects, it's a very nice feature for demos or open source applications you download from the web: just unzip, start VS, hit F5, and you have a running solution including database. Without SQL Express, you first have to move the MDF file, attach the database, set up user rights, replace the connection strings etc...
The Visual Studio 2010 installer gives you the option of installing SQL Server 2008 Express Edition. This edition of SQL Server is good enough for development purposes but is not intended for production use.
I think the size limitation is not the main issue.
In Sql Server 2008 you have some features in Sql Server Management Studio that aren't available in the Express management Studio or the Express database engine, like:
- suggesting the table and column names (in Query Window)
- Sql profiler
Cor Westra

Importing a MDF file into SQL Server 2008?

I have inherited a VB.net web app that I'm making some changes on. I'm perfectly capable with the programming side (VB and MSSQL) but I'm getting lost with the tools. I was given a zip file of the code and everything. I opened the sln file in Visual Studio 2005 and it worked fairly easily with little modification.
Running the app works perfectly. Problem is, I need to write some new SPs so need the database admin. SQL Server 2008 Express is installed but it doesn't see any database and I have no idea how to import it.
I have a folder App_Data in the project with the file ASPNETDB.MDF. Opening this in VS gived the error:
This server version is not supported. You must have Microsoft SQL Server 2005 Beta 2 or later.
Any ideas where to go from here?
You need to get Sql Server Management Studio. From there you should be able to connect to the instance of Sql Server Express running on your system and tell it to attach to the .mdf file. This will allow you to use that database from withing sql server and management studio, and you will be able to add your stored procedure. Just remember to detach again when you're done, or you won't be able to use the mdf file as you expect from your app.
Visual Studio uses SMO 2005 to connec to to SQL. The SMO 2005 will not connect to SQL 2008 by design. You need to either upgrade VS to VS 2008, or downgrade Express to Express 2005.
You can't attach mdf file made in SQL Server 2005 to a SQL Server 2008 instance. What you need is to install SQL Server 2005 Express, attach this file, backup database, then restore it on 2008 Server instance and detach the database. You will get properly created for 2008 Server mdf.

Resources