Kolay gelsin.
CREATE TABLE ##tempTable
(
DatabaseName VARCHAR(64),
ObjectName VARCHAR(128),
ObjectKind VARCHAR(128)
)
EXEC sp_Msforeachdb "USE [?];
INSERT ##tempTable (DatabaseName, ObjectName, ObjectKind)
SELECT db_name(), t1.name, t1.xtype
FROM sysobjects t1"
SELECT *
FROM ##tempTable
DROP TABLE ##tempTable
Hiç yorum yok:
Yorum Gönder