SSDT Visual Studio 2013: Config file will not save - sql-server

I created an SSIS package using Business Intelligence studio and since then have been given a new laptop on which I installed Visual Studio 2013. I also installed SSDT and converted this SSIS package.
We use config files as part of our deployment model.
I am now in the need adding DefaultBufferMaxRows and DefaultBufferSize as configurable properties. Everything looks fine until I click on Finish: the dtsconfig file is not updated and remains the same, although I receive a message confirming it was updated.
I am running as an administrator and I have full right on the folder where I try to save the config file. The Package Configuration Wizard has no issues retrieving the existing properties either.
Is this a common issue? What would be a good workaround?
Thanks in advance!

Related

Vb.Net Application installer not updating access database

As the title says my vb.net application installer is not updating the correct database, the application works fine when debugging with visual studio, however when i install it the database in the data directory is not updated to the latest.
I use "Microsoft Visual Studio Installer Projects" to make an installer with all the needed files, this is how i have set it up:
Application Folder:
Image
User Desktop: I have just a shortcut to the .exe in the application folder
User's Program Menu: I have a folder with the app name and inside that a shortcut to the .exe in the application folder
When installed into the computer the database is not the latest and i know this because when i try to use a button with an insert query the app gives back an error non being able to find a column, "ID_User", that i just recently added.
Database connection string:
Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Account.mdb")
More Info:
I used the visual studio deployment wizard to create the setup files instead of the Visual Studio project installer and the application works just fine so i assume its a problem just with the other installer and how its configured but i cant figure out whats the problem, i always used it and never had problems until the latest release.
Edit:
I tried adding the database inside the application folder in the Visual Studio project installer and setting the property of the database to always copy it inside the output directory, still no luck.
Solution:
I don't know either what happened but somehow i might have messed up something in the database while editing it, i made a new one with the same fields and replaced the old one, now everything works just fine.
Edit 08 Jan 2021:
Same problem happened again, and this time i think i know why... i edited the database again but i didnt open the file directly but from Visual Studio solution explorer and then edited it. When i tried installing the new version it didnt work again and when i changed the database it started working again. So i think the problem is that the visual studio db editor doesn't save changes somehow.

Can't open properly a SSIS package based job from SSMS in Visual Studio

I need to understand what a certain job in SQL Server 2012 does. It's a job someone created and left the company before I started to work here, and nobody on my team knows what this job does also.
The job isn't SQL command based but SSIS Package (which I'm not familiar with), the package points to a Maintenance Plan with the same name as the job. As I read on the internet I connected via Integration Services type, then Stored Packages -> MSDB -> Maintenance Plans, right click on the Maintenance Plan and exported it to a .dtsx file.
I opened it in Visual Studio 2010 Shell, but I can't edit anything because of this error:
The task with the name "" and the creation name "" is not registered for use on this computer.
I also don't have a Solution Explorer for that package, and the icons of the tasks seem a bit faded compared to tasks icons of a new project if I create one.
Maybe the dated version of the VS can be the problem? Perhaps there is other way to see what this job does?
I never worked with SSIS before so maybe I'm missing something very basic but I've been on the Internet for days already and can't find any solution.
Please help,
Thanks in advance
By way of background, until Visual Studio 2019, VS, by itself, couldn't open an SSIS package.
Prior to VS 2010, you needed to use a different product, called Business Intelligence Design Studio (BIDS), which was based on VS, but was built for SQL Server functionality. With the release of SQL Server 2012, Microsoft created SQL Server Data Tools (SSDT) as a plugin for VS that required a separate installation. Until SSDT(VS) 2017, you needed to have stand-alone versions of BIDS or SSDT for each version of SSIS you were working with in your environment. The 2017 version, though, is backward compatible to SQL Server 2012, and forward compatible (!) to SQL Server 2019. Visual Studio 2019 has SQL Server Data Tools sort of built in, but you need to add extensions through the extension manager for SQL Server Integration Services (SSIS), Analysis Services (SSAS), and/or Reporting Services (SSRS).
That's kind of a lot to take in, and is sort of irrelevant to you, but it forms the context for Larnu's comments. Rather than messing around with antique versions of Visual Studio, you should just install either VS2017 and also SSDT, or VS2019 with the SSIS extension. Both are in current widespread use, so support is easy to find, and either will allow you to work with the 2012 package you're trying to open up.
Once you have the software installed, you should be able to create a "dummy" integration services solution that you can use to open random packages. I keep one around called MiscSolution. Right click on the solution name, select Add -> Existing Item. Then find your .dtsx package and import it. (Or right click SSIS Packages -> Add Existing Package. I always do it at the Solution level because that interface allows you to select multiple packages.)
Note that when you do this, you're making a new copy of the package in your local solution directory. You are NOT working on the copy of the package that sits in the folder where you picked it up. This matters if you're going to be making any changes, since it will need to be redeployed. It also matters if you accidentally hose up the package, because you've done no harm as long as you just delete that copy.
Once the package imports, which might take a minute or so depending on how complex it is, you should be able to open it up and see what's going on.

Entity Framework : Unable to change DataSource for Code First Migrations

I am working on a project where I am using Entity Framework along with code first migrations to update my database. I started this project on another machine and it worked out very well. Now I checked out the code on another machine. Since this machine does not have the database, I ran update-database command in nuget. It should apply my previous migrations and create a new database on this machine but it is displaying following error.
error
I read this MSDN article which says
If a local SQL Express instance is available (installed by default with Visual Studio 2010) then Code First has created the database on that instance
If SQL Express isn’t available then Code First will try and use LocalDb (installed by default with Visual Studio 2012)
What I understand by this is when i enabled migrations in my first machine, it created database with SQLEXPRESS instance as DataSource and since I don't have that in my current machine, It is unable to create the database. So I am trying to change the DataSource of EntityFramework to the Instance of my current sql server which is LAPTOP-HD618J49. For this I tried to write a hard coded connection string with this instance in app.config, changed ContextName in Data Context class but to no avail. Please give me some directions on what I might be missing?
I finally resolved the issue. Earlier I tried to use base("name=ConnectionStringNameHere") but it didn't worked when I ran update-database command in package manager console. The strange reason is Visual Studio don't know which app.config to check for ConnectionStringName. Although I had already selected the module with entity framework in the dropdown of package manager console. I had to select the module with entity framework from the solution explorer window and set it as startup project. This somehow solved the problem and It was able to pick ConnectionStringName from app.config of the module with the updated DataSource.

SQL Database Tools in Visual Studio 2012

I'm trying to setup my Visual Studio Project to be able to use only one IDE for managing SQL objects using TFS 2012. Is there any way to configure my project connected to a source control and if for example I go to SSMS and try to modify a stored procedure, automatically takes the one in the source control or vice versa using Visual Studio 2012 check out a procedure and from SSMS shows me that is checked out?
No matter where I'm (Management Studio or Visual Studio 2012)the SQL objects are synchronized.
Thanks
Microsoft doesn't provide any built-in support but you can link your SSDT database project to SSMS using the latest version of SQL Source Control, which is a commercial tool developed by Red Gate, the company I work for. Steps are:
Download SQL Source Control and install it (it has a 28-day free trial)
Load SSMS, right click on your database in the object explorer and select the Link to Source Control option.
In the Link dialog, browse to the database project folder in your repository.
That's it. It's now set up. Simply use the Commit and Get Latest tabs to keep your database in sync with your database project in source control.
I'd be happy to assist should you hit any problems. Please add a comment to this answer or contact support#red-gate.com

Why does BIDS modify connection managers with values from configuration file?

I have been involved in discussions in this forum about whether SSIS overwrites packages when you modify XML config files. The two posts at the bottom of this posting disagree with each other, one saying packages do get overwritten, one saying they don’t. I believe that I have the answer but am looking for others thoughts on this – if you modify xml package configurations at design time and run the package through visual studio, when the package is saved, the package code is actually modified by SSIS to reflect the configurations you have changed. However If you run packages through DTEXEC , or SQL Server Agent the package code is not modifed
If I have a package in Visual Studio, if I modify the servername in the connectionstring (change server A to Server B) in the XML configurations, and run the package
The behavior I expect is fine, it writes the data to the table on the second server
The behavior I DON’T expect is this. When I pull up the connection manager in the package visual studio, server A has been changed to server B
SSIS has modified the code in my package.
This behavior can be very confusing and hast cost me a lot of time on the project I am working on. IMHO should only override values at run time, not overwrite packages at design time!!
Do you have any thoughts on this?
Post 1 states it does overwrite
ssis xml configuration modifies package xml - am i crazy?
Post 2 states it does not overwrite
ssis xml configurations - configs overwrite packages - does ssis change config without you telling it to?
If you Execute a package from Visual Studio 2005 / 2008 (for SQL 2005 / 2008 / 2008 R2) then yes it does overwrite using the configured values.
Visual Studio 2010 (for SQL 2012) using the Project Deployment Model appears to avoid this issue.

Resources