SQL CMD 範本
SQLQuery2.sql
DECLARE @DefaultUserName varchar(15)
DECLARE @DefaultPassWord varchar(15)
DECLARE @IP varchar(15)
-- 電腦 預設帳號
EXECUTE
master..xp_regread
"HKEY_LOCAL_MACHINE"
,"SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon"
,"DefaultUserName"
,@DefaultUserName OUTPUT
-- 電腦 預設密碼
EXECUTE
master..xp_regread
"HKEY_LOCAL_MACHINE"
,"SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon"
,"DefaultPassWord"
,@DefaultPassWord OUTPUT
-- 本SQL SERVER IP
set @IP = cast(
CONNECTIONPROPERTY("local_net_address") as varchar(15) )
select @IP
AS local_net_address , @DefaultUserName as Name , @DefaultPassWord as PW
沒有留言:
張貼留言