Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 316
  • Last Modified:

system_user for a user without login

create user test without login
execute as user = 'test';
select system_user
revert
drop user test

when i run the above, i get the value of
S-1-9-3-2009668872-1126946027-3271010458-694455781
which i can't see in sysusers or syslogins.. what is it?

thanks
0
anushahanna
Asked:
anushahanna
  • 3
2 Solutions
 
Chris MangusDatabase AdministratorCommented:
It's showing you a SID of an orphan user, which is a user account without a login.
0
 
anushahannaAuthor Commented:
But could not see it in sysusers (that id starting with S-') rather we have a regular sid

create user test without login
execute as user = 'test';
select system_user
select * from sysusers where name = 'test'
revert
drop user test
0
 
Scott PletcherSenior DBACommented:
My best guess is that SQL may have to create some type of login name internally because of the way its processes work.  You're likely seeing that "dummy" login name.
0
 
anushahannaAuthor Commented:
OK. that makes sense.
0
 
anushahannaAuthor Commented:
Thank you for your input.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now