SSDT project can't reference a cross db trigger - warning SQL71502 - visual-studio-2012

I have two SQL 2012 DBs - one has a table with a trigger, the other has a procedure that disables that trigger.
I've created a SSDT solution with 2 database projects, one for each database. For the second database I've added a Database reference pointing to the first database so that I can reference objects - however the line in my procedure:
ALTER TABLE [$(DbWithTrigger)].dbo.TblWithTrigger DISABLE TRIGGER MyTrigger
brings up the warning:
SQL71502 Procedure: [dbo].[CrossDbTriggerCall] has an unresolved
reference to object [dbo].[MyTrigger].
I'm able to consistently reproduce this behaviour in Visual Studio 2012 SSDT and Visual Studio 2013 Ultimate.

Try
DISABLE TRIGGER [$(DbWithTrigger)].[dbo].[MyTrigger] on [$(DbWithTrigger)].[dbo].[TblWithTrigger];
in the SP. This should work.

Related

TF208071 Object reference Error from Excel with TFS reports

VS2017, Click "Create Report in Microsoft Excel", Excel 2016 opens, once I click Finish, throws this
"TF208071: The following error occurred when the command was generating PivotTable and PivotChart reports. Close the Microsoft Excel workbook and try again, or press F1 for more information.
Object reference not set to an instance of an object.
"
Recently upgraded TFS server to 2017, I can still generate the reports using Visual Studio 2012/2013 by connecting to the same TFS server. However not on VS2017.
Where do I start looking? None of the event logs show any such error.
I have 4 columns of data from the WI to export, so its not the amount of data.
Seems you are talking about create Excel reports from a work item query, try to clear TFS and VS cache and test again.
Besides, since you are using TFS2017 and VS2017, you could try to use this extension--VSTS Open in Excel, you could use this extension for bulk editing work items, or to leverage Excel tools to analyze and visualize a large number of work items. You could directly open work items in web portal.
Besides, as a workaround, you could still generate the reports using Visual Studio 2012/2013 by connecting to the same TFS server.
Hope it helps someone!
The issue is with the 2017 TFS COM Add-in, this has an issue used with Excel 2016. seems like a bug from Microsoft!
So we removed all the TFS addin from Excel2016. Then do a repair install of 2015 Office integration which will set V14 Com Add-in to load at start. Then it will export through VS2017 (using the 2015 COM IN)
You can also edit this through regedit, make the V14 OR V13 COM Add-in to load at startup by editing that specific TFS Addin to a value of 3 and setting all the rest to 0.

ODP.NET 1120320 Visual Studio 2012 Entity Data Model Wizard not responding

I'm working with Visual Studio 2012 and ODAC 1120320.
In this project I need 2 different edmx files since I've to work with 2 different DBs.
But I managed to import table only from the first schema, when I try with the second the Entity Data Model Wizard stops working and stays in Not Responding status for hours.
Can you help me to understand what is wrong?

How to add an existing cube into an SSAS project

I need to add a new version of a Cube in an existing SSAS database. I've created the new Cube by using Management Studio to script the old Cube to a screen, changed the ID's to the new ID, and executing the script.
So now the new Cube exists in the database.
I want to put the new cube into my existing Visual Studio project. Can I import a cube from a database (as opposed to the whole database)? Can I import the script logic that is created by Management Studio?
If neither of these things, what is the best way for me to import this new cube into the project?
Thanks, --sw
ps--all versions are the newest (e.g., Visual Studio 2012, SSAS 2012, and so on). --sw
I would start from a Visual Studio Project, which is the "source code" for SSAS. If you dont have this already you can use Visual Studio to Import from the server, while creating a new Project.
Then in Visual Studio I would copy and paste the Cube object, and work from there.

Visual Studio 2012 Object Data Source

In Visual Studio versions prior to 2012 you could open the Data Source tool window, click the add data source button select object and navigate the project namespace hierarchy to a class (business object). Visual Studio 2012, out of the box, doesn't allow you to simply select a class anymore. My question is how do I add a data source based on a business object to my project in Visual Studio 2012 or how do I revert to the old functionality?
I've fixed the issue by right clicking on the solution and choosing clean and rebuilding everything. I'm now able to create a data source as described in my question.

Execute stored procedure from Visual Studio 2012 Database project

I have imported a SQL Server database into a Visual Studio 2012 database project. I am able to see the tables and stored procedures just fine. I would now like to execute stored procedures from that database within Visual Studio. Does anyone know if this is possible and if so how?
I know I could simply use Server Explorer but it would be desirable to work exclusively in the database project as that is the one synced to our version control system.
If you're using SQL Projects, you can open the SQL Server Object Explorer within SSDT and look at the database connections for (localdb). After building your database, you should have a connection to the (localdb) server or whatever is set in your Project Debug setting.
You can also launch the Transact-SQL Editor under the SQL menu and connect to an existing database server that way. Most likely, you'll want to use your debug settings as they'd be directly connected to your project on each build.

Resources