2016-09-01 63 views

回答

0

這裏的答案

讓您窗口SID通過CMD控制檯執行

whoami/user 

SQL查詢:

USE [YourDatabase] 
DECLARE @USERSID uniqueidentifier, @WINDOWSSID nvarchar(119), @USERNAME  
nvarchar(50) 
SET @USERNAME = 'Domain\user' 
SET @USERSID = newid() 
SET @WINDOWSSID = 'Your SID' 

INSERT INTO [dbo].[User] 
     ([User Security ID],[User Name],[Full Name],[State],[Expiry Date], 
     [Windows Security ID],[Change Password],[License Type], 

[Authentication Email]) 
VALUES 
     (@USERSID,@USERNAME,'',0,'1753-01-01 00:00:00.000',@WINDOWSSID,0,0,'') 

INSERT INTO [dbo].[User Property] 
     ([User Security ID],[Password],[Name Identifier],[Authentication Key],  

[WebServices Key],[WebServices Key Expiry Date],[Authentication Object ID]) 
VALUES 
     (@USERSID,'','','','','1753-01-01 00:00:00.000','') 

INSERT INTO [dbo].[Access Control] 
     ([User Security ID],[Role ID],[Company Name]) 
VALUES 
     (@USERSID,'SUPER','') 

GO