PostgreSQL Data Connection/Server Explorer in Visual Studio 2008 - database

I'm trying to find a way to browse a PostgreSQL database from the Visual Studio 2008 "Server Explorer" panel. I downloaded Npgsql but as I understand that's only a library for the code itself, not the Server Explorer.

Npgsql is a .NET provider for PostgreSQL. Whether or not a given provider integrates with Server Explorer depends on whether it supports DDEX, which Npgsl as of now does not, but this support is planned for future versions.
However, if all you want to do is to be able to browse a PostgreSQL database in Server Explorer, you can do this by installing the psqlODBC, the PostgreSQL ODBC driver, and connecting via the .NET Framework Data Provider for ODBC.
alt text http://www.codingthewheel.com/image.axd?picture=postgre_sql_server_explorer.png
Also, I should mention that Npgsql DOES have some design-time integration with Visual Studio - for example you can use NpgsqlConnection objects from the toolbar and so forth.

I looked for this earlier this year and found someone that on some mailing list wrote that they were working on that for Npgsql but it not yet available.
We actually discarded Npsql and now uses dotConnect for PostgreSQL instead. It is a commercial product with a free option but you have to pay to the get the Visual Studio integration.

Related

Unable to open SSIS project in Visual Studio 2012 or 2013 (migration fails)

