摘要:
SELECT * FROM sys.all_objects 查询系统表的内容 USE cjml_basecenter; GO SELECT o.name, SUM(p.reserved_page_count) * 8 table_size_kb, SUM(p.reserved_page_count) 阅读全文
posted @ 2020-08-03 21:15
ascertain
阅读(557)
评论(0)
推荐(0)
摘要:
直接在web中删除,要求输入手机验证码;采用以下方式可以直接删除数据库 EXEC sp_rds_drop_database 'cjml-auto' 直接利用rds的存储过程删除数据库,因为是高可用,后面有一个mirror,删除比较麻烦 阅读全文
posted @ 2020-08-03 21:11
ascertain
阅读(260)
评论(0)
推荐(0)
摘要:
统计单个库所有表记录数(包含sys) SELECT SCHEMA_NAME(t.schema_id) AS [schema] ,t.name AS tableName ,i.rows AS [rowCount] FROM sys.tables AS t , sysindexes AS i WHERE 阅读全文
posted @ 2020-08-03 11:54
ascertain
阅读(679)
评论(0)
推荐(0)
摘要:
查询每个库的数据文件大小和日志文件大小 with fs as ( select database_id, type, size -- * 8.0 / 1024 size from sys.master_files ) select name, --(select cast(round(sum(siz 阅读全文
posted @ 2020-08-03 10:49
ascertain
阅读(915)
评论(0)
推荐(0)

浙公网安备 33010602011771号