Bug in SSDT? SQL Server Object Explorer Shows Code From Database Project

I’ve found an interesting bug in SQL Server Data Tools, version is 12.0.50717.0.

I have a database project. After I published the project to SQL server, I wanted to examine the code via SQL Server Object Explorer. I double-clicked the stored procedure, and SSDT showed me the code (at this time it was identical to the code in database project).

Then I close the tab, and open the code of the same stored procedure in the database project. I’ve made some slight correction.

Now I return to SQL Server Object Explorer. Double-click SP again. But I see the modified code from the database project. Why? I expect that Explorer would show the code on the server.

To be sure, I also check the code on the SQL Server via SQL Server Management Studio. The code on the server really differs from the code in database project. So, it’s just a bug in SSDT 🙁

Update August 19, 2015

It’s not a bug, it’s just a feature of SSDT 🙂

It depends on the connection that was set in Debug tab of the database project’s Properties window. When you open an object in SQL Server Object Explorer from the same database (from Debug tab), SSDT shows the code from the database project. If this is the other database (different from Debug tab), SSDT shows the code from the server. In the last case it also shows a different tab name (something like dbo.SP_Name) and the Update button.

My #sqlweek 2015 with PASS Europe

It’s just 2 weeks before my fantastic #sqlweek, the grand tour in Europe that will last from one SQL Saturday to another SQL Saturday. But the days between them won’t be less amazing.

To say shortly, I’ll cross 7 countries, speak at 2 SQL Saturday conferences and 4 user group meetings. The schedule will be very intensive:

  • Saturday, August 29 – SQL Saturday Oslo
  • Monday, August 31 – Wroclaw, Poland
  • Tuesday, September 1 – Copenhagen, Denmark
  • Wednesday, September 2 – Gent, Belgium
  • Thursday, September 3 – Berlin, Germany
  • Saturday, September 5 – SQL Saturday Göteborg, Sweden

The only exception from this list is Paris, France, where I’ll spend a night waiting for a flight to my home.

That will be a hard week full of meetings, presentations, transfers and changing places. Almost every day I’ll have an air flight to reach the next point. From the other side, it will bring a lot of new impressions, the acquaintance with ancient European cities, and new friends. Even these days are the days of my vacation for this year, I suppose it will a very good time. And I hope I’ll never regret that I’m trying to do something unusual, something exciting.

I’d like to say some kind words to all who organizes these conferences and meetings. Without you, without your response, your help and advice I could not make such a cool tour in one week.

Also I want to thank SQL PASS and its leaders for their energy. Without PASS, all PASS events and PASS groups and societies it will be extremely hard to find a way to communicate with a foreign colleagues to organize meetings. It’s great that I’m a part of PASS movement, and this participation also helps me to make something great.