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

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.

Related

Version and deployment of SQL Server database

I am planning to move a SQL Server database (with procedure calls and 200+ tables) to version control (github) and deploy using DACPAC. I imported my database into Visual Studio 2017, but I don't have any idea how I will maintain database version and deploy change set
After you imported into VS 2017, you should see the SQL project with all your database objects including tables, stored procedures, functions, views, etc in the folder where you saved in Visual Studio. You can check-in this SQL Project folder with all its contents into GitHub. Use a suitable gitignore file like this https://github.com/gertd/sqlproj/blob/master/.gitignore to avoid cluttering GitHub with non-code files.
You need to make changes in the Visual Studio for any change in database objects and commit/push to GitHub. If you prefer you can make change in SQL Server directly and then update your Visual Studio project using the schema compare feature, before you push to GitHub.
To deploy, you can build the SqlProject from Visual Studio which will create/update a dacpac.

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

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

visual studio extension to execute sql

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.

Error in Visual Studio 2008 with SSRS 2005 report projects

Has anyone found a good workaound for opening or editing an SSRS 2005 report project with Visual Studio 2008 yet?
Will the SQL server 2008 tools be the migration path for these report projects in the future? I really dont want to have to keep VS2005 installed forever just to update SSRS reports.
After an upgrade to VS2008 an existing solution that contains a VS2005 SSRS reports project will not open. From what I understand the SQL Server 2005 tools dont know about VS2008 so they will not integrate into the IDE. So currently I switch back to VS2005 for any updates to this project, and get an error loading project message everytime I open the solution in 2008.
EDIT on solution:
I was able to install the shared component for BDIS from the SQL2008 disc and am now able to open and update my SSRS 2005 .rdl project items within VS2008.
Note to others:
If you edit your SSRS 2005 reports in VS2008 and re-save you will not be able to edit them in VS2005 anymore, or deploy them to a 2005 server. They are up-converted to 2008 report files.
I don't fully understand what kind of "workaround" you want.....
In order to create and edit SSRS report projects in Visual Studio, you basically have two options:
install the "Business Intelligence Development Studio" components from your SQL Server 2008 DVD - this gives you the full suite of visual designers and everything to create and edit RDL files in Visual Studio
learn the RDL spec by heart and open the RDL files as XML and just manually edit those - joking, of course - this is not really an option, is it?
So - what exactly do you want to "work around" then??

Resources