我想从可能不在我的专用网络中的数据库服务器获取硬件信息,例如网卡的 MAC 地址或 CPU ID。它必须在 MS SQL 和 MySQL 上工作。
它是某种许可模型所必需的,并且需要在任何网络连接上工作。像数据库服务器的硬件 ID 或数据库服务器软件的某种序列号,它唯一地标识了这个服务器。
谢谢
短剑
我想从可能不在我的专用网络中的数据库服务器获取硬件信息,例如网卡的 MAC 地址或 CPU ID。它必须在 MS SQL 和 MySQL 上工作。
它是某种许可模型所必需的,并且需要在任何网络连接上工作。像数据库服务器的硬件 ID 或数据库服务器软件的某种序列号,它唯一地标识了这个服务器。
谢谢
短剑
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).
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
在互联网上找到了这个。它可能会帮助您思考/查找其他 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 地址。