January 4, 2011 at 4:57 pm
How do I find out if I have the SA account privileges or not on a sql server ?
What level of permissions should I have to assign myself SA account privileges?How do I do it?
If I have the sa account privileges how do I find out the login usernames and their respective passwords in sqlserver?
January 4, 2011 at 10:42 pm
declare @username nvarchar(35)
set @username = (select suser_name())
select loginname, (Case sysadmin when 1 then 'Yes' else 'No' end) as Sysadmin
from syslogins where loginname = @username
Passwords for NT linked accounts are not stored in SQL, but in Active Directory, and are encrypted.
SQL login passwords are also encrypted and you wont be able to retrieve the clear text for them.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply