軟體註冊中,可以使用獲取sql伺服器mac來獲得許可權。
取得mac
declare
@dbid
int
set
@dbid=db_id(
'db_stuey'
)
select
distinct
hostname,
db_name(dbid),
net_address,
loginame,
program_name
from
master..sysprocesses
where
hostname!=
''
and
(@dbid
is
null
or
dbid=@dbid)
取得sa
declare @dbid int
set @dbid=db_id('資料庫名')
select distinct hostname,
db_name(dbid),
net_address, --實體地址
loginame,
program_name
from master..sysprocesses
where hostname='伺服器名'and(@dbid is null or dbid=@dbid)
可以使用最簡單的方法,直接獲取sql伺服器的mac,一句話搞定!
select distinct net_address from master..sysprocesses where hostname!=''
獲取MAC位址
簡單的辦法是在控制台輸入ping 目標ip,然後用 arp a 來檢視.或者下面的 記下來以備後用 private declare function inet addr function inet addr lib wsock32.dll byval s as string as int32 pri...
獲取網絡卡MAC位址
做網路程式設計的程式設計師免不了要與mac位址打交道,這個128bit的數字串在某種程度上就代表了機器的唯一性,因此在做統計工作時一般都以mac位址作為標準。下面介紹兩種獲取本機mac位址的方式。1.通過請求netbios服務獲取mac位址 2.通過iphelpapi獲取。第一種方法要求本機開啟了n...
如何獲取MAC位址
如何獲取mac位址 get the hardware address of the inte ce int sockfd struct ifreq req unsigned char hwaddr eth alen if sockfd socket af inet,sock stream,0 0 b...