从数据库服务器获取硬件信息

发布于 2024-12-04 11:30:02 字数 184 浏览 4 评论 0原文

我想从数据库服务器获取硬件信息,该服务器可能不在我的专用网络中,例如网卡的 MAC 地址或 CPU ID。它必须适用于 MS SQL 和 MySQL。

它是某种许可模型所必需的,并且需要在任何网络连接上工作。类似于数据库服务器的硬件 ID 或数据库服务器软件的某种序列,它唯一地标识该服务器。

谢谢德克

I want to get hardware information from a database server, which may not be in my private network, like the network card's MAC address, or the CPU ID. It has to work on MS SQL and MySQL.

It is needed for some kind of Licensing Model and needs to work over ANY network connection. Something like a Hardware ID of the database server or some kind of serial of the DB Server software, which identifies this server uniquely.

Thanks

Dirk

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

贪了杯 2024-12-11 11:30:02

一般来说,MAC 地址对于节点锁定来说不是一个好的选择,因为它可以由许多系统上的系统管理员设置。系统参数的组合更安全,但当然,您需要提供一种方法来适应对系统进行较小升级的用户(可能会导致其中一个参数发生更改)、系统崩溃并因此需要获得他们的许可证在另一个系统上运行,以及想要将其许可证重新定位到另一个系统的用户(如果您的许可条款允许这样做)。

In general the MAC address is not a good choice for node-locking, as it can be set by a System Administrator on many systems. A combination of system parameters is more secure, but of course you need to provide a way to accommodate users who do minor upgrades to their system (perhaps causing one of these parameters to change), users who have a system crash and so need to get their license running on another system, and users who want to relocate their license to another system (if your license terms allow this).

江南烟雨〆相思醉 2024-12-11 11:30:02
mysql> STATUS;
--------------
./client/mysql  Ver 14.12 Distrib 5.0.29, for pc-linux-gnu (i686) using readline 5.0

Connection id:          8
Current database:
Current user:           mc@localhost
SSL:                    Not in use
Current pager:          /usr/bin/less
Using outfile:          ''
Using delimiter:        ;
Server version:         5.0.27-standard MySQL Community Edition - Standard (GPL)
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    latin1
Conn.  characterset:    latin1
UNIX socket:            /tmp/mysql.sock
Uptime:                 1 day 3 hours 58 min 43 sec

Threads: 2  Questions: 17  Slow queries: 0  Opens: 11  Flush tables: 1  Open tables: 6  Queries per second avg: 0.000
--------------

mysql> SHOW VARIABLES LIKE "%version%";
+-------------------------+------------------------------------------+
| Variable_name           | Value                                    |
+-------------------------+------------------------------------------+
| protocol_version        | 10                                       |
| version                 | 5.0.27-standard                          |
| version_comment         | MySQL Community Edition - Standard (GPL) |
| version_compile_machine | i686                                     |
| version_compile_os      | pc-linux-gnu                             |
+-------------------------+------------------------------------------+

http://dev.mysql.com/doc/refman/5.0 /en/installation-version.html

mysql> STATUS;
--------------
./client/mysql  Ver 14.12 Distrib 5.0.29, for pc-linux-gnu (i686) using readline 5.0

Connection id:          8
Current database:
Current user:           mc@localhost
SSL:                    Not in use
Current pager:          /usr/bin/less
Using outfile:          ''
Using delimiter:        ;
Server version:         5.0.27-standard MySQL Community Edition - Standard (GPL)
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    latin1
Conn.  characterset:    latin1
UNIX socket:            /tmp/mysql.sock
Uptime:                 1 day 3 hours 58 min 43 sec

Threads: 2  Questions: 17  Slow queries: 0  Opens: 11  Flush tables: 1  Open tables: 6  Queries per second avg: 0.000
--------------

mysql> SHOW VARIABLES LIKE "%version%";
+-------------------------+------------------------------------------+
| Variable_name           | Value                                    |
+-------------------------+------------------------------------------+
| protocol_version        | 10                                       |
| version                 | 5.0.27-standard                          |
| version_comment         | MySQL Community Edition - Standard (GPL) |
| version_compile_machine | i686                                     |
| version_compile_os      | pc-linux-gnu                             |
+-------------------------+------------------------------------------+

http://dev.mysql.com/doc/refman/5.0/en/installation-version.html

万水千山粽是情ミ 2024-12-11 11:30:02

在互联网上找到了这个。它可能会帮助你想到/找到其他SQL信息。

SELECT cpu_count, hyperthread_ratio, cpu_count/hyperthread_ratio,
physical_memory_in_bytes/1048576 AS 'RAM (MB)'
FROM sys.dm_os_sys_info;

另请参阅此答案,它从 SQL 数据库获取 IP 地址桌子。

Found this on the internets. It may help you to think of / find other SQL information.

SELECT cpu_count, hyperthread_ratio, cpu_count/hyperthread_ratio,
physical_memory_in_bytes/1048576 AS 'RAM (MB)'
FROM sys.dm_os_sys_info;

See also this answer, which gets the IP address from a SQL database table.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文