资源描述:
《sqlplus系统环境变量有哪些》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、SQLPlus系统环境变量有哪些WhataretheenvironmentvariablesoftheSQL*Plussystem?Howtomodify?Softwareenvironment:1,Windows,NT4.0+ORACLE,8.0.42,ORACLEinstallationpathis:C: RANTImplementationmethod:TheshowandsetcommandsarethetwocommandsusedtomaintainSQL^Plussystemvari
2、ablesSQL>showall--viewall68systemvariablevaluesSQL>showuser一displaysthecurrentconnectionuserSQL>showerror一displayerrorSQL>setheadingoff-disablesoutputcolumnheaders,defaultstoONSQL>,set,feedback,off一一prohibitdisplayingthelastlinecountfeedbackinformation
3、.Defaultsto〃6ormorerecords"and"loopbackON"SQL>settimingon-defaultstoOFF,settingquerytimeconsuming,whichcanbeusedtoestimatetheexecutiontimeofSQLstatementsandtestperformaneeSQL>setsqlprompt〃SQL>〃-setsthedefaultprompt,andthedefaultis〃SQL>〃〃SQL>setlinesize
4、1000-setsthescreendisplaylinewidthbydefault100SQL>setautocommitON-whetherthesettingsaresubmittedautomaticallyanddefaultstoOFFSQL>setpauseon-defaultsto〃OFF〃・Settingpausewillstopthescreendisplay,waitfortheENTERbuttontobepressed,andthendisplaythenextpageS
5、QL>setarraysize1-defaultsto15SQL>setlong1000-defaultsto80Explain:Thelongvaluedefaultsto80andsets1000toshowmorecontent,becausemanydatadictionaryviewsusethelongdatatype,suchas:SQL>descuser_viewsCo1umnname,nullvalue,notypeVIEW_NAME,NOT,NULL,VARCHAR2(30)TE
6、XT_LENGTHNUMBERTEXTLONGSQL>definea='''2000010112:01:01'''-defineslocalvariables,ifyouwanttouseaconstantlikethecarriagereturnincludedinvariousdisplays,--youcansetitwiththedefinecommandSQL>,select,&a,from,dual;Theoriginal1:select&afromdualNewvalues1:,sel
7、ect,J20000101,12:01:01',from,dual‘2000010112:01:01Roundandround2000010112:01:01Proposeproblem:1.UsersneedtoperformthesameSQLoperationoneachtableunderthedatabaseuser・Atthistime,typingSQLstatementsoverandoverisverytroublesomeImplementationmethod:SQL>seth
8、eadingoff一disablesoutputcolumnheadingSQL>,set,feedback,off--donotdisplaythecountfeedbackinformationofthelastlineListsthedefinitionsofallsynonymsunderthecurrentuser,whichcanbeusedtotestthetrueexistenceofsynonymsSelect,'desc,
9、
10、tname,from,