Although there are GUI tools in VS2010 for entering data, writing queries etc against a SQL CE4 db, there doesn't appear to be a way to visualise the database in a digram.
So my Questions are
A) Have i missed something in VS2010 tools for sql Server CE4
b) Can i use SMSS to Diagram SQL CE4 databases. I've tried it but it wouldn't allow open the db. Is there a plugin available?
Thank you.
Microsoft does not supply a diagramming tool for SQL Server Compact 4, you could try my VS 2010 add-in http://sqlcetoolbox.codeplex.com (Create Database Graph) or the Data Port Console from http://www.primeworks-mobile.com
Actually, there IS a diagramming tool for SQL CE right into VS, but it's hard to find.
I only tried this in VS 2012 Preview, but it might work in older versions - please speak up in the comments.
Here's how to get to it:
In 'server explorer' create a normal connection to the SQL CE database. (No diagramming options are visible...)
Then right-click a table -> "Show table data"... Wait for it...
Hit Ctrl-1.
TA-DA!!
Alternatively, Right-click in the window with the tabular data and choose "Pane" from the context menu. (I know, 'Pane' !?)
Finally, from the 'Pane' submenu click the obvious choice - "Diagram".
There you have it.
SDF Viewer is now able to create database diagrams for SQLCE databases
Related
I searched many times, but there was no answer from MSFT or any other communities for this issue.
I have the Community edition 2019. Tabular model explorer is greyed out in the View->Toolbar->Other windows. I have no luck with VS 2017 EE as well, the same problem there too.
I could able to use the Import Datasource button on the Model menu and pull the source tables for building, however, Tabular model explorer and the data source folders are missing or not being able to use from a project perspective. Since the tabular model explorer is missing, I couldn't able to use the data transform window for each table and thus literally making a stop on development.
This is really annoying.
Here is VS 2019 system info
Microsoft Visual Studio Community 2019
Version 16.5.3
VisualStudio.16.Release/16.5.3+30002.166
Microsoft .NET Framework
Version 4.7.03062
Installed Version: Community
SQL Server Analysis Services 15.0.19049.0
Microsoft SQL Server Analysis Services Designer
Version 15.0.19049.0
SQL Server Data Tools 16.0.62003.05170
Microsoft SQL Server Data Tools
SQL Server Integration Services 15.0.2000.93
Microsoft SQL Server Integration Services Designer
Version 15.0.2000.93
SQL Server Reporting Services 15.0.19049.0
Microsoft SQL Server Reporting Services Designers
Version 15.0.19049.0
[Update 04/10/2020- Attached screenshot of the greyed out window menu]
[SSAS Tabular Explorer Window greyed out]1
In your screenshot, Model.bim does not appear to be open. You have to open it for Tabular Model Explorer to show up. Double click Model.bim in Solution Explorer.
Other issues that I don't believe apply to you, but may to others:
The Compatibility Level of the model must be at least 1400. Check by selecting Model.bim in Solution Explorer and then look in the Properties Window.
You also must have the Analysis Services extension installed. Search on "SSDT" for current installation steps.
If you left click on the Model.bim File in solution explorer and look at the properties window you should see Compatibility Level is 1103 or less. You will need to upgrade to a newer compatibility level to use Tabular Model Explorer. What version is your SSAS Server? You can upgrade to that level or lower.
You are probably using compatibility level 1400, in which you have to click on the Design button instead - see this Microsoft reply.
You need to install the Analysis services tabular projects extension from the Marketplace. Post that you should be able to see the tabular model explorer
I have 1400 compatibility level and still the tabular explorer didn't show up, it was greyed, it's some kind of bug, you can solve it by simply double clicking again on the model and opening it.
I believe I am following the instructions at http://msdn.microsoft.com/en-us/library/vstudio/ms171960.aspx but whatever I try, the Query Designer toolbar remains greyed out and 'Query Designer' does not appear in the main menu. Am I missing something?
(VS2013 version 12.0.21005.1 REL connecting to a SQL 2008 R2 Express db)
Have posted similar problem here - Solved on this thread.
Create two connections in VS Server Explorer.
1) Microsoft SQL Server Database File (SqlClient):
Use this for editing tables, and for the connection string in the software.
2) Microsoft SQL Server + .NET Framework Data Provider for OLE DB:
Use this for visual queries.
Everything is VS, Publish options don't give 'file in use'.
On a completely unrelated Twilight Zone moment - you posted the same question, on the same day, on the same forum, and both our names are Peter G!
I am working on project (VS2010 .NET) and have two SQL Server databases, Dev and Prod.
I make all database structure changes in the Dev database and after testing I apply the same changes to the Prod database.
Maybe someone could suggest schema comparison tool which could help me to compare structure and apply changes.
RedGate makes excellent tools for the purpose.
I know of two really good tools:
Red-Gate SQL Compare
ApexSQL Diff
You can also get SSDT (free) here - more about SSDT on my blog.
although you are working in 2010, if you can get hold of VS 2012
go to SQL (menu item) -> Schema Compare. Click on Select Source on the left, and select the dev database. Select the production database on the right.
Then click on the generate script icon (next to the Update icon, it looks more or less like a music icon). That will generate the update script. You may also untick any of the changes that you do not want to include in the script. And it is ... 'free' if you happen to own Visual Studio 2012
I installed Microsoft WebMatrix, which, I believe comes with SQL Server CE4. I've tried opening the SDF file in SQL Management Studio (SQL 2008), but I get the following error message:
-------- Microsoft SQL Server Management Studio:
There is no editor available for
'C:\efTest\App_Data\SchoolRepository.sdf'.
Make sure the application for the file
type (.sdf) is installed.
How do I view/modify my .sdf database?
I see there is a similar question on StackOverflow (http://stackoverflow.com/questions/4070860/sql-compact-4-0-cant-open-read-sdf-file) but I would really like to use Management Studio if I can, and not another 3rd party tool.
Have you tried the SQL Server Compact Toolbox?
or the SQL Compact Query Analyzer?
You can download sql ce through web api just follow this link
visual-studio-tools-for-sql-serverl
to do that.
Here are a couple which have worked quite well for me in terms of connecting to SQL CE 3.5 and 4.0 databases:
LINQPad - (See my remark to question) It works quite well plus it allows for specifying LINQ or SQL for queries.
CompactView - Seems pretty full featured + install creates a nice Windows file association so one can simply double-click to open/connect to .sdf files for instance.
All of the other options require SQL CE 4.0 Database Provider installed on your machine.
This one doesn't need provider http://sqlcequery.codeplex.com/
If you are using Visual Studio 2015, 2013, 2012, 2010, try SqlCeToolbox.4.5.0.3.vsix. It is SQL Server Compact/SQLite Toolbox for Visual Studio.
The link:
http://www.sokhawin.com/how-to-open-sql-compact-edition-file-sdf-in-visual-studio-or-linqpad/
It has ability to open and edit.
I've downloaded the RTM version of SQL CE (Compact Edition) and installed it. I've installed the SQL Server Compact Toolbox. I understand that SQL CE4 support within Visual Studio won't happen until SP1 drops.
The problem is, while I have tools to edit the CE Database, I can't find a way to actually create a SQL CE4 database. I figure I must be missing something obvious, but 20 minutes of searching hasn't turned up anything. How do I create a SQL CE4 database?
Thanks,
Erick
Edit: I would rather avoid installing and running WebMatrix.
The SQL Server Compact Toolbox also allows you to create a database file (via the Add Connection dialog)
There's probably a better solution, but you could try out WebMatrix. With it I created an Orchard site, but after creating the site you can create new databases by clicking the 'New Database' button.
Really easy. Don't think this is the best option though...