• <small id='ebVfP'></small><noframes id='ebVfP'>

    • <bdo id='ebVfP'></bdo><ul id='ebVfP'></ul>
      <i id='ebVfP'><tr id='ebVfP'><dt id='ebVfP'><q id='ebVfP'><span id='ebVfP'><b id='ebVfP'><form id='ebVfP'><ins id='ebVfP'></ins><ul id='ebVfP'></ul><sub id='ebVfP'></sub></form><legend id='ebVfP'></legend><bdo id='ebVfP'><pre id='ebVfP'><center id='ebVfP'></center></pre></bdo></b><th id='ebVfP'></th></span></q></dt></tr></i><div id='ebVfP'><tfoot id='ebVfP'></tfoot><dl id='ebVfP'><fieldset id='ebVfP'></fieldset></dl></div>
    1. <tfoot id='ebVfP'></tfoot>
      <legend id='ebVfP'><style id='ebVfP'><dir id='ebVfP'><q id='ebVfP'></q></dir></style></legend>

        有没有办法使用 SQL 获取有关服务器的信息

        时间:2023-06-07
          <tfoot id='1eWr7'></tfoot>
            <bdo id='1eWr7'></bdo><ul id='1eWr7'></ul>
              <tbody id='1eWr7'></tbody>

                  <i id='1eWr7'><tr id='1eWr7'><dt id='1eWr7'><q id='1eWr7'><span id='1eWr7'><b id='1eWr7'><form id='1eWr7'><ins id='1eWr7'></ins><ul id='1eWr7'></ul><sub id='1eWr7'></sub></form><legend id='1eWr7'></legend><bdo id='1eWr7'><pre id='1eWr7'><center id='1eWr7'></center></pre></bdo></b><th id='1eWr7'></th></span></q></dt></tr></i><div id='1eWr7'><tfoot id='1eWr7'></tfoot><dl id='1eWr7'><fieldset id='1eWr7'></fieldset></dl></div>

                  <small id='1eWr7'></small><noframes id='1eWr7'>

                • <legend id='1eWr7'><style id='1eWr7'><dir id='1eWr7'><q id='1eWr7'></q></dir></style></legend>
                • 本文介绍了有没有办法使用 SQL 获取有关服务器的信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  有没有办法使用 SQL 获取有关服务器的信息?它是一个使用 Windows 服务器的 Oracle 数据库.我搜索了谷歌,我发现的只是 @@version 这不起作用.谢谢你的帮助.

                  Is there a way to get information about a server using SQL? It is an Oracle database using a windows server. I searched google and all I found was @@version which does not work. Thanks for your help.

                  推荐答案

                  这里有一个很好的主要信息检索例程列表.确保这是获取服务器信息的最佳方式:

                  Here is a good list of the main informations retrieve routines. Be sure this is the best way to obtain Server infos:

                  甲骨文

                  版本:PL/SQL、TNS 版本与 Oracle 一起使用.

                  Version: PL/SQL, TNS versions using with Oracle.

                  SELECT * FROM v$version;
                  -- Which version of oracle you are running.
                  SELECT * FROM v$version WHERE banner LIKE 'Oracle%';
                  -- Or, in more readable way.
                  SELECT * FROM product_component_version;
                  

                  Instance:显示当前实例的状态.

                  Instance: Displays the state of the current instance.

                  SELECT * FROM v$instance;
                  -- About license limits of the current instance.
                  SELECT * FROM v$license;
                  

                  数据库:数据库名称.

                  SELECT * FROM GLOBAL_NAME
                  --Db IP Address.
                  SELECT UTL_INADDR.get_host_address FROM dual
                  --Db Host Name.
                  SELECT UTL_INADDR.GET_HOST_NAME('above ip address') FROM dual
                  

                  客户端:客户端 IP 地址.

                  Client: Client IP Address.

                  SELECT SYS_CONTEXT('USERENV','IP_ADDRESS') FROM dual
                  --Db Host Name
                  SELECT SYS_CONTEXT('USERENV','TERMINAL') FROM dual
                  --Db Host Name with domain.
                  SELECT SYS_CONTEXT('USERENV','HOST') FROM dual
                  --Current Client session details who using DB.
                  SELECT * FROM v$session WHERE username = 'User/Schema name'
                  --To which DB user connected to.
                  SELECT SUBSTR(GLOBAL_NAME, 1, INSTR(GLOBAL_NAME,'.')-1) FROM GLOBAL_NAME
                  

                  SQL Server

                  版本:您正在运行的 Sql 服务器版本.

                  Version: Which versions of Sql sever you are running.

                  SELECT @@VERSION
                  SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('edition')
                  -- SERVERPROPERTY Returns property information about the server instance.
                  

                  客户端:客户端详细信息(IP 地址、机器名称、使用的实例).

                  Client: Client details (IP Address, Machine Name, Instance using).

                  SELECT con.client_net_address as IPAddress,
                           sess.host_name as MachineName, sess.program_name as ApplicationName,
                           login_name as LoginName
                  FROM sys.dm_exec_connections con
                  inner join sys.dm_exec_sessions sess
                  on con.session_ID=sess.session_ID
                  WHERE con.session_ID = @@SPID
                  

                  有关详细信息:http://msdn.microsoft.com/en-我们/图书馆/ms174396.aspx

                  这篇关于有没有办法使用 SQL 获取有关服务器的信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Sqlite Window Phone 8 中的更新记录 下一篇:Windows Server 2012 中的 SQL Server 登录失败

                  相关文章

                  最新文章

                  <small id='s7THr'></small><noframes id='s7THr'>

                  1. <i id='s7THr'><tr id='s7THr'><dt id='s7THr'><q id='s7THr'><span id='s7THr'><b id='s7THr'><form id='s7THr'><ins id='s7THr'></ins><ul id='s7THr'></ul><sub id='s7THr'></sub></form><legend id='s7THr'></legend><bdo id='s7THr'><pre id='s7THr'><center id='s7THr'></center></pre></bdo></b><th id='s7THr'></th></span></q></dt></tr></i><div id='s7THr'><tfoot id='s7THr'></tfoot><dl id='s7THr'><fieldset id='s7THr'></fieldset></dl></div>
                    <tfoot id='s7THr'></tfoot>
                    1. <legend id='s7THr'><style id='s7THr'><dir id='s7THr'><q id='s7THr'></q></dir></style></legend>

                      • <bdo id='s7THr'></bdo><ul id='s7THr'></ul>