在SqlServer2005中,建表时是默认把所有的表都保存在PRIMARY默认表空间中的.当数据库中表很多,并且数据量很大时,会导致数据库性能严重下降,有必要将一些大的表放到不同的表空间中去.主要的步骤如下所示: 1.建立表空间(数据文件) USE [master] GO ALTER DATABASE [TestDB] ADD FILEGROUP [Log1] GO ALTER DATABASE [TestDB] ADD FILE ( NAME = N'Log1', FILENAME = N'
if object_id('student', 'U') is not null drop table student go create table student( sno varchar(20) not null , sage decimal not null, sname varchar(20) ) go create nonclustered index stu_index on student(sno) go if(object_id('person', 'U') is not nu
正文原创 一:查询数据库实例有多少用户: [oracle@localhost ~]$ sqlplus / as sysdba; SQL*Plus: Release 11.2.0.3.0 Production on Thu Dec 21 10:18:39 2017 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11