预览加载中,请您耐心等待几秒...
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

亲,该文档总共62页,到这已经超出免费预览范围,如果喜欢就直接下载吧~

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

实验一SQLServer2008基本服务和信息 一实验目的 要求学生查看SQLServer2008联机丛书的内容,了解SQL的环境及基本操作,了解SQL的基本信息。 二实验内容 查看书内容,环境并掌握其基本操作,服务器管理和注册 查看SQL的目录结构,利用SQL的基本系统视图查看相关信息。 三实验指导 select*fromsys.servers whereserver_id=0 select*fromsys.databases select*fromsys.filegroups select*fromsys.master_files select*fromsys.database_files select*fromsys.data_spaces createtabletest ( idintnotnull, namechar(100)null, constraintpk_testprimarykeyclustered(idasc) ) createnonclusteredindexix_testontest(name) select* fromsys.objects wheretype_desc='user_table'andname='test' select*fromsys.objects wheretype_desc='user_table'andname='test'orparent_object_idin (selectobject_idfromsys.objects wheretype_desc='user_table'andname='test') select*fromsys.columns whereobject_id='12' select*fromsys.indexes whereobject_id='12325345' select*fromsys.partitions whereobject_id='12325345' select*fromsys.allocation_units select*fromsys.allocation_unitsu,sys.partitionsp whereu.typein(1,3)andu.container_id=p.hobt_idandp.object_id='33' unionall select*fromsys.allocation_unitsu,sys.partitionsp whereu.type=2andu.container_id=p.partition_idandp.object_id='33' select*fromsys.dm_db_partition_stats whereobject_id='33' select*fromsys.index_columns whereobject_id='11' select*fromsys.database_principals select*fromsys.types 实验二数据库的创建和管理 一实验目的 要求学生熟练的使用SQL创建和管理数据库,并学会使用SQL查询分析器接受和运行结果分析。 二实验内容 创建数据库,查看和修改数据库的属性,修改数据库名称,删除数据库. 三实验指导 --数据库的创建 createdatabaseeduc onprimary ( name=student_data, filename='C:\ProgramFiles\MicrosoftSQLServer\MSSQL10.MSSQLSERVER\MSSQL\DATA\student_data.mdf', size=10MB, maxsize=50MB, filegrowth=1MB ) logon ( name=student_log, filename='C:\ProgramFiles\MicrosoftSQLServer\MSSQL10.MSSQLSERVER\MSSQL\DATA\student_log.ldf', size=2MB, maxsize=5MB, filegrowth=1% ) useeduc go selectdatabase_id,is_read_only,collation_name,compatibility_level fromsys.databaseswherename='educ' go useeduc go selectdatabasepropertyex('educ','isautoshrink') go usejxgl go selectobject_name(id)as'数据表名' fromsysobjects wherextype='u'and