问题描述
我怎样才能获得一个包含变量 libref
和 server_id
(或任何服务器信息)的表,用于 SAS
中我可用的所有库?
How can I get a table with variables libref
and server_id
(or any server info) for all libraries available to me in SAS
?
我的目标是汇总所有这些库的数据物理位置,以便在从不同服务器获取数据时编写高效的查询.
My goal is to get a summary of where the data is physically located for all these libraries, in order to write efficient queries when fetching data from different servers.
推荐答案
查看SASHELP.VLIBNAM(或使用PROC SQL时的DICTIONARY.LIBNAMES)视图中可用的信息.
Look at what information is available in the view SASHELP.VLIBNAM (or DICTIONARY.LIBNAMES when using PROC SQL).
这是一个实用宏,它从该视图中为给定的 libref 拉取引擎、主机和架构.我已经将它用于 TERADATA、ORACLE 和 ODBC 引擎.dblibchk.sas
Here is a utility macro that pulls the engine, host and schema from that view for a given libref. I have used it for TERADATA, ORACLE and ODBC engines. dblibchk.sas
这篇关于获取所有 libref 的服务器信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!