65t4rq//NetWork List
CREATE TABLE #servers(sname VARCHAR(500))
INSERT #servers (sname)
EXEC master..xp_CMDShell 'OSQL -L'
DELETE
FROM #servers
WHERE sname='Servers:'
OR sname IS NULL
SELECT LTRIM(sname)
FROM #servers
DROP TABLE #servers
CREATE TABLE #servers(sname VARCHAR(500))
INSERT #servers (sname)
EXEC master..xp_CMDShell 'OSQL -L'
DELETE
FROM #servers
WHERE sname='Servers:'
OR sname IS NULL
SELECT LTRIM(sname)
FROM #servers
DROP TABLE #servers
No comments:
Post a Comment