ABC_usercrontab格式
crontab格式 时间:2021-01-16 阅读:(
)
SERVICEREPORTSAPIQWeeklyDBHealthCheckTemplateVersion12.
0SAPSystemIDABCSAPProductSybaseIQRelease16.
0DBSystemIQ16SPXXPLXXOperatingSystemLinuxx86_64CustomerDateofSessionXX.
XX.
2017DateofReportXX.
XX.
2017InstallationNo.
AuthorAmitAgarwalCustomerNo.
XXYYZZMailReportSummaryIQTPOWeeklyHealthCheck,,Today'sDate(CONFIDENTIAL)2MonthDaythYearIQWeeklyHealthCheckReportTemplateDearSir/Madam,TheIQweeklyHealthcheckreportfocusisdatabaseoverviewandanalyzesofyoursystemconfigurationondatabase,inordertoproviderecommendationsforimprovingsystemresponsetime.
Ifyouhaveanyquestionsorconcerns,donothesitatetocontactus.
Yourssincerely,AmitAgarwalSeniorSupportConsultantDBSSAPLabs,IndiaReportSummaryIQTPOWeeklyHealthCheck,,Today'sDate(CONFIDENTIAL)31ReportSummary1.
1SummaryTheprimarygoaloftheIQHealthcheckreportisfocusDatabaseconfigurationandsystemperformancemonitor.
ThisreportcoversthefindingsoftheIQsystemparameterandconfigurationoverviewduringtheperiodof'MonthDay–Day,Year'.
Mostofthescripts&storeprocedurecallinthisreportareeitherSAinbuiltstoreprocedure(startingwith"sa_*")whileothersarestandardIQinbuildstoreprocedures(with"*_iq*")Pleasereviewthisdetailedreport1.
2ActionPlanThefollowingtablescontainalistofrecommendationsprovidedinthisreport.
CRITERIAFORSETTINGPRIORITIESPriorityDescriptionVeryhighHasorwillhavecriticalimpactonbusinessoperations(possiblefinancialloss)HighHasorwillhaveseriousimpactonbusinessoperationsMediumHasorwillhavesomeimpactonbusinessoperationsLowHasorwillhaveminorimpactonbusinessoperationsThefollowingtablecontainsrecommendationsonissuesidentifiedonIQdatabasesystem:NoPriorityAreaIssueAction/Recommandation8.
12SystemPerformance8.
21ConfigurationTableofContentsIQTPOWeeklyHealthCheck,,Today'sDate(CONFIDENTIAL)42TableofContents1REPORTSUMMARY.
31.
1SUMMARY31.
2ACTIONPLAN32TABLEOFCONTENTS.
43LANDSCAPE.
73.
1IQCURRENTPRODUCTIONLANDSCAPEDIAGRAM.
73.
2IQCURRENTLANDSCAPE73.
2.
1HardwareSpecificationforcurrentLandscape84HARDWAREOVERVIEW.
94.
1DBHOSTCPUUSAGE94.
2DBHOSTMEMORYUSAGE.
94.
3DBHOSTSPACEUSAGE.
95IQNODESOVERVIEW105.
1MULTIPLEX/SINGLEXSERVERINFO105.
2IQDBVERSION105.
3DBSTARTTIME.
105.
4MPXHEARTBEATINFO115.
5STARTUPPARAMETERS125.
6CACHEHITSANDCACHEIO.
125.
7MAINCACHE/TEMPCACHE/CATALOGCACHE/LARGEMEMORYSIZE135.
8ACTIVECONNECTIONANDTHREADSINUSE/FREE.
145.
9CURRENTDBLOCKS.
155.
10IQTEMPSPACEINUSAGE.
165.
11READIQMSGFILE.
165.
12IQVERSIONINGINUSE175.
13TOPIQPERFORMANCEQUERY185.
14TOPTRANSACTIONHISTORY.
196GENERALDBSTATUSOVERVIEW206.
1IQDBSTATUS.
206.
2SPACEINFORMATION.
246.
2.
1DBspaceInfo.
246.
2.
2DBFileInfo.
256.
2.
3IQCatalogDBandIQMSGfileInfo.
276.
2.
4LargestTablesinIQ286.
3TABLES/STOREDPROCEDURESCREATEDONDATABASEDURINGLASTWEEK.
306.
4INVALIDVIEWONIQDATABASE.
316.
5IDENTIFYOBJECTTYPESIQTABLE.
316.
6IDENTIFYOBJECTTYPESIQDATABASE326.
7INDEXTYPESONIQDATABASE.
326.
8IQINDEXFRAGMENTATION.
336.
9IDENTIFYLISTOFTABLESINAVIEWORSTOREPROCEDUREINIQ.
34TableofContentsIQTPOWeeklyHealthCheck,,Today'sDate(CONFIDENTIAL)56.
10FINDDETAILSOFPROCEDURE/TABLE/VIEWIQ.
346.
11IQUSER&ROLE.
346.
12IQLOGICALSERVERPOLICYASSIGNEDUSERS.
356.
13MONITORLASTTIMEANOBJECTWASACCESSEDINIQ356.
14IQPARTITIONEDTABLES356.
15BACKUPSUMMARY.
366.
16IQDBLICENSEINFORMATION386.
17IQDATABASEUPGRADEINFO397HISTORICSTATISTICSCOLLECTIONSCRIPTS.
407.
1COLLECTSTATISTICSFORTOPTRANSACTIONINIQ.
407.
2COLLECTSTATISTICSFORCONNECTION/THREADS/MEMORYAREAS.
427.
2.
1IQActiveconnections.
427.
2.
2IQThreadsinUse.
437.
2.
3IQThreadsFree437.
2.
4IQMaincacheSize.
447.
2.
5IQTemporarycacheSize447.
2.
6IQTemporarycacheUsage457.
2.
7IQTemporarycacheUsage458APPENDIX.
468.
1DBSTARTUPPARAMETERS.
468.
2DISPLAYDATABASEOPTIONS.
518.
3DBVALID-DATABASEADMINISTRATIONUTILITY538.
4DB_BACKUPHEADER-UTILITY.
538.
5DISPLAYSTHESOURCETEXT"SP_HELPTEXT"548.
6ENABLEANDDISABLETRACEINIQDB.
558.
7SAPSYBASEIQERRORMESSAGESANDREPORTINGALERTS.
568.
8IQHEADER-UTILITY568.
9UTILITY"IQUNLOAD"TOEXPORT/IMPORTIQOBJECT(SMALLTABLES)578.
10UTILITY"TEMP_EXTRACT"TOEXPORT/IMPORTIQOBJECT(LARGETABLES)588.
11IQTUNINGGDIRTY608.
12IQMONITORINGTOPSQLSTATEMENTPERFORMANCE.
608.
13SYBASEIQSYSMON-SYSTEMPERFORMANCEANALYSIS.
618.
14DQP(DISTRIBUTEDQUERYPROCESSING)638.
15IQCHECKPOINT.
658.
16IQVERSIONING.
718.
17IQINDEXADVISOR728.
18DATABASEOPTIONSTHATGOVERNUSERRESOURCES.
738.
19SP_IQMPXDUMPTLVLOGPROCEDURE738.
20IQSTOPSPROCESSINGORSTOPSRESPONDING748.
21IQDIAGNOSTICSANDHANGANALYSIS758.
22NBITFP.
758.
23PSTACK768.
24DSTAT.
788.
25OSIOMONITORING798.
26SAPIQREFERENCEGUIDE80TableofContentsIQTPOWeeklyHealthCheck,,Today'sDate(CONFIDENTIAL)68.
27IQSTOREDPROCEDURES808.
28IQDML_OPTIONS.
81LandscapeIQTPOWeeklyHealthCheck,,Today'sDate(CONFIDENTIAL)73Landscape3.
1IQCurrentProductionLandscapediagram3.
2IQCurrentLandscapeDBSERVERSSIDHostLogicalHost(SAPDBHOST)DBInstanceNameMPXModeABCXYZC01XYZC01XYZC01coordinatorABCXYZW02XYZW02XYZW02writerABCXYZW09XYZW09XYZW09readerABCXYZC02XYZC02XYZC02writerABCXYZW10XYZW10XYZW10writerABCXYZW01XYZW01XYZW01writerABCXYZW11XYZW11XYZW11writerABCXYZW12XYZW12XYZW12writerABCXYZW13XYZW13XYZW13writerABCXYZW14XYZW14XYZW14writerABCXYZW03XYZW03XYZW03writerABCXYZW15XYZW15XYZW15writerABCXYZW06XYZW06XYZW06writerABCXYZW07XYZW07XYZW07writerABCXYZW08XYZW08XYZW08readerABCXYZW18XYZW18XYZW18writerABCXYZW19XYZW19XYZW19writerABCXYZW20XYZW20XYZW20writerABCXYZW21XYZW21XYZW21writerABCXYZW22XYZW22XYZW22writerLandscapeIQTPOWeeklyHealthCheck,,Today'sDate(CONFIDENTIAL)83.
2.
1HardwareSpecificationforcurrentLandscapeHostManufacturerComputerModelOperatingSystemCPUTypeCPUFrequencyNo.
ofCPUsMemory(TB)XYZC01HPLinuxRHEL6.
6IntelXeon(R)2600561.
5XYZW02HPLinuxRHEL6.
6IntelXeon(R)2600561.
5XYZW09HPLinuxRHEL6.
6IntelXeon(R)2600561.
5XYZC02HPLinuxRHEL6.
6IntelXeon(R)2600561.
5XYZW10HPLinuxRHEL6.
6IntelXeon(R)2600561.
5XYZW01HPLinuxRHEL6.
6IntelXeon(R)2600561.
5XYZW11HPLinuxRHEL6.
6IntelXeon(R)2600561.
5XYZW12HPLinuxRHEL6.
6IntelXeon(R)2600561.
5XYZW13HPLinuxRHEL6.
6IntelXeon(R)2600561.
5XYZW14HPLinuxRHEL6.
6IntelXeon(R)2600561.
5XYZW03HPLinuxRHEL6.
6IntelXeon(R)2600561.
5XYZW15HPLinuxRHEL6.
6IntelXeon(R)2600561.
5XYZW06HPLinuxRHEL6.
6IntelXeon(R)2600561.
5XYZW07HPLinuxRHEL6.
6IntelXeon(R)2600561.
5XYZW08HPLinuxRHEL6.
6IntelXeon(R)2600561.
5XYZW18HPLinuxRHEL6.
6IntelXeon(R)2600561.
5XYZW19HPLinuxRHEL6.
6IntelXeon(R)2600561.
5XYZW20HPLinuxRHEL6.
6IntelXeon(R)2600561.
5XYZW21HPLinuxRHEL6.
6IntelXeon(R)2600561.
5XYZW22HPLinuxRHEL6.
6IntelXeon(R)2600561.
5HardwareOverviewIQTPOWeeklyHealthCheck,,Today'sDate(CONFIDENTIAL)94HardwareOverview4.
1DBHostCPUusageOSCPUusagefromallDBservernodes:SQL>sa_cpu_topologystoredprocedure4.
2DBHostMemoryusageOSmemoryusagefromallDBservernodesSQL>sp_iqhostutilizationstoredprocedure(Linuxonly)4.
3DBHostspaceusageDiskspaceusagefromallDBservernodesSQL>sa_disk_free_spacestoredprocedure(TestedonLinuxonly)SQL>sp_iqdisks(TestedonLinuxonly)IQNodesOverviewIQTPOWeeklyHealthCheck,,Today'sDate(CONFIDENTIAL)105IQNodesOverview5.
1Multiplex/SimplexserverinfoThissectioncontainscurrentinformationrelatedtoIQNodesrunning(SQL:"selectsubstring(server_name,1,20)asserver_name,substring(connection_info,1,30)asconnection_info,mpx_mode,inc_state,status,substring(coordinator_failover,1,20)ascoordinator_failover,substring(db_path,1,40)asdb_pathfromsp_iqmpxinfo();"):Server_nameConnection_infompx_modeInc_statestatuscoordinator_failoverdb_pathXYZC01host=XX.
XX.
XX.
XX:2638coordinatorN/AincludedXYZC02/APP/ABC/CATALOG/DB/ABC.
dbXYZW02host=XX.
XX.
XX.
XX:2638writeractiveincludedXYZC02/APP/ABC/CATALOG/DB/ABC.
dbXYZW09host=XX.
XX.
XX.
XX:2638readeractiveincludedXYZC02/APP/ABC/CATALOG/DB/ABC.
dbXYZC02host=XX.
XX.
XX.
XX:2638writeractiveincludedXYZC02/APP/ABC/CATALOG/DB/ABC.
dbXYZW10host=XX.
XX.
XX.
XX:2638writeractiveincludedXYZC02/APP/ABC/CATALOG/DB/ABC.
dbXYZW01host=XX.
XX.
XX.
XX:2638writeractiveincludedXYZC02/APP/ABC/CATALOG/DB/ABC.
dbXYZW11host=XX.
XX.
XX.
XX:2638writeractiveincludedXYZC02/APP/ABC/CATALOG/DB/ABC.
dbXYZW12host=XX.
XX.
XX.
XX:2638writeractiveincludedXYZC02/APP/ABC/CATALOG/DB/ABC.
dbXYZW13host=XX.
XX.
XX.
XX:2638writeractiveincludedXYZC02/APP/ABC/CATALOG/DB/ABC.
dbXYZW20host=XX.
XX.
XX.
XX:2638writeractiveincludedXYZC02/APP/ABC/CATALOG/DB/ABC.
dbXYZW21host=XX.
XX.
XX.
XX:2638writeractiveincludedXYZC02/APP/ABC/CATALOG/DB/ABC.
dbXYZW22host=XX.
XX.
XX.
XX:2638writeractiveincludedXYZC02/APP/ABC/CATALOG/DB/ABC.
dbColumnDescriptionColumnnameDescriptionserver_nameNameoftheserverconnection_infoAformattedstringcontainingthehost/portportionoftheconnectionstringusedforTCPIPconnectionsbetweenmultiplexservers.
mpx_mode'single'|'coordinator'|'writer'|'reader'|'writer'|'unknown'Inc_state'active'|'notresponding'|'timedout'status'included'|'excluded'coordinator_failoverNameofthefailoverserverdb_pathFulldatabasepath5.
2IQDBversionSQL>selectproperty('ServerName'),db_property('Name'),property('ProductVersion'),db_property('File'),property('PlatformVer')Output:selectoperation,versionfromsyshistorywhereoperationin('INIT','UPGRADE');select*fromsp_iqstatus()wherenamelike'%Version:%'start_iq-v2Selectconnection_property('AppInfo')->5.
3DBStartTimeThissectionshowsIQDBstartuptimeBelowStatementhelpsprovideDBstartuptime(SQL:select@@servernameasHostname,CURRENTTIMESTAMPASTimeStamp,substring(VALUE,1,40)ASStartTime,SECONDS(VALUE,CURRENTTIMESTAMP)ASRuntimeSecondsFROMSA_ENG_PROPERTIES()WHEREPropName='StartTime';)HostNameTimestampStartTimeRuntimeinsecondsXYZW048/25/201613:378/19/201616:17508860XYZW058/25/201613:378/11/201615:251203084IQNodesOverviewIQTPOWeeklyHealthCheck,,Today'sDate(CONFIDENTIAL)115.
4MPXHeartbeatinfoSQL>sp_iqmpxvalidateorcalldbo.
sp_iqmpxvalidate('show_msgs')Checksmultiplexconfigurationforinconsistencies.
ExecutesmultiplechecksontablesSYS.
SYSIQDBFILEandothermultiplexeventsandstoredprocedures.
Mayrunonanyserver.
Returnsaseverityresulttothecaller;valuesare:Output:NoerrordetectedèCheckforerrorifreportedSQL>sp_iqmpxincheartbeatinfoOutput:ColumnDescriptionColumnnameDatatypeDescriptionValuesserver_idunsignedintIdentifierfortheserverserver_namechar(128)Nameoftheserverlast_positive_hbTIMESTAMPDate/timeoflastsuccessfulheartbeatpingDD:MM:YYYY:HH:MM:SStime_not_respondingTIMETimesincelastsuccessfulheartbeatpingHH:MM:SStime_until_timeoutTIMEIfanodeisnotresponding,thetimeleftuntilnodeisdeclaredoffline.
SQL>sp_iqmpxincstatisticsOutput:ColumnDescriptionNote:Youcancollectthesedataatregularintervalsoveraperiodtimetohavehistoricalinformation.
IQNodesOverviewIQTPOWeeklyHealthCheck,,Today'sDate(CONFIDENTIAL)125.
5StartupparametersThissectioncontainsparameterin".
cfg"definedtostartSAPIQdatabase(SQL:selectValuefromsa_eng_properties()wherePropName='CommandLine')Output:-nXYZW04-xtcpip(MyIP=10.
141.
66.
51;port=2638)-c8192m-gc20-gddba-glall-gm100-gn150-gp32768-iqmc512000-iqlm102400-iqtc512000-iqmsgsz2047-iqmsgnum30-ti60-tl600-snoneParameterDescriptionSeeAppendixSection8.
15.
6CacheHitsandCacheIOThissectionCurrentIQmemoryutilizationintermsofMaincachepagesusageandTemporaryCacheusage.
(SQL:"selectsubstring(stat_desc,1,50)Parameter,substring(stat_value,1,20)Valuefromsp_iqstatistics()wherestat_namein('TempCacheHits','MainCacheHits','TempCacheFinds','MainCacheFinds');")ParameterValueMaincachetotalnumberoflookuprequests16070094Maincachetotalnumberofhits15904001Temporarycachetotalnumberoflookuprequests147661995Temporarycachetotalnumberofhits146094482ThissectionCurrentIQmemoryIOutilizationintermsofMaincacheIOandTemporaryCacheIO(GraphPlotting).
SQL>selectCURRENTTIMESTAMPASTimeStamp,ValueasMainIQ_IO_Statisticsfromsp_iqstatus()whereName='MainIQI/O:'SQL>selectCURRENTTIMESTAMPASTimeStamp,ValueasTeampIQ_IO_Statisticsfromsp_iqstatus()whereName='TemporaryIQI/O:'I:InputL:Logicalpagesread("Finds")P:PhysicalpagesreadO:OutputCPagesCreatedDPagesDirtiedP:PhysicallyWrittenD:PagesDestroyedC:CompressionRatioIQNodesOverviewIQTPOWeeklyHealthCheck,,Today'sDate(CONFIDENTIAL)135.
7MainCache/TempCache/Catalogcache/LargeMemorysizeThissectionhelptomonitoratleastlargememory,mainmemoryandtemporarymemorySQL1)SELECTPROPERTY('CurrentCacheSize')Output:Catalogcachesize->8388608SQL2)select*fromsp_iqstatus()whereNamelike'%IQlarge%'Output:NameValueIQlargememoryspace:309600MbIQlargememoryflexiblepercentage:50IQlargememoryflexibleused:0MbIQlargememoryinflexiblepercentage:90IQlargememoryinflexibleused:106510MbIQlargememoryanti-starvationpercentage:50"LargeMemorySpace"–MaximumLargeMemoryconfiguredsize(-iqlmvaluefromparams.
cfg)"LargeMemoryMaxFlexible"-Maximummemorygrantedforflexibleoperators.
(e.
gLoadEngine(hashsortmergeforhash/has-rangepartitionedtableandhashsortmergecursor)).
"LargeMemoryNumFlexAllocations"–Thisisthecountofmemorychunksallocatedasflexmemory.
"LargeMemoryFlexible%"–percentageoflargememoryusedforflexibleoperators.
"LargeMemoryFlexibleused"–Thisisthetotalamountofmemoryallocatedtoflexusers.
"LargeMemoryInflexible%"–Percentageoflargememoryusedforinflexibleoperators(N-bitmetadatastructures,databufferofcolumnvectorinload).
"LargeMemoryInflexibleused"–Largememoryusedbyinflexibleoperators"LargeMemoryAnti-Starvation%"–Thisonlyappliestoflexibleoperators.
SQ3>select@@servername,substring(stat_name,1,50)asstat_name,substring(stat_value,1,20)stat_valuefromsp_iqstatistics()wherestat_namein('MainCachePagesInUsePercentage','TempCachePagesInUsePercentage','MainCacheCurrentSize','MainCacheCurrentSize')Output:IQNodesOverviewIQTPOWeeklyHealthCheck,,Today'sDate(CONFIDENTIAL)145.
8ActiveconnectionandThreadsinUse/FreeThissectionCurrentIQconnectionsactivefordifferentusers(SQL>selectuser_id,user_name,connections,last_login_timefromsa_get_user_status()whereconnections>0)Output:user_name,connections,last_login_time'monuser',1,'2016-09-0120:18:00.
000''soldba',4,'2016-09-0120:21:00.
000'ThissectionCurrentIQconnectionsactiveandthreadsinuse.
(SQL:"selectsubstring(stat_desc,1,50)stat_desc,substring(stat_value,1,20)stat_valuefromsp_iqstatistics()wherestat_namein('THreadsFree','ThreadsInUse','ConnectionsActive',''OperationsActiveLoadTableStatements');")ParameterValueNumberofIQthreadsfree1760NumberofIQthreadsinuse1188Numberofactiveconnections7NumberofactiveLOADTABLEstatements1SQL>select@@max_connectionsOutput:200,Today'sDate(CONFIDENTIAL)155.
9CurrentDBLocksThissectionCurrentIQtablelocksheldonthatnode(SQL:"selectb.
conn_id,substring(a.
userid,1,15)asuserid,substring(a.
Name,1,40)asName,@@servernameasHostname,a.
MPXServerName,a.
connCreateTime,substring(b.
table_name,1,20)astable_name,substring(a.
ReqType,1,30)asReqType,datediff(ss,a.
LastReqTime,now())asLast_CALL_ET_sec,b.
lock_typeb.
lock_classfromsp_iqconnection()a,sp_iqlocks()bwherea.
ConnHandle=b.
conn_id;")conn_iduseridNameHostnameMPXServerNameconnCreateTimetable_nameReqTypeLast_CALL_ET_seclock_type116841dboIQ_MPX_SERVER_P4236XYZC01XYZW118/22/201620:05qwerEXEC48Write116841dboIQ_MPX_SERVER_P4236XYZC01XYZW118/22/201620:05dfwEXEC48Shared116844dboIQ_MPX_SERVER_P5689XYZC01XYZW148/22/201620:06rtek_sip_saa_qwerPREFETCH0Write116844dboIQ_MPX_SERVER_P5689XYZC01XYZW148/22/201620:06rtek_sip_sa_qwerPREFETCH0Shared116848dboIQ_MPX_SERVER_P1549XYZC01XYZW208/22/201620:07rCI_ADRCPREFETCH1Write116848dboIQ_MPX_SERVER_P1549XYZC01XYZW208/22/201620:07rCI_ADRCPREFETCH1Shared116849dboIQ_MPX_SERVER_P6523XYZC01XYZW018/22/201620:07ttasaditer_203PREFETCH18Write116849dboIQ_MPX_SERVER_P6523XYZC01XYZW018/22/201620:07ttasaditer_203PREFETCH18Shared116858dboIQ_MPX_SERVER_P6524XYZC01XYZW018/22/201620:08tasiameter_202PREFETCH18Write116858dboIQ_MPX_SERVER_P6524XYZC01XYZW018/22/201620:08as_202PREFETCH18Shared116859dboIQ_MPX_SERVER_P6525XYZC01XYZW018/22/201620:09sds_201PREFETCH18Write116859dboIQ_MPX_SERVER_P6525XYZC01XYZW018/22/201620:09tekDatadiameter_201PREFETCH18Shared116861dboIQ_MPX_SERVER_P2387XYZC01XYZW108/22/201620:09rtek_gtp_PM_qwerPREFETCH34Write116861dboIQ_MPX_SERVER_P2387XYZC01XYZW108/22/201620:09rtek_gtp_PM_qwerPREFETCH34Shared116876dboIQ_MPX_SERVER_P1550XYZC01XYZW208/22/201620:11FSSKKVKPPREFETCH0Write116876dboIQ_MPX_SERVER_P1550XYZC01XYZW208/22/201620:11FSSKKVKPPREFETCH0SharedColumnDescriptionColumnDescriptionconn_idConnectionIDthathasthelock.
user_idUserassociatedwiththisconnectionID.
table_nameTableonwhichthelockisheld.
lock_classStringofcharactersindicatingthetypeoflock:S–share.
SW–shareandwrite.
EW–exclusiveandwrite.
E–exclusive.
P–phantom.
A–antiphantom.
W–write.
AlllockslistedhaveoneofS,E,EW,orSW,andmayalsohaveP,A,orboth.
PhantomandantiphantomlocksalsohaveaqualifierofTor*:T–thelockiswithrespecttoasequentialscan.
*–thelockiswithrespecttoallscans.
nnn–Indexnumber;thelockiswithrespecttoaparticularindex.
SybaseIQobtainsasharelockbeforeawritelock.
Ifaconnectionhasexclusivelock,sharelockdoesnotappear.
Forwritelocks,ifaconnectionhasall-exclusive,share,andwritelocks,itisEW.
lock_typeValueidentifyingthelock(dependentonthelockclass)ReqTypeAstringforthetypeofthelastrequest.
MPXServerNameIfanINCconnection,thevarchar(128)valuecontainsthenameofthemultiplexserverwheretheINCconnectionoriginates.
NULLifnotanINCconnection.
NameThenameoftheserver.
HostnameLocalservernameConnCreateTimeThetimetheconnectionwascreated.
NewOptionsForIQ16:ParameterLOG_DEADLOCKSDescription:WhenthisoptionissettoOn,thedatabaseserverlogsinformationaboutdeadlocksinaninternalbuffer.
Thesizeofthebufferisfixedat10000bytes.
Youcanviewthedeadlockinformationusingthe"sa_report_deadlocks"storedprocedure.
ThecontentsofthebufferareretainedwhenthisoptionissettoOff.
Whendeadlockoccurs,informationisreportedforonlythoseconnectionsinvolvedinthedeadlock.
Theorderinwhichconnectionsarereportedisbasedonwhichconnectioniswaitingforwhichrow.
Forthreaddeadlocks,informationisreportedaboutallconnections.
Whenyouhavedeadlockreportingturnedon,youcanalsousetheDeadlocksystemeventtotakeactionwhenadeadlockoccurs.
Default:'OFF'IQNodesOverviewIQTPOWeeklyHealthCheck,,Today'sDate(CONFIDENTIAL)165.
10IQTempspaceinUsageThissectionCurrentIQVersioninuseandspaceheldonthatnode(SQL:selectmonth(now()),today(),cast(now()astime),substring(@@servername,1,20),substring(DBSpaceName,1,20),Usagefromsp_iqdbspace()whereDBSpaceName='IQ_SYSTEM_TEMP';)month(now())today()now()substring(@@servername,1,20)substring(sp_iqdbspace.
DBSpaceName,1,20)Usage122016-12-1312:30:30.
892XYZW04IQ_SYSTEM_TEMP15.
11ReadIQMSGfileThissectioncanhelponlytopalertiniqmsglogfilesusinggrepoption.
Youcanenhancescripttofinddifferenterrorterms:abort|err|exception|unexpected|outofspace|warning|signal11|stack|lockon|fatal"inIQMSGfileatOScreatedbyIQ.
#!
/bin/bashFROMDATE=`date-s"today-1days"+%m/%d`TODAY=`date+%m/%d`grep"${FROMDATE}\|${TODAY}"*.
iqmsg|grep-i"abort\|err\|exception\|unexpected">Err_iqmsg.
logIQNodesOverviewIQTPOWeeklyHealthCheck,,Today'sDate(CONFIDENTIAL)175.
12IQVersioninginUseThissectionCurrentIQVersioninuseandspaceheldonthatnode(SQL>select*fromsp_iqstatus()wherenamelike'%Versions:%')Output:NameValueOtherVersions:2=1968MbActiveTxnVersions:1=C:2175Mb/D:2850MbTheaboveexampleoutputshowsthatoneactivewritetransactioncreated2175MBanddestroyed2850MBofdata.
Thetotaldataconsumedintransactionsandnotyetreleasedis4818MB,or1968MB+2850MB=4818MB.
(SQL:"sp_iqversionuse")Output:ColumnnameDescriptionVersionIDTheversionidentifierServerTheservertowhichusersofthisversionareconnectedIQConnIDTheconnectionIDusingthisversionWasReportedIndicateswhethertheserverhasreceivedusageinformationforthisversionMinKBReleaseTheminimumamountofspacereturnedoncethisversionisnolongerinuseMaxKBReleaseThemaximumamountofspacereturnedoncethisversionisnolongerinuseSQL>selectserver,count(*)asTransactionCountfromsp_iqversionuse()groupbyserverSQL>selectserver,Sum(MaxKBRelease/1024/1024)asSizeinGBfromsp_iqversionuse()groupbyservercangivegoodmonitoringforIQversioningThissectionhelpinfindingtoptransaction/connectionusinghighVersioninuse:selecttop5Server,VersionID,MaxKBReleasefromsp_iqversionuse()orderbyMaxKBReleasedescselectServer,count(1)fromsp_iqversionuse()groupbyServerselectISNULL(MPXServerName,'dbo'),count(1)fromsp_iqconnection()groupbyMPXServerNameorderby2descselecta.
Userid,a.
connHandle,a.
MainTableKBCr,b.
CmdLine,b.
ConnOrCurCreateTimefromsp_iqtransaction()a,sp_iqcontext()bwherea.
VersionID=127004135ANDa.
ConnHandle=b.
ConnHandleSELECTa.
ConnHandle,a.
IQConnID,b.
VersionID,a.
IQthreads,a.
ConncreateTime,b.
TxnCreateTime,a.
LastReqTime,b.
"State",a.
"Name",a.
UserID,b.
txnid,a.
ReqType,a.
NodeAddr,b.
cmtid,minutes(b.
TxnCreateTime,now())ASLOGON_SINCE_Minutes,minutes(a.
LastReqTime,now())ASLAST_CALL_ET_MINFROMsp_iqconnection()a,sp_iqtransaction()bWHEREb.
State='ACTIVE'ANDa.
IQConnID=b.
IQConnIDANDa.
"Name"NOTLIKE'IQ_MPX_%'IQNodesOverviewIQTPOWeeklyHealthCheck,,Today'sDate(CONFIDENTIAL)185.
13TOPIQPerformancequeryNumberofOperationwaiting:SELECT(SELECTstat_valueFROMSP_IQSTATISTICS('ConnectionsActive'))ASConnectionsActive,(SELECTstat_valueFROMSP_IQSTATISTICS('OperationsActive'))ASOperationsActive,(SELECTstat_valueFROMSP_IQSTATISTICS('OperationsWaiting'))ASOperationsWaiting,(SELECTstat_valueFROMSP_IQSTATISTICS('OperationsActiveLoadTableStatements'))ASOperationsActiveLoadTableStatementsFROMDUMMYActiveConnection:SELECTa.
ConnHandle,a.
IQConnID,a.
Name,a.
UserID,b.
txnid,b.
TxnCreateTime,minutes(b.
TxnCreateTime,now())ASDurationMinutesFROMsp_iqconnection()a,sp_iqtransaction()bWHEREb.
State='ACTIVE'ANDa.
IQConnID=b.
IQConnIDANDa.
NameNOTLIKE'IQ_MPX_%'SELECTa.
ConnHandle,a.
IQConnID,a.
IQthreads,a.
ConncreateTime,b.
TxnCreateTime,a.
LastReqTime,a.
"Name",a.
UserID,b.
txnid,a.
ReqType,a.
NodeAddr,b.
cmtid,minutes(b.
TxnCreateTime,now())ASLOGON_SINCE_Minutes,minutes(a.
LastReqTime,now())ASLAST_CALL_ET_MINFROMsp_iqconnection()a,sp_iqtransaction()bWHEREb.
State='ACTIVE'ANDa.
IQConnID=b.
IQConnIDANDa.
"Name"NOTLIKE'IQ_MPX_%'Longrunningactivetransaction:selecta.
ConnHandle,a.
IQConnID,a.
IQThreads,a.
TxnID,c.
"server"asVersionUse_Server,b.
CmtID,b.
VersionID,datediff(ss,a.
LastReqTime,now())asLast_CALL_ET,c.
MaxKBReleaseasVersion_MaxKBRelease,a.
"Name",a.
UserID,a.
ConnCreatetime,b.
TxnCreateTime,a.
LastReqTime,a.
ReqType,a.
NodeAddr,d.
CmdLinefromsp_iqconnection()a,sp_iqtransaction()b,sp_iqversionuse()c,sp_iqcontext()dwhereb.
VersionID=c.
VersionIDanda.
TempWorkSpaceKB=b.
TempWorkSpaceKBandd.
connHandle=a.
connHandleandd.
connHandle=b.
connHandleandb.
CmtID=0andlast_call_ET>0SELECTa.
ConnHandle,a.
IQConnID,b.
VersionID,a.
IQthreads,a.
ConncreateTime,b.
TxnCreateTime,a.
LastReqTime,b.
"State",a.
"Name",a.
UserID,b.
txnid,a.
ReqType,a.
NodeAddr,b.
cmtid,minutes(b.
TxnCreateTime,now())ASLOGON_SINCE_Minutes,minutes(a.
LastReqTime,now())ASLAST_CALL_ET_MINFROMsp_iqconnection()a,sp_iqtransaction()bWHEREb.
State='ACTIVE'ANDa.
IQConnID=b.
IQConnIDANDa.
"Name"NOTLIKE'IQ_MPX_%'andLAST_CALL_ET_MIN>0andLOGON_SINCE_Minutes>60IQNodesOverviewIQTPOWeeklyHealthCheck,,Today'sDate(CONFIDENTIAL)195.
14TOPTransactionhistoryThissectionprovidesinformationforcurrentTOPtransactioninIQ(SQL:select"CONNECTION_PROPERTY"('NodeAddress',"a".
"ConnHandle")as"NodeAddress","a".
"ConnHandle","a".
"IQconnID",substring("a".
"Userid",1,10)asUserID,"a".
"ReqType",substring("a".
"Name",1,30)asName,substring("a".
"ConnCreateTime",1,30)asConnCreateTime,substring("a".
"LastReqTime",1,30)asLastReqTime,a.
LastIdle,datediff(ss,a.
LastReqTime,now())asLast_CALL_ET_sec,"a".
"TempTableSpaceKB","a".
"TempWorkSpaceKB","b".
"CmdLine"from"dbo".
"sp_iqconnection"()as"a","dbo".
"sp_iqcontext"()as"b"where"a".
"ConnHandle"="b".
"ConnHandle"andb.
CmdLine'NOCOMMAND'andb.
CmdLine''Mainstoreproceduresusedareasfollows:sp_iqconnectionsp_iqtransactionsp_iqcontextGeneralDBStatusOverviewIQTPOWeeklyHealthCheck,,Today'sDate(CONFIDENTIAL)206GeneralDBStatusOverviewThissectioncontainscurrentinformationrelatedtoIQDBNodesandrunningstartupparameters.
6.
1IQDBStatusThissectioncontainsgeneralinformationrelatedtotheOracledatabase(SQL:"selectsubstring(Name,1,50)asName,Valuefromsp_iqstatus()").
NameValueSAPIQ(TM)Copyright(c)1992-2016bySAPAGoranSAPaffiliatecompany.
Allrightsreserved.
Version:16.
0.
102.
6.
1364/20135/P/sp10.
12/EnterpriseLinux64-x86_64-2.
6.
18-194.
el5/64bit/2016-03-3102:36:25TimeNow:09:28.
4BuildTime:3/31/20162:36FileFormat:23on03/18/1999Servermode:IQMultiplexCoordinatorServerCatalogFormat:2StoredProcedureRevision:1PageSize:524288/32768blksz/16bppNumberofMainDBFiles:101MainStoreOutOfSpace:NNumberofCacheDbspaceFiles:0NumberofSharedTempDBFiles:0SharedTempStoreOutOfSpace:NNumberofLocalTempDBFiles:3LocalTempStoreOutOfSpace:NDBBlocks:16739328-150957055user01DBBlocks:154838784-289056511user02DBBlocks:292938240-427155967user03DBBlocks:431037696-565255423user04DBBlocks:569137152-703354879user05DBBlocks:707236608-841454335user06DBBlocks:845336064-979553791user07DBBlocks:983435520-1117653247user08DBBlocks:1121534976-1255752703user09DBBlocks:1259634432-1393852159user10DBBlocks:1397733888-1531951615user11DBBlocks:1535833344-1670051071user12DBBlocks:1673932800-1808150527user13DBBlocks:1812032256-1946249983user14DBBlocks:1950131712-2084349439user15DBBlocks:2088231168-2222448895user16DBBlocks:2226330624-2360548351user17DBBlocks:2364430080-2498647807user18DBBlocks:2502529536-2636747263user19DBBlocks:2640628992-2774846719user20DBBlocks:2778728448-2912946175user21DBBlocks:2916827904-3051045631user22DBBlocks:3054927360-3189145087user23GeneralDBStatusOverviewIQTPOWeeklyHealthCheck,,Today'sDate(CONFIDENTIAL)21DBBlocks:3193026816-3327244543user24DBBlocks:3331126272-3465343999user25DBBlocks:3469225728-3603443455user26DBBlocks:3607325184-3741542911user27DBBlocks:3745424640-3879642367user28DBBlocks:3883524096-4017741823user29DBBlocks:4021623552-4155841279user30DBBlocks:4159723008-4293940735user31DBBlocks:4297822464-4432040191user32DBBlocks:4435921920-4570139647user33DBBlocks:4574021376-4708239103user34DBBlocks:4712120832-4846338559user35DBBlocks:4850220288-4984438015user36DBBlocks:4988319744-5122537471user37DBBlocks:5126419200-5260636927user38DBBlocks:5264518656-5398736383user39DBBlocks:5402618112-5536835839user40DBBlocks:5540717568-5674935295user41DBBlocks:5678817024-5813034751user42DBBlocks:5816916480-5951134207user43DBBlocks:5955015936-6089233663user44DBBlocks:6093115392-6227333119user45DBBlocks:6231214848-6365432575user46DBBlocks:6369314304-6503532031user47DBBlocks:6507413760-6641631487user48DBBlocks:6645513216-6779730943user49DBBlocks:6783612672-6917830399user50DBBlocks:6921712128-7055929855user51DBBlocks:7059811584-7194029311user52DBBlocks:7197911040-7332128767user53DBBlocks:7336010496-7470228223user54DBBlocks:7474109952-7608327679user55DBBlocks:7612209408-7746427135user56DBBlocks:7750308864-7884526591user57DBBlocks:7888408320-8022626047user58DBBlocks:8026507776-8160725503user59DBBlocks:8164607232-8298824959user60DBBlocks:8302706688-8436924415user61DBBlocks:8440806144-8575023871user62DBBlocks:8578905600-8713123327user63DBBlocks:8717005056-8851222783user64DBBlocks:8855104512-8989322239user65DBBlocks:8993203968-9127421695user66DBBlocks:9131303424-9265521151user67DBBlocks:9269402880-9403620607user68DBBlocks:9407502336-9541720063user69DBBlocks:9545601792-9679819519user70DBBlocks:9683701248-9817918975user71DBBlocks:9821800704-9956018431user72DBBlocks:9959900160-10094117887user73DBBlocks:10097999616-10232217343user74GeneralDBStatusOverviewIQTPOWeeklyHealthCheck,,Today'sDate(CONFIDENTIAL)22DBBlocks:10236099072-10370316799user75DBBlocks:10374198528-10508416255user76DBBlocks:10512297984-10646515711user77DBBlocks:10650397440-10784615167user78DBBlocks:10788496896-10922714623user79DBBlocks:10926596352-11060814079user80DBBlocks:11064695808-11198913535user81DBBlocks:11202795264-11337012991user82DBBlocks:11340894720-11475112447user83DBBlocks:11478994176-11613211903user84DBBlocks:11617093632-11751311359user85DBBlocks:11755193088-11889410815user86DBBlocks:11893292544-12027510271user87DBBlocks:12031392000-12165609727user88DBBlocks:12169491456-12303709183user89DBBlocks:12307590912-12441808639user90DBBlocks:12445690368-12579908095user91DBBlocks:12583789824-12718007551user92DBBlocks:12721889280-12856107007user93DBBlocks:12859988736-12994206463user94DBBlocks:12998088192-13132305919user95DBBlocks:13136187648-13270405375user96DBBlocks:13274287104-13408504831user97DBBlocks:13412386560-13546604287user98DBBlocks:13550486016-13684703743user99DBBlocks:13826684928-13910571007IQ_SYSTEM_MAIN1DBBlocks:13914566400-13998452479IQ_SYSTEM_MAIN2LocalTempBlocks:1-15073280IQ_SYSTEM_TEMPLocalTempBlocks:16739328-31812607IQ_SYSTEM_TEMP02LocalTempBlocks:33478656-46585855IQ_SYSTEM_TEMP03CreateTime:49:31.
5UpdateTime:08:38.
2MainIQBuffers:618586,309600MbTemporaryIQBuffers:618586,309600MbMainIQBlocksUsed:5167389253of13454488372,38%=157696Gb,MaxBlock#:13954552110CacheDbspaceIQBlocksUsed:0of0,0%=0Mb,MaxBlock#:0SharedTemporaryIQBlocksUsed:0of0,0%=0Mb,MaxBlock#:0LocalTemporaryIQBlocksUsed:547of43122688,0%=17Mb,MaxBlock#:34263440MainReservedBlocksAvailable:838860of838860,100%=26214MbSharedTemporaryReservedBlocksAvailable:0of0,0%=0MbLocalTemporaryReservedBlocksAvailable:131072of131072,100%=4096MbIQDynamicMemory:Current:628706mb,Max:631224mbMainIQBuffers:Used:618584,Locked:1TemporaryIQBuffers:Used:1065,Locked:0MainIQI/O:I:L980781954/P3720721O:C51045989/D65065490/P28855004D:78608233C:72.
3GeneralDBStatusOverviewIQTPOWeeklyHealthCheck,,Today'sDate(CONFIDENTIAL)23TemporaryIQI/O:I:L3057650754/P10O:C53781765/D54755320/P2342220D:53780705C:45.
3OtherVersions:2357=2816GbActiveTxnVersions:0=C:0Mb/D:0MbLastFullBackupID:78249976LastFullBackupTime:8/7/201618:22LastBackupID:78249976LastBackupType:FULLLastBackupTime:8/7/201618:22DBUpdated:1BlocksinnextISFBackup:1816552047Blocks:=55436GbBlocksinnextISIBackup:1816552047Blocks:=55436GbMainTlvlogSize:Pages:42,Recs:44827,Replays:0/0IQlargememoryspace:309600MbIQlargememoryflexiblepercentage:50IQlargememoryflexibleused:0MbIQlargememoryinflexiblepercentage:90IQlargememoryinflexibleused:106510MbIQlargememoryanti-starvationpercentage:50DBFileEncryptionStatus:OFFRLVStatus:RORLVmemorylimit(mb):2048RLVmemoryused(bytes):0RLVLogBuffersAllocated:0RLVLogBuffersGloballyFree:0RLVLogBuffersPrivatelyFree:0RLVLogBuffersInUse:0ThefollowingisakeytounderstandingtheMainIQI/OandTemporaryIQI/Ooutputcodes:I:InputL:Logicalpagesread("Finds")P:PhysicalpagesreadO:OutputCPagesCreatedDPagesDirtiedP:PhysicallyWrittenD:PagesDestroyedC:CompressionRatioCheckthefollowinginformation:·ThelinesMainIQBlocksUsedandTemporaryIQBlocksusedtellyouwhatportionofyourdbspacesisinuse.
Ifthepercentageofblocksinuse(themiddlestatisticontheselines)isinthehighnineties,youneedtoaddadbspace.
·ThelinesMainIQBuffersandTemporaryIQBufferstellyouthecurrentsizesofyourmainandtempbuffercaches.
·OtherVersionsshowsotherdbversionsandthetotalspaceconsumed.
Theseversionswilleventuallybedroppedwhentheyarenolongerreferencedorreferenceablebyactivetransactions.
·ActiveTxnVersionsshowsthenumberofactivewritetransactionsandtheamountofdatatheyhavecreatedanddestroyed.
Ifthesetransactionscommit,the"destroyed"datawillbecomeanoldversionandeventuallybedropped.
Iftheyrollback,the"created"datawillbefreed.
·MainReservedBlocksAvailableandTemporaryReservedBlocksAvailableshowtheamountofreservedspacethatisavailable.
·ThelinesMainIQI/OandTemporaryIQI/OdisplayI/OstatusinthesameformatasintheIQmessagelog.
StatementIssues(CONFIDENTIAL)246.
2SpaceInformation6.
2.
1DBspaceInfoThissectionprovidesinformationforalltablespaces(SQL:"selectsubstring(DBSpaceName,1,20)asDBSpaceName,DBSpaceType,Usage,TotalSize,Reserve,NumFiles,Online,Writablefromsp_iqdbspace()").
DBSpaceNameDBSpaceTypePercUsedTotalSizeReserveNumFilesOnlineWritableIQ_SYSTEM_MAINMAIN365T0B2TTIQ_SYSTEM_TEMPTEMPORARY11.
28T0B3TTABC_userMAIN39396T0B99TTColumnDescriptionColumnnameDescriptionDBSpaceNameNameofthedbspaceasspecifiedintheCREATEDBSPACEstatement.
Dbspacenamesarecase-insensitivefordatabasescreatedwithCASERESPECT.
DBSpaceTypeTypeofthedbspace(MAINorTEMPORARYonly).
WritableT(writable)orF(notwritable).
OnlineT(online)orF(offline).
PercUsedPercentofdbspacecurrentlyinusebyallfilesinthedbspace.
TotalSizeTotalsizeofallfilesinthedbspaceintheunitsB(bytes),K(kilobytes),M(megabytes),G(gigabytes),T(terabytes),orP(petabytes).
ReserveTotalreservedspacethatcanbeaddedtoallfilesinthedbspace.
NumFilesNumberoffilesinthedbspace.
MonitoringFreeSpaceUsingTheNew"sa_disk_free_space"StoredProcedureNewsystemprocedureformonitoringthefreespaceforsystemDBspacescalled"sa_disk_free_space".
ThisprocedurereturnsthesystemDBspacename,thefreedisksizeandthetotaldisksize.
ThesystemDBspacenamesthatcanbeusedwiththesa_disk_free_spacesyntaxare:–SYSTEM–TRANSLOG–TRANSLOGMIRROR–TEMPORARYorTEMPTip:MonitorYourFreeSpaceBesuretomonitoryourIQDBspacesfrequentlybyrunningthe"sa_disk_free_space"procedureatregularintervalsthroughouttheday.
Runiteithermanually,byschedulingitsexecutioninaCREATEEVENTstatement,orinanUNIXscripttomonitorfreespace.
Forexample:callsa_disk_free_space(system);-->returnsdiskinfoforthesystemDBspace(.
DB)callsa_disk_free_space(translog);-->returnsdiskinfoforthetransactionlog(.
LOG).
callsa_disk_free_space(temp);-->returnsdiskinfoforthediskwheretemporaryfilesreside.
StatementIssues(CONFIDENTIAL)256.
2.
2DBFileInfoThissectionprovidesinformationforalldbfilesfromactualDBspaces(SQLselectsubstring(DBSpaceName,1,15)asDBSpaceName,substring(Path,1,50)asPath,SegmentType,RWMode,Online,Usage,DBFileSizefromsp_iqfile('IQ_SYSTEM_MAIN')"Output:DBSpaceNamePathSegmentTypeRWModeOnlineUsageDBFileSizeIQ_SYSTEM_MAIN/qwer/abc_qwer/IQ_MAIN/IQ_SYSTEM_MAIN1.
iqMAINRWT322.
5TIQ_SYSTEM_MAIN/qwer/abc_qwer/IQ_MAIN/IQ_SYSTEM_MAIN2.
iqMAINRWT332.
5TABC_user/qwer/abc_qwer/IQ_USER/user01MAINRWT454TABC_user/qwer/abc_qwer/IQ_USER/user02MAINRWT454TABC_user/qwer/abc_qwer/IQ_USER/user03MAINRWT454TABC_user/qwer/abc_qwer/IQ_USER/user04MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user05MAINRWT434TABC_user/qwer/abc_qwer/IQ_USER/user06MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user07MAINRWT434TABC_user/qwer/abc_qwer/IQ_USER/user08MAINRWT434TABC_user/qwer/abc_qwer/IQ_USER/user09MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user10MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user11MAINRWT434TABC_user/qwer/abc_qwer/IQ_USER/user12MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user13MAINRWT434TABC_user/qwer/abc_qwer/IQ_USER/user14MAINRWT434TABC_user/qwer/abc_qwer/IQ_USER/user15MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user16MAINRWT434TABC_user/qwer/abc_qwer/IQ_USER/user17MAINRWT434TABC_user/qwer/abc_qwer/IQ_USER/user18MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user19MAINRWT434TABC_user/qwer/abc_qwer/IQ_USER/user20MAINRWT434TABC_user/qwer/abc_qwer/IQ_USER/user21MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user22MAINRWT454TABC_user/qwer/abc_qwer/IQ_USER/user23MAINRWT464TABC_user/qwer/abc_qwer/IQ_USER/user24MAINRWT474TABC_user/qwer/abc_qwer/IQ_USER/user25MAINRWT454TABC_user/qwer/abc_qwer/IQ_USER/user26MAINRWT454TABC_user/qwer/abc_qwer/IQ_USER/user27MAINRWT454TABC_user/qwer/abc_qwer/IQ_USER/user28MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user29MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user30MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user31MAINRWT454TABC_user/qwer/abc_qwer/IQ_USER/user32MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user33MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user34MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user35MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user36MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user37MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user38MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user39MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user40MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user41MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user42MAINRWT454TABC_user/qwer/abc_qwer/IQ_USER/user43MAINRWT454TABC_user/qwer/abc_qwer/IQ_USER/user44MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user45MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user46MAINRWT434TABC_user/qwer/abc_qwer/IQ_USER/user47MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user48MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user49MAINRWT454TABC_user/qwer/abc_qwer/IQ_USER/user50MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user51MAINRWT454TABC_user/qwer/abc_qwer/IQ_USER/user52MAINRWT454TABC_user/qwer/abc_qwer/IQ_USER/user53MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user54MAINRWT434TABC_user/qwer/abc_qwer/IQ_USER/user55MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user56MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user57MAINRWT434TABC_user/qwer/abc_qwer/IQ_USER/user58MAINRWT434TABC_user/qwer/abc_qwer/IQ_USER/user59MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user60MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user61MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user62MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user63MAINRWT454TABC_user/qwer/abc_qwer/IQ_USER/user64MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user65MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user66MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user67MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user68MAINRWT444TStatementIssues(CONFIDENTIAL)26ABC_user/qwer/abc_qwer/IQ_USER/user69MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user70MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user71MAINRWT434TABC_user/qwer/abc_qwer/IQ_USER/user72MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user73MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user74MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user75MAINRWT444TABC_user/qwer/abc_qwer/IQ_USER/user76MAINROT244TABC_user/qwer/abc_qwer/IQ_USER/user77MAINROT244TABC_user/qwer/abc_qwer/IQ_USER/user78MAINROT234TABC_user/qwer/abc_qwer/IQ_USER/user79MAINROT244TABC_user/qwer/abc_qwer/IQ_USER/user80MAINROT234TABC_user/qwer/abc_qwer/IQ_USER/user81MAINROT234TABC_user/qwer/abc_qwer/IQ_USER/user82MAINROT244TABC_user/qwer/abc_qwer/IQ_USER/user83MAINROT244TABC_user/qwer/abc_qwer/IQ_USER/user84MAINROT234TABC_user/qwer/abc_qwer/IQ_USER/user85MAINROT234TABC_user/qwer/abc_qwer/IQ_USER/user86MAINROT234TABC_user/qwer/abc_qwer/IQ_USER/user87MAINROT234TABC_user/qwer/abc_qwer/IQ_USER/user88MAINROT234TABC_user/qwer/abc_qwer/IQ_USER/user89MAINROT234TABC_user/qwer/abc_qwer/IQ_USER/user90MAINROT244TABC_user/qwer/abc_qwer/IQ_USER/user91MAINROT234TABC_user/qwer/abc_qwer/IQ_USER/user92MAINROT234TABC_user/qwer/abc_qwer/IQ_USER/user93MAINROT234TABC_user/qwer/abc_qwer/IQ_USER/user94MAINROT234TABC_user/qwer/abc_qwer/IQ_USER/user95MAINROT244TABC_user/qwer/abc_qwer/IQ_USER/user96MAINROT244TABC_user/qwer/abc_qwer/IQ_USER/user97MAINROT244TABC_user/qwer/abc_qwer/IQ_USER/user98MAINROT244TABC_user/qwer/abc_qwer/IQ_USER/user99MAINROT214TIQ_SYSTEM_TEMP/Sybasedata/IQ_SYSTEM_TEMP01.
iqtmpTEMPORARYRWT1460GBIQ_SYSTEM_TEMP/Sybasedata/IQ_SYSTEM_TEMP02TEMPORARYRWT1460GBIQ_SYSTEM_TEMP/Sybasedata/IQ_SYSTEM_TEMP03TEMPORARYRWT1460GBColumnDescriptionColumnnameDescriptionDBSpaceNameNameofthedbspaceasspecifiedintheCREATEDBSPACEstatement.
Dbspacenamesarecase-insensitivefordatabasescreatedwithCASERESPECT.
DBFileNameLogicalfilename.
PathLocationofthephysicalfileorrawpartition.
SegmentTypeTypeofdbspace(MAINorTEMPORARY).
RWModeModeofthedbspace:read-write(RW)orread-only(RO).
OnlineT(online)orF(offline).
UsagePercentofdbspacecurrentlyinusebythisfileinthedbspace.
DBFileSizeCurrentsizeofthefileorrawpartition.
Forarawpartition,thissizevaluecanbelessthanthephysicalsize.
ReserveReservedspacethatcanbeaddedtothisfileinthedbspace.
StatementIssues(CONFIDENTIAL)276.
2.
3IQCatalogDBandIQMSGfileInfoThissectionprovidesinformationforIQfilesnotallocatedwithinDBspaceofdatabaseIQ(SQL:"selectfile_id,file_name,dbspace_name,store_typefromsysfilewheredbspace_namenotin('IQ_SYSTEM_MAIN','IQ_SYSTEM_TEMP','ABC_user')")IQSERVERLOGFILEOnUNIXandLinuxservers,theserverlogfilesarelocatedin$IQDIR16/logfiles.
Theseserverlogfileshave4digitnumbers.
Startupinformationissavedinthe.
000n.
stderrfileServerstatusisloggedinthe.
000n.
srvlogfileTofindthesrvlogfullpath:SQL>selectproperty('ConsoleLogFile')assrvlogfile;AdditionallyNote:TheSYSDBFILEsystemviewshowsallthedbfilesinyourdatabase,includingthecatalog,messagefile,anddbfilesinthemainandtemporarydbspaces.
Toreturndbfileanddbspacestatistics,querytheSYSDBFILEsystemview:SQLSELECTdbf.
dbfile_name,f.
*FROMSYSFILEf,SYSDBFILEdbfWHEREf.
file_id=dbf.
dbfile_idThefile_namecolumnintheSYSFILEsystemtablefortheSYSTEMdbspaceisnotupdatedduringarestore.
FortheSYSTEMdbspace,thefile_namecolumnalwaysreflectsthenamewhenthedatabasewascreated.
ThefilenameoftheSYSTEMdbspaceisthenameofthedatabasefile.
IQREQUESTLOGFILETherearetwowaystoenablerequest-levellogging:Setting-zrcommand-lineoptionwhenstartingtheIQserver-RequiresarebootoftheserverCalling"sa_server_option"storedprocedure-Overridesthecurrentsettingof-zOnUNIXandLinuxservers,theserverlogfilesarelocatedin$IQDIR16/logfilesSQL>selectproperty('RequestLogFile'),property('RequestLogging');StatementIssues(CONFIDENTIAL)286.
2.
4LargestTablesinIQThissectionliststhetableswiththelargestsize(SQL:"selectowner,object_name,convert(float,substr(columns,1,char_length(columns)-1))*power(1024,charindex(substr(columns,char_length(columns),1),'BKMGTP')-1)asbytesfromsp_iqdbspaceinfo()orderby3desc;")ORThissectionliststhetableswiththelargestsize(includingindexessegments;SQL:".
/IQHC_DB_TABLESIZE.
sh")Cur_dateOwnerNameTableNameSizeGBDbspaceNameisPartitionedTable_typeisRlvlocationindexescolumns8/19/2016LALALAOOLALALA202ABC_userNBASEFMain0/038/388/19/2016LALALAOOLALALA24ABC_userNBASEFMain0/099/998/19/2016LALALAOOLALALA19ABC_userNBASEFMain0/0315/3158/19/2016LALALAOOLALALA17ABC_userNBASEFMain10/1040/408/19/2016LALALAOOLALALA13ABC_userNBASEFMain0/0148/1488/19/2016LALALAOOLALALA13ABC_userNBASEFMain0/0238/2388/19/2016LALALAOOLALALA12ABC_userNBASEFMain0/099/998/19/2016LALALAOOLALALA10ABC_userNBASEFMain15/1599/998/19/2016LALALAOOLALALA8ABC_userNBASEFMain0/0148/1488/19/2016LALALAOOLALALA7ingestNBASEFMain15/1599/998/19/2016LALALAOOLALALA6ABC_userNBASEFMain0/0148/1488/19/2016LALALAOOLALALA5ABC_userNBASEFMain0/0148/1488/19/2016LALALAOOLALALA5ABC_userNBASEFMain0/010-Oct8/19/2016LALALAOOLALALA5ABC_userNBASEFMain0/099/998/19/2016LALALAOOLALALA4ABC_userNBASEFMain0/0148/1488/19/2016LALALAOOLALALA4ABC_userNBASEFMain0/0148/1488/19/2016LALALAOOLALALA4ABC_userNBASEFMain0/0320/3208/19/2016LALALAOOLALALA4ABC_userNBASEFMain15/1599/998/19/2016LALALAOOLALALA3ABC_userNBASEFMain0/041/418/19/2016LALALAOOLALALA3ABC_userNBASEFMain19/1919/198/19/2016LALALAOOLALALA3ABC_userNBASEFMain21/21152/1528/19/2016LALALAOOLALALA3ABC_userNBASEFMain0/0148/1488/19/2016LALALAOOLALALA2ABC_userNBASEFMain0/038/388/19/2016LALALAOOLALALA2ABC_userNBASEFMain0/0148/1488/19/2016LALALAOOLALALA2ABC_userNBASEFMain21/21152/1528/19/2016LALALAOOLALALA2ABC_userNBASEFMain0/0180/1808/19/2016LALALAOOLALALA2ABC_userNBASEFMain0/0107/1078/19/2016LALALAOOLALALA2ABC_userNBASEFMain15/15100/1008/19/2016LALALAOOLALALA2ABC_userNBASEFMain15/15100/1008/19/2016LALALAOOLALALA2ABC_userNBASEFMain15/15100/1008/19/2016LALALAOOLALALA2ABC_userNBASEFMain15/15100/1008/19/2016LALALAOOLALALA2ABC_userNBASEFMain0/099/998/19/2016LALALAOOLALALA1ABC_userNBASEFMain0/092/928/19/2016LALALAOOLALALA1ABC_userNBASEFMain0/051/518/19/2016LALALAOOLALALA1ABC_userNBASEFMain0/016/168/19/2016LALALAOOLALALA1ABC_userNBASEFMain0/015/158/19/2016LALALAOOLALALA1ABC_userNBASEFMain7-Jul19/198/19/2016LALALAOOLALALA1ABC_userNBASEFMain0/0147/1478/19/2016LALALAOOLALALA1ABC_userNBASEFMain0/0152/1528/19/2016LALALAOOLALALA1ABC_userNBASEFMain21/21156/1568/19/2016LALALAOOLALALA1ABC_userNBASEFMain21/21156/1568/19/2016LALALAOOLALALA1ABC_userNBASEFMain21/21156/1568/19/2016LALALAOOLALALA1ABC_userNBASEFMain21/21156/1568/19/2016LALALAOOLALALA1ABC_userNBASEFMain0/093/938/19/2016LALALAOOLALALA1ABC_userNBASEFMain0/0100/1008/19/2016LALALAOOLALALA1ABC_userNBASEFMain0/0100/1008/19/2016LALALAOOLALALA1ABC_userNBASEFMain15/15100/100ColumnDescriptionColumnnameDescriptionCur_dateCurrentdateforthestatisticscollectedtable_nameThenameofthetable.
table_typeBASE–abasetable.
MATVIEW-amaterializedview.
(SAtablesonly)GBLTEMP-aglobaltemporarytable.
PARTITION-atablepartition(thistableisforinternaluseonlyandcannotbeusedbySybaseIQusers).
VIEW–aview.
JVT–ajoinvirtualtable.
OwnerNameTheownerofthetableserver_typeIQ–anobjectcreatedintheIQstore.
SA–anobjectcreatedintheSAstore.
AllviewsarecreatedintheSAstore.
locationTEMP–IQtemporarystore.
StatementIssues(CONFIDENTIAL)29MAIN–IQstore.
SYSTEM–catalogstore.
dbspaceNameNameofthedbspacewherethetableresides.
isPartitioned'Y'ifthecolumnbelongstoapartitionedtableandhasoneormorepartitionswhosedbspaceisdifferentfromthetablepartition'sdbspace,'N'ifthecolumn'stableisnotpartitionedoreachpartitionofthecolumnresidesinthesamedbspaceasthetablepartition.
columnsNumberoftablecolumnswhicharelocatedonthegivendbspace.
Ifacolumnoroneofthecolumn-partitionsislocatedonadbspace,itiscountedtobepresentonthatdbspace.
Theresultisdisplayedintheformn/N(noutoftotalNcolumnsofthetableareonthegivendbspace).
indexesNumberofuserdefinedindexesonthetablewhicharelocatedonthegivendbspace.
Displayedintheformn/N(noutoftotalNindexesonthetableareonthegivendbspace).
Thisdoesnotcontainindexeswhicharesystemgenerated,suchasFPindexesandHGindexesinthecaseofuniqueconstraintsSizeGBPhysicaltablesizeinGBIQHC_DB_TABLESIZE.
sh#!
/bin/sh#LOGDIR=/APP/ABC/LOGS/DBA/cd/tmpdt=`date+%F`dbisql-c"dsn=MONDSN;"-nogui@/APP/ABC/DBA/SCRIPTS/IQ_NEW_HC/tablesize_info.
sqlcat-v/tmp/Tablesize.
sql|sed's/M-oM-;M-//g'|grep-viexecution>/tmp/Tablesize1.
sqlsedG/tmp/Tablesize1.
sql|sed's/^$/>>#list1.
out/g'>/tmp/Tablesize2.
sqlecho"commit;">>/tmp/Tablesize2.
sqldbisql-c"dsn=MONDSN;"-nogui@/tmp/Tablesize2.
sqlrm/tmp/Tablesize2.
sql/tmp/Tablesize1.
sql/tmp/Tablesize.
sqltablesize_info.
sqlselect'Insertintomonuser.
IQHC_TABLEGROWTHselectcast(now()asDATE),Ownername,Tablename,(KBytes/1024)/1024asSizeGB,substring(X.
dbspace_name,1,10)asDbspaceName,Y.
isPartitioned,Y.
Table_type,Y.
isRlv,Y.
location,W.
indexes,W.
columnsfromsp_iqtablesize('''+Y.
Table_owner+'.
['+Y.
Table_name+']''),sysdbspaceX,sp_iqtable('''+Y.
Table_name+Y.
Table_owner+''')Y,sp_iqdbspaceobjectinfo()WwhereX.
dbspace_id=Y.
dbspace_idandw.
dbspace_id=y.
dbspace_idandw.
object_name=y.
table_nameandownername=w.
owner'fromsp_iqtable()YwhereY.
table_owner'DBA';outputto'/tmp/Tablesize.
sql'formatasciiquote'';commit;#Tablemonuser.
IQHC_TABLEGROWTHhastobecreatedStatementIssues(CONFIDENTIAL)306.
3Tables/storedprocedurescreatedondatabaseduringlastweekThissectionshowsIQstoredprocedurecreatedinlast1week.
(SQL:"selectA.
proc_name,C.
user_name,B.
creation_timefromsysprocedureA,sysobjectB,sysuserCwhereB.
object_type=6ANDA.
object_id=B.
object_idANDA.
creator=C.
user_idANDA.
creatorNOTIN(0,3,6)ANDdatediff(dd,B.
creation_time,getdate())'2016-08-20'").
NewTable(Aug16-Aug19)Table_OwnerTable_NameCreationDateCreationTimeOLALA'ADR6''2016-08-1914:45:12.
000'OLALA'DFKK_VT_H''2016-08-1817:30:26.
000'OLALA'DFKK_VT_I''2016-08-1817:30:23.
000'OLALA'DFKK_VT_TR''2016-08-1917:25:30.
000'OLALA'DIA000_IA001''2016-08-1818:01:00.
000'OLALA'EKUN''2016-08-1920:06:29.
000'OLALA'FKKPREPACC''2016-08-1912:46:10.
000'OLALA'FKKVKP''2016-08-1912:46:10.
000'OLALA'FKK_SEC''2016-08-1912:32:45.
000'OLALA'FKK_SEC_C''2016-08-1912:32:46.
000'OLALA'OCCP_Master''2016-08-1715:55:47.
000'OLALA'T005T''2016-08-1912:32:46.
000'OLALA'T005U''2016-08-1912:32:46.
000'OLALA'TAS_MASTER''2016-08-1713:42:00.
000'OLALA'TE181T''2016-08-1912:32:46.
000'OLALA'TEST_04''2016-08-1715:56:50.
000'OLALA'TEST_04_APR''2016-08-1816:45:14.
000'OLALA'TEST_08_MAY''2016-08-1814:58:22.
000'Indexcreationtime:SQL>selecta.
index_name,a.
index_type,b.
creation_time,a.
table_idfromsysindexa,sysobjectbwherea.
object_id=b.
object_idanda.
index_name='ASIQ_IDX_T5865_C113_FP';StatementIssues(CONFIDENTIAL)316.
4InvalidviewonIQdatabaseThissectionshowslistofinvalidviewinIQ(SQL:"selectU.
user_name,T.
table_nameasobject_namefromsysobjectO,systabT,sysuserUwhereT.
object_id=O.
object_idandU.
user_id=T.
creatorandO.
status=2").
SYSOBJECTstatusTINYINTThestatusoftheobject.
Valuesinclude:·1(valid)-Theobjectisavailableforusebythedatabaseserver.
ThisstatusissynonymouswithENABLED.
Thatis,ifyouENABLEanobject,thestatuschangestoVALID.
·2(invalid)-Anattempttorecompiletheobjectafteraninternaloperationhasfailed,forexample,afteraschema-alteringmodificationtoanobjectonwhichitdepends.
Thedatabaseservercontinuestotrytorecompiletheobjectwheneveritisreferencedinastatement.
·4(disabled)-Theobjecthasbeenexplicitlydisabledbytheuser,forexampleusinganALTERTABLE.
.
.
DISABLEVIEWDEPENDENCIESstatement.
object_typeTINYINTTypeofobject.
Valuesinclude:·1-Table·2-View·3-Materializedview·4-Column·5-Index·6-Procedure·7-Trigger·8-Event·9-User·10-Publication·11-Remotetype·12-Loginmapping·13-JAR·14-Javaclass·16-Service·17-Textconfiguration·18-Dbspace6.
5IdentifyObjectTypesIQtableThissectionshowsobjecttypeinIQ(SQL:"selecto.
creation_time,last_modified_at,T.
table_name,O.
status,B.
table_type,b.
view_deffromsysobjectO,systabT,systableBwhereB.
table_id=T.
table_idando.
object_id=T.
object_idandO.
object_id=(selectT.
object_idfromsystabTwhereT.
table_name='')"StatementIssues(CONFIDENTIAL)326.
6IdentifyObjectTypesIQdatabaseIfyouwanttomakeaselectstatementthatshowsmeallusertables,columns,datatypesanddatalengthoftheselectedcolumns,thissectionshowsobjecttypeinIQ(SQL:"selectt.
table_name,c.
column_name,d.
domain_name,c.
width,c.
scaleFROMSYS.
SYSTABtJOINSYS.
SYSCOLUMNcONt.
table_id=c.
table_idjoinSYS.
SYSDOMAINdond.
domain_id=c.
domain_idwheret.
creator0--sysobjectstype'S'andnotexists(select*fromsys.
systabtvwheretv.
creatorin(2,22)andtv.
table_id=t.
table_id)')")6.
7IndextypesonIQdatabaseThissectionshowsIQcountoftablesandtypesofindexes(SQL:"selectcount(*),index_typefromsp_iqindex()groupbyindex_type;").
index_typecount()Time114FP69027HG1843DATE208WD3DTTM273ColumnnameDescriptionindex_typeTheabbreviatedindextype(forexample,HG,LF)Refer:sp_iqindexfragmentation('index…')andsp_iqindexinfo//forindexfragmentationinfoSybaseIQIndexTypesThissectionexploresindepththereasonsyoumightuseeachofthecolumnindextypes.
·TheFastProjection(FP)DefaultIndexTypeWhenyoucreateapermanenttableinaSybaseIQdatabase,IQstoresallcolumnvaluesinadefaultindex.
Thisdefaultindex,calledanFP(FastProjection)index,optimizesprojectionsandenablescertainkindsofsearchconditionstobeevaluated.
·TheLow_Fast(LF)IndexTypeThisindexisidealforcolumnsthathaveaverylownumberofuniquevalues(under1,000)suchassex,Yes/No,True/False,numberofdependents,wageclass,andsoon.
LFisthefastestindexinSybaseIQ.
·TheHigh_Group(HG)IndexTypeTheHigh_Groupindexiscommonlyusedforjoincolumnswithintegerdatatypes.
ItisalsomorecommonlyusedthanHigh_Non_GroupbecauseithandlesGROUPBYefficiently.
·TheHigh_Non_Group(HNG)IndexTypeAddanHNGindexwhenyouneedtodorangesearches.
·TheCompare(CMP)IndexTypeACompare(CMP)indexisanindexontherelationshipbetweentwocolumns.
YoumaycreateCompareStatementIssues(CONFIDENTIAL)33indexesonanytwodistinctcolumnswithidenticaldatatypes,precision,andscale.
TheCMPindexstoresthebinarycomparison(,or=)ofitstwocolumns.
·TheContainment(WD)IndexTypeTheContainment(WD)indexallowsyoutostorewordsfromacolumnstringofCHAR,VARCHAR,andLONGVARCHARdata.
·TheDate(DATE),Time(TIME),andDatetime(DTTM)IndexTypesThreeindextypesareusedtoprocessqueriesinvolvingdate,time,ordatetimequantities:·TEXTIndexesTouseTEXTindexes,youmustbespecificallylicensedtousetheunstructureddataanalyticsfunctionality.
·OptimizingPerformanceforAdHocJoinsIndexescanbecreatedtooptimizeadhocjoinperformance.
·SelectinganIndexCertaincriteria,suchasthenumberofuniquevalues,helpyoutoidentifyappropriateindextypesforyourdata.
6.
8IQIndexFragmentationThissectionshowthefragmentationonindexesofatableinIQ:(SQL:sp_iqindexfragmentation('table'))",thisStoredprocedurecanbeusedtochecktheindexfragmentation.
StoredprocedurereportsinformationaboutthepercentageofpagespacetakenupwithintheB-trees,garrays,andbitmapstructuresinSybaseIQindexes.
Note:Allpercentagesaretruncatedtothenearestpercentagepoint.
HGindexesalsodisplaythevalueofoptionGARRAY_FILL_FACTOR_PERCENT.
IndextypesthatuseaB-treealsodisplaythenumberofnode(nonleaf)pages.
TheseareHG,LF,WD,DATE,andDTTM.
Forgarrays,thefillpercentagecalculationdoesnottakeintoaccountthereservedspacewithinthegarraygroups,whichiscontrolledbytheGARRAY_FILL_FACTOR_PERCENToption.
ItspecifiesthepercentofspaceoneachHGgarraypagestoreserveforfutureincrementalinsertsintoexistinggroups.
Thegarraytriestopadouteachgrouptoincludeapadofemptyspacesetbythevalue.
Thisspaceisusedforrowsaddedtoexistingindexgroups.
Defaultvalueis25.
GARRAY_PAGE_SPLIT_PAD_PERCENToption,determinesper-pagefillfactorduringpagesplitsonthegarrayandspecifiesthepercentofspaceoneachHGgarraypagetoreserveforfutureincrementalinserts.
Splitsofagarraypagetrytoleavethatpercentageempty.
Thisspaceisusedforrowsaddedtonewindexgroups.
Defaultvalue:25.
sp_iqrowdensity('table.
')//ThisstoredprocedurecanbeusedtoreportrowfragmentationAdditionally,sp_iqindex('')0sp_iqcolumn('')sp_iqindexfragmentation('table.
')sp_iqindexsize('.
.
')sp_iqindexinfo('table.
')sp_iqspaceinfo('table.
')sp_iqcheckdb('verifyindex.
.
')CALLsa_index_density('Customers');Torebuildindexifissuefound:-Storeproceduresp_iqrebuiltindexcanbeusedtorebuildtheindexesandreducethefragmentation.
e.
g.
sp_iqrebuiltindex(,)StatementIssues(CONFIDENTIAL)346.
9IdentifylistoftablesinaVieworstoreprocedureinIQ"sp_iqview":Displaysinformationaboutviewsinadatabase.
sp_iqview([view_name],[view_owner],[view_type])SQL>Selectview_name,view_ownerfromsp_iqview()whereview_deflike'%TABLE_NAME%'SQL>Selectproc_name,creatorfromsysprocedurewhereproc_defnlike'%TABLE_NAME%'6.
10Finddetailsofprocedure/table/viewIQ"sp_iqhelp":Displaysinformationaboutsystemanduser-definedobjectsanddatatypes.
sp_iqhelp[obj-name],[obj-owner],[obj-category],[obj-type]Displaydetailedinformationabouttheproceduresp_customer_list:sp_iqhelpsp_customer_listDisplaydetailedinformationaboutthetablesale:sp_iqhelpsale6.
11IQUSER&ROLEThissectionhelpfindlistofgrantsprovidedtoparticularuserinIQselect*fromsysuserauthselect*fromsysloginpolicyselect*fromsysiqlspolicyselect*fromsysiqlspolicyoption;select*fromSYSIQLSMEMBERSselect*fromSYSIQLOGINPOLICYLSINFO1.
Myrolesselectrole_name,grant_typefromsp_displayroles()2.
PriviledgeassignedtoaROLEsp_displayroles()3.
sp_objectpermission''4.
select*fromsysrolegrants5.
LastlogintimeforIQUSERselectuser_name,last_login_time,login_policy_idfromsysuserwherepasswordisnotnullandlast_login_timeisnotnull6.
UserswithDBAprivilegesselect*fromsysrolegrantswhererole_namelike'%DBA%'/*SAPnote2518909-HowtofindpermissionsgrantedtousersinSAPIQ*/StatementIssues(CONFIDENTIAL)356.
12IQLogicalServerpolicyassignedusers.
Thissectionhelpfindlistallthelogicalserverandloginpolicycreated,alsohelplistuserassociatedwith-inIQ:selectd.
user_name,a.
login_policy_name,b.
ls_name,b.
server_name,d.
last_login_timefromsysloginpolicya,SYSIQLSMEMBERSb,SYSIQLOGINPOLICYLSINFOc,sysuserdwherec.
login_policy_id=d.
login_policy_idanda.
login_policy_id=c.
login_policy_idandc.
ls_id=b.
ls_idandd.
passwordisnotnullLoginPolicyOption(parameter)Configuration:select*fromsysiqlspolicyoption;select*fromsysloginpolicyLOGICALSERVER-Nodes:select*fromSYSIQLSMEMBERSselect*fromsysiqlspolicy6.
13MonitorlasttimeanobjectwasaccessedinIQThereisawaytofindoutthelasttimeanobject(table/view/stproc)wasaccessedbyanapplicationinIQ.
Youenableit,thencanrunreportsagainstthedataovertimeonthingsliketableandindexuse,tablesandindexesnotused,etc.
sp_iqworkmonProcedureItControlscollectionofworkloadmonitorusageinformation,andreportsmonitoringcollectionstatus.
sp_iqworkmoncollectsinformationforallSQLstatements.
Note:UsageiscollectedonlyforSQLstatementscontainingaFROMclause;forexample,SELECT,UPDATE,andDELETE.
Seealso*sp_iqcolumnuse*sp_iqindexadvice*sp_iqindexuse*sp_iqtableuse*sp_iqunusedcolumn*sp_iqunusedindex*sp_iqunusedtable6.
14IQPartitionedTablesThissectionhelpfindlistofPartitionedtablesinIQListofallthePartitionedtablesinIQSQL1>selectb.
table_name,b.
table_type,a.
create_time,a.
update_time,z.
dbspace_namefromsysiqtablea,systableb,sysfilezwherez.
file_id=b.
file_idanda.
table_id=b.
table_idanda.
table_idin(selectdistincttable_idfromsyspartitions)DetailsofparticulartablewhichispartitionedSQL2>selectpartition_id,partition_values,partition_namefromsyspartitionswheretable_idin(selecttable_idfromsystablewheretable_name='')StatementIssues(CONFIDENTIAL)366.
15BackupSummaryNodailyFullBackupdoneonproductionIQdatabasesystem.
Onlymonthlyfullbackupsandweeklyincrementalbackupsaredone.
WerecommendschedulingweeklyfulldatabasebackupofProductiondatabaseanddailyincrementalbackup.
ImpactonBusiness:Datalossofupto7days.
BelowisthebackupsummaryfromproductionIQ(SQL:selectsubstring(Name,1,40)asName,Valuefromsp_iqstatus()whereNamelike'%Backup%')Output:NameValueLastFullBackupTime:8/7/201618:22LastFullBackupID:78249976LastBackupType:FULLLastBackupTime:8/7/201618:22LastBackupID:78249976BlocksinnextISIBackup:1817088679Blocks:=55453GbBlocksinnextISFBackup:1817088679Blocks:=55453GbBelowisthebackuphistoryfromproductionIQ(SQL:selectbu_id,bu_time,dependson_id,type,cmdfromsysiqbackuphistory")Output:bu_idbu_timedependson_idcmd107928353/1/20168:240backupdatabaseto'/qwer/sybase_IQ/UPGRADE/SP10_PL02/BACKUP/DB_BACKUP/bkp.
dat1'size50000000111418243/4/20168:300backupdatabaseto'/qwer/sybase_IQ/BACKUP_PRODUCTION/FULL_file1'size50000000127467943/17/201619:210backupdatabaseto'/qwer/sybase_IQ/BACKUP_PRODUCTION/Full_170316.
dat1'size50000000128408493/18/201618:0912746794backupdatabaseincrementalto'/qwer/sybase_IQ/BACKUP_PRODUCTION/INCR_Daily_180316.
incr'size50000000147054804/2/201614:410backupdatabaseto'/qwer/sybase_IQ/BACKUP_PRODUCTION/Full_02042016.
dat1'size50000000165924724/13/201619:150backupdatabaseto'/qwer/sybase_IQ/BACKUP_TEST_VIJAY/Full_file1.
13'size50000000166063284/13/201621:0116592472backupdatabaseincrementalto'/qwer/sybase_IQ/BACKUP_TEST_VIJAY/INCR_Daily_file1.
13'size50000000167098384/14/201610:0916606328backupdatabaseincrementalto'/qwer/sybase_IQ/BACKUP_TEST_VIJAY/INCR_Daily_file1.
14'size50000000169252344/15/201613:0916709838backupdatabaseincrementalto'/qwer/sybase_IQ/BACKUP_TEST_VIJAY/INCR_Daily_file1.
15'size50000000175300534/18/201614:1716925234backupdatabaseincrementalto'/qwer/sybase_IQ/BACKUP_TEST_VIJAY/INCR_Daily_file1.
18'size50000000176093514/18/201622:0017530053backupdatabaseincrementalto'/qwer/sybase_IQ/BACKUP_TEST_VIJAY/INCR_Daily_file1.
18'size50000000StatementIssues(CONFIDENTIAL)37178136474/19/201622:0017609351backupdatabaseincrementalto'/qwer/sybase_IQ/BACKUP_TEST_VIJAY/INCR_Daily_file1.
19'size50000000180077634/20/201622:0017813647backupdatabaseincrementalto'/qwer/sybase_IQ/BACKUP_TEST_VIJAY/INCR_Daily_file1.
20'size50000000181963904/21/201622:0018007763backupdatabaseincrementalto'/qwer/sybase_IQ/BACKUP_TEST_VIJAY/INCR_Daily_file1.
21'size50000000183795204/22/201622:0018196390backupdatabaseincrementalto'/qwer/sybase_IQ/BACKUP_TEST_VIJAY/INCR_Daily_file1.
22'size50000000185601404/23/201622:0016592472backupdatabaseincrementalsincefullto'/qwer/sybase_IQ/BACKUP_TEST_VIJAY/INCR_SIN_FULL_file1.
23'size50000000187302444/24/201622:0018560140backupdatabaseincrementalto'/qwer/sybase_IQ/BACKUP_TEST_VIJAY/INCR_Daily_file1.
24'size50000000189122474/25/201622:0018730244backupdatabaseincrementalto'/qwer/sybase_IQ/BACKUP_TEST_VIJAY/INCR_Daily_file1.
25'size50000000190995384/26/201622:0018912247backupdatabaseincrementalto'/qwer/sybase_IQ/BACKUP_TEST_VIJAY/INCR_Daily_file1.
26'size50000000192826964/27/201622:0019099538backupdatabaseincrementalto'/qwer/sybase_IQ/BACKUP_TEST_VIJAY/INCR_Daily_file1.
27'size50000000194764124/28/201622:0019282696backupdatabaseincrementalto'/qwer/sybase_IQ/BACKUP_TEST_VIJAY/INCR_Daily_file1.
28'size50000000ColumnDescriptionColumnnameDescriptionbu_idTransactionidentifierofthecheckpointoftheoperation.
BackupIDforbackupoperations.
bu_timeTimeofbackupoperationthatisrecordedinbackuprecord.
typeBackuptype:0=FULL1=INCREMENTAL2=INCREMENTALSINCEFULLdependson_idNULLforFULLbackupcmdFulltextofcommandAlso,Refer:sp_iqbackupsummary,sp_iqbackupdetailsBackupMemoryInanidealsituation,amountofmemoryusedduringabackupisafunctionofnumberofcpusnumberofmainorlocalstoredbspacestobebackedupblockfactorIQblocksize(asseenincolumn'block_size'insys.
sysiqinfo)Approximatememoryusedbybackupprocess(z)willbey=max(2*number_of_cpus,8*number_of_main_or_local_dbspaces)z=(y*20)*(blockfactor*block_size)BackupMemory(example)dbspaces=50blockfactor=100numberofcpus=4block_size=8,192'y'ismax(8,400)=>y=400'z'is(400*20)*(100*8,192)=>6.
5GBStatementIssues(CONFIDENTIAL)38BLOCKFACTORspecifythenumberofblockstowriteatonetime.
Thevaluemustbegreaterthan0,orSAPIQgeneratesanerrormessage.
Itsdefaultis25forUNIXsystemsand15forWindowssystems(toaccommodatethesmallerfixedtapeblocksizes).
Thisclauseeffectivelycontrolstheamountofmemoryusedforbuffers.
Theactualamountofmemoryisthisvaluetimestheblocksizetimesthenumberofthreadsusedtoextractdatafromthedatabase.
SetBLOCKFACTORtoatleast25.
SyntaxBACKUPDATABASE[backup-option…]TO[archive-option.
.
.
]…[WITHCOMMENT]backup-option-(backtoSyntax){READWRITEFILESONLY|READONLYdbspace-or-file[,…]}CRC{ON|OFF}ATTENDED{ON|OFF}BLOCKFACTOR{FULL|INCREMENTAL|INCREMENTALSINCEFULL}VIRTUAL{DECOUPLED|ENCAPSULATED}POINTINTIMERECOVERYLOGSONLYWITHCOMMENTdbspace-or-file-(backtobackup-option){DBSPACESidentifier-list|FILES|}identifier-list-(backtodbspace-or-file)[,…]archive-option-(backtoSyntax)SIZESTACKERReferbelowlinkforIQbackup:http://help.
sap.
com/saphelp_iq1608_iqbackup/helpdata/en/a6/13fdea84f21015aaa499e4bc801d20/content.
htm6.
16IQDBlicenseinformationSQL>sp_iqlmconfigstoreprocedureStatementIssues(CONFIDENTIAL)396.
17IQDatabaseUpgradeinfoHowtocheckwhether"ALTERDATABASEUPGRADE"hasbeendoneCheckSYSHISTORYsystemview.
1.
When"ALTERDATABASEUPGRADE"hasbeendone,operation=UPGRADErowisadded.
2.
CompareversionfieldformostrecentUPGRADErowandLAST_STARTrow.
SQL>selectoperation,version,last_timefromsyshistoryorderbyversionTheversionstringcanbecheckedintheSYSHISTORYsystemviewinsecondpartforproductversionstring:select@@versionStatementIssues(CONFIDENTIAL)407Historicstatisticscollectionscripts7.
1CollectstatisticsforTOPtransactioninIQBelow"sh"scriptcanhelpinpopulatingdatabyschedulingshellscriptincrontabandinsertingintoaMonitoringtablee.
gIQHC_HIST_STAThere,tostorehistorydataandcanbeviewedlaterintermsofgraphs:1.
CreateatableonIQDBasfollowsfromanyDBnode:Createtablemonuser.
IQHC_HIST_TRANS(SAMPLE_TIMEtimestamp,CLIENT_ADDRESSvarchar(30),IQHOSTNAMEvarchar(30),ConnHandlenumeric(50),IQconnIDnumeric(50),UserIDvarchar(50),ReqTypevarchar(50),IQthreadsnumeric(10),ClientToolvarchar(50),ConnCreateTimetimestamp,LastReqTimetimestamp,INACTIVE_SINCE_SECSnumeric(50),TempTableSpaceKBnumeric(50),TempWorkSpaceKBnumeric(50),CmdLinevarchar(225))2.
Createshellscriptbelowandscheduleitevery15minonallDBNodesofIQtobemonitoredIQHC_HIST_STATS.
sh#!
/bin/sh#Sourcetheenvfilesource/APP/ABC/BINARY/IQ-16_0/IQ-16_0.
shcd/tmpdt=`date+%F`#######TransactionHistoryInfodbisql-c"dsn=MONDSN;"-nogui"Insertintomonuser.
IQHC_HIST_TRANSselectCURRENTTIMESTAMPASSAMPLETIME,substring("CONNECTION_PROPERTY"('NodeAddress',"a".
"ConnHandle"),1,20)as"ClientAddress",substring(b.
Name,1,20)asIQHOSTNAME,"a".
"ConnHandle","a".
"IQconnID",substring("a".
"Userid",1,30)asUserID,substring("a".
"ReqType",1,30)asReqType,a.
IQthreads,substring("a".
"Name",1,30)asName,substring("a".
"ConnCreateTime",1,30)asConnCreateTime,substring("a".
"LastReqTime",1,30)asLastReqTime,datediff(ss,a.
LastReqTime,now())asINACTIVE_SINCE_SECS,"a".
"TempTableSpaceKB","a".
"TempWorkSpaceKB","b".
"CmdLine"from"dbo".
"sp_iqconnection"()as"a","dbo".
"sp_iqcontext"()as"b"where"a".
"ConnHandle"="b".
"ConnHandle"orderby"ConnCreateTime"asc;commit;"StatementIssues(CONFIDENTIAL)41SQL1>select*fromIQHC_HIST_TRANSwhereinactive_since_secs>10andsample_timebetweentoday()-1andgetdate()andCmdLine'NOCOMMAND'andCmdLine'')SQL2>select*fromIQHC_HIST_TRANSwheresample_timebetween'2016-08-2913:25:00.
000'and'2016-08-2913:55:00.
000'Output:StatementIssues(CONFIDENTIAL)427.
2Collectstatisticsforconnection/threads/MemoryareasWecanscheduleasbelow"sh"script.
ThiscanhelpinpopulatingdatabyschedulingshellscriptincrontabandinsertingintoaMonitoringtablee.
gIQHC_CONNECTMAINhere,tostorehistorydataandcanbeviewedlaterintermsofgraphs:1.
CreateatableonIQDBasfollowsfromanyDBnode:Createtablemonuser.
IQHC_HIST_STATS(SAMPLE_TIMEtimestamp,IQHOSTNAMEvarchar(128),Parametervarchar(100),Valuenumeric(50)2.
Createshellscriptbelowandscheduleitevery15minonallDBNodesofIQtobemonitoredIQHC_HIST_STATS.
sh#!
/bin/sh#Sourcetheenvfilesource/APP/ABC/BINARY/IQ-16_0/IQ-16_0.
shdt=`date+%F`dbisql-c"dsn=MONDSN;"-nogui"Insertintomonuser.
IQHC_CONNECTMAINselectcast(now()asTIMESTAMP),@@servername,substring(stat_name,1,50)asstat_name,substring(stat_value,1,20)stat_valuefromsp_iqstatistics()wherestat_namein('MainCachePagesInUsePercentage','TempCachePagesInUsePercentage','TempCacheCurrentSize','MainCacheCurrentSize','ThreadsInUse','ThreadsFree','ConnectionsActive','OperationsActiveLoadTableStatements');commit;"Resultcanbepulledingraphasfollowsforconnection/thread/memoryareas:7.
2.
1IQActiveconnectionsSQL1>SelectSAMPLE_TIME,IQHOSTNAME,VALUEFROMmonuser.
IQHC_HIST_STATSWHEREPARAMETER='ConnectionsActive';Output:StatementIssues(CONFIDENTIAL)437.
2.
2IQThreadsinUseSQL2>SelectSAMPLE_TIME,IQHOSTNAME,VALUEFROMmonuser.
IQHC_HIST_STATSWHEREPARAMETER='ThreadsInUse';Output:7.
2.
3IQThreadsFreeSQL3>SelectSAMPLE_TIME,IQHOSTNAME,VALUEFROMmonuser.
IQHC_HIST_STATSWHEREPARAMETER='ThreadsFree';StatementIssues(CONFIDENTIAL)447.
2.
4IQMaincacheSizeSQL4>SelectSAMPLE_TIME,IQHOSTNAME,VALUEFROMmonuser.
IQHC_HIST_STATSWHEREPARAMETER='MainCacheCurrentSize';Output:7.
2.
5IQTemporarycacheSizeSQL5>SelectSAMPLE_TIME,IQHOSTNAME,VALUEFROMmonuser.
IQHC_HIST_STATSWHEREPARAMETER='TempCacheCurrentSize';Output:StatementIssues(CONFIDENTIAL)457.
2.
6IQTemporarycacheUsage%SQL6>SelectSAMPLE_TIME,IQHOSTNAME,VALUEFROMmonuser.
IQHC_HIST_STATSWHEREPARAMETER='MainCachePagesInUsePercentage';7.
2.
7IQTemporarycacheUsage%SQL7>SelectSAMPLE_TIME,IQHOSTNAME,VALUEFROMmonuser.
IQHC_HIST_STATSWHEREPARAMETER='TempCachePagesInUsePercentage'StatementIssues(CONFIDENTIAL)468Appendix8.
1DBStartupParametersParameterDescription·@dataiqsrv16databaseserveroptionReadsinoptionsfromthespecifiedenvironmentvariableorconfigurationfile.
·@envvariqsrv16ServerOptionReadsincommand-lineswitchesfromthesuppliedenvironmentvariable.
·@filenameiqsrv16ServerOptionReadinswitchesfromconfigurationfile.
·-ciqsrv16ServerOptionSetsinitialmemoryreservedforcachingcatalogstorepagesandotherserverinformation.
ForthismanyusersOntheseplatformsSet-ctothisminimumvalueorhigherupto100064-bitonly64MBupto20064-bit48MB(start_iqdefaultfor64-bit);largernumbersofusersmaybenefitfrom64MBupto20032-bit32MB(start_iqdefaultfor32-bit)Canusespecificupperandlowerlimitsforthecatalogstorecachesizeusingthe-chand-clparameters·-aliqsrv16ServerOptionExtendsLOGIN_MODEforLDAPUAonlytoaselectnumberofusersusingStandardauthentication·-caiqsrv16databaseserveroptionEnforcesastaticcachesize.
·-cciqsrv16databaseserveroptionCollectsinformationaboutdatabasepagestobeusedforcachewarmingthenexttimethedatabaseisstarted.
·-chiqsrv16ServerOptionSetcatalogstorecachesizeupperlimitinbytes.
·-cliqsrv16databaseserveroptionSetsaminimumcachesizeasalowerlimittodynamiccacheresizing.
·-cpiqsrv16databaseserveroptionSpecifiesanadditionalsetofdirectoriesorJARfilesinwhichtosearchforclasses.
·-criqsrv16databaseserveroptionReloads(warms)thecachewithdatabasepagesusinginformationcollectedthelasttimethedatabasewasrun.
·-csiqsrv16databaseserveroptionDisplaysstatisticsrelatedtodynamiccachesizinginthedatabaseservermessageswindow.
·-cviqsrv16databaseserveroptionControlstheappearanceofmessagesaboutcachewarminginthedatabaseservermessageswindow.
·-dtiqsrv16databaseserveroptionSpecifiesthedirectorywheretemporaryfilesarestored.
·-eciqsrv16databaseserveroptionUsestransport-layersecurityorsimpleencryptiontoencryptallcommandsequencecommunicationprotocolpackets(suchasDBLibandODBC)transmittedtoandfromallclients.
TDSpacketsaren'tencrypted.
·-epiqsrv16databaseserveroptionPromptstheuserfortheencryptionkeyuponstartingastronglyencrypteddatabase.
·-esiqsrv16databaseserveroptionAllowsunencryptedconnectionsoversharedmemory.
StatementIssues(CONFIDENTIAL)47·-fipsiqsrv16databaseserveroptionRequiresthatonlyFIPS-certifiedalgorithmscanbeusedforstrongdatabaseandcommunicationencryption.
·-gaiqsrv16databaseserveroptionUnloadsthedatabaseafterthelastnon-HTTPclientconnectiondisconnects.
·-gbiqsrv16databaseserveroptionSetstheserverprocesspriorityclass.
·-gciqsrv16databaseserveroptionSetsthemaximumintervalbetweencheckpoints.
·-gdiqsrv16databaseserveroptionSetstheprivilegesrequiredtostartorstopadatabaseonarunningdatabaseserver.
·-geiqsrv16databaseserveroptionSetsthestacksizeforexternalfunctions.
·-gfiqsrv16databaseserveroptionDisablesfiringoftriggersbytheserver.
·-gkiqsrv16databaseserveroptionSetstheprivilegesrequiredtostopthedatabaseserver.
·-gliqsrv16ServerOptionSetthepermissionrequiredtoloaddatausingLOADTABLE.
·-gmiqsrv16databaseserveroptionLimitsthenumberofconcurrentconnectionstothedatabaseserver.
·-gniqsrv16ServerOptionSetsthenumberofexecutionthreadsthatareusedforthecatalogstoreandconnectivitywhilerunningwithmultipleusers.
·-gpiqsrv16databaseserveroptionSetsthemaximumalloweddatabasepagesize.
·-griqsrv16ServerOptionSetsthemaximumlengthoftime,inminutes,thatthedatabaseservertakestorecoverfromsystemfailure.
·-gssiqsrv16ServerOptionSets,inpart,thestacksizeforserverexecutionthreadsthatexecuterequestsforserverconnections.
·-gtiqsrv16databaseserveroptionSetsthemaximumnumberofphysicalprocessorsthatcanbeused(uptothelicensedmaximum).
Thisoptionisonlyusefulonmultiprocessorsystems.
·-gtciqsrv16databaseserveroptionControlsthemaximumprocessorconcurrencythatthedatabaseserverallows.
·-guiqsrv16databaseserveroptionSetstheprivilegerequiredforexecutingdatabasefileadministrationstatementssuchasforcreatingordroppingdatabases.
·-iqfreciqsrv16ServerOptionOpendatabaseinforcedrecoverymode.
·-iqgoverniqsrv16ServerOptionSetsthenumberofconcurrentqueriesallowedbytheserver.
The-iqgovernvalueplacesaceilingonthemaximumnumberofqueriestoexecuteatonce.
Ifmoreusersthanthe-iqgovernlimithavesubmittedqueries,newquerieswillbequeueduntiloneoftheactivequeriesisfinished.
Theoptimalvaluefor-iqgoverndependsonthenatureofyourqueries,numberofCPUs,andsizeoftheSybaseIQbuffercache.
Thedefaultvalueis2*numCPU+10.
Withalargenumberofconnectedusers,youmayfindthatsettingthisoptionto2*numCPU+4providesbetterthroughput.
·–iqlmiqsrv16ServerOptionSpecifiesthemaximumamountofmemoryinMBthatSAPSybaseIQcandynamicallyrequestfromtheoperatingsystemfortemporaryuse.
StatementIssues(CONFIDENTIAL)48·-iqmciqsrv16ServerOptionSpecifiesthemainIQstorebuffercachesize,inMB.
·-iqmpx_failoveriqsrv16ServerOptionInitiatesmultiplexcoordinatorfailovertoestablishthedesignatedfailoverSecondarynodeasthenewcoordinator.
·-iqmpx_oviqsrv16ServerOptionPerformsmultiplexconfigurationoverrideforthecurrentnode.
·-iqmpx_reclaimwriterfreelistiqsrv16ServerOptionThisoptionappliesonlywhilerestartingacoordinatornode.
·-iqmpx_sniqsrv16ServerOptionRunsthecurrentnodeinmultiplexinsingle-nodemode.
·-iqmsgnumiqsrv16ServerOptionSpecifiesthenumberofarchivesoftheoldmessagelogmaintainedbytheserver.
·-iqmsgsziqsrv16ServerOptionLimitsthemaximumsizeofthemessagelog.
·-iqmtiqsrv16ServerOptionSpecifiesthenumberofSAPSybaseIQthreadstocreate.
·-iqnotempiqsrv16ServerOptionCreatesatemporaryfileinplaceofthedefinedtemporarydbspace.
·-iqnumbercpusiqsrv16ServerOptionSpecifiesthenumberofCPUsavailabletoSAPSybaseIQ,overridingthephysicalnumberofCPUs,forresourceplanningpurposes.
·-iqpartitioniqsrv16ServerOptionSetsthenumberofIQmainandtempbuffercachepartitions.
·-iqrlvmemstart_iqServerOptionSpecifiestheamountofmemory,inmegabytes,availabletotheRLVstore.
·-iqroiqsrv16ServerOptionRunsthecurrentnoderead-only.
·-iqstartiqsrv16ServerOptionProvidesstartupdiagnosticsfordbspaces.
·-iqtciqsrv16ServerOptionSpecifiesIQtemporarystorecachesize,inMB.
·-iqtssiqsrv16ServerOptionSpecifiesthestacksize,inKB,forserverexecutionthreadsrunningeitherinthebackgroundoraspartofathreadteamassistingthemainserverconnectionthread.
·-iqwmemiqsrv16ServerOptionCreatesapoolof"wired"memoryonHPandSunUNIXsystems.
·-kiqsrv16databaseserveroptionControlsthecollectionofPerformanceMonitorstatistics.
·-kliqsrv16databaseserveroptionSpecifiesthefilenameoftheKerberosGSS-APIlibrary(orsharedobjectonUnix)andenablesKerberosauthenticatedconnectionstothedatabaseserver.
·-kriqsrv16databaseserveroption(deprecated)SpecifiestherealmoftheKerberosserverprincipalandenablesKerberosauthenticatedconnectionstothedatabaseserver.
·-krbiqsrv16databaseserveroptionEnablesKerberos-authenticatedconnectionstothedatabaseserver.
·-ksiqsrv16databaseserveroptionDisablesthecreationofsharedmemorythatthePerformanceMonitorusestocollectcountervaluesfromthedatabaseserver.
·-ksciqsrv16databaseserveroptionSpecifiesthemaximumnumberofconnectionsthatthePerformanceMonitorcanmonitor.
StatementIssues(CONFIDENTIAL)49·-ksdiqsrv16databaseserveroptionSpecifiesthemaximumnumberofdatabasesthatthePerformanceMonitorcanmonitor.
·-miqsrv16databaseserveroptionTruncatesthetransactionlogwhenacheckpointisdone.
·-niqsrv16databaseserveroptionSetsthenameofthedatabaseserver.
·-oiqsrv16databaseserveroptionPrintsalldatabaseservermessagestothedatabaseservermessagelogfile.
·-oeiqsrv16databaseserveroptionSpecifiesafilenametologstartuperrors,fatalerrors,andassertions.
·-oniqsrv16databaseserveroptionSpecifiesamaximumsizeforthedatabaseservermessagelog,afterwhichthefileisrenamedwiththeextension.
oldandanewfileisstarted.
·-osiqsrv16databaseserveroptionSpecifiesamaximumsizeforthedatabaseservermessagelogfile,atwhichpointthefileisrenamed.
·-otiqsrv16databaseserveroptionTruncatesthedatabaseservermessagelogfileandappendsoutputmessagestoit.
·-piqsrv16databaseserveroptionSetsthemaximumsizeofcommunicationpackets.
·-pciqsrv16databaseserveroptionCompressesallconnectionsexceptforsame-computerconnections.
·-ptiqsrv16databaseserveroptionIncreasesordecreasesthesizelimitatwhichpacketsarecompressed.
·-qiiqsrv16databaseserveroptionControlswhetherdatabaseserversystemtrayiconanddatabaseservermessageswindowappear.
·-qpiqsrv16databaseserveroptionSpecifiesthatmessagesaboutperformancedonotappearinthedatabaseservermessageswindow.
·-qsiqsrv16databaseserveroptionSuppressesstartuperrorwindows.
·-qwiqsrv16databaseserveroptionSpecifiesthatthedatabaseservermessageswindowdoesnotappear.
·-siqsrv16databaseserveroptionSetstheuserIDforSyslogmessages.
·-sbiqsrv16databaseserveroptionSpecifieshowthedatabaseserverreactstobroadcasts.
·-sfiqsrv16databaseserveroptionControlswhetherusershaveaccesstofeaturesfordatabasesrunningonthecurrentdatabaseserver.
Asecuredfeaturecanonlybeaccessedbyauserwithappropriateprivileges,whileanunsecuredfeaturecanbeaccessedbyallusers.
·-skiqsrv16databaseserveroptionSpecifiesasystemsecurefeaturekeythatcanbeusedtoallowaccesstofeaturesthataresecuredforthedatabaseserver.
·-suiqsrv16databaseserveroptionSetsthepasswordfortheDBAuseroftheutilitydatabase(utility_db),ordisableconnectionstotheutilitydatabase.
·-tdsliqsrv16databaseserveroptionSetstheTDSloginmode.
·-tiiqsrv16databaseserveroptionDisconnectsinactiveconnections.
·-tliqsrv16databaseserveroptionSetstheperiodatwhichtosendlivenesspackets.
StatementIssues(CONFIDENTIAL)50·-tmfiqsrv16databaseserveroptionForcestransactionmanagerrecoveryfordistributedtransactions.
·-tqiqsrv16databaseserveroptionShutsdowntheserverataspecifiedtime.
·-uiqsrv16databaseserveroptionOpensfilesusingtheoperatingsystemdiskcache.
·-udiqsrv16ServerOption(UNIXservers)Causestheprocesstorunasadaemonintherootdirectory.
SAPrecommendsthatyoudonotusethisswitchinIQservers.
·-ufiqsrv16databaseserveroptionSpecifiestheactionthatthedatabaseservertakeswhenafatalerrororassertionfailureoccursonadatabaseserver.
·-utiqsrv16ServerOption(UNIXservers)Causestheservertotouchcatalogstoretemporaryfilesatintervalsspecifiedbymin.
·-viqsrv16ServerOptionDisplaysthedatabaseserverversioninamessagebox(Windows)orinaversionstring(UNIX/Linux).
·-xiqsrv16databaseserveroptionSpecifiesserver-sidenetworkcommunicationsprotocols.
·-xdiqsrv16ServerOptionPreventsthedatabaseserverfrombecomingthedefaultdatabaseserver.
·-xsiqsrv16databaseserveroptionSpecifiesserver-sidewebservicescommunicationsprotocols.
·-ziqsrv16databaseserveroptionDisplaysdiagnosticcommunicationmessages,andothermessages,fortroubleshootingpurposes.
·-zeiqsrv16databaseserveroptionDisplaysdatabaseserverenvironmentvariablesinthedatabaseservermessageswindow.
·-zliqsrv16databaseserveroptionTurnsoncapturingofthemostrecently-preparedSQLstatementforeachconnectiontodatabasesontheserver.
·-zniqsrv16databaseserveroptionSpecifiesthenumberofrequestlogfilecopiestoretain.
·-zoiqsrv16databaseserveroptionRedirectsrequestlogginginformationtoafileseparatefromtheregularlogfile.
·-zociqsrv16databaseserveroptionRedirectswebserviceclientinformationtoafile.
·-zriqsrv16databaseserveroptionEnablesrequestloggingofoperations.
·-zsiqsrv16databaseserveroptionLimitsthesizeoftherequestlog.
StatementIssues(CONFIDENTIAL)518.
2DisplayDatabaseOptionsA)DisplayDatabaseOptionsinIQDBUse"sp_iqcheckoptions"toDisplayYourDatabaseOptionsThesp_iqcheckoptionsprocedureliststhecurrentanddefaultvaluesfordatabaseoptionsthathavebeenCHANGEDfromthedefault:Whensp_iqcheckoptionsisrunasDBA,itlistsalloptionssetonapermanentbasisforallgroups.
Whensp_iqcheckoptionsisrunasauser,itliststemporaryoptionssetforDBAandthosetemporaryoptionssetbythecurrentuser.
Allusersseenon-defaultserverstart-upoptions.
SampleOutputforsp_iqcheckoptions:User_nameOption_nameCurrent_valueDefault_valueOption_type'DBA''Query_Plan_As_HTML''On''Off''Permanent''DBA''Query_Plan_Text_Access''On''Off''Temporary''DBA''Query_Plan_Text_Access''On''Off''Permanent'B)DisplaySETOptionsinIQDBUse"SET"commandtoDisplayYourDatabaseOptionsTheSETOPTIONstatementisusedtochangeoptionsthataffectthebehaviorofthedatabaseanditscompatibilitywithTransact-SQL.
Settingthevalueofanoptioncanchangethebehaviorforallusersoranindividualuser,ineitheratemporaryorpermanentscope.
Theclassesofoptionsare:·Generaldatabaseoptions·Transact-SQLcompatibilitydatabaseoptionsSpecifyingeitherauserIDorthePUBLICuserIDdetermineswhethertheoptionissetforanindividualuser,ausergrouprepresentedbyuserid,orthePUBLICuserID(theusergrouptowhichallusersareamember).
Ifnousergroupisspecified,theoptionchangeisappliedtothecurrentlylogged-onuserIDthatissuedtheSETOPTIONstatement.
Forexample,thefollowingstatementappliesanoptionchangetothePUBLICuserID,ausergrouptowhichallusersbelong:SETOPTIONPublic.
login_mode=standardOnlyuserswithDBAprivilegeshavetheauthoritytosetanoptionforthePUBLICuserID.
InEmbeddedSQL,onlydatabaseoptionscanbesettemporarily.
ChangingthevalueofanoptionforthePUBLICuserIDsetsthevalueoftheoptionforanyuserthathasnotsetitsownvalue.
OptionvaluescannotbesetforanindividualuserIDunlessthereisalreadyaPUBLICuserIDsettingforthatoption.
Userscannotsettheoptionsofanotheruser,unlesstheyhaveDBAauthority.
UserscanusetheSETOPTIONstatementtochangethevaluesfortheirownuserIDs.
SettingthevalueofanoptionforauserIDotherthenyourownispermittedonlyifyouhaveDBAauthority.
IfyouusetheEXISTINGkeyword,optionvaluescannotbesetforanindividualuserIDunlessthereisalreadyaPUBLICuserIDsettingforthatoption.
AddingtheTEMPORARYkeywordtotheSETOPTIONstatementchangesthedurationthatthechangetakeseffect.
WithouttheTEMPORARYkeyword,anoptionchangeispermanent:itdoesnotchangeuntilitisexplicitlychangedusingSETOPTION.
WhenSETTEMPORARYOPTIONisappliedusinganindividualuserID,thenewoptionvalueisineffectaslongasthatuserisloggedintothedatabase.
StatementIssues(CONFIDENTIAL)52WhenSETTEMPORARYOPTIONisusedwiththePUBLICuserID,thechangeisinplaceforaslongasthedatabaseisrunning.
Whenthedatabaseisshutdown,TEMPORARYoptionsforthePUBLICuserIDrevertbacktotheirpermanentvalue.
TemporarilysettinganoptionforthePUBLICuserIDasopposedtosettingthevalueoftheoptionpermanentlyoffersasecurityadvantage.
Forexample,whenthelogin_modeoptionisenabled,thedatabasereliesontheloginsecurityofthesystemonwhichitisrunning.
EnablingtheoptiontemporarilymeansadatabaserelyingonthesecurityofaWindowsdomainisnotcompromisedifthedatabaseisshutdownandcopiedtoalocalmachine.
Inthatcase,thetemporaryenablingoflogin_moderevertstoitspermanentvalue,whichmightbeStandard,amodeinwhichintegratedloginsarenotpermitted.
Ifoption-valueisomitted,thespecifiedoptionsettingisdeletedfromthedatabase.
Ifitwasapersonaloptionsetting,thevalueusedrevertstothePUBLICsetting.
IfaTEMPORARYoptionisdeleted,theoptionsettingrevertstothepermanentsetting.
SQL>SET;StatementIssues(CONFIDENTIAL)538.
3DBVALID-DatabaseAdministrationUtilityThedbvalidutilityisavalidationutilitythatvalidatestheindexesandkeysonsomeoralloftheSAPSQLAnywheretablesinthecatalogstore.
TheValidationutilityscanstheentiretableandlooksupeachrecordineveryindexandkeydefinedonthetable.
Bydefault,theValidationutilityusestheexpresscheckoption.
Note:Thedbvalidutilityletsyoueasilyvalidatecatalogstoretables,butdoesnotvalidateIQmainstoretables.
Usethesp_iqcheckdbstoredproceduretovalidateIQmainstoretables.
Youcanaccessthedbvalidutilityatthesystemcommand-linelevel,whichisusefulforincorporatingdbvalidintobatchorcommandfiles.
Syntaxdbvalid[options][object-name,.
.
.
]UsageWiththedbvalidcommand-lineutility,youcanvalidatetheindexesandkeysonsomeorallofthetablesinthecatalogstore.
dbvalidscanstheentiretableandconfirmsthateachrowexistsintheappropriateindexes.
ItisthesameasrunningtheSQLAnywhereVALIDATETABLEstatementoneachcatalogstoretable.
Note:VALIDATETABLEisnotsupportedinSAPSybaseIQ.
sp_iqcheckdbprovidesasimilarfunctionforIQmainstoretables.
Bydefault,theValidationutilityusestheexpresscheckoption.
However,theexpresscheckoptionisnotusedifyouspecify-f,-fd,-fi,-fn,or-i.
Ifthecatalogstoretableisinconsistent,dbvalidreportsanerror.
Iferrorsarereported,youcandropalloftheindexesandkeysonatableandre-createthem.
Youmustalsore-createanyforeignkeystothetable.
Warning!
Validateatableorentirecatalogstoreonlywhennoconnectionsaremakingchangestothedatabase;otherwise,spuriouserrorsmaybereported,indicatingsomeformofdatabaseinconsistencyeventhoughnoinconsistencyactuallyexists.
ProgramexitcodeDescription0Databasevalidatedsuccessfully1Generalfailureinutility2Errorvalidatingdatabase7Cannotfinddatabasetoconnectto(databasenameiswrong)8Cannotconnecttodatabase(userID/passwordiswrong)11Cannotfindservertoconnectto(servernameiswrong)12IncorrectencryptionkeyforstartingdatabaseExampleThefollowingcommandvalidatesthecatalogstoreoftheiqdemodatabase,connectingasuserDBAwithpasswordsql:dbvalid-c"uid=DBA;pwd=sql;dbf=c:\sybase\IQ-16_0\demo\iqdemo.
db"8.
4DB_BACKUPHEADER-UtilityReadsthefirstbackuparchive,returnsbackupstatisticsanddefinitions,displaystheDBspacesandDBFilesthatexistedwhenthebackupwasdone.
Syntax:db_backupheader[path]backup_filedb_backupheaderisacommandlineutility.
http://quickdbasupport.
com/most_used_sybase_iq.
phpStatementIssues(CONFIDENTIAL)548.
5Displaysthesourcetext"sp_helptext"Displaysthesourcetextofacompiledobject,aswellasthetextforuser-definedfunctions,computedcolumns,orfunction-basedindexdefinitions.
sp_helptextobjname[,grouping_num][,numlines[,printopts]]]Example:Displaysthesourcetextofpub_idrule.
Sincethisruleisinthepubs2database,executethiscommandfrompubs2:sp_helptextpub_idrule#LinesofText1textcreaterulepub_idruleas@pub_idin("1389","0736","0877","1622","1756")or@pub_idlike"99[0-9][0-9]"SharedSystemTemporaryStoreAmultiplexconfigurationwithsharedtemporarystoragecanusetheIQ_SHARED_TEMPdbspaceasasharedsystemtemporarystoreinsteadofrequiringaseparatelocalstoreforeachsecondaryserver.
Thesharedsystemtemporarystoresimplifiesmultiplexconfiguration,improvesperformance,andsupportsdistributedqueryprocessing.
Onmultiplexsystems:·WhenyousetthelogicalserverpolicyoptionTEMP_DATA_IN_SHARED_TEMPON,SAPSybaseIQcreatesalltemporaryobjectsontheIQ_SHARED_TEMPdbspace.
Youmustrestartsecondarynodesaftersettingthisoptionorafteraddingaread-writefiletothesharedtemporarystore.
(Ifthesharedtemporarystorecontainsnoread-writefile,orifyoudonotrestartsecondarynodes,datainsteadwritestoIQ_SYSTEM_TEMP.
)·Temporaryuserobjects(suchastablesortableindexes)thatyoucreateusingtheINIQ_SYSTEM_TEMPclausegoineitherIQ_SYSTEM_TEMPorIQ_SHARED_TEMP,dependingonthevalueofthelogicalserveroptionTEMP_DATA_IN_SHARED_TEMP:IfTEMP_DATA_IN_SHARED_TEMPis'OFF',objectsgoinIQ_SYSTEM_TEMP.
IfTEMP_DATA_IN_SHARED_TEMPisset'ON',objectsgoin·IQ_SHARED_TEMP.
·SAPSybaseIQdoesnotsupportcreatingtemporaryuserobjectsusingtheINIQ_SHARED_TEMPclause.
·TheWITHSTOPSERVERclauseautomaticallyshutsdownallserversinthelogicalserver.
ThesestatementssupportWITHSTOPSERVER:ALTERLOGICALSERVERALTERLSPOLICYCREATELOGICALSERVERDROPLOGICALSERVERIfyouuseALTERLSPOLICY.
.
.
WITHSTOPSERVERtochangetheTEMP_DATA_IN_SHARED_TEMPoption'ON|OFF',allserversinthatlogicalservershutdownautomatically.
YoumustrestarttheserverstoforcethelogicalservertoplacetemporarydatainthestorespecifiedbytheTEMP_DATA_IN_SHARED_TEMPoption.
·IfyouuseALTERLSPOLICYtosetTEMP_DATA_IN_SHARED_TEMP'OFF',thelogicalserverstartsplacingtemporarydataintheSYSTEMtemporaryareaafterthenextnormalserverstartup.
YoucanalsochangetheTEMP_DATA_IN_SHARED_TEMPvalueindirectlyusingCREATELOGICALSERVER,ALTERLOGICALSERVER,orDROPLOGICALSERVERstatementsandtheWITHSTOPSERVERclauseReferenceLinkhttp://infocenter.
sybase.
com/help/index.
jsptopic=/com.
sybase.
infocenter.
dc36273.
1550/html/sprocs/X25756.
htmStatementIssues(CONFIDENTIAL)558.
6EnableandDisableTraceinIQDBEnableTraceinIQDB1.
Checkthetablemetainfoindbisql:sp_iqobjectinfo[owner],[table_name];2.
EnableSQLorQueryPlangenerator–OntheloadtargetIQserver–runthesecommandswithDBA:createatempfoldertosavetraceandlogs:mkdir/tmp/log_iqloadSQLTrace:indbisql:callsa_server_option('request_level_logging','SQL');callsa_server_option('request_level_log_file','/tmp/log_iqload/sqltrace.
log');Queryplan:indbisql:setoptionquery_plan='on';setoptionquery_detail='on';setoptionquery_plan_as_html='on';setoptiondml_options10='on';setoptionquery_plan_after_run='on';setoptionquery_name='load_plan';setoptionquery_plan_text_caching='on'setoptionquery_plan_as_html_directory='/tmp/log_iqload';setoptionquery_plan_text_access='on';setoptionquery_timing='on';setoptionrevert_to_v15_optimizer='OFF';3.
Runthatloadtest,inthemeantime–monitortheIO,CPUandthreadstatuswithNMONnmon-f-s1-c4.
Afterloadtestcompleted,switchofftheSQLtraceorQueryPlangeneratorwithDBA:SQLTrace:indbisql:callsa_server_option('request_level_logging','OFF');Queryplan:indbisql:setoptionquery_plan='off';setoptionquery_detail='off';setoptionquery_plan_as_html='off';5.
Collectingalloutputandlogsabove:Output:sp_iqobjectinfoTracefilesallfilesinfolder/tmp/log_iqloadcallsa_get_request_profile('/sys1/users/jones/iqreqs1_zr.
log');select*fromsatmp_request_profile;select*fromsatmp_request_time;Note:IQhastheoptionQUERY_PLAN_MIN_TIMEtoprintqueryplanonlywhenqueryexecutiontimeexceedsthethreshold.
Wecanusethisoptionfornowtogetqueryplansforhighexecutiontimequeries.
Documentationat:http://infocenter.
sybase.
com/help/index.
jsptopic=/com.
sybase.
infocenter.
dc00801.
1604/doc/html/jcu1332357637622.
htmlFurtherIQTraceFilesandLogFileshttps://wiki.
scn.
sap.
com/wiki/display/SYBIQ/IQ+Trace+Files+and+Log+FilesStatementIssues(CONFIDENTIAL)568.
7SAPSybaseIQErrorMessagesandReportingAlertsErrorandstatusmessagesindicatingconditionsofpotentialconcerntoSAPSybaseIQdatabaseoperationscanappearinseveraldifferentIQlogfiles:IQmessagefile("the.
iqsmglog")Serverlog("the.
srvlog")Standarderrorlog("the.
stderrlog")RequestLog("thezrzolog"or"SQLlog")Allfourmessagesourcesshouldbemonitoredinordertocatchallconditionsofpotentialinteresttoadatabaseadministrator(DBA).
ThereisnosinglemeansthatasystemgeneratingDBAalertscanusetodetectallerrormessages.
ThisarticleexaminesthevarioustypesofSAPSybaseIQmessagesandhowtheycanbedetected".
iqmsg"logmessages.
See,Section6.
2.
3IQCatalogDBandIQMSGfileInfo8.
8IQHEADER-UtilityUsetheDBSpaceHeaderutilitytodeterminewhichserver,ifany,isusingaparticulardevice,fileorLUN(LogicalUnitNumber)asadbspaceinordertoanalyzediskusageortoconfigureamultiplexqueryserver.
TheiqheaderutilityreportstheconfigurationofanarbitrarydeviceregardlessofwhetheritiscurrentlyinusebyanIQserver.
UsageiqheaderusageWheninvokedwithnoparameters,ausagesummaryisreportedandanonzerostatusisreturned:iqheaderUsage:iqheader[dbspace_path]http://infocenter.
sybase.
com/help/index.
jsptopic=/com.
sybase.
infocenter.
dc00168.
1510/html/iqutil/CIHDHJHD.
htmStatementIssues(CONFIDENTIAL)578.
9Utility"iqunload"toexport/importIQobject(smalltables)SampleprocedureforanobjectlevelbackupinIQ:1)Wehavetable'LOAD9'intestdatabasesupposewith2GBsize/2.
5croresofrecords.
(DBA)>selectcount(*)fromLOAD9(DBA)>sp_iqtablesizeLOAD92)Takethebackupoftable'LOAD9'with'iqunload'utility.
Outputbelow:-sh-4.
1$iqunload-c"dsn=XYZXX;"-tLOAD9-rload9.
sql/APP/ABC/DBA/SAPIQUnloadUtilityVersion16.
0.
0.
2304Connectingandinitializing2016-11-0412:04:41Unloadingsequences2016-11-0412:04:41Unloadingtabledefinitions2016-11-0412:04:47Unloadingindexdefinitions2016-11-0412:04:51Unloadingtriggers2016-11-0412:04:51Extractingtable:"DBA".
"LOAD9"Successfullyunloadedschemaanddatafromdatabase"/APP/ABC/CATALOG/DB/ABC.
db".
3)Thefollowingfilesarecreated.
DataisextractedintoflatfilesDBA_LOAD9_DATA_1.
inp&DBA_LOAD9_DATA_2.
inp-sh-4.
1$ls-l-rw-r--r--.
1iqABCdba0Nov412:04DBA_LOAD9_DATA_2.
inp-rw-r--r--.
1iqABCdba22876338961Nov412:07DBA_LOAD9_DATA_1.
inp-rw-1iqABCdba11764Nov412:07load9.
sql4)Sizeofflatfileis22GB.
-sh-4.
1$du-g22GDBA_LOAD9_DATA_1.
inp0DBA_LOAD9_DATA_2.
inp12Kload9.
sql5)Loadedintoanothertable'LOAD100'toseeifextracteddatainflatfileisvalid.
Datarowcountmatchesanddataisvalid.
-sh-4.
1$DBISQL@load100.
sql(DBA)>selectcount(*)fromLOAD100Referencedocuments:Belowaresomedocumentsshowssupportof"iqunload"onIQ16SP08http://froebe.
net/blog/wp-content/uploads/2015/04/IQ-16.
0-SP8-Utility-Guide-SAP-Inc_.
pdfAlso,SAPnote2156392-Howtorestorebackuptobiggerdevices-SAPIQ"useiqunload-nfromIQ15.
xareatogetschemafrom*running*theexistingIQserver"https://archive.
sap.
com/documents/docs/DOC-70562StatementIssues(CONFIDENTIAL)588.
10Utility"TEMP_Extract"toexport/importIQobject(Largetables)TheextractoptionsletyouredirecttheoutputofaSELECTstatementfromthestandardinterfacetogodirectlytooneormorediskfilesornamedpipes.
E.
g:settemporaryoptiontemp_extract_name1='X_1.
dat';settemporaryoptiontemp_extract_size1='1000000';settemporaryoptiontemp_extract_name2='X_2.
dat';settemporaryoptiontemp_extract_size2='1000000';settemporaryoptiontemp_extract_name3='X_3.
dat';settemporaryoptiontemp_extract_size3='1000000';settemporaryoptiontemp_extract_name4='X_4.
dat';settemporaryoptiontemp_extract_size4='1000000';settemporaryoptiontemp_extract_name5='X_5.
dat';settemporaryoptiontemp_extract_size5='1000000';settemporaryoptiontemp_extract_name6='X_6.
dat';settemporaryoptiontemp_extract_size6='1000000';settemporaryoptiontemp_extract_name7='X_7.
dat';settemporaryoptiontemp_extract_size7='1000000';settemporaryoptiontemp_extract_name8='X_8.
dat';settemporaryoptiontemp_extract_size8='1000000';settemporaryoptiontemp_extract_directory='/tmp/XYZ/';settemporaryoptionisql_show_multiple_result_sets='on';settemporaryOPTIONISQL_PRINT_RESULT_SET='ALL';settemporaryoptiontemp_extract_binary='ON';settemporaryoptiontemp_extract_quotes='OFF';settemporaryoptiontemp_extract_quotes_all='OFF';select*from;TheExtractOptions:OptionNameAllowedValuesDefaultvalueTemp_Extract_AppendONorOFFOFFTemp_Extract_BinaryONorOFFOFFTemp_Extract_Column_Delimiterstring','Temp_Extract_Directorystring''Temp_Extract_Name1string''Temp_Extract_Name2string''Temp_Extract_Name3string''Temp_Extract_Name4string''Temp_Extract_Name5string''Temp_Extract_Name6string''Temp_Extract_Name7string''Temp_Extract_Name8string''Temp_Extract_Null_As_EmptyONorOFFOFFTemp_Extract_Null_As_ZeroONorOFFOFFTemp_Extract_Quotestring''Temp_Extract_QuotesONorOFFOFFStatementIssues(CONFIDENTIAL)59OptionNameAllowedValuesDefaultvalueTemp_Extract_Quotes_AllONorOFFOFFTemp_Extract_Row_Delimiterstring''Temp_Extract_Size1platformspecific*0Temp_Extract_Size2platformspecific*0Temp_Extract_Size3platformspecific*0Temp_Extract_Size4platformspecific*0Temp_Extract_Size5platformspecific*0Temp_Extract_Size6platformspecific*0Temp_Extract_Size7platformspecific*0Temp_Extract_Size8platformspecific*0Temp_Extract_SwapONorOFFOFF*ThedefaultvaluesfortheTemp_Extract_Sizenoptionsareplatformspecific:·AIXandHP-UX:0–64GB·SunSolaris:0–512GB·Windows:0–128GB·Linux:0–512GBWhenlargefilesystems,suchasJFS2,supportfilesizelargerthanthedefaultvalue,setTEMP_EXTRACT_SIZEntothevaluethatthefilesystemallows.
Forexample,tosupportlTBsetoption:SETOPTIONTEMP_EXTRACT_SIZE1=1073741824KBTypesofExtractionTherearethreetypesofdataextraction:·Binary·Binary/swap·ASCIIAbinaryextractionproducesafilethatcanbeloadedviaaLOADTABLEstatementwithanoverall"binary"formatandwithapercolumn"binarywithnullbyte"format.
Thebinary/swapextractionisthesameasthebinaryextraction,exceptitisdesignedtobeloadedonanothermachinewithoppositeendianness.
TheASCIIextractionproducesatextfile.
ThetwooptionsTemp_Extract_BinaryandTemp_Extract_Swapdeterminewhichofthethreetypesofextractionisdone:TypeTemp_Extract_BinaryTemp_Extract_SwapbinaryONOFFbinary/swapONONASCIIOFFOFFFurtherreferencedocument:http://infocenter.
sybase.
com/help/index.
jsptopic=/com.
sybase.
infocenter.
dc01773.
1603/doc/html/san1288042643642.
htmlhttp://froebe.
net/blog/wp-content/uploads/2013/09/IQ-16.
0-Reference_-Statements-and-Options-Sybase-Inc_.
pdfSAPNote1984992-Howtobackupandrestoreacrossdifferentendianformats-SAPIQStatementIssues(CONFIDENTIAL)608.
11IQTuningGDirtyWhenyourun"iqutilitiesmain"summaryreport,GDirtyshowsthenumberofgrabbeddirtypagesfrommemory.
AccordingtotheSybasedocumentionthisvalueshouldideallybe0.
Therecommendedtuningparametersaresweeper_threads_percentandwash_area_buffers_percent.
SampleoutputofthesummaryreportAsyoucansee,GDirtyisabovezeroatsomepoint.
Multipletestswithvariouscombinationsofthesweeper_threads_percentandwash_area_buffers_percenthaveshownthatchangingsweeper_threads_percentdoesnotmakeabigdifference.
WhenyouneedtoreduceGdirty,it'sbesttoincreasethesizeofthewasharea.
Thedefaultvalueis20andwhenyouchangeit,doitwithfairlybigsteps(e.
g.
+10%).
Doitwith"setoptionpublic.
wash_area_buffers_percent="Runtestsbeforemakingfinalchanges.
Alsocheckthehitratiobelow90%Gdirtyisissue,Increasecachecanhelpresolvethisissuetoo.
8.
12IQMonitoringTOPSQLstatementperformanceThestatementperformancemonitoringfeaturereturnsexecutiontimesforslowSQLstatements(queries),andotherrelevantdiagnosticdata(likeCPUusage,numberofpagesfoundinthecache,numberoftimesthestatementwasexecutedinthecurrentplan,andnumberofthreadsusedbystatementexecution.
Note:ThisIQfeatureisonlyavailablesinceIQ16SP11Pl12+Procedure1.
SetoptionCOLLECT_IQ_PERFORMANCE_STATStoON.
2.
SetoptionQUERY_PLAN_MIN_TIMEinmilliseconds.
Thissetsthemonitoringthreshold,sothatonlythoseSQLstatementswithexecutiontimesexceedingthisthresholdarerecorded.
3.
Usethesp_top_k_statementsandsp_find_top_statementssystemprocedurestoreportthestatementandplancombinationsthattakethelongesttimetorun:osp_top_k_statementsprovidestimingmetricsincludingthestandarddeviation(stddev_seconds)fromaveragestatementexecution,andthemaximumruntime(max_seconds)forthestatement.
osp_find_top_statementsprovidesresourcemetrics,includingCPUusage(max_cpu_usage_perc),tempspaceusage(temp_space_used_mb),numberoftimesthestatementwasexecutedbythecurrentplan(num_exec),andnumberofthreadsused(max_thread_count).
4.
Analyzestatementperformancedatainthefollowingsystemviews:oGTSYSPERFCACHESTMTsystemview-ProvidestheSQLforslowstatements.
oGTSYSPERFCACHEPLANsystemview-ProvidestheXMLplanforslowstatements.
5.
Ifastatement'sstandarddeviation(standdev_seconds)insp_top_k_statementsindicatesaslowstatement,considerfurtherinvestigationbyturningonqueryplangeneration.
SeeGeneratingaQueryPlanintheSAPIQInteractiveSQLGuide.
https://help.
sap.
com/viewer/a8982cc084f21015a7b4b7fcdeb0953d/16.
0.
11.
12/en-US/a50746e62c2248c2a66f34c8e34fb722.
htmlStatementIssues(CONFIDENTIAL)618.
13SybaseIQSysmon-SystemPerformanceAnalysisIQUtilitySybaseIQ'ssysmonprocedureproducesalogfiledeclarelocaltemporarytabledummy_monitor_debug(dummy_columninteger);declarelocaltemporarytabledummy_monitor1_debug(dummy_columninteger);settemporaryoptionMonitor_Output_Directory="/qwer/jio/ingest/LOAD_STATISTICS_14092014";iqutilitiesmainintodummy_monitor_debugstartmonitor'-debug-interval10-file_suffixmain';iqutilitiesprivateintodummy_monitor1_debugstartmonitor'-debug-interval10-file_suffixtemp';ORsetoptionMonitor_Output_Directory="/qwer/test/ingest/LOAD_STATISTICS_14092014"gosp_iqsysmonstart_monitor,filemode,'-interval120-file_suffixsysmon.
2017_May6'gocommitgowaitfordelay'00:59:00'commitgosp_iqsysmonstop_monitorgoBelowisahandyscriptforprocessingthesysmonoutput.
Itfiltersthedata,andshowsrecommendedlevels/benchmarks.
#!
/bin/bash#sysmonlogfileanalyzer##fname=$1if!
test-f$fname;thenecho"Error:file$fnamenotfound.
"exitfidateechoecho"IQSysmonLogAnalyzer"echosleep2echo"Threads:FreevsReservedBenchmark:ThrNumFree>ThrReserved"echo"";echo"";sleep2egrep'Thr'$fname|egrep'Free|Reserved'|head-25echosleep3echo"Pressentertocontinue.
"readsel1echo"PinnedBuffersBenchmark:Pinned90%"echo"";echo"";sleep2egrep-i'hit%'$fname|head-25echoStatementIssues(CONFIDENTIAL)638.
14DQP(DistributedQueryProcessing)DistributedQueryProcessing(DQP)spreadsqueryprocessingacrossmultipleserversinaSAPSybaseIQMultiplexgrid.
DQPwasintroducedinIQ15.
4andhasbeenenhancedintermsofperformanceinIQ16.
0.
ItimprovesperformanceinIQmultiplexconfigurationsbyspreadingworkacrossmultiplenodesinthecluster.
Logicalserver-Groupingdynamicallyphysicalmultiplexserversintoalogicalserver.
-Fordistributedprocessing,youcandynamicallychangethemembersinvolvedinthelogicalserver.
-Aphysicalmembernodecanbeparticipatedinmorethan2logicalservers.
DQP(DistributedQueryProcessing)·Leadernodereceivesarequestforquery,itdistributesworkunitstoworkernodes.
·Workernodesreturnstheresultsettotheleadernode.
·Inordertosavetheintermediateresults,youshouldaddaparticulardbspacenamedIQ_SYSTEM_SHARED_TEMPdbspaceinIQ15.
4.
·CommunicationsbetweennodesaredonethroughMIPC(MultiplexInterProcessCommunication).
·AsofIQ16.
0,youhaveanotheroption'DQPovernetwork'whichprovidesmoreenhancedDQP.
WhatKindsofQueriesCanBeDistributedAcrossaPlexQGridInorderforaqueryoperatortobedistributed,itmustbeabletobeexecutedinparallel.
Whenanoperatorisexecutedinparallel,multiplethreadscanbeappliedtoexecutetheprocessinginparallel.
InSAPSybaseIQ,mostqueryoperatorscanbeparallelizedbutnotallaredistributed.
ThefollowingtableshowswhichqueryoperatorsaredistributedStatementIssues(CONFIDENTIAL)64Queryfragmentsthathavethefollowingbehaviorareneverdistributed:Writetothedatabase(includingDDL,INSERT,LOAD,UPDATEandDELETE)ReferencetemporarytablesReferencetablesthatresideintheSYSTEMDBSpaceReferenceproxytablesUtilizenon-deterministicfunctions,suchasNEWIDNotethataLOADoperationcanstillbe"distributed"byloadingindividualtablesinparallelusingmultiplewriternodesinthegridAsamplequeryplangeneratedbyDQPDQP(DistributedQueryProcessing)-Errorhandling1.
Ifaleaderthreadrunsintoanunsolvableerrorwhileworkerthreadsareworkingonworkunits,theworkerthreadrollsbackitstask.
2.
Underasituationthatleaderthreadsareworkingonworkunitsandthereisanavailablenodewhichcanaffordtotakeworkunits,ifaworkerthreadencountersanunsolvableerrors(ex,slowness/goingdown/hang/etc),thentheleadernodekeepssendingtheworkunitstotheworkernode(retry)orsendingthemtoanotherworkernodeavailable.
3.
Iftheworkernodegetscrashedwhileprocessingworkunits,thentheleadersendthemouttoanotheravailableworkernode.
4.
SendingouttheworkunitstoanotherworkernodedependsonadatabaseoptionMPX_WORK_UNIT_TIMEOUT(default:60sec).
DQP(DistributedQueryProcessing)–"dqp_enabled"optionAdatabaseoptionDQP_ENABLEDenablesordisablestheDQPbehaviorasatemporaryorpublicoption.
Also,it'spossibletodefinetheDQPbehaviorasaloginpolicyoptioninIQ15.
4asbelow.
"ALTERLOGINPOLICYlp1dqp_enabled=ONLOGICALSERVERls1;"AsofIQ16.
0,ithasbeenchangedtoalogicalserverpolicyoption,insteadofloginpolicyoption.
And,IQ16.
0introducedanewoption'DQPOVERNETWORK'whichcanbeusingwithouthavingtowriteintermediateresulttoIQ_SYSTEM_SHARE_TEMPdbspace.
"ALTERLSPOLICYlsp1dqp_enabled=2;"·0forNoDQP,·1forDQPoverIQ_SYSTEM_SHARED_TEMP(Default),·2forDQPoverthewirewithoutusingIQ_SYSTEM_SHARED_TEMP"sp_iqmpxcheckdqpconfig"RelatedDocumentshttp://infocenter.
sybase.
com/help/index.
jsptopic=/com.
sybase.
infocenter.
help.
iq.
15.
4/title.
htmhttp://help.
sap.
com/saphelp_iq1610_iqmpx/helpdata/en/a2/30362b84f21015b0c4978dd1653301/content.
htmframeset=/en/a8/90ad7284f210158f85cf9374d47854/frameset.
htm¤t_toc=/en/a8/90ad7284f210158f85cf9374d47854/plain.
htm&node_id=116&show_children=falseWhitepaperonScale-outwithSAPIQ:https://www.
google.
co.
in/urlsa=t&rct=j&q=&esrc=s&source=web&cd=4&ved=0ahUKEwj44q7R0bbPAhUX7WMKHW0PBB0QFgg3MAM&url=http%3A%2F%2Fwww.
sdn.
sap.
com%2Firj%2Fscn%2Findex%3Frid%3D%2Flibrary%2Fuuid%2Fd0bd9b86-2c42-3110-baa2-a2c909de7cab%26overridelayout%3Dtrue&usg=AFQjCNF4NpD53nW6ZomqeSGRDS6gPCV_lw&bvm=bv.
134495766,d.
cGc&cad=rjaStatementIssues(CONFIDENTIAL)658.
15IQCheckpointHowthedatabaseserverdecideswhentocheckpointThepriorityofwritingdirtypagestothediskincreasesasthetimeandtheamountofworksincethelastcheckpointincreases.
Thepriorityisdeterminedbythefollowingfactors:·CheckpointUrgencyThetimethathaselapsedsincethelastcheckpoint,asapercentageofthecheckpointtimesettingofthedatabase.
Youcansetthemaximumtime,inminutes,betweencheckpointsbyusingthe-gcserveroptionorthecheckpoint_timedatabaseoption.
If-gcisspecified,thecheckpoint_timeoptionsettinginthedatabaseisignored.
·RecoveryUrgencyAheuristictoestimatetheamountoftimerequiredtorecoverthedatabaseifitfailsrightnow.
Youcansetthemaximumtime,inminutes,forrecoveryintheeventofsystemfailurebyusingthe-grserveroptionorrecovery_timedatabaseoption.
If-grisspecified,therecovery_timeoptionsettinginthedatabaseisignored.
Thecheckpointandrecoveryurgencyvaluesareimportantonlyifthedatabaseserverdoesnothaveenoughidletimetowritedirtypages.
Thelowerboundaryontheintervalbetweencheckpointsisbasedonacombinationoftherecovery_timeandcheckpoint_timeoptions.
Therecovery_timeoptionsettingisnotrespectedincaseswhereitwouldforceacheckpointtoosoon.
Frequentcheckpointsmakerecoveryquicker,butalsocreateworkfortheserverwritingoutdirtypages.
If,becauseofotheractivityinthedatabase,thenumberofdirtypagesfallstozero,andifthecheckpointurgencyis33%ormore,thenacheckpointtakesplaceautomaticallysinceitisaconvenienttime.
oIQwillalsoautomaticallytryanddoacheckpointifthedatabaseserverprocessingremainsidlelongenoughandcheckpointurgency(CheckpointUrgency)reaches33%of-gc.
Boththecheckpointurgencyandrecoveryurgencyvaluesincreaseuntilthecheckpointoccurs,atwhichpointtheydroptozero.
"IfCOOPERATIVE_COMMITSissettoOFF,aCOMMITiswrittentodiskassoonasitisreceivedbythedatabaseengine,andtheapplicationisthenallowedtocontinue.
WhenCOOPERATIVE_COMMITSissettoON(thedefault),thedatabaseenginedoesnotimmediatelywritetheCOMMITtothedisk.
Instead,itrequirestheapplicationtowaitforamaximumlengthsetbytheCOOPERATIVE_COMMIT_TIMEOUToptionforsomethingelsetoputonthepagesbeforetheyarewrittentodisk.
"SQL>sa_db_properties()wherePropNamelikeCheckpointorChk.
O/PNumberPropNumPropNamePropDescriptionValue022ChkptFlushCheckpointflushedpages215196023ChkptPageCheckpointlogpageimagessaved215172024CheckpointUrgencyCheckpointUrgency23025ChkptCheckpoints8161026CheckpointLogCommitToDiskCheckpointlogcommittodisk32844027CheckpointLogPagesInUseCheckpointlogpagesinuse61028CheckpointLogPagesRelocatedCheckpointlogpagesrelocated131029CheckpointLogSavePreimageCheckpointlogsavepreimage215172030CheckpointLogSizeCheckpointlogsizeinpages68031CheckpointLogPagesWrittenCheckpointlogpageswritten215242032CheckpointLogWritesCheckpointlogdiskwrites16485096IdleCheckIdleI/Ochecked1060455097IdleChkTimeIdleI/Ocheckpointtime1097556098IdleChkptIdleI/Ocheckpoints78990284ChecksumPagechecksumOn0437LastCheckpointTimeLastcheckpointtime6/2/201717:490439WriteChecksumWriteI/OchecksumOnStatementIssues(CONFIDENTIAL)66CheckpointandrecoverystatisticsStatisticDescriptionCheckpointFlushes/secShowstherateatwhichrangesofadjacentpagesarewrittenoutduringacheckpoint.
CheckpointUrgencyShowsthecheckpointurgency,expressedasapercentage.
Checkpoints/secShowstherateatwhichcheckpointsareperformed.
ChkptLog:BitmapsizeShowsthesizeofthecheckpointlogbitmap.
ChkptLog:Committodisk/secShowstherateatwhichcheckpointlogcommit_to_diskoperationsarebeingperformed.
ChkptLog:LogsizeShowsthesizeofthecheckpointloginpages.
ChkptLog:Pageimagessaved/secShowstherateatwhichpagesarebeingsavedinthecheckpointlogpriortomodification.
ChkptLog:PagesinuseShowsthenumberofpagesinthecheckpointlogwhicharecurrentlyinuse.
ChkptLog:Relocatepages/secShowstherateatwhichpagesinthecheckpointlogarebeingrelocated.
ChkptLog:Savepreimage/secShowstherateatwhichnewdatabasepagepreimagesarebeingaddedtothecheckpointlog.
ChkptLog:Writepages/secShowstherateatwhichpagesarebeingwrittentothecheckpointlog.
ChkptLog:Writes/secShowstherateatwhichdiskwritesarebeingperformedinthecheckpointlog.
Onewritecanincludemultiplepages.
ChkptLog:Writestobitmap/secShowstherateatwhichdiskwritesarebeingperformedinthecheckpointlogforbitmappages.
IdleActives/secShowstherateatwhichthedatabaseserver'sidlethreadbecomesactivetodoidlewrites,idlecheckpoints,andsoon.
IdleCheckpointTimeShowsthetotaltimespentdoingidlecheckpoints,inseconds.
IdleCheckpoints/secShowstherateatwhichcheckpointsarecompletedbythedatabaseserver'sidlethread.
Anidlecheckpointoccurswhenevertheidlethreadwritesoutthelastdirtypageinthecache.
IdleWrites/secShowstherateatwhichdiskwritesareissuedbythedatabaseserver'sidlethread.
RecoveryI/OEstimateShowstheestimatednumberofI/Ooperationsrequiredtorecoverthedatabase.
RecoveryUrgencyShowstherecoveryurgencyexpressedasapercentage.
ReferSAPnotesbelow:1937483-TemporaryhangsinCheckpoint-SAPIQ2037009-[SAPIQ]Arelationshipbetweenev_begintxnandcheckpoint.
2478791-SAPIQHowdoserverstartupswitches-gcand-graffectautocheckpointingStatementIssues(CONFIDENTIAL)67OtherPerformanceMonitorstatisticsStatisticDescriptionActiveRequestsActiveRequestsisthenumberofenginethreadsthatarecurrentlyhandlingarequest.
AsynchronousReads/secAsynchronousReads/secistherateatwhichpagesarebeingreadasynchronouslyfromdisk.
AsynchronousWrites/secAsynchronousWrites/secistherateatwhichpagesarebeingwrittenasynchronouslytodisk.
BytesReceived/secBytesReceived/secistherateatwhichnetworkdata(inbytes)arebeingreceived.
BytesTransmitted/secBytesTransmitted/secistherateatwhichbytesarebeingtransmittedoverthenetwork.
CacheHits/secCacheHits/secistherateatwhichdatabasepagelookupsaresatisfiedbyfindingthepageinthecache.
CacheIndexInternalReads/secCacheIndexInternalReads/secistherateatwhichindexinternal-nodepagesarebeingreadfromthecache.
CacheIndexLeafReads/secCacheIndexLeafReads/secistherateatwhichindexleafpagesarebeingreadfromthecache.
CacheReads/secCacheReads/secistherateatwhichdatabasepagesarebeinglookedupinthecache.
CacheTableReads/secCacheTableReads/secistherateatwhichtablepagesarebeingreadfromthecache.
CacheWrites/secCacheWrites/secistherateatwhichpagesinthecachearebeingmodified(inpages/sec).
CheckpointFlushes/secCheckpointFlushes/secistherateatwhichrangesofadjacentpagesarebeingwrittenoutduringacheckpoint.
CheckpointLog/secCheckpointLog/secistherateatwhichthetransactionlogisbeingcheckpointed.
CheckpointUrgencyCheckpointUrgencyisexpressedasapercentage.
Checkpoints/secCheckpoints/secistherateatwhichcheckpointsarebeingperformed.
Commitfiles/secCommitfiles/secistherateatwhichtheengineisforcingaflushofthediskcache.
OnWindowsNTandNetWareplatforms,thediskcachedoesnotneedtobeflushedbecauseunbuffered(direct)I/Oisused.
Commits/secCommits/secistherateatwhichCommitrequestsarebeinghandled.
ContextSwitchChecks/secContextSwitchChecks/secistherateatwhichthecurrentenginethreadisvolunteeringtogiveuptheCPUtoanotherenginethread.
ContextSwitches/secContextSwitches/secistherateatwhichthecurrentenginethreadisbeingchanged.
ContinueRequests/secContinueRequests/secistherateatwhich"CONTINUE"requestsarebeingissuedtotheengine.
CorruptPackets/secCorruptPackets/secistherateatwhichcorruptnetworkpacketsarebeingreceived.
CurrentIOCurrentIOisthecurrentnumberoffileI/Osissuedbytheenginewhichhavenotyetcompleted.
CurrentReadsCurrentReadsisthecurrentnumberoffilereadsissuedbytheenginewhichhavenotyetcompleted.
CurrentWritesCurrentWritesisthecurrentnumberoffilewritesissuedbytheenginewhichhavenotyetcompleted.
CursorCursoristhenumberofdeclaredcursorsthatarecurrentlybeingmaintainedbytheengine.
StatementIssues(CONFIDENTIAL)68DirtyPagesDirtyPagesisthenumberofpagesinthecachewhichmustbewrittenoutandwhichdonotbelongtotemporaryfiles.
DiskIndexInternalReads/secDiskIndexInternalReads/secistherateatwhichindexinternal-nodepagesarebeingreadfromdisk.
DiskIndexLeafReads/secDiskIndexLeafReads/secistherateatwhichindexleafpagesarebeingreadfromdisk.
DiskReads/secDiskReads/secistherateatwhichpagesarebeingreadfromfile.
DiskSyncReads/secDiskSyncReads/secistherateatwhichpagesarebeingreadsynchronouslyfromdisk.
DiskSyncWriteOther/secDiskSyncWriteOther/secistherateatwhichpagesarebeingwrittensynchronouslytodiskforareasonnotcoveredbyother"DiskSyncWrites_____/sec"counters.
DiskSyncWritesCheckpoint/secDiskSyncWritesCheckpoint/secistherateatwhichpagesarebeingwrittensynchronouslytodiskforacheckpoint.
DiskSyncWritesExtend/secDiskSyncWritesExtend/secistherateatwhichpagesarebeingwrittensynchronouslytodiskwhileextendingadatabasefile.
DiskSyncWritesFreeCurrent/secDiskSyncWritesFreeCurrent/secistherateatwhichpagesarebeingwrittensynchronouslytodisktofreeapagethatcannotremaininthein-memoryfreelist.
DiskSyncWritesFreePush/secDiskSyncWritesFreePush/secistherateatwhichpagesarebeingwrittensynchronouslytodisktofreeapagethatcanremaininthein-memoryfreelist.
DiskSyncWritesLog/secDiskSyncWritesLog/secistherateatwhichpagesarebeingwrittensynchronouslytothetransactionlog.
DiskSyncWritesRollback/secDiskSyncWritesRollback/secistherateatwhichpagesarebeingwrittensynchronouslytotherollbacklog.
DiskSyncWrites/secDiskSyncWrites/secistherateatwhichpagesarebeingwrittensynchronouslytodisk.
Itisthesumofalltheother"DiskSyncWrites_____/sec"counters.
DiskTableReads/secDiskTableReads/secistherateatwhichtablepagesarebeingreadfromdisk.
DiskWaitreads/secDiskWaitreads/secistherateatwhichtheengineiswaitingsynchronouslyforthecompletionofareadIOoperationwhichwasoriginallyissuedasanasynchronousread.
WaitreadsoftenoccurduetocachemissesonsystemsthatsupportasynchronousIO.
DiskWaitwrites/secDiskWaitwrites/secistherateatwhichtheengineiswaitingsynchronouslyforthecompletionofawriteIOoperationwhichwasoriginallyissuedasanasynchronouswrite.
DiskWrites/secDiskWrites/secistherateatwhichmodifiedpagesarebeingwrittentodisk.
DroppedPackets/secDroppedPackets/secistherateatwhichnetworkpacketsarebeingdroppedduetolackofbufferspace.
ExtendDatabase/secExtendDatabase/secistherate(inpages/sec)atwhichthedatabasefileisbeingextended.
ExtendTemporaryFile/secExtendTemporaryFile/secistherate(inpages/sec)atwhichtemporaryfilesarebeingextended.
FreeBuffersNumberoffreenetworkbuffers.
FreelistWriteCurrent/secFreelistWriteCurrent/secistherateatwhichpagesthatcannotremaininthein-memoryfreelistarebeingfreed.
FreelistWritePush/secFreelistWritePush/secistherateatwhichpagesthatcanremaininthein-memoryfreelistarebeingfreed.
Fullcompares/secFullcompares/secistherateatwhichcomparisonsbeyondthehashvalueinanindexmustbeperformed.
IOtoRecoverIOtoRecoveristheestimatednumberofIOoperationsrequiredtorecoverthedatabase.
StatementIssues(CONFIDENTIAL)69IdleActive/secIdleActive/secistherateatwhichtheengine'sidlethreadbecomesactivetodoidlewrites,idlecheckpoints,etc.
IdleCheckpoints/secIdleCheckpoints/secistherateatwhichcheckpointsarecompletedbytheengine'sidlethread.
Anidlecheckpointoccurswhenevertheidlethreadwritesoutthelastdirtypageinthecache.
IdleWaits/secIdleWaits/secisthenumberoftimespersecondthattheservergoesidlewaitingforIOcompletionoranewrequest.
IdleWrites/secIdleWrites/secistherateatwhichdiskwritesarebeingissuedbytheengine'sidlethread.
IndexFillsIndexFillsisthenumberoftimesanewtemporarymergeindexiscreated.
IndexMergesIndexMergesisthenumberoftimesatempindexhasbeenmergedintoamainindexIndexadds/secIndexadds/secistherateatwhichentriesarebeingaddedtoindexes.
Indexlookups/secIndexlookups/secistherateatwhichentriesarebeinglookedupinindexes.
LockTablePagesLockTablePagesisthenumberofpagesusedtostorelockinformation.
MainHeapPagesMainHeapPagesisthenumberofpagesusedforglobalenginedatastructures.
MapPagesMapPagesisthenumberofmappagesusedforaccessingthelocktable,frequencytable,andtablelayout.
MaximumIOMaximumIOisthemaximumvaluethat"CurrentIO"hasreached.
MaximumReadsMaximumReadsisthemaximumvaluethat"CurrentReads"hasreached.
MaximumWritesMaximumWritesisthemaximumvaluethat"CurrentWrites"hasreached.
Multi-packetsReceived/secMulti-packetsReceived/secistherateatwhichmulti-packetdeliveriesarebeingreceived.
Multi-packetsTransmitted/secMulti-packetsTransmitted/secistherateatwhichmulti-packetdeliveriesarebeingtransmitted.
OpencursorsOpencursorsisthenumberofopencursorsthatarecurrentlybeingmaintainedbytheengine.
PacketsReceived/secPacketsReceived/secistherateatwhichnetworkpacketsarebeingreceived.
PacketsTransmitted/secPacketsTransmitted/secistherateatwhichnetworkpacketsarebeingtransmitted.
PageRelocations/secPageRelocations/secistherateatwhichrelocatableheappagesarebeingreadfromthetemporaryfile.
Pendingrequests/secPendingrequests/secistherateatwhichtheengineisdetectingthearrivalofnewrequests.
Ping1/secPing1/secistherateatwhichpingrequestswhichgoallthewaydownintotheengineareserviced.
Ping2/secPing2/secistherateatwhichpingrequestswhichareturnedaroundatthetopoftheprotocolstackareserviced.
ProcedurePagesProcedurePagesisthenumberofrelocatableheappagesusedforprocedures.
ReadHintsUsed/secReadHintsUsed/secistherateatwhichpage-readoperationsarebeingsatisfiedimmediatelyfromcachethankstoanearlierreadhint.
ReadHints/secAreadhintisanasynchronousreadoperationforapagethattheserverislikelytoneedsoon.
ReadHints/secistherateatwhichsuchreadoperationsarebeingissued.
RecoveryUrgencyRecoveryUrgencyisexpressedasapercentage.
RedoFreeCommits/secA"RedoFreeCommit"occurswhenacommitofthetransaction(redo)logisrequestedbuttheloghasalreadybeenwritten(sothecommitwasdonefor"free").
StatementIssues(CONFIDENTIAL)70RedoRewrites/secRedoRewrites/secistherateatwhichpagesthatwerepreviouslywrittentothetransactionlog(butwerenotfull)arebeingwrittentothetransactionlogagain(butwithmoredataadded).
RedoWrites/secRedoWrites/secistherateatwhichpagesarebeingwrittentothetransaction(redo)log.
RelocatableHeapPagesRelocatableHeapPagesisthenumberofpagesusedforrelocatableheaps(cursors,statements,procedures,triggers,views,etc.
).
RemoteputWait/secRemoteputWait/secistherateatwhichthecommunicationlinkmustwaitbecauseitdoesnothavebuffersavailabletosendinformation.
ThisstatisticiscollectedforNetBIOS(bothsessionsanddatagrams)andIPXprotocolsonly.
Requests/secRequests/secistherateatwhichtheengineisbeingenteredtoallowittohandleanewrequestorcontinueprocessinganexistingrequest.
RereadsQueued/secArereadoccurswhenareadrequestforapageisreceivedbythedatabaseIOsubsystemwhileanasynchronousreadIOoperationhasbeenpostedtotheoperatingsystembuthasnotcompleted.
RereadsQueued/secistherateatwhichthisconditionisoccurring.
RereceivedPackets/secRereceivedPackets/secistherateatwhichduplicatenetworkpacketsarebeingreceived.
RetransmittedPackets/secRetransmittedPackets/secistherateatwhichnetworkpacketsarebeingretransmitted.
RollbackLogPagesRollbackLogPagesisthenumberofpagesintherollbacklog.
Rollback/secRollback/secistherateatwhichRollbackrequestsarebeinghandled.
AdaptiveServerAnywhereTheAdaptiveServerAnywhereobjectprovidesinformationaboutthedatabaseserver.
SendsFailed/secSendsFailed/secistherateatwhichtheunderlyingprotocol(s)failedtosendapacket.
StatementStatementisthenumberofpreparedstatementsthatarecurrentlybeingmaintainedbytheengine.
TotalBuffersTotalBuffersnumberofnetworkbuffers.
TriggerPagesTriggerPagesisthenumberofrelocatableheappagesusedfortriggers.
UnscheduledrequestsUnscheduledrequestsisthenumberofrequeststhatarecurrentlyqueuedupwaitingforanavailableenginethread.
ViewPagesViewPagesisthenumberofrelocatableheappagesusedforviews.
Voluntaryblocks/secVoluntaryblocks/secistherateatwhichenginethreadsvoluntarilyblockonpendingdiskIO.
WaitreadFullCompare/secWaitreadFullCompare/secistherateatwhichreadrequestsassociatedwithafullcomparison(acomparisonbeyondthehashvalueinanindex)mustbesatisfiedbyasynchronousreadoperation.
WaitreadOptimizer/secWaitreadOptimizer/secistherateatwhichreadrequestspostedbytheoptimizermustbesatisfiedbyasynchronousreadoperation.
WaitreadOther/secWaitreadOther/secistherateatwhichreadrequestsfromothersourcesmustbesatisfiedbyasynchronousreadoperation.
WaitreadSysConnection/secWaitreadSysConnection/secistherateatwhichreadrequestspostedfromthesystemconnectionmustbesatisfiedbyasynchronousreadoperation.
Thesystemconnectionisaspecialconnectionthatisusedasthecontextbeforeaconnectionismadeandforoperationsperformedoutsideofaclientconnection.
WaitreadTemporaryTable/secWaitreadTemporaryTable/secistherateatwhichreadrequestsforatemporarytablemustbesatisfiedbyasynchronousreadoperation.
StatementIssues(CONFIDENTIAL)718.
16IQVersioningHowSybaseIQTracksVersionsSybaseIQassignsaversionidentifiertoeachdatabaseobjectthatexistsinthemetadata,andthathasalifespanbeyondasinglecommand.
IQusestheseversionidentifierstoensurethatwritestoanydatabaseobjectarealwaysbasedonthelatestversionoftheobject.
Itkeepseachactiveversionofadatabaseobjectondisk.
Whenanolderversionisnolongerneededbyactivetransactions,SybaseIQremovesitfromthecache.
Aversionisneededuntilthetransactionsusingitdooneofthefollowing:·Commit·Rollback·IssueaRELEASESAVEPOINTcommandreleasingthatversionIQ16hastwotypesofsnapshotversioning,table-levelandrow-level.
Thedefaultistable-levelandprovidestheversionbasedontheentiretable.
Row-levelsnapshotversioningappliesonlytotablesenabledforin-memoryRLVstorage.
Inrow-levelsnapshotversioning,multiplewritersareallowedtomakeconcurrentDMLchangestotable,butnevertothesamerowatthesametime.
sp_iqtransactionisasystemstoredprocedurewhichsuppliesinformationonthetransactionscurrentlyrunningonyourserver.
Theinformationretunedbythiscommandwillhelpdeterminethestatusofyourserver.
TherowsareorderedbyTransactionID.
Inthisdocumentwewillnotcovereverycolumnoftheoutput,butratherwewillfocusontheStateoutput.
DifferentStatesofaTransactionAsmentionedintheabovesectionsq_iqtransactionisusedtogettheinformationonthestateoftransactions.
ThisvariablereflectsinternalSAPSybaseIQimplementationdetailsandissubjecttochangeinthefuture.
·Activeindicatesthatthetransactioniscurrentlyrunning·Committingindicatesthatthetransactionisintheprocessofbeingcompleted.
·CommittedindicatesthatthetransactioniscompletedandiswaitingtobeApplied.
·Rolling_backAprocesshasbeenkilledandisintheprocessofcancellingthetransaction.
·Rolled_backAprocesshasbeenkilledandtheprocessofcancellingthetransactionhasbeencompleted.
·AppliedOnceatransactionisapplied,itisvisibletoanytransactionandissubjecttogarbagecollection.
Thepurposeofthegarbagecollectionistoreleaseresourcesnolongerinuse.
·NoneAconnectionismade,butnothingisrunning.
Thiscanbeanewconnection,whichhasnotstartedanywork,oritcouldbeacommittedtransaction,whichhasbeendropped,butisstillholdingtheversioning.
SnapshotIsolationSnapshotisolationisintendedtoeliminatetheneedforreadlocksbyensuringthateachtransactionseesaconsistentviewofthedatabase.
Theobviousadvantageisthataconsistentviewofthedatabasecanbequeriedwithoutrelyingonfullyserializabletransactions(isolationlevel3),andthelossofconcurrencythatcomeswithusingisolationlevel3.
However,snapshotisolationcomeswithasignificantcostbecausecopiesofmodifiedrowsmustbemaintainedtosatisfytherequirementsofbothconcurrentsnapshottransactionsalreadyexecuting,andsnapshottransactionsthathaveyettostart.
Becauseofthiscopymaintenance,theuseofsnapshotisolationmaybeinappropriateforheavy-updateworkloads.
Cursorsensitivity,however,determineswhichchangesarevisible(ornot)tothecursor'sresult.
Becausecursorsensitivityisspecifiedonacursorbasis,cursorsensitivityappliestoboththeeffectsofothertransactionsandtoupdateactivityofthesametransaction,althoughtheseeffectsdependentirelyonthecursortypespecified.
Bysettingcursorsensitivity,youarenotdirectlydeterminingwhenlocksareplacedonrowsinthedatabase.
However,itisthecombinationofcursorsensitivityandisolationlevelthatcontrolsthevariousconcurrencyscenariosthatarepossiblewithaparticularapplicationMoredetailspleasereferbelowlink:https://wiki.
scn.
sap.
com/wiki/display/SYBIQ/SAP+IQ+Snapshot+Versioning+ExplainedWhenthishappens,pleaseCheckthefollowinginformation:--sp_iqcontext--sp_iqconnection--sp_iqtransaction--sp_iqstatus--sp_iqversionuse--IQcfgfile--pstack-need3pstackoutputsat1minuteintervalsStatementIssues(CONFIDENTIAL)728.
17IQIndexAdvisorsp_iqindexadviceProcedureDisplaysstoredindexadvicemessages.
Optionallyclearsadvicestorage.
SQL>select*fromsa_conn_options()whereOptionNamelike'%Index_Adv%'andnumber=connection_property('Number')EnableIndexAdvisorinIQDBOption1:1.
SETOPTIONindex_advisor='ON';2.
SETOPTIONindex_advisor_max_rows=100;3.
commit;4.
;5.
callsp_iqindexadvice();Option2:1.
settemporaryoptionINDEX_ADVISOR=on;2.
settemporaryoptionINDEX_ADVISOR_MAX_ROWS=20;3.
commit;4.
--sqlstatements5.
callsp_iqindexadvice();Theabovecodedoestwothingsforyou-1.
Ittellsyouthatyouroptionaresetcorrectly.
2.
Iftablestructureisnotoptimalrelativetoquery,theadvisorshouldgivesomeadvice.
Syntaxsp_iqindexadvice([resetflag])UsageParameterDescriptionresetflagLetsthecallercleartheindexadvicestorage.
Ifresetflagisnonzero,alladviceisremovedafterthelastrowhasbeenretrieved.
DescriptionAllowsuserstoqueryaggregatedindexadvisormessagesusingSQL.
Informationcanbeusedtohelpdecidewhichindexesorschemachangeswillaffectthemostqueries.
INDEX_ADVISORcolumns:sp_iqindexadvicecolumnsColumnnameDescriptionAdviceUniqueadvicemessageNInstNumberofinstancesofmessageLastDTLastdate/timeadvicewasgeneratedExampleSampleoutputfromthesp_iqindexadviceprocedure:AdviceNInstLastDTAddaCMPindexonDBA.
tb(c2,c3)Predicate:(tb.
c2=tb.
c3)20732009-04-0716:37:31.
000ConvertHGindexonDBA.
tb.
c4toauniqueHG8122009-04-0610:01:15.
000JoinKeyColumnsDBA.
ta.
c1andDBA.
tb.
c1havemismatcheddatatypes9112009-02-2520:59:01.
000selectindex_type,index_namefromsp_iqindex('JYNC1.
ZAR004_TRF','GPART');select*fromsp_iqindexmetadata('','JYNC1.
ZAR004_TRF');sp_iqindexadvicesp_iqindexuseStatementIssues(CONFIDENTIAL)738.
18DatabaseOptionsThatGovernUserResourcesSybaseIQprovidesasetofdatabaseoptionsthattheDBAcanusetocontrolresources.
Theseoptionsarecalledresourcegovernors.
HowtoSetOptionsYoucansetdatabaseoptionsusingtheSETOPTIONstatement.
Forsyntax,seeReference:StatementsandOptions.
ResourcesThatCanBeManagedThefollowingdatabaseoptionscanbeusedtomanageresources.
·CURSOR_WINDOW_ROWS–Definesthenumberofcursorrowstobuffer.
·MAX_CARTESIAN_RESULT–LimitsthenumberofresultrowsfromaquerycontainingaCartesianjoin.
·MAX_IQ_THREADS_PER_CONNECTION–SetsthenumberofprocessingthreadsavailabletoaconnectionforuseinIQoperations.
·TEMP_CACHE_MEMORY_MB–SetsthesizeofthecachefortheIQTemporaryStore.
(Theserveroption-iqtcistherecommendedwaytosetthetempcachesize.
)·QUERY_TEMP_SPACE_LIMIT–Limitstheamountoftemporarydbspaceavailabletoanyonequery.
·QUERY_ROWS_RETURNED_LIMIT–Tellsthequeryoptimizertorejectqueriesthatmightconsumetoomanyresources.
Iftheoptimizerestimatesthattheresultsetfromthequerywillexceedthevalueofthisoption,theoptimizerrejectsthequeryandreturnsanerrormessage.
Thefollowingdatabaseoptionsaffecttheengine,buthavelimitedimpactonSybaseIQ:·JAVA_HEAP_SIZE–Setsthemaximumsize(inbytes)ofthatpartofthememorythatisallocatedtoJavaapplicationsonaperconnectionbasis.
·MAX_CURSOR_COUNT–Limitsthenumberofcursorsforaconnection.
·MAX_STATEMENT_COUNT–Limitsthenumberofpreparedstatementsforaconnection.
sp_iqshowpsexeprocedureFunctionDisplaysinformationaboutthesettingsofdatabaseoptionsthatcontrolthepriorityoftasksandresourceusageforconnections.
Syntaxsp_iqshowpsexe[connection-id]8.
19sp_iqmpxdumptlvlogprocedureReturnsthecontentsofthetableversionloginareadableformat.
Descriptionsp_iqmpxdumptlvlogreturnsthecontentsofthequeuethroughwhichthecoordinatorpropagatesDMLandDDLcommandstosecondarynodes.
Theascordescargumentsspecifytheroworder.
Theseargumentsrequirethemainargument.
Thedefaultoptionsare:'main','asc'.
ExamplesThisexampleshowstheoutputofsp_iqmpxdumptlvlog:RowIDContents1TxnCatId:196CmtId:196TxnId:195LastRec:1UpdateTime:2011-08-0815:41:43.
6212TxnCatId:243CmtId:243TxnId:242LastRec:5UpdateTime:2011-08-0815:42:25.
0703DDL:Type=34,CatID=0,IdxID=0,Object=IQ_SYSTEM_TEMP,Owner=mpx4022_w14CONN:CatID=0,ConnUser=5SQL:ALTERDBSPACE"IQ_SYSTEM_TEMP"ADDFILE"w1_temp1"'/dev/raw/raw25'FILEID16391PREFIX65536FINISH0FIRSTBLOCK1BLOCKCOUNT3276792RESERVE0MULTIPLEXSERVER"mpx4022_w1"COMMITID242CREATETIME'2011-08-0815:42:24.
86StatementIssues(CONFIDENTIAL)748.
20IQStopsProcessingorStopsRespondingYoucandetectthecauseofserverunresponsivenessbylookingintheSAPSybaseIQmessagefile.
PossibleCausesThemostcommoncausesofserverunresponsivenessinclude:·Insufficientdiskspace·Insufficientroominmainortempbuffercache,·InsufficientIQmainstoreorIQtemporarystore·CheckboththeSAPSybaseIQmessagefileandtheserverlogfile·CheckneartheendoftheSAPSybaseIQmessagefileforthemessageResourcecount0,whichmaybefollowedbyanOpenCursormessage.
Thesemessagesindicatearesourcedepletion,whichcancauseadeadlockIftheCPUusagechanges,thentheSAPSybaseIQserverprocessshouldbeprocessingnormally.
UseInteractiveSQLonaneworexistingconnectiontogatherthefollowinginformation,inthespecifiedorderCommandInformationalPurposeCHECKPOINTCheckpointcansucceedsa_conn_propertiesConnectioninformationsa_conn_infoConnectioninformationsa_db_propertiesDatabasepropertyinformationsa_eng_propertiesServerpropertyinformationsp_iqstatusDatabasestatusinformationsp_iqconnectionConnectioninformationsp_iqtransactionTransactioninformationFurthermode,usethestart_iqcommandlineoption-zandtheSAPSybaseIQdatabaseoptionQUERY_PLAN='ON'tologusefulinformationintheSAPSybaseIQmessage(.
iqmsg)andserverlog(.
srvlog)files.
Ifyoucanconnecttothedatabase,runtheIQUTILITIESbuffercachemonitoronthemainandtemp(private)buffercachesfortenminuteswithaten-secondinterval:1.
Connecttothedatabaseorusetheexistingconnection.
2.
CREATETABLEdummy_monitor(c1INT);3.
IQUTILITIESMAININTOdummy_monitorSTARTMONITOR'-append-debug-interval10-file_suffixiqdbgmon';4.
IQUTILITIESPRIVATEINTOdummy_monitorSTARTMONITOR'-append-debug-interval10-file_suffixiqdbgmon';Lettheprocessrunfor10minutes,thenstopthebuffercachemonitor:5.
IQUTILITIESMAININTOdummy_monitorSTOPMONITOR;6.
IQUTILITIESPRIVATEINTOdummy_monitorSTOPMONITOR;Formoredetailsreferbelowlink:http://infocenter.
sybase.
com/help/index.
jsptopic=/com.
sybase.
infocenter.
dc01771.
1604/doc/html/san1288043134267.
htmlStatementIssues(CONFIDENTIAL)758.
21IQDiagnosticsandHangAnalysisIQDiagnosticsandAnalysisforHungServer1)SymptomsSomeofthesymptoms,thatcouldleadyou(orusers)tothinkthatIQserverishungare:-NonewconnectionscanbemadetotheservereitherfromthesamehostmachineordifferenthostmachineoverTCP/IPnetwork.
-NotasksseemstobeworkingandthereisnonewmessagesseenintheIQserverlog(.
iqmsgfile),ifnoexistingconnectionsdoingwork.
-Themessagesappeartobesparsein.
iqmsgfile,notaskhow-eversimple,doesappeartogetcompletedinatimelymanner.
-Catalog.
dband.
logtimenotgettingupdatedonanyIQnodes.
-Hardwarebottleneck–IOstuck2)IQDiagnosticschecklistCollectandanalyzethefollowingdiagnosticinformationforallIQproblemsand/orsymptoms-Knowclearproblemdescriptionand/orexacterrormessage.
-HasanythingchangedrecentlyonIQortheOS-Itisusefultoknowdetailsliketimingoftheproblem/symptom,durationofthesymptom,whetherthereareanyrecentchangesintheenvironment.
3)DIAGNOSTICSDATANEEDEDTOANALYZETHESYMPTOMS-AnalyzetheIQlogfiles-IQMSG.
log,IQSRV.
log,STDERR.
log-AnalyzetheOperatingSystem(OS)information:version,patchlevel,Totalmemory,andnumberofCPUs/cores-DSTATo/p,NMONo/p-AnalyzetheOSerrorlogs-/var/log/messagesfromaffectednode-Knowifanyothertoolinvolvedintheproblem-GetMinimum3pstack/procstacktakenforIQserverPID,2to3minuteapart-FromCoordinatorcheck:--sp_iqmpxinfo--sp_iqcontext--sp_iqconnection--sp_iqtransaction--sp_iqstatus--sp_iqversionuse--copyoftheIQcfgfile8.
22NbitFPTheIQUNIQUEcolumnconstraintdetermineswhetheracolumnloadsasFlatFPorNBitFP.
AnIQUNIQUEnvaluesetto0loadsthecolumnasFlatFP.
Annvaluegreaterthan0butlessthantheFP_NBIT_AUTOSIZE_LIMITcreatesaNBitcolumninitiallysizedton.
ColumnswithoutanIQUNIQUEconstraintimplicitlyloadasNBituptotheauto-sizelimit.
UsingIQUNIQUEwithannvaluelessthantheauto-sizelimitisnotnecessary.
TheloadengineautomaticallysizesalllowormediumcardinalitycolumnsasNBit.
UseIQUNIQUEincaseswhereyouwanttoloadthecolumnasFlatFPorwhenyouwanttoloadacolumnasNBitwhenthenumberofdistinctvaluesexceedstheauto-sizelimits.
IQUNIQUEdefinestheexpectedcardinalityofacolumnanddetermineswhetherthecolumnloadsasFlatFPorNBit.
AnIQUNIQUE(n)valueexplicitlysetto0loadsthecolumnasFlatFP.
ColumnswithoutanIQUNIQUEconstraintimplicitlyloadasNBituptothelimitsdefinedbytheFP_NBIT_AUTOSIZE_LIMITandFP_NBIT_LOOKUP_MBoptions:FP_NBIT_AUTOSIZE_LIMITlimitsthenumberofdistinctvaluesthatloadasNBitFP_NBIT_LOOKUP_MBsetsathresholdforthetotalNBitdictionarysizeFP_NBIT_ROLLOVER_MAX_MBsetsthedictionarysizeforimplicitNBitrolloversfromNBittoFlatFPFP_NBIT_ENFORCE_LIMITSenforcesNBitdictionarysizinglimits.
ThisoptionisOFFbydefaultUsingIQUNIQUEwithannvaluelessthantheFP_NBIT_AUTOSIZE_LIMITisnotnecessary.
Auto-sizefunctionalityautomaticallysizesalllowormediumcardinalitycolumnsasNBit.
UseIQUNIQUEincaseswhereyouwanttoloadthecolumnasFlatFPorwhenyouwanttoloadacolumnasNBitwhenthenumberofdistinctvaluesexceedstheFP_NBIT_AUTOSIZE_LIMIT.
Further,referbelowWikilink:https://wiki.
scn.
sap.
com/wiki/pages/viewpage.
actionpageId=441454309andSAPNote2397157-HowtoidentifytheFPindexisanbitorflatFPindexStatementIssues(CONFIDENTIAL)768.
23PSTACKThissectionhelphowtotakepstackandanalysethethreadsinfirstglance.
$pstack>pstack.
out1//Takepstackdump$/stack_grp.
awkpstack.
out1>pstack.
1.
grp//Analayzepstacko/pfilecat"stack_grp.
awk"#!
/usr/bin/gawk-fBEGIN{nframes=0threadnum=0tnum=0}functionfinishthread(){found=0nthrframes=nframes-FIRSTFRAME[threadnum]for(tnuminSTKSIZES){if(STKSIZES[tnum]!
=nthrframes)continuetframe=FIRSTFRAME[threadnum]mframe=FIRSTFRAME[tnum]while(tframe1dstat--helpUsage:dstat[-afv][options.
.
][delay[count]]VersatiletoolforgeneratingsystemresourcestatisticsDstatoptions:-c,--cpuenablecpustats-C0,3,totalincludecpu0,cpu3andtotal-d,--diskenablediskstats-Dtotal,hdaincludehdaandtotal-g,--pageenablepagestats-i,--intenableinterruptstats-I5,eth2includeint5andinterruptusedbyeth2-l,--loadenableloadstats-m,--memenablememorystats-n,--netenablenetworkstats-Neth1,totalincludeeth1andtotal-p,--procenableprocessstats-r,--ioenableiostats(I/Orequestscompleted)-s,--swapenableswapstats-Sswap1,totalincludeswap1andtotal-t,--timeenabletime/dateoutput-T,--epochenabletimecounter(secondssinceepoch)-y,--sysenablesystemstats--aioenableaiostats--fs,--filesystemenablefsstats--ipcenableipcstats--lockenablelockstats--rawenablerawstats--socketenablesocketstats--tcpenabletcpstats--udpenableudpstats--unixenableunixstats--vmenablevmstats--plugin-nameenablepluginsbypluginname(seemanual)--listlistallavailableplugins-a,--allequals-cdngy(default)-f,--fullautomaticallyexpand-C,-D,-I,-Nand-Slists-v,--vmstatequals-pmgdsc-Dtotal--floatforcefloatvaluesonscreen--integerforceintegervaluesonscreenStatementIssues(CONFIDENTIAL)79--bw,--blackonwhitechangecolorsforwhitebackgroundterminal--nocolordisablecolors(implies--noupdate)--noheadersdisablerepetitiveheaders--noupdatedisableintermediateupdates--outputfilewriteCSVoutputtofiledelayisthedelayinsecondsbetweeneachupdate(default:1)countisthenumberofupdatestodisplaybeforeexiting(default:unlimited)SAMPLEoutput:dstat----total-cpu-usage-----dsk/total--net/total----paging-----system--usrsysidlwaihiqsiq|readwrit|recvsend|inout|intcsw5093000|154k84k|00|00|1081111613087000|00|00|00|10366968092010|08192B|00|00|10739360099001|00|00|00|10729401197020|00|00|00|125217271198010|00|00|00|112611911099000|00|00|00|10459080099000|044k|00|00|10519041199000|00|00|00|103685010100000|00|00|00|10297578.
25OSIOMonitoringCommand:topas/topiostat210ps–ealf|grepvmstat2100pstackIQ_SERVER_PID>pstack.
outmmfsadmdumpiohist>/tmp/iohist.
dmp.
1dstat1strace–f–p>strace.
out2>strace1.
errstrace-f-r-T-tt-s1024-ostrace_OUTPUT.
out-pIQ_SERVER_PID<======replacethiswithactualPIDmmdiag--iohistmmdiag--helpmmdiag--waiterQWERperformanceGuide:http://files.
qwerug.
org/presentations/2014/UG10_QWER_Performance_Session_v10.
pdfStatementIssues(CONFIDENTIAL)808.
26SAPIQReferenceGuidehttp://help.
sap.
com/iq1611current=iq16ReferSAPNote1843189-SAPSybaseIQTroubleshootinganddiagnosticscollectionchecklist8.
27IQStoredproceduresStatementIssues(CONFIDENTIAL)818.
28IQDML_OPTIONSSomeDMLoptionsexplainedinWikilink:https://wiki.
scn.
sap.
com/wiki/display/SYBIQ/DML_optionsdml_options2Page:dml_options3Page:dml_options4Page:dml_options8Page:dml_options10Page:dml_options16Page:dml_options35Page:dml_options57Page:DML_options115Others,DML_Options2=67108864//Thisoptionbypassoptimizationknownas'redundantpredicateelimination'SeeKBA2116329.
DML_Options2=8388608//Disableeliminationofredundantsort(OrderBy)nodes,SeeKBA2493710DML_Options8=8//Disableshadowparallelism,SeeKBA2493710DML_Options7=131072//Onlydisableparallelizationintheaffectedareai.
e.
NestedLoopPushdownJoinSeeKBA2326873JOIN_PREFFERECE=-4//AvoidHASHJoin,SeeKBA2333621JOIN_PREFFERECE=-5//AvoidHASHPushdownJoin,SeeKBA2513084Note:These"DML_*"areinternaldatabaseoptions,behaviorofitcanchangewithnewreleases
wordpress高级全行业大气外贸主题,wordpress通用全行业高级外贸企业在线询单自适应主题建站程序,完善的外贸企业建站功能模块 + 高效通用的后台自定义设置,更实用的移动设备特色功能模块 + 更适于欧美国外用户操作体验 大气简洁的网站风格设计 + 高效优化的网站程序结构,更利于Goolge等SEO搜索优化和站点收录排名。点击进入:wordpress高级全行业大气外贸主题主题价格:¥398...
老鹰主机HawkHost是个人比较喜欢的海外主机商,如果没有记错的话,大约2012年左右的时候算是比较早提供支付宝付款的主机商。当然这个主机商成立时间更早一些的,由于早期提供支付宝付款后,所以受众用户比较青睐,要知道我们早期购买海外主机是比较麻烦的,信用卡和PAYPAL还没有普及,大家可能只有银联和支付宝,很多人选择海外主机还需要代购。虽然如今很多人建站少了,而且大部分人都用云服务器。但是老鹰主机...
六一云互联六一云互联为西安六一网络科技有限公司的旗下产品。是一个正规持有IDC/ISP/CDN的国内公司,成立于2018年,主要销售海外高防高速大带宽云服务器/CDN,并以高质量.稳定性.售后相应快.支持退款等特点受很多用户的支持!近期公司也推出了很多给力的抽奖和折扣活动如:新用户免费抽奖,最大可获得500元,湖北新购六折续费八折折上折,全场八折等等最新活动:1.湖北100G高防:新购六折续费八折...
crontab格式为你推荐
国际域名注册顶级域名怎样注册asp主机空间Asp空间是什么空间啊?跟有的网站提供的免费空间有什么区别吗?代理主机如何将我工作的电脑设置为代理主机 让我回家以后可以用家里的电脑连接店里的主机访问网络台湾vps香港vps和台湾vps哪个好用重庆虚拟空间重庆虚拟主机租用那家好?免费网站空间哪里有永久免费的网站空间?网站空间商网站空间商怎么查询郑州虚拟主机虚拟主机哪个好点,用过的推荐下mysql虚拟主机哪些类型的虚拟主机支持数据库?最好的虚拟主机哪家的虚拟主机比较好?
独立ip空间 便宜域名注册 kddi 流媒体服务器 12306抢票攻略 天猫双十一抢红包 卡巴斯基永久免费版 共享主机 空间合租 免费私人服务器 江苏双线服务器 厦门电信 工信部网站备案查询 ledlamp 中国联通宽带测试 umax 广州服务器托管 锐速 碳云 建站技术 更多