English 中文(简体)
如何在 SQL S2008 服务器存储程序中读取配置文件密钥
原标题:How to read config file key in SQL Server 2008 stored procedure

我的 c://config 中有一个设置。 config 文件

sections.config 包含此内容 :

<filelocation>d://mydata</filelocation>

现在我要在我的 SQL Server 2008 存储程序中获取 < code> d://mydata 文件路径, 这将将此位置作为文件创建路径的输入 。

请建议!

问题回答

简化示例, 但您可以做类似的事情( 假设您可以从 SQL 服务器读取文件) :

declare @table table (Value XML)

insert @table
select a.* from openrowset (bulk  C:config , single_clob) a

select * from @table

select Value.value( filelocation[1] ,  varchar(100) )
from @table

基于文件结构的扩展 。





相关问题
Performance impact of indexed view in MS SQL Server 2008

Does anyone have experience with using indexed view in MS SQL Server 2008? I am trying to find out how does indexed view affect performance of insert / update statements, that are adding / updating ...

Lock Escalation - What s happening here?

While altering a table (removing a column) in SQL Server 2008, I clicked the Generate Change Script button and I noticed that the change script it generated drops the column, says "go" and then runs ...

Round to nearest 5 in SQL Server

I have a Money column in my SQL Server 2008 table. In my below query how can I round it to nearest 5$ select FineAmount from tickets Thanks

热门标签