I am trying to open a solution file in Visual Studio 2013 Ultimate that includes an Integration Services project (.dtproj). Unfortunately, the migration failed for reasons that are slightly baffling to me.
The migration report contains the following error:
RecommenderJobs.dtproj: The application which this project type is based on was not found. Please try this link for further information: http://go.microsoft.com/fwlink/?prd=12395&pver=11&sbp=ProjectTypeDeprecated&plcid=0x409&clcid=0x409&ar=MSDN&sar=ProjectCompatibility&o1=159641D6-6404-4A2A-AE62-294DE0FE8301
Unfortunately, the link appears to be dead, so that's no help.
I also received the following error message when I tried to open this in Visual Studio 2012:
I've tried opening this solution in both Visual Studio 2012 Ultimate and Visual Studio 2013 Premium (which is why I tagged both). Both are on Update 5. I already tried updating all of my extensions and updates, even ones that seem like they wouldn't be directly relevant to the problem (like Visual Studio's Office tools).
I found a similar question on Microsoft's forum. The suggestion there was to upgrade my version of SSIS to the latest version. I tried to install SSDT for VS2013 as suggested, but the install failed:
When I checked the logs, it had the following error:
Error 0x80070666: Cannot install a product when a newer version is installed.
I do, in fact, have a different version installed, but it's not actually newer as far as I can tell (in fact, it launches in the Visual Studio 2010 shell), so I'm a little confused by this. The version information is below:
Microsoft SQL Server Integration Services Designer
Version 11.0.5058.0
Microsoft SQL Server Reporting Services Designers
Version 11.0.5058.0
I do also have tools related to SQL Server 2012 installed.
Based on what I've read in other posts, I'd expect to see the SQL Server Data Tools in "Add/Remove Programs," but it's not. Does anyone know why that might be?
I've also seen related questions for other types of projects, such as for a PowerShell project. (Obviously, my question has nothing to do with Powershell, but the OP there was receiving the same exact error message for a different project type). Unfortunately, the suggestions on that post didn't seem all that helpful - for example, the accepted answer there involved completely uninstalling and reinstalling Visual Studio, which would be a major pain to say the least. I'm also not all that confident that that would work for me since this problem occurs in two separate versions of Visual Studio.
Does anyone have any suggestions on what else I could try?
You likely need to install both Integration services and Business Intelligence for Visual Studio (BIDS). You can do it launching SQL Server Setup and adding features to your current SQL Server Instance.
Have a look at this one: https://guruprasadv.wordpress.com/2009/06/17/opening-ssis-package-in-visual-studio/
BIDS is the IDE (integrated into Visual Studio) that allows you to drag and drop the components and create the SSIS packages. From SQL Server 2014 on wards you won't see BIDS anymore packaged in the SQL Server Setup, so you will have to install it independently. If you need it for VS 2013 here you have the link: https://www.microsoft.com/en-us/download/details.aspx?id=42313

SQL Server Management Studio Version Controlling

As I know if I need to use some kind of version control I need to use 3rd party softwares.
Is there any built in version controlling option in the SQL Server management studio ?
No there is not any version control. You should to use 3rd party tools.
If you are looking to version control the database schema, you could use SQL Server Data Tools (SSDT) along with the version control system of your choice. Although not technically part of SSMS, SSDT is based on the same Visual Studio shell as SSMS so the interface is similar.
SSDT is included with the latest version of Visual Studio 2015, including the free Community Edition. For a vendor database, you could start by reverse engineering the existing database using the SSDT schema compare tool.

SSDT 2013 new database Project missing

This might be a trivial error in my setup but I cannot seem to find where I went wrong in stalling SSDT 2013 with SQl Server and having the open to create a new database template
please see image
what I expect to be in the list in a sql template with the option to create a new database project
could someone tell me what i'm missing ?
Thanks in advance
For database projects you'll need to install a version of Visual Studio that supports it - in your case it looks like you ran the standalone SSDT-BI installer which installs SSIS, SSAS and SSRS templates. This doesn't include database project templates. What you need is to install one of the VS versions with support - there are 2 Express versions (Express for Web and Express for Windows Desktop) and 3 paid versions (Premium, Pro, Ultimate). Here is a quote from the SSDT blog post explaining this:
Visual Studio 2013 - VS 2013 now has SQL Server tooling built in and shipped as part of the core product. Database Projects, SQL tools (such as schema compare & data compare), and the online experiences through SSOX are all included with the RTM version. We have full project and SSOX support in VS Express for Web and Express for Windows Desktop, so we have discontinued our stand-alone integrated shell offering. We have a component update feed that will use VS Update to push notification to users. To manually check for updates, go to the Tools > Extensions and Updates... menu to open the dialog. We will continue to post announcements on our blog and forum that a release is available and what is included in that update.
What version of Visual Studio 2013 are you using? You need to have either the Ultimate, Premium or Pro version for SSDT (Link).
If you do have the right version of Visual Studio then you may need to re-run the installer and opt in to SQL Server Data Tools during setup.
I had this issue and resolved it several years ago. I needed to reinstall SSMS with Data Tools. Unfortunately I am encountering the same issue now, but luckily I had documented the issue at the time. I am finding that because there are newer versions of both VS and SSMS, it is hard to find the proper downloads.
From my documentation (3 years ago) None of the attempts to correct the Visual Studio install directly (SSDTBI_x86_ENU download from Microsoft) were successful, but once we did a complete reinstall of SQL Server 2014 which included the Data Tools, the needed template was available in the Add New Project dialog, and the previously incompatible projects found in GitHub******Report.sln were now compatible.

How to view database diagram in a Code First using localdb

I have a Code First project with Entity Framework 5.0.0 using localdb created in Visual Studio 2012 Ultimate.
Although I can see my class relations in a Class Diagram, how to see a visual diagram of automatic generated database by EF ?
Install Entity Framework Power Tools Beta 4, restart Visual Studio, right-click on the context in your solution view and you'll see a new 'Entity Framework' option in the context menu. Select 'View Entity Data Model' to see a beautiful visual database diagram in Visual Studio. VoilĂ !
Entity Framework 6 Power Tools: Link
You can use Microsoft SQL Server Management Studio 2012 with localdb which supports Database Diagrams in they way you may be used to with other SQL Server database.
Open Management Studio (should have been installed with Visual Studio)
Connect to (localdb)\v11.0, with Windows Authentication
Find the relevant database
Expand Database Digrams, and install diagram support objects if you've not already
Add the tables you need and you're done!
Source: This older but still relevant article: http://visualstudiomagazine.com/blogs/data-driver/2012/05/visual-studio-11-beta-easier-development-localdb.aspx
I checked out the Entity Framework Power Tools Beta 4 and it is no longer being supported. Intead, you can use the new Entity Framework 6 Power Tools Community Edition.
It is supposed to work the same.

How do I create/add a sql server compact edition db in vs2010?

I have vs2010 ultimate installed and sql server 2008 developer. I created a package using the openAuth Extension from the online gallery and can not find an option to add a sql server CE db to my project. I tried changing the target framework to 4.0 and still nothing.
I see a type that says SQL Server Database, but I believed that was for a full blown db to attach to sql server.
Where is compact?
You first need to add it in the Server explorer even if it's new.
Here is the link on how to do it.
link text
If you mean to this:
http://i.imgur.com/NcmH1.png
I fix my problem running SSCEVSTools-esn.msi from the vs2010 dvd.
D:\Visual Studio 2010\WCU\SSCE

Resources