Building Database project in VS 2008 - database

I've spent some time with new Database project in VS 2008 and decided to go with it (really cool). But i've also discovered that i cannot build it on our CI-server where .NET SDK only is installed. I tried to put Microsoft.VisualStudio.TeamSystem.Data.Tasks.targets to the CI-server but it has too many dependencies on assemblies such as Microsoft.VisualStudio.TeamSystem.Data.dll.
Am i right that in order to build it i need VS 2008 Team System installed (unacceptable for CI-server) or there is a simpler solution?

You always need to install on your build server the same software you use to build on a developer machine. In this case, you do need the Data Edition installed. In the same way, if you had web tests as part of your automated test suite, you would need the Test Edition installed.

Related

How does Visual Studio SSIS Handle Extensions and Package Deployment?

I'm fairly new to Visual Studio and SSIS and was wondering if someone could just clear up for me how Visual Studio SSIS Projects and Visual Studio in general handle Add-In Extension and Package Deployment.
The Scenario: I am currently developing and creating a Visual Studio SSIS Package on my local machine.I need to use an extension from the Tools > Extensions and Updates which just links me to a webpage.I need to install this and use it to make a package which I will deploy to the Integration Services Catalog on a SQL Server 2014 that does not have Visual Studio installed. When I deploy this project as a package will the things the extension did be baked into the package or is it like references where I will need to install the extension on the server that will be running the package via SQL Agent Job. Thanks, any help is appreciated.
When you deploy a package to the catalog, all libraries/extensions (eg.azure connection etc) are deployed along-with, so no special treatment is needed. But many a times you will need to ensure your frameworks( eg. .net 4.0 etc) exist for the extension to be executed on the integration services server you are deploying to.
In some cases you have to register the dlls using GACUtil, to the integration services server. Your custom tool installation instructions will specify that.

SSIS environments and deployment

I use SQL Server 2012 with Visual studio 2010 with Integration Services Catalog. I would like to know if it is possible to deploy my ssis 2012 project to only one of the three environments I have created.
I am trying to understand if this is possible or if environments are created only for different variable values (for different test scenarios etc).
So my question is if I can have deployment version 1 on my DEV environment and deployment version 2 on another environment.
Thank you
Sure it's possible. It's the opposite of what most people want, but you can create a DEV version of your package and only deploy it to your DEV environment, and then create a 2nd version of the package and only deploy it to your 2nd environment.
Note that I am talking about having two separate .dtsx packages, which will have to be maintained separately. That is what I think you are asking. If I have misunderstood, then your question wasn't clear.

How to convert VS2010 SQL Server Unit test project to VS 2012?

I have VS 2010 project with SQL Server unit tests. I need to convert them to VS2012. After much googling I found a msdn article which does not lay out the steps. The context menu on project does not contain anything related to project upgrade. After opening the project in 2012 you wont see your test sql unit test queries. If I open it in vs 2010 I see them. After opening the project in vs 2012 and if I create new sql unit test it will get pop-up box saying :
I have SSDTBI_VS21012 installed. Any idea how I go about converting my VS2010 project with SQL Server unit tests to VS2012?
I work on the product team, thanks for raising this. After a quick investigation, this looks like it is a regression introduced in the July release of SQL Server database tooling in Visual Studio. Could you please file a connect bug for this issue at https://connect.microsoft.com/SQLServer/feedback/CreateFeedback.aspx and use the category "Developer Tools(SSDT, BIDS, etc.)". We will treat this as high priority, and this is the best way to ensure it'll get tracked and you can see when it's fixed.
Unfortunately there is no workaround in the July/November releases as an overzealous check was added to avoid showing this option for all unit test projects, and we don't have an overrideable command. However, to unblock yourself you should be able to do one of two things:
Workaround #1 uninstall the database tooling components and install an earlier version instead. Here's how:
Go to Add/Remove Programs
Uninstall "Microsoft SQL Server Data Tools 2012", which is the overall installer, if present
Uninstall "Microsoft SQL Server Data Tools - enu" (if you have English installed).
You shouldn't have to uninstall "Microsoft SQL Server Data Tools Build Utilities - enu" if you're using July/November release as it's no longer relevant. However if you run into trouble, consider uninstalling this too.
Install the April release of SQL Server tooling for VS2012 instead. The SSDTSetup.exe file to do this is found at http://download.microsoft.com/download/0/D/F/0DF6C816-A7D5-4C17-8B10-2061FC97D37E/EN/SSDTSetup.exe. Note if you are not using English, change the "/EN/" part of the URL to a different language such as DEU and it should allow you to download that language version.
Workaround #2 Migrate to a new Unit Test Project
You can alternatively create a new SQL Unit Test Project and migrate your tests across:
Create a unit test project based on a procedure in your SQL Project, or create a new Unit Test Project and go to "Add -> New Item -> SQL Server -> SQL Server Unit Test").
When it opens the SQL Server Test Configuration dialog, be sure to enter valid values for the reference project and the connection string(s) - these should match your previous project
Copy across your unit test files from the old project. If you build, it will fail due to a missing reference. We'll fix that next.
Unload the project (right-click, unload project) and add the following snippet near the top:
<PropertyGroup>
<IncludeSsdtUnitTestAdapter>True</IncludeSsdtUnitTestAdapter>
</PropertyGroup>
Reload the project, and build. This should now pass as the adapter DLL used in migration will be included in the references.
Lastly, run the tests and it should work.

Embedding SQL Server into a .NET application

Hey, I've just finished writing a VB.NET application. Now I want to package the executable and the database ofcourse into a single installer file. I tried using QSetup, InstallShield to make SQL Server embedded into the setup file, and finally after hours of try&fail I have no idea. Anyone?
You can do a rightmouse on the properties of your Visual Studio Setup Project, and then there is this button 'Prerequisites'. There you can tick 'SQL Server Express ...' Or the 'SQL Server Compact 3.5'
link to image
You're probably best off just to set the connection file directly to the mdf, and attach it when the program is run. This is easier as it doesn't require a custom setup script to install the database to the database directory itself.
Note: Consider using the Compact Version, it's smaller, people don't like a full blown engine on their computer :)
InstallShield has a concept called Setup Prerequisites where you can teach it how to install additional packages along with your own. In older versions this would happen before calling your MSI. In newer versions you can have a "Feature" prerequisite where the prereq can associated to a feature and only installed if that feature is selected to be installed and after it's been selected but still before the main activity of your MSI occurs during the install execute sequence.
InstallShield also has a pattern for executing SQL scripts against your database instance so that you can then load your database into your newly installed instance.
All of this is quite powerful but it does take a bit of digging to learn.
As far as I know, anything but the SQL Server Compact Edition (SQL Server CE) cannot be embedded into your setup, really. Microsoft doesn't want that - you need to have SQL Server Express installed separately - any other edition can't even be shipped with your software (the client must have a license and installation separately).
You can indeed distribute SQL server with your custom application:
http://msdn.microsoft.com/en-us/library/bb264562(SQL.90).aspx

How do I reference SSIS on a build machine without installing SQL Server 2008 Client Tools?

I need to build SSIS packages on a build machine, and do not want the overhead of installing SQL Server Management Studio on this machine. A SQL Server 2008 SDK would be ideal, but I could not find where to download it.
The dlls I require are (for example):
Microsoft.SQLServer.ManagedDTS
Microsoft.SqlServer.PipelineHost
Microsoft.SqlServer.DTSPipelineWrap
Microsoft.SQLServer.DTSRuntimeWrap
I could attempt to copy them to the build machine individually, but I would rather just use an SDK if possible.
Where can I get the SDK, or alternatively, what suggestions are there?
You could probably manually copy things about and register then in the GAC, but the client tools are hardly huge, and don't take long to install, so I don't see why they are much of an overhead?
As far as I know there's no other way to get those assemblies.
I think he is trying to accomplish SSIS packages as part of the automated continuous build process. The way i did it was to have an express edition of SQL Server and SSIS on the build machine, use BIDS helper to script the cmd line file for deploying the packages and use NANT to use this script. Hope this helped.
I don't know about SQL 2008 but SQL 2005 SSIS packages are developed in Visual Studio.
Edited:
When you run install for client tools, it's an option to add the stuff to VS.NET, "Client tools" as such can be deselected (end edit)
SSMS can be used to manage them and administer.
What other editor did you want to use...?

Resources