Visual Studio Create Script setting ignores Target Platform - visual-studio-2013

For my database project, I put the tick on the Create script (.sql file) in my Project Settings. And Target Platform is set to SQL Server 2008. I have SQL Server 2012 installed on my machine. But the script its generating only works in SQL Server 2012, doesn't work in SQL 2008 at all. Is there a way to generate the script for SQL Server 2008? I'm surprised it's using whatever is installed locally and ignoring the Target Platform setting.

This is a bug in SSDT:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/2fdffc00-055c-487d-827d-f17b751dc5cd/ssdt-generates-2012-option-for-target-2008-when-target-is-a-dacpac?forum=ssdt#60de8e54-02a8-4983-a1d5-7f44766a167b
I have a deployment contributor which removes those invalid options. You can get it here: http://scardevblog.blogspot.com/2015/03/ssdt-generates-2012-option-for-target.html

Related

How do I deploy an SSRS solution?

This is an extremely vague question because I don't know enough to know what I don't know. Here's my situation:
I have downloaded SSDT and connected to a data source (A SQL Server DB instance). I've created a report. I can preview the report in VS. I can publish the report from the VS build menu and it gets published to my local reports server that seems to have been installed by default at http://localhost/reports. I can use a browser to go to that url and see the report I created.
Now, the problem is that this is all only in my local development environment. I installed SSDT through Visual Studio and it auto-created my reports server. Is there a way to install a reports server without installing visual studio and publish the reports from a report solution using an MSI created by a packager like WiX? I'm having a hard time finding information about how to do this.
The report server is typically installed when you install SQL Server. If you want to publish reports so that others can use them do the following:
Go to your VS solution and right-click on the project then select properties.
Set the TargetReportFolder (this will be created if it does not
exist). This will usually reflect the name of the group of reports
you are working on (e.g. 'HR Reports')
Set the TargetServerURL to the report server on your SQL Server box for example http://mySQLServerBox/reportserver/
Set the TargetServerVersion to match your SQL Server installation version (SQL Server 2016 etc)
Now you can simply right-click a report rdl in VS and choose deploy, you can also do the same at the folder level to deploy all the reports in one go.
To access the reports, go to the web portal which will usually be http://MySQLServerBox/reports
I hope this is what you are looking for..

Issue deploying dacpac on SQL Server 2008 R2 created using VS13 Database Project

I have a Database Project in Visual Studio 2013 which I use to create a dacpac file and deploy it on SQL Servers using SQL Server Management Studio. I can successfully deploy the dacpac on SQL Server 2012 but when I try to deploy it on SQL Server 2008 R2, I get the following error message when selecting the DAC package:
<DacType xmlns='http://schemas.microsoft.com/sqlserver/dac/Serialization/2012/02'> was not expected. (es3ttafd)
I have selected "SQL Server 2008" as Target Platform under Project Settings but this does not seem to modify the namespace. When I unpack the dacpac, I can see that this namespace exists inside DacMetadata.xml, model.xml and Origin.xml files.
Is there anything I can do to stop including that namespace in the dacpac (or change it to the correct one?) in order to allow me to deploy it on an SQL Server 2008? I can successfully publish the project through VS on the SQL Server but I want to be able to create a dac package and deploy it on other servers as well, using the wizard.
Thanks.
I suspect that you're using an old version of SQL Server Management Studio to deploy to SQL Server 2008. I'd suggest downloading the latest SSMS (available here: https://msdn.microsoft.com/en-us/library/mt238290.aspx) and using that to publish.
Alternately, the most recent version of the Data-Tier Application Framework (available here: https://www.microsoft.com/en-us/download/details.aspx?id=53876) includes SqlPackage.exe, which can be used to publish a dacpac file, like so:
SqlPackage.exe /a:publish /tcs:"Data Source=SERVER;Initial Catalog=DBNAME;Integrated Security=true" /sf:C:\project\mydb.dacpac
See documentation for SqlPackage.exe here: https://msdn.microsoft.com/en-us/library/hh550080(v=vs.103).aspx

Cannot Import DTSX files back into SQL Server 2008r2 Int Services after export and edit in VSPro2013

I've carried out a lot of work here and want to be able to use my DTSX packages
But I get the version incompatibility and the Error message is specific
But there must be some way I can run my packages. They appear to not be able to be run from within VS2013 Pro editor
My question is, what do I need to install exactly to all allow me to execute these saved packages?
By asking here i can save time since there are many versions and many add ons etc
First - how to run a SSIS 2008 package?
There is a good overview here, by Ashish Kumar Mehta of MSSQTips, on how to execute packages both remotely on the server or locally. Either way you need the SQL Server Client Tools installed from the SQL Server media (CD, image, etc.). There's no possibility of running a package locally from Management Studio or raw Visual Studio. You can run the package remotely through Management Studio only if that package was stored within the SQL Server. Theoretically, you can run a package in development mode via VS2013, see below.
Second - how to modify a SSIS 2008 package?
Unlike subsequent SQL Server (and SSIS) versions, with 2008 you couldn't just use your regular Visual Studio with a downloadable plugin. You had to install one Business Intelligence Development Studio (BIDS), a Visual Studio 2008 derivative (i.e. not a plugin) available on your SQL Server media. That's the way to go if you want to edit the package but also maintain its 2008 version. Otherwise, you're free to upgrade the package to Integration Services 2014 level by several methods, and start hacking at it via Visual Studio 2013 with a downloadable Data Tools - Business Intelligence plug-in. Be advised, it's not possible to convert the package back to 2012 nor 2008 versions.

Install sql server express database engine only

I am deploying a wpf application that requires sql server 2008 as a prerequisite. As a result I am embedding the sql server installer in my application. When that launches the SQL Server Installation window shows up:
I don't want the user to have to go through out this installation. That program will install SQL Express and many other things like SQL Management Studio.
Is there a place where I can download SQL Express 2008 the database engine only? so that the user will just have to click next, Agree, Ok... etc... without having to make complicated decisions. Or maybe is it possible to install sql server express throughout the command line?
I am including the installer in my application because my application is supposed to be able to be installed without having an interenet connection. Also I cannto seem to find a place where I can download SQL Server express the database engine only.
Go here and download the appropriate version of SQL Express. Then see the How to: Install SQL Server 2008 R2 Using a Configuration File article on MSDN. Note that after you generate the config file for the installation, changing the following keys in the config will probably be of particular interest to you:
; Setup will not display any user interface.
QUIET="False"
; Setup will display progress only without any user interaction.
QUIETSIMPLE="True"
; Automatically accept the license terms
IAcceptSQLServerLicenseTerms="True"

Making script to create database skeleton for SQL Server 2008

I'm making Visual Studio setup for my project.
I want it automatically create empty database inside some SQL Server 2008 (Express)
Is there some tool / way to automatic generate such script of my database (sadly my database structure isn't stable yet)
How can I add it to installation process ? I know that I can run programs and scripts during installation but how can I specify SQL Server for my script ?
thank you.
In SSMS, Right-Click on database -> Tasks... -> Generate Scripts....
Suggest you also look at using the Database GDR R2 projects (if using VS 2008) or the built-in database project if using VS 2010.

Resources