March 28, 2012 at 7:20 am
how to validate a windows login in domain through SQL queries
March 28, 2012 at 7:22 am
sureshrajan (3/28/2012)
how to validate a windows login in domain through SQL queries
not sure what you mean...do you want to test if mydomain\sureshrajan has a login or has access to a server/ database?
Lowell
March 28, 2012 at 7:24 am
Yes. When you create a login in SQL, it should validate through a script whether it is valid windows login.
March 28, 2012 at 8:43 am
the CREATE LOGIN process already does that.
for example if you try this command:
CREATE LOGIN [fakedomain\fakeuser] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
you get this error:
Msg 15401, Level 16, State 1, Line 1
Windows NT user or group 'fakedomain\fakeuser' not found. Check the name again.
Lowell
March 28, 2012 at 2:44 pm
SSRfromChennai (3/28/2012)
how to validate a windows login in domain through SQL queries
use the stored procedure xp_logininfo
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs"
April 9, 2012 at 9:42 am
Perry Whittle (3/28/2012)
SSRfromChennai (3/28/2012)
how to validate a windows login in domain through SQL queriesuse the stored procedure xp_logininfo
xp_logininfo only validates windows accounts after the SQL Server Login is created.
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy