访问使用LINQ to SQL系统数据库/表? [英] Accessing System Databases/Tables using LINQ to SQL?

查看:103
本文介绍了访问使用LINQ to SQL系统数据库/表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我有每天早晨跑,给我上一份报告的 SSIS包失败或前一天成功的包数。这些包的信息都包含部分在 sysjobs 表中(系统表)在 MSDB 数据库中(系统数据库)在 SQL Server 2005的

Right now I have an SSIS package that runs every morning and gives me a report on the number of packages that failed or succeeded from the day before. The information for these packages is contained partly within the sysjobs table (a system table) within the msdb database (a system database) in SQL Server 2005.

当试图将包移动到C#可执行文件(主要是为了获得更好的格式化过的被发送出去的电子邮件),我是不是能够找到一种方法来创建,让我通过访问这些表的DBML文件 LINQ 。我试图寻找这将使这些表中可见的属性,但是我还没有多少运气。

When trying to move the package to a C# executable (mostly to gain better formatting over the email that gets sent out), I wasn't able to find a way to create a dbml file that allowed me to access these tables through LINQ. I tried to look for any properties that would make these tables visible, but I haven't had much luck.

这是可能的<一个href=\"http://en.wikipedia.org/wiki/Language_Integrated_Query#LINQ_to_SQL_.28formerly_called_DLINQ.29\"相对=nofollow> LINQ&NBSP;到&NBSP; SQL

推荐答案

如果您在服务器资源管理器的时候,你可以让他们看到这样的:

If you're in Server Explorer, you can make them visible this way:


  • 创建到您想要的服务器的连接。

  • 右键单击该服务器,然后选择更改视图>对象类型。

  • 您现在应该看到系统表和用户表。您应该看到sysjobs那里,你可以轻松将它拖到一个表面的.dbml

这篇关于访问使用LINQ to SQL系统数据库/表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