SQL CLR triggers with Azure Event Hub - sql-server-2014

Is there any way to implement change data capture on SQL to Azure EventHub without using exe?
The code needs to run in the context of SQL Server only
SQL Server Version : 2014
Tried SQL CLR with Azure EventHub but not able to create all required assemblies on SQL database.
I'm trying to create the list of references by clicking adding new assemblies on SQL databases. These are the assembly references required as per my Visual Studio project
But adding one it requires another one and it seems end less. I'm not able to find all the assemblies on my system and i got few assemblies from internet. Many assemblies are added as UNSAFE. While I'm adding, getting always unsafe warning. After lot of struggles added only these assemblies

Related

MySQL Data Source Entity in Visual Studio 2012

I have also encountered the problem to create a data source in VS2012 with MySQL connector, while many thanks for the connector updates from Oracle.
Than I installed the MySQL connector version 6.6.5, it looks work well while there is no directory in the "Data Source" sub-window but the Model has been created after I created the data source.
When I configuring the insert process to the data using Linq, VS2012 tells there is no such method "AddTo".
Therefore, according the things happened during my programming:
Is it common that the data source will not be shown in that sub window after I have already add the data entities?
Why there is no such method "AddTo" (Actually no any methods at all in the definition) when I using Linq with VS2012?
Many thanks in advance,
Harry

How can I add an embedded data source to RDL in C# code?

I am trying to use SSRS in a multi-tenant situation. The base version we want to support is SQL Server 2008 but if R2 is needed we might be ok with that.
I am currently using the ReportingService2005.asmx endpoint which seems to expose the ReportService2005SoapClient class (even though all samples seem to show ReportingService2005 class).
When we run a report I want to make a copy of that report from the server, add an embedded datasource, point the datasets to that datasource and then run the report.
I have gotten as far as:
getting the RDL from the server
modifying the XML to add the DataSource
pointing the datasets to point to the new datasource
...but when I try to "CreateReport" I get the following error:
System.Web.Services.Protocols.SoapException: The dataset ‘DataSet1’ refers to the data source “mydatasource_LOCAL”, which does not exist.
at Microsoft.ReportingServices.Library.ReportingService2005Impl.ExecuteBatch(Guid batchId)
at Microsoft.ReportingServices.WebServer.ReportingService2005.ExecuteBatch()
I have added the dataset to the RDL, it looks the same as when I add one in the designer. However, I assume something needs to be added to the server? What am I missing?
(As an aside, I know MS Dynamics enabled multi-tennant SSRS in a single instance, but I see no info on how they did it. If they have any code or anything they share someone could point me to that would be awesome.)
You're using the correct endpoint, more or less. From MSDN:
The ReportService2005 and ReportService2006 endpoints are deprecated in SQL Server 2008 R2. The ReportService2010 endpoint includes the functionalities of both endpoints and contains additional management features.
In any case, you mention you modify the RDL to use a new data source in step 2. I might be wrong, but I think you probably still need to add a DataSource item to your report catalog using the ReportingService2010 CreateDataSource(...) method.
If you deploy a new report from Visual Studio to report server it wil also mention in the log that it's deploying the data source before it deploys the report.
Of course you could also create that data source on the server beforehand, using the report manager (though "mydatasource_LOCAL" may not be an ideal name).

Can you query SQL Server directly from the Entity Framework Designer?

When you're inside Visual Studio you can use the Server Explorer to add a Data Connection. Once you've added the data connection you can browse the schema, execute queries, etc.
Another developer mentioned that EF might have this functionality. With the EF designer, you would already have a connection setup and even have the list of tables mapped as well. It would be great to right click on a model in the designer and view the data, or execute queries.
This would allow a user to open a solution and instantly (well almost) view the data being used, whereas right now you would need to add the connection to the Server Explorer (again).
Does anything like this exist, either in Visual Studio, NuGet Package, Service Pack, Tools Update, or even an extension?
Not in Visual Studio but as separate tool called LINQPad.
Edit:
If you create EDMX model through the Wizard it will create connection for you in Server explorer but this connection is VS feature. It has nothing to do with Entity designer which works just with connection string.

TFS Build partially succeeded when LINQ to SQL is added

VS2008 / TFS Build 3.5 / Ent Lib 4.1
I have a rather large solution that contains several apps. They are all currently using Enterprise Library (v.4.1) for their data access layer.
I added and locally tested a new data access layer that uses LINQ to SQL- it was fast and easy to add and the test went fine. But...
When I checked in the project, it would not complete the build - I get a "Partially Succeeded". There are some warnings, but those exact same warnings were there prior to the build failing.
I took the data access class back out (along with the code that calls it) and rebuilt and it builds fine.
I then added an empty new class and put a single variable in it and referenced it from the code. That built. I then created a new LINQ to SQL class in that new project and did not even reference it. When I checked that in, the build failed again with the "Partially Succeeded" message. No extra errors or warnings.
I love LINQ to SQL, I have used it in a few projects outside of this system, but I now have many hours into attempting to get this to build with no success.
Are all the same tools/libraries installed on the build server as on your desktop - Perhaps the server doesn't have the same vs or .net service pack level? Try running the build "manually" on the build server - load up the solution in Visual Studio on the server and execute the build within the IDE rather than under the TFS build system - this may report problems that you don't see so easily in the automated build.
Check the build log. Visual Studio often reports errors in the output pane text or build-server log text that are not picked up by the GUI error windows. So you will think a build succeeded but an output file has "quietly" not been generated. TFS build logs are usually huge so they are a pain to work through, so start by searching for keywords like "error" or the name of the project that fails rather than trying to read through line by line.
OK, we found it. The issue is on stack overflow elsewhere at
Visual Studio Setup and Deployment build fails with no errors
The issue is a bug in MS setup and deploy that breaks when it hits a line in the project that uses Linq. You have to comment out a line in the project to get it to work. Amazing, ridiculous, and no surprise.
Thanks for the input, it was that input that helped us get to the eventual answer (already on StackOverflow, but didn't have Linq in the title).

Deploying a project using LINQ to SQL

I am working on a winforms application using LINQ to SQL - and am building the app using a SQL Express instance on my workstation. The final installation of the project will be on a proper SQL Server 2005.
The database has the same name, and all tables are identical but the hostname is different.
The only way I have found to make my app work from one machine to the next is to re-open the code in Visual Studio, delete all of the objects referring to the SQL express instance from my .mdbl, save the project, connect to the other server, drag all of the references back on, and rebuild the application for release once more.
an answer here suggested that one can simply modify the app.config/web.config file - whih would work for asp.net, but this is a winforms application. What's the correct way of making LINQ to SQL apps use a new database without having to re-open the app in visual studio?
If I understand your problem correctly, you simply change the database's connection string in your app.config / web.config.
Edit, post clarification: You have the connection strings stored somewhere. They might be in the app.config of your server. Still, you get them from somewhere and that somewhere may be in an app.config. Use that then :)
One good solution is to add another connection to the dbml file itself. You can get to this by right-clicking on the field of the design surface and selecting properties. From there, you can add another connection string. Instead of deleting everything and redragging, just change the string and recompile.
But if you want to get fancy-schmancy, you can have the program auto-detect whether it is being run locally or not, using this neat utility function: detect local
And go from there to set the appropriate connection string based on the results.
A more useful answer...
app.config ends up as appname.exe.config when it has been built.
rather than opening Visual Studio and modifying app.config, you can simply edit the appname.exe.config file, and restart the app.
I believe you can store the connection information in an app.config file and retrieve it from there. Here is a post about doing that with LINQ to SQL. Once you deploy it to a production server, you can just edit the XML to change the data source.