System information

OPEN DBCursor;
DECLARE @DBName VARCHAR(200) = '';
FETCH NEXT FROM DBCursor INTO @DBName;
WHILE @@FETCH_STATUS = 0
BEGIN
DECLARE @SQL NVARCHAR(MAX) = N'USE ' + QUOTENAME(@DBName) + '
IF EXISTS
( SELECT 1
FROM sys.tables
WHERE [Object_ID] = OBJECT_ID(N''dbo.tb_settings'')
)
BEGIN
INSERT #tmp_333 (DatabaseName, valstr, keystr, inisection)
SELECT @DB, [valstr], [keystr], [inisection]
FROM dbo.tb_settings
WHERE keystr = ''bindip'' AND
inisection=''settings''
END';
EXECUTE SP_EXECUTESQL @SQL, N'@DB VARCHAR(200)', @DBName;
FETCH NEXT FROM DBCursor INTO @DBName;
END
CLOSE DBCursor;
DEALLOCATE DBCursor;
SELECT *
FROM #tmp_333;
DROP TABLE #tmp_333;
5.120. Number of services limit on a server
You might have to change the windows desktop heap settings if you are running multiple service instances (more than 10) on the same server.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems\Windows
More details:
http://ss64.com/nt/syntax-desktopheap.html
http://social.technet.microsoft.com/Forums/en-GB/winservergen/thread/c53e3c42-a798-417a-9c48-cd2b442310f2
http://blogs.msdn.com/b/ntdebugging/archive/2007/01/04/desktop-heap-overview.aspx