SQL Server 2019 “无效的对象名称 sys.sysrowsets”

huangapple go评论61阅读模式
英文:

SQL Server 2019 "Invalid object name sys.sysrowsets"

问题

我遇到以下错误:SQL Server 2019 "Invalid object name sys.sysrowsets",然后我尝试从sys.sysrowsets表中选择数据。我使用的是SQL Server 2019。您知道如何解决这个问题吗?谢谢。

英文:

I get folowing error: SQL Server 2019 "Invalid object name sys.sysrowsets", then I tried to select data from sys.sysrowsets table.
I have sql server 2019.
Do you know how solve this?
Thank you

答案1

得分: 2

这是一个系统基表

在SQL Server 2019中仍然存在

> 存在于每个数据库中。包含索引或堆的每个分区行集的行。

在选择sys.partitions时,可以在执行计划中看到它,但(如文档所述)

> 要绑定到系统基表,用户必须使用专用管理员连接(DAC)连接到SQL Server的实例。
> 尝试在未使用DAC连接的情况下从系统基表执行SELECT查询会引发错误。

因此,如果您具有适当的权限,软件在连接到DAC端口时可以技术上运行SELECT

尽管可以这样做,但这并不建议。通过DAC而不是使用文档化的视图定期连接的软件并不是一个好主意,并且在文档中明确警告。

> 重要
>
> 仅Microsoft人员可以使用DAC访问系统基表,这不是受支持的客户方案。

这个软件为您做了什么?为什么它直接访问基表而不是使用文档化的接口?

英文:

This is a system base table.

It still exists in SQL Server 2019

> Exists in every database. Contains a row for each partition rowset for
> an index or a heap.

It can be seen in the execution plan when selecting from sys.partitions but (as the docs explain)

> To bind to a system base table, a user must connect to the instance of
> SQL Server by using the dedicated administrator connection (DAC).
> Trying to execute a SELECT query from a system base table without
> connecting by using DAC raises an error.

So if you have appropriate permissions then technically the software can run the SELECT by connecting to the DAC port.

It is not advisable to do this though. Having software that routinely connects via the DAC rather than use documented views is not a good idea and is explicitly warned against in the docs

> Important
>
> Access to system base tables by using DAC is designed only for
> Microsoft personnel, and it is not a supported customer scenario.

What is this software doing for you? Why is it accessing base tables directly rather than using documented interfaces?

huangapple
  • 本文由 发表于 2023年2月7日 02:07:00
  • 转载请务必保留本文链接:https://go.coder-hub.com/75365027.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定