visual studio extension to execute sql - sql-server

I have several .sql files in my visual studio 2010 project.
I am looking for an extension or add on where I can right click on the sql file and execute its contents against a sql server database.
Anyone know if such an extension exists?

Starting with SQL Server Denali (at least in the community preview version I installed to play with), SQL Management Studio is integrated into the Visual Studio 2010 IDE. So you get all the syntax highlighting, Object Explorer, etc., all from within VS2010.
That said, I didn't specifically try adding a SQL script to an existing project (and I uninstalled the shared features last week because there were... issues), but with such a tight integration, I assume doing more or less what you're asking for is the intention.

Related

Is there a way to add .sqlproj to SSMS solution explorer?

I would like to add a .sqlproj (Visual Studio SQL Server Database Project) to SSMS Solution explorer.
When I go to File | Open Projects, this extension is not available
No, SQL Server Management Studio is different product and works with it's own projects.
Projects in SSMS are collections of logically related scripts and files, that can be saved together, while projects in Visual Studio are much more than that. But you can execute SQL scripts from Visual Studio, if you want to use only one environment.

SSDT download guidance

I have SQL Server Management Studio. I've imported an excel file and learned how to write queries on the database. I'm interested in a report templates. I read about SSDT and assume that would be useful to me. When I click on File > New > Project, my options don't include the "Business Intelligence" menu items (i.e. Reporting Services).
The Microsoft page: https://learn.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt
Where I downloaded SSDT, specifically refers to "Visual Studio." Is that different than Microsoft SQL Server Management Studio? Will SSDT work with SS Management Studio, or do I need to downoad "Visual Studio" as well, or are they one in the same... a bit confused. Thanks for any guidance on this.
Cheers.
Visual Studio and SQL Server Management Studio (SSMS) are not the same thing. SQL Server Data Tools (SSDT) only works within Visual Studio, and has nothing to do with SSMS. If you want to use what SSDT offers, you will need a compatible version of Visual Studio to do so.
Updated per request:
SSMS is used to do development around the SQL Server stack, where VS is an all around development tool that you can use to build applications in many programming languages.
Is used to be that SSDT was called Business Intelligence Development Studio (BIDS), and was more of a stand-alone thing; it was really off to the side of the SQL Server stack that business intelligence pros needed to get their work done. Now, with SSDT, MS has made is fit a little more with VS project templates, although you still have to download it separately.
You need SSDT to develop SSRS reports, SSAS cubes and SSIS packages, and it includes tools to help you deploy those things to the appropriate location when you are done with development.
Hope this helps you out!
Actually SSDT will include a scaled back version of Visual Studio that will allow you to create Integration Services packages, including an IDE to create and edit Script Components.
Read about it here: https://learn.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt#installing-ssdt-without-visual-studio-pre-installed

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

After Visual Studio 2015 upgrade, how do I open VS 2005 report projects?

Full disclosure, I had a minimum level of comfort with designing reports in VS 2005 (just enough to get the job done) and recently my computer was changed and I now have SSMS 2016 and VS2015 instead of SSMS 2008 and VS2005.
I can't seem to open my reports, .rdl isn't even a listed file extension. If I go to the directory where the .rdl files are, I can click on them and open with vs 2015, but it just gives me the xml code. So is there any way to import my old reports into VS 2015? I don't even see a place or tool bar to edit/create reports.
I tried to change the installation to include MS SQL Data Tools, but I could not find the package (maybe I have to get it online?)Presumably, I could then edit the design and layout. But right now, I don't even understand what most of the tool bar options are.
So, as for a question - Where do I start? Once I get SQL Data Tools installed, can I edit the layout/design of existing, VS2005 reports and deploy them to our existing Report Manager as I have done in the past with VS 2005? Thanks for helping!
You definitely need to install SQL Server Data Tools for Visual Studio 2015. It looks like this is now available. Without having SSDT installed VS2015 will have no concept of what an RDL file is.
I personally have no experience with VS2015. VS2013 though can open VS2005 reports, and you can deploy them as before,.
Personally I found the old reports now looked a bit messy and I had to reformat a number of them (thought this may not have been necessary - I might just have not liked the way the guy before had coded them)

Not able to see script (VB code) from SSIS script task

I have one already developed SSIS application using SQL Server 2005. I'm trying to view the script like below:
Right click -> Edit -> Script -> Design script
[normally instade of "Design script" it should come "Edit script". I think, due to SSIS 2005 its like that]
However, its not showing me underline script.Its not showing any error as well.
I have BI studio 2005 installed. However, I can not see VB under(file -> new -> project) if I'm going to create new project. So, do I need a Visual studio version 2005 with VB to be installed to open this?
Is there any other way to see this? OR is there any settings needs to be changed to see this underline script?
Hum I don't know what is causing that error but Visual Studio BI edition is enough (and required) to edit all functionality of a SSIS. Including the VB code in the Script Task without the need to install the whole VB environment.
You should really watch about any error reported when you open the solution, especially the "corruption" messages which are usually indicators that Visual Studio cannot decipher the parts of the SSIS that were encrypted (depending of the security model of your SSIS).
You also would want to make sure you've installed the Visual Studio BI for 2005 and not 2008 (or other) since, unlike 'classic' projects, SSIS projects are highly tied with the version of VS BI it was created with.

Resources