DB2实验报告2.doc

上传人:b****9 文档编号:135992 上传时间:2022-10-04 格式:DOC 页数:60 大小:1.88MB
下载 相关 举报
DB2实验报告2.doc_第1页
第1页 / 共60页
DB2实验报告2.doc_第2页
第2页 / 共60页
DB2实验报告2.doc_第3页
第3页 / 共60页
DB2实验报告2.doc_第4页
第4页 / 共60页
DB2实验报告2.doc_第5页
第5页 / 共60页
点击查看更多>>
下载资源
资源描述

DB2实验报告2.doc

《DB2实验报告2.doc》由会员分享,可在线阅读,更多相关《DB2实验报告2.doc(60页珍藏版)》请在冰豆网上搜索。

DB2实验报告2.doc

吉林大学

DB2实验报告

班级:

姓名:

学号:

姓名

学号

实验项目

2.Creatingdatabasesanddataplacement

实验性质

□演示性实验□验证性实验

þ操作性实验□综合性实验

实验地点

机器编号

指导教师

实验时间

年月日时分

一、实验综述

1.实验目的及要求

Duringthislab,youwillcreateyourdatabaseandyourtablespaces.Alsointhislab,youwillselectinformationontablespacesfromthesystemcatalog(SYSCAT)views.

Attheendofthelab,studentsshouldbeableto:

•Createadatabase

•Createatablespace

•Executeascriptfiletocreatemultipletablespaces

•AccesstheSYSCATviewscontainingtablespaceinformation

•Listtablespaceinformation

•Listcontainerinformation

2.实验设备、软件

PC, windows XPProfessional, DB2 9 Express-c

二、实验过程(实验步骤、记录、数据、分析)

Section1-CreatingtheDatabase

1.CreatingadatabasecanbedonewiththeDB2commandcreatedatabase.UsetheonlinehelpfacilitytodisplaytheDB2commandsyntaxforcreatedatabase.

Showyourworkbelowbyprintingscreen.

2.Whatinformationcanyouspecifyonthecreatedatabasecommand?

Thenameofthedatabase,thelocationofthedatabase,analiasname,thecodesetandterritoryforstoringthedata,acollatingsequence,adefaultextentsize,automaticstorage,andtablespaceinformationcanbespecifiedonthecreatedatabasecommand.

3.Basedonwhatyoulearnedinlecture,whattablespacesarecreatedwhenadatabaseiscreated?

SYSCATSPACE,USERSPACE1,andTEMPSPACE1

Dependingonwhatyouspecifywhenyoucreatethedatabase,theremaybeafourthtablespacecreatedwithanameofSYSTOOLSPACE.ThisiscreatedifyouspecifyWithAutomaticMaintenanceinsteadofStandardwhenyoucreatethedatabase.

4.Whattypeoftablespace,SMSorDMS,willyourdatabaseusebydefaultforthesedefaulttablespaces?

DMStablespacesforSYSCATSPACEandUSERSPACE1,andSMSforTEMPSPACE1.NotethatinDB2UDBV8.2andearlierthedefaulttablespacesareSMS.

5.BeforewecreateourMUSICDBdatabase,rememberwhatyoulearnedinlectureaboutwhatsomeofthedefaultswillbe.

•Whatisthedefaultpaththatthedatabasewillbecreatedon?

•Whatwillbethedefaulttablespacetype(SMSorDMS)forthetablespacesthatwillbecreatedtohouseUserTables,CatalogTables,andTemporaryTables?

•WhatarethedefaultExtentandPrefetchsizes?

•WhatarethedefaultTerritory,CodeSetandCollatingSequencevalues?

•ThedatabasewillbecreatedontheC:

\DB2pathbydefault.

•ThedefaulttablespacetypeforUserTablesandCatalogTablesisDMS,andforTemporaryTablesisSMS.

•ThedefaultExtentandPrefetchsizesare324KBpageseach.

•Thedefault

6.CreateyourdatabasewithaDatabasenameofMUSICDBusingthedefaultsettings.Itwilltakeafewminutestocreatethedatabase.

Showyourworkbelowbyprintingscreenforthelaststep.

7.YoushouldnowhaveyourMUSICDBdatabasecreated.TheSystemDatabaseDirectorycontainsanentryforalldatabasesknownbythisinstance.ChecktheSystemDatabaseDirectoryforanentryfortheMUSICDBdatabasebyissuingthelistdbdirectorycommand.

Showyourworkbelowbyprintingscreen.

8.Asthereisalotofinformationreturnedfromtheselectstatementandthedatabasemanagerconfiguration,itmightbehelpfultostoretheinformationinafilecalledmyouttobeabletoexamineitstepbystep.Executethescriptagainandsavetheoutputinafilenamedmyout.

Showyourworkbelowbyprintingscreen.

8.WhatistheDatabasealiasnameandwherediditcomefrom?

TheDatabasealiasnameisYL1016.Itdefaultedtothedatabasenamesincenoaliaswasspecifiedwhenthedatabasewascreated.

9.WhatdoesaDirectoryentrytypeofIndirectmean?

ADirectoryentrytypeofIndirectmeansthedatabaseislocatedonthissystem,andthatthelocaldatabasedirectorycanbefoundhere.Youwillseethisifyouissuethelistdatabasedirectorycommandfromyourtelnetwindow.

10.WhatdoesaDirectoryentrytypeofRemotemean?

ADirectoryentrytypeofRemotemeansthedatabaseislocatedonanothersystem.YouwillseethisifyouissuethelistdatabasedirectorycommandfromtheWindowsclient.

11.It'stimetoconnecttoyourMUSICDBdatabase.Checkyourcurrentconnectionstatewiththegetconnectionstatecommand.

12.Whatistheconnectionstate?

Showyourworkbelowbyprintingscreen.

TheconnectionstateisConnectableandUnconnected.

13.ConnecttoyourMUSICDBdatabase.

14.DidyougetconnectedtoyourMUSICDBdatabase?

Showyourworkbelowbyprintingscreen.

15.Checkyourconnectionstateagain.Whatdoesitshow?

Showyourworkbelowbyprintingscreen.

16.EverydatabasehasitsownDatabaseConfigurationfilethatcontainsinformationaboutthedatabaseandtuningparameters.LookattheDatabaseConfigurationfileforyourMUSICDBdatabase.

Showyourworkbelowbyprintingscr

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > PPT模板 > 卡通动漫

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1