如何使用代码在系统目录中设置ANY字段? [英] How to set ANY field in system catalog using code?
问题描述
EXECUTE sys.sp_catalogs 'server\instance'
返回,一旦实例配置为DATA ACCESS,执行此操作:
returns, once the instance has been configured for "DATA ACCESS" by doing this:
EXEC sp_serveroption 'server\instance', 'DATA ACCESS', TRUE
this:
this:
CATALOG_NAME DESCRIPTION
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
x NULL
y NULL
z NULL
master NULL
model NULL
msdb NULL
Northwind NULL
ReportServer$instance NULL
ReportServer$instanceTempDB NULL
tempdb NULL
r NULL
有人建议使用更新,我可以将DESCRIPTION(上面的任何标题)设置为我想要的值。
鉴于当前值为NULL,等等那个数据类型可能是它代表的,UPDAT怎么样E有用吗?此输出是表格式的,但它不一定来自任何表格;存储过程可以利用未暴露的设施或其他。但这不是重点。
如何在不知道系统目录数据来自何处的情况下保留这种制表性质,或者更好,而无需创建我自己的制表,如何更改DESCRIPTION数据本身并将NULL更改为...
无论如何?
And someone has suggested using UPDATE, that I could set DESCRIPTION (the ANY of the title above) to what I want the value to be.
Given that the value presently is NULL, and whatever that datatype might be that it represents, how could UPDATE be of any use? This output is tabular but it's not necessarily coming from any table; the stored procedure could be leveraging unexposed facility or other. But that's besides the point here.
How can I retain this "tabulation" nature without knowing where this system catalog data is coming from, or better yet without having to create my own tabulation, how can I alter the DESCRIPTION data itself and change NULL to ...
whatever?
推荐答案
instance NULL
ReportServer
instance NULL ReportServer
instanceTempDB NULL
tempdb NULL
r NULL
instanceTempDB NULL tempdb NULL r NULL
有人建议使用UPDATE,我可以将DESCRIPTION(上面的标题中的任何一个)设置为我想要的值。
假设当前值为NULL,并且无论它代表什么数据类型,UPDATE怎么可能有用?此输出是表格式的,但它不一定来自任何表格;存储过程可以利用未暴露的设施或其他。但这不是重点。
如何在不知道系统目录数据来自何处的情况下保留这种制表性质,或者更好,而无需创建我自己的制表,如何改变描述数据本身并将NULL更改为......
无论如何?
And someone has suggested using UPDATE, that I could set DESCRIPTION (the ANY of the title above) to what I want the value to be.
Given that the value presently is NULL, and whatever that datatype might be that it represents, how could UPDATE be of any use? This output is tabular but it's not necessarily coming from any table; the stored procedure could be leveraging unexposed facility or other. But that's besides the point here.
How can I retain this "tabulation" nature without knowing where this system catalog data is coming from, or better yet without having to create my own tabulation, how can I alter the DESCRIPTION data itself and change NULL to ...
whatever?
这篇关于如何使用代码在系统目录中设置ANY字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!