摘要:
1:查数据库所有表名select name from sysobjects where xtype='U'2:查数据库文件及可释放空间(AvailableSpaceInMB即可释放空间)SELECT name ,size/128.0,size/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0 AS AvailableSpaceInMB FROM sysfiles;3:释放文件空间DBCC SHRINKFILE (逻辑数据文件名, 3000);4:查数据库IDselect * from maste 阅读全文