this morning i find out from internet , how do i use SQL query to list all user from sahrepoint DB.
Script as below:
--Change the g.type = ? statement to get the type of user--you need as follows:
-- 5 = Administrator
-- 4 = Web Designer
-- 3 = Contributor
-- 2 = Reader
-- 1 = Visitor--To get all users regardless of type, just remove the
--"g.type = 5 AND" part of the code altogether.
USE SharePoint_SITESELECT
w.fullurl, w.title, u.tp_title, u.tp_login
FROM webs w, userinfo u, webgroups g
INNER JOIN webgroupmembership p
ON g.webid = p.webid
AND g.id = p.groupid
WHERE g.type = 5
AND u.tp_id = p.memberid
AND u.tp_siteid = g.siteid
AND w.id = g.webid
AND w.siteid = g.siteid
ORDER BY w.fullurl