objets créés récemment

Tables et vues créées récemment : SQL Server 2000 :

SELECT name, xtype, crdate 
FROM dbo.sysobjects
WHERE xtype IN ('V','U')
ORDER BY crdate DESC

Index sur une table, SQL Server 2000

SELECT
	o.name TableName, 
	i.name AS IndexName, 
	ik.indid IndexID, 
	ik.colid ColID, 
	i.STATUS,
	c.name AS ColName, 
	c.xtype DataTypeID, 
	t.name AS DataType,
	c.length LengthBytes, 
	c.prec, 
	c.scale
FROM sysobjects o 
JOIN sysindexes i ON o.id = i.id 
JOIN sysindexkeys ik ON i.id = ik.id AND i.indid = ik.indid 
JOIN syscolumns c ON ik.id = c.id AND ik.colid = c.colid 
JOIN systypes t ON c.xtype = t.xtype
WHERE 
	o.xtype='U' AND
	o.id = object_id('Person.Contact')
ORDER BY IndexId
 
sql_server/snippets/administration/metadonnees.txt · Dernière modification: 2007/10/13 09:45 (édition externe)