Home > Database > Mysql Tutorial > body text

SqlServer常用命令

WBOY
Release: 2016-06-07 15:45:50
Original
1304 people have browsed it

dbcc showfilestats 显示数据库空间占用情况 sp_spaceused tb_Test 显示表占用情况 如果包含有非dbo的Scheme,需要特殊处理,比如我们表tb_Test所使用的scheme为Dx,则需要这样写: sp_spaceused [Dx.tb_Test] 当在新建一个查询窗口内写一个查询语句,想知道

  • dbcc showfilestats

显示数据库空间占用情况

  • sp_spaceused tb_Test

显示表占用情况

如果包含有非dbo的Scheme,需要特殊处理,比如我们表tb_Test所使用的scheme为Dx,则需要这样写:

sp_spaceused [Dx.tb_Test]

  • 当在新建一个查询窗口内写一个查询语句,想知道该执行的状态

select * from sys.dm_exec_requests where session_id=58;

-- 其中58为当前窗口的session_id,从窗口的状态栏中可以看出该数字。

 

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template