You are on page 1of 158

Primo System Administration

Guide
Version 3.1

CONFIDENTIAL INFORMATION
TheinformationhereinisthepropertyofExLibrisLtd.oritsaffiliatesandanymisuseorabuse
willresultineconomicloss.DONOTCOPYUNLESSYOUHAVEBEENGIVENSPECIFIC
WRITTENAUTHORIZATIONFROMEXLIBRISLTD.
Thisdocumentisprovidedforlimitedandrestrictedpurposesinaccordancewithabinding
contractwithExLibrisLtd.oranaffiliate.Theinformationhereinincludestradesecretsandis
confidential.

DISCLAIMER
Theinformationinthisdocumentwillbesubjecttoperiodicchangeandupdating.Pleaseconfirm
thatyouhavethemostcurrentdocumentation.Therearenowarrantiesofanykind,expressor
implied,providedinthisdocumentation,otherthanthoseexpresslyagreeduponinthe
applicableExLibriscontract.ThisinformationisprovidedASIS.Unlessotherwiseagreed,Ex
Librisshallnotbeliableforanydamagesforuseofthisdocument,including,withoutlimitation,
consequential,punitive,indirectordirectdamages.
Anyreferencesinthisdocumenttothirdpartymaterial(includingthirdpartyWebsites)are
providedforconvenienceonlyanddonotinanymannerserveasanendorsementofthatthird
partymaterialorthoseWebsites.ThethirdpartymaterialsarenotpartofthematerialsforthisEx
LibrisproductandExLibrishasnoliabilityforsuchmaterials.

TRADEMARKS
ExLibris,theExLibrisbridge,Primo,Aleph,Alephino,Voyager,SFX,MetaLib,Verde,
DigiTool,Preservation,URM,Voyager,ENCompass,EndeavoreZConnect,WebVoyage,Citation
Server,LinkFinderandLinkFinderPlus,andothermarksaretrademarksorregistered
trademarksofExLibrisLtd.oritsaffiliates.
Theabsenceofanameorlogointhislistdoesnotconstituteawaiverofanyandallintellectual
propertyrightsthatExLibrisLtd.oritsaffiliateshaveestablishedinanyofitsproducts,features,
orservicenamesorlogos.
Trademarksofvariousthirdpartyproducts,whichmayincludethefollowing,arereferencedin
thisdocumentation.ExLibrisdoesnotclaimanyrightsinthesetrademarks.Useofthesemarks
doesnotimplyendorsementbyExLibrisofthesethirdpartyproducts,orendorsementbythese
thirdpartiesofExLibrisproducts.
OracleisaregisteredtrademarkofOracleCorporation.
UNIXisaregisteredtrademarkintheUnitedStatesandothercountries,licensedexclusively
throughX/OpenCompanyLtd.
Microsoft,theMicrosoftlogo,MS,MSDOS,MicrosoftPowerPoint,VisualBasic,VisualC++,
Win32,
MicrosoftWindows,theWindowslogo,MicrosoftNotepad,MicrosoftWindowsExplorer,
MicrosoftInternetExplorer,andWindowsNTareregisteredtrademarksandActiveXisa
trademarkoftheMicrosoftCorporationintheUnitedStatesand/orothercountries.
UnicodeandtheUnicodelogoareregisteredtrademarksofUnicode,Inc.
GoogleisaregisteredtrademarkofGoogle,Inc.

CopyrightExLibrisLimited,2011.Allrightsreserved.
Documentreleased:June12,2011
Webaddress:http://www.exlibrisgroup.com

Table of Contents
UpdatestoThisGuide ..............................................................................9
AboutThisGuide ....................................................................................11
OrganizationoftheGuide.......................................................................11
Resources ...................................................................................................12
Chapter1

SystemArchitecture ................................................................................13
Introduction...............................................................................................13
Components ..............................................................................................13
PublishingPlatform ...............................................................................15
Indexer....................................................................................................16
BackOffice..............................................................................................17
SearchFederator.....................................................................................18
SearchAgents.........................................................................................18
SearchEngine.........................................................................................18
FrontEnd ...............................................................................................18
PrimoDatabase ......................................................................................19
PhysicalViewoftheSystem ...................................................................19
OverviewofthePublishingProcess ......................................................20
PreparingtheSourceData .....................................................................21
HarvestingData.....................................................................................22
NormalizingtheHarvestedData ...........................................................22
EnrichingtheData.................................................................................23
LoadingDataintothePrimoDatabase..................................................23
ProcessingDuplicateRecords(Dedup) .................................................23
DedupProcess...................................................................................23
MergingDuplicateRecords(Dedup).....................................................24
ProcessingRecords(FRBR) ...................................................................24
OverviewoftheIndexandSearchProcess...........................................24
IndexinginPrimo ..................................................................................25
IndexingonRAMSlice ....................................................................25
IndexingonFileSystemSlice...........................................................26
Method1:AllInOne........................................................................26
Method2:2Tier/3Tier ....................................................................26
SearchinginPrimo.................................................................................26
LinguisticIssues ...............................................................................28

June 12, 2011

Primo System Administration Guide

DidYouMean .................................................................................. 29
search_schema.xml............................................................................ 29
MetasearchFunctionality ...................................................................... 32
ThirdNodeFunctionality ...................................................................... 32
SecureSocketLayer(SSL) ....................................................................... 32
Accessibility............................................................................................... 32
Chapter2

StartingandStoppingtheSystem........................................................33
SystemStartupandShutdownCommands ......................................... 33
ShuttingDownthePrimoServers ......................................................... 35
StartingUpthePrimoServers ................................................................ 36
VerifyingSystemOperation ................................................................... 37

Chapter3

OverviewofthePrimoDirectoryStructure .......................................39
Introduction............................................................................................... 39
ThePrimoRootDirectory ....................................................................... 39
TheProductionDirectory........................................................................ 40
ThePipeRunDirectory ........................................................................... 42
TheJaguarRootDirectory....................................................................... 42
JBossDirectoryStructure ........................................................................ 43
PrimoDirectoryAliases........................................................................... 45

Chapter4

PerformingSystemCleanup..................................................................47
CleanDatabaseScripts............................................................................. 47
ReIndexingtheDatabase........................................................................ 48
DeletingandReIndexingtheDatabase................................................ 50
RemovingUnwantedData...................................................................... 51
CleaningPrimoLogDirectories ............................................................. 52
CleaningApacheLogDirectories .......................................................... 53
CleaningPDSLogFiles ........................................................................... 54
DiskSpaceCommands ............................................................................ 54
CheckingDiskSpace .............................................................................. 55
FreeingDiskSpace................................................................................. 55

Chapter5

CopyingPrimoDatafromOneMachinetoAnother .......................57
Introduction............................................................................................... 57
CopyingAllConfigurationData............................................................ 57

June 12, 2011

CopyingViewConfigurationData ........................................................61
RestoringfromBackup ............................................................................63
CopyingNormalizationSets...................................................................64
Chapter6

PrimoPortConfigurations .....................................................................67
Introduction...............................................................................................67
RedirectingPorts ......................................................................................67
OverlappingServices .............................................................................68
IPTables .....................................................................................................68
IPTableExamples ..................................................................................69
Example1:Port80toPrimoFE.......................................................69
Example2:Port80toPrimoFE,Port443toPDS..........................69
Example3:Port80toPrimoFEandPDS .......................................70

Chapter7

AccessingReportsandLogFiles...........................................................73
PrimoReports............................................................................................73
AccessingPrimoLogs ..............................................................................74
PipeLogs ................................................................................................74
JBossRelatedLogs .................................................................................76
boot.log ..............................................................................................76
localhost_access_log.log ....................................................................76
library_server.log,publish_server.log,andagent_9501.log.............77
WatchdogLogs .......................................................................................79

Chapter8

ManagingthePrimoDatabase ..............................................................81
IntroductiontotheOracleDatabase ......................................................81
OracleUsersinPrimo............................................................................81
TablespacesinPrimo..............................................................................82
DatabaseSchema ......................................................................................83
P_PNXTable .........................................................................................87
DatabaseUtilities ......................................................................................89
OracleServer(UtilO/1) ........................................................................93
ActivateOracleServer(UtilO/1/1) .................................................94
CloseOracleServer(UtilO/1/2) ......................................................94
ShowRunningOracleServer(UtilO/1/3) ......................................95
ShowOracleServerStatus(UtilO/1/4) ..........................................96
OracleListener(UtilO/2)......................................................................97
ActivateOracleListener(UtilO/2/1) ..............................................98
CloseOracleListener(UtilO/2/2) ...................................................98

June 12, 2011

Primo System Administration Guide

ShowRunningOracleListener(UtilO/2/3) ................................... 99
ShowListenerStatus(UtilO/2/4) ................................................... 99
ShowListenerServices(UtilO/2/5)............................................... 101
OracleLogs(UtilO/3) ......................................................................... 103
ViewOracleALERTLOG(UtilO/3/1) ......................................... 103
NLS(UtilO/6)..................................................................................... 104
ShowNLSParameters(UtilO/6/1) ............................................... 105
Archiving(UtilO/7)............................................................................ 105
TurningArchivingOn(UtilO/7/1) .............................................. 107
TurningArchivingOff(UtilO/7/2) .............................................. 107
ShowArchivingStatus(UtilO/7/3) .............................................. 108
DatabaseUsers(UtilO/9) ................................................................... 108
ListDatabaseUsers(UtilO/9/1).................................................... 109
CreateaNewUser(UtilO/9/2) ..................................................... 110
OracleUserPasswordUtility(UtilO/11) .......................................... 113
DatabaseFiles(UtilO/13) ................................................................... 114
ListofDatabaseFiles(UtilO/13/1) ............................................... 114
ResizeOracleDatafile(UtilO/13/2) .............................................. 115
AddFiletoTablespace(UtilO/13/3).............................................. 116
ShowDatafileFreeBlocksbyKbytes(UtilO/13/4) ....................... 118
ShowDatafileFreeBlocksbyBlockID(UtilO/13/5)..................... 118
DatabaseFree/UsedSpace(UtilO/14) ................................................ 119
AllTablespacesFreeSpaceSummary(UtilO/14/1)...................... 120
NumberofFreeExtentsbySizeinaTablespace(UtilO/14/2) ..... 121
AllFreeExtentsofMinSizeinaTablespace(UtilO/14/3) .......... 122
SpaceUsedbyaRepository/RepositoriesinEachTablespace
(UtilO/14/4)................................................................................... 123
SpaceUsedbyaGroupofRepositoriesinEachTablespace
(UtilO/14/5)................................................................................... 123
CoalesceContiguousFreeExtents(UtilO/14/6) ........................... 124
PrimoTablespacesTotal/Free/UsedSpaceReport(UtilO/14/8) ... 127
CleanTemporaryTablespaceFreeStorage(UtilO/14/9) .............. 127
SpaceUsedbyaPRM00Schema(UtilO/14/10)........................... 128
DatabaseTablespaces(UtilO/17)........................................................ 128
CreateaTablespace(UtilO/17/1) .................................................. 129
ListTablespaceFiles(UtilO/17/2)................................................. 131
ShowTablespacesDefinition(UtilO/17/4) ................................... 131
ShowTablespaceAllocated/Free/UsedSpace(UtilO/17/5)........... 132
OracleStatistics(UtilO/18)................................................................ 133
PerformanceStatistics(UtilO/18/1).............................................. 134
RollbackSegmentsDefinitions(UtilO/18/2) ................................ 134

June 12, 2011

RollbackSegmentsDynamicAllocation(UtilO/18/3) ..................136
ViewLongOperations(UtilO/18/4)..............................................136
IOStatistics(UtilO/18/5)..............................................................137
SortOperations(UtilO/18/6) ........................................................137
SharedPool(UtilO/19) .......................................................................138
ShowSGABuffers(UtilO/19/1)....................................................139
FlushSharedPool(UtilO/19/2).....................................................140
MultiThreadedServer(UtilO/20) .....................................................140
ShowMTSParameters(UtilO/20/1) ............................................141
ShowListenerServices(UtilO/20/2).............................................141
Chapter9

GuidelinesforFaultTolerantConfigurations.................................143
MultipleBOConfiguration ...................................................................143
Guidelines.............................................................................................143
MultipleFrontEndConfigurations .....................................................144
ManytoOneConfiguration................................................................145
ManytoManyConfiguration.............................................................145
FailoverofanFE ..................................................................................146
ConfiguringtheFEServers .................................................................147
MultiplePDSConfiguration .................................................................147
Guidelines.............................................................................................147
LoadBalancerRequirements ................................................................148
HowDoesItWork?..............................................................................148
LoadBalancerSetup.............................................................................149
StickySessions .....................................................................................150
RemovingServersforMaintenancePurposes .....................................150
LoadBalancerMonitorGuidelines ......................................................150
LoadBalancerTestCase.......................................................................151

Chapter10

ConfiguringSSLforPrimo ..................................................................153
ImplementingSSL ..................................................................................153

Index

June 12, 2011

...................................................................................................................157

Primo System Administration Guide

June 12, 2011

Updates to This Guide


Updatedthefollowingsections:

UpdatedthelistofPrimotablespaces.Formoreinformation,see
TablespacesinPrimoonpage82.

UpdatedthePrimostartupandshutdownprocedures.Formore
information,seeStartingandStoppingtheSystemonpage33.

AddedthefollowingsectiontolistPrimosstandardsandguidelines:

June 12, 2011

Accessibilityonpage32

Primo System Administration Guide

10

June 12, 2011

About This Guide


ThePrimoSystemAdministrationGuideprovidesadetailedoverviewofthe
Primosystemanditscomponents,andinstructionsonhowtoperformsystem
administrativetasks.
Thissectionincludes:

OrganizationoftheGuideonpage11

Resourcesonpage12

Organization of the Guide


ThePrimoSystemAdministrationGuideisorganizedasfollows:

SystemArchitectureProvidesadescriptionofthelogicalandphysical
architectureofthePrimosystem.

StartingandStoppingtheSystemProvidesinstructionsforstartingand
stoppingthePrimoservers.

OverviewofthePrimoDirectoryStructureProvidesdetailsaboutthe
structureofthePrimodirectoriesandtheircontents.

PerformingSystemCleanupProvidesinstructionsoncleaningupthe
system,ifnecessary.

CopyingPrimoDatafromOneMachinetoAnotherProvides
instructionsonhowtocopyPrimoconfigurationdatatoanothermachine.

PrimoPortConfigurationsProvidesinstructionsonhowtoredirect
Primoports.

AccessingReportsandLogFilesProvidesdetailsaboutthevarious
reportsandlogfilesavailableinthePrimosystem.

ManagingthePrimoDatabaseProvidesdetailsaboutthestructureofthe
Primodatabase,thecontentsofitstables,andthevariousutilitiesavailable.

June 12, 2011

11

Primo System Administration Guide

GuidelinesforFaultTolerantConfigurationsProvidesthedetailsfor
usingmultipleserverconfigurationsandloadbalancers.

ConfiguringSSLforPrimoProvidesthedetailsforconfiguringSSLfor
Primo.

Resources
ThefollowingareotherguidesavailableforthePrimosystem:

PrimoBackOfficeGuideProvidesinformationonhowtoconfigurePrimo
datausingtheBackOfficeuserinterface.

PrimoSystemAdministrationGuideProvidesinformationonhowto
maintainPrimoservers.

PrimoInteroperabilityGuideProvidesinformationonhowtoconfigure
Primotoworkwithothersystems,suchasAleph,Voyager,andsoforth.

PrimoTechnicalGuideProvidesadvancedconfigurationinformation.

GuidelinesforUsingVirtualEnvironmentsforExLibrisProductsdocument
providesvirtualizationinformationforExLibrisproducts.

Inaddition,thefollowingWebsitesprovideaccesstouserdocumentationand
developerinformation,respectively:

12

http://docs.exlibrisgroup.com/docportal

http://www.exlibrisgroup.org/display/ElCommons/Home

June 12, 2011

1
System Architecture
Thissectionincludes:

Introductiononpage13

Componentsonpage13

PhysicalViewoftheSystemonpage19

OverviewofthePublishingProcessonpage20

OverviewoftheIndexandSearchProcessonpage24

SecureSocketLayer(SSL)onpage32

Accessibilityonpage32

Introduction
Primoprovidesuserswithauniversalsolutionforthediscoveryanddeliveryof
printanddigitalinformationsources,regardlessofformatandlocation.
Primooffersadvanced,highqualitysearchresultsbasedonexistingmetadata.
Afterfindingthedesiredmaterials,Primocanfacilitatethedeliveryofthe
physicalitemfromthelibraryorprovideimmediateaccesstodigitalcopies.
PrimoisaWebbasedsolutionthatrunsunderUNIX.Itcomeswithabuiltin
publishingplatformthatisusedtoprocessrawdata(MARC,XML,MAB,and
DublinCore)andturnitintohighquality,indexedinformationthatissavedin
PrimoNormalizedXML(PNX)format.Theprocessingofthedatasource
informationisperformedbypipesthatunderstandthevariouslibrarysource
formats.ThePNXdatacanbequicklyandefficientlysearchedbytheSearch
Engine.

Components
Primoconsistsofthefollowingcomponents:

June 12, 2011

13

Primo System Administration Guide

PublishingPlatform

Indexer

BackOffice

SearchFederator

SearchAgents

SearchEngine

FrontEnd

Database

ThefollowingfigureillustratesthelogicalviewofPrimo,includingitsvarious
components.Eachofitscomponentsisdescribedinthefollowingsections.

14

June 12, 2011

Chapter 1: System Architecture

Figure 1: Logical View of Primo System

Publishing Platform
ThePublishingPlatformenablestheinstitutiontoconsolidatethefullrangeof
institutionalresources,includingprintcollections,digitalrepositories,and
electronicresources.ThePublishingPlatformmanagestheharvestingofthis
rawdatafromvariousdatasourcesanditstransformationintohighquality,
indexedinformationthatcanbequicklyandefficientlysearchedbythePrimo
SearchEngine.ThisdataisstoredinthePrimoNormalizedXML(PNX)format.

June 12, 2011

15

Primo System Administration Guide

PrimocanharvestandnormalizeanydatainstandardXMLformat.Standard
formatsforexample,MARC,MABandDublinCorehavebuiltintemplate
mappings.Templatescanbecustomizedduringtheimplementationprocess.
Theprocessingofeachdatasourceisperformedbypipesthatrecognizevarious
sourceformats.
ThePublishingPlatformperforms:

IntelligentharvestingofdataviaFTP,filecopy,orOAI

NormalizationofthedatatothePNXformat,whichisstoredinthePrimo
database

Enrichmentbasedonalgorithmsandexternalinformation

Deduplicationbasedonalgorithms

FRBRization

TheNormalizationMappingsandEnrichmentsareconfigurableusingthe
PrimoBackOffice.ForadditionalinformationaboutthePrimoBackOffice,refer
tothePrimoBackOfficeGuide.
ThePublishingPlatformsupportsscheduledandunattendedharvestingand
processingofdifferentdataformats,whileenablinginteractivemonitoringand
controlovertheentiresetofactivities.

Indexer
TheIndexerispartoftheSearchEngineandisusedtocreateslices.TheSearch
Enginesupportsmultipleslicesofsearchdata.Slicesareanefficientwayto
allocategroupsofequalsizedchunksofmemory.
TheIndexerautomaticallyswapsitselfwithsearchmachinessothatslicescan
bemadeavailablewithoutdowntime.
TheIndexersplitstheactualdataintomanageableslices,whichareloadedinto
memory.Eachsliceissearchedbyadedicatedthread;however,multipleslices
canresideonthesamemachinesothatallCPUsareutilized.Multiplemachines
maybeusedsothatthesystemisnotlimitedtothememoryofonemachine.

16

June 12, 2011

Chapter 1: System Architecture

ThefollowingfigureillustratestheindexingprocessinthePrimosystem.
Figure 1:

Figure 2: Logical View of Primo System Indexing

Formoreinformationabouttheindexingprocessandswapping,referto
OverviewoftheIndexandSearchProcessonpage24.

Back Office
ThePrimoBackOfficeenablesconfigurationandmonitoringofallPrimo
componentsinaneasytousegraphicalinterface.
TheconfigurationofPrimointheBackOfficeisorganizedbythelifecycleof
Primo,andincludes:

Initialconfiguration

Ongoingmaintenance

June 12, 2011

17

Primo System Administration Guide

Inaddition,youcanconfigureelementsofthesystemindividuallybyaccessing
themthroughtheappropriatewizard.Asitemapisprovidedfordirectaccessto
theindividualtasksfortheadvanceduser.Foradditionalinformationaboutthe
PrimoBackOffice,refertothePrimoBackOfficeGuide.

Search Federator
TheSearchFederatorcoordinatesthesearch,utilizingallslices,andcombines
thesearchresultsintoaunifiedresultset.

Search Agents
Searchagentsarelocatedonremotemachines.Theseagentsstopandstartthe
searchinstanceandtheindexingprocess.Whenanagentstarts,itsendsa
registrationrequesttotheFederator.TheagentandtheFederatorcommunicate
usingtheJavaRMIprotocol.

Search Engine
ThePrimoSearchEngineretrieveslibrarymetadatafromthelocalPNX
databasetableandtransformsitintousefulinformation.TheSearchEngine
extendsLucenefunctionalityandsupportsmultipleslicesforverylargedata
sets.TheseslicesarepreparedbytheIndexer.Eachsliceissearchedbya
dedicatedthread;however,multipleslicescanresideonthesamemachine,so
thatallCPUsareutilized.Multiplemachinesmaybeusedsothatyouarenot
limitedtothememoryofonemachine.
Searchfunctionalityincludesfacetednavigation,didyoumeansuggestions,
paging,andsorting.

Front End
ThePrimoFrontEnduserinterfaceisresponsibleforallinteractionswiththe
enduser.Itisasearchtoolthatisbothpowerfulandeasytouse.Each
institutioncanhaveitsownfullycustomizedview.Everyviewcanhaveoneor
moretabs.TabsenableasitetodividethePrimorepositoryandrecordsfrom
remoteresourcesintoresourcegroupsortypes.Withinatab,severalsearch
scopescanbedefined.Searchscopesgrouprecordssotheycanbesearched
together.
UsingtheFrontEnduserinterface,theendusersearchesthePNXdatabase
tableforrelevantitems.Afterdiscovery,Primoindicatestheavailabilityofthe
resourceinthesourcesystemandinteractswiththesourcesystemtoprovide
moreinformationabouttheresourceordeliverstheresourcetotheenduser.
TheFrontEndgeneratestheactualHTMLpagesviewedbytheenduser.

18

June 12, 2011

Chapter 1: System Architecture

ThefollowingfigureillustratesthequeryingprocessinthePrimosystem.

Figure 3: Logical View of Primo System Queries

Primo Database
ThePrimodatabaseisbasedonOracle11gR2RDBMS.TheOracledatabase
containsthefollowingprimarytypesofcontent:

PrimoPNXrecordsandusercontributedinformation(suchasreviewsand
tags).

Monitoringinformation,includingstatistics,detailedinformationon
searches,andsoforth.

Primoconfigurationinformation.

Physical View of the System


Thesystemincludesthefollowingsoftwarecomponents:

PublishingPlatformandPrimoBackOfficeonaJBossserver.

FrontEnd,SearchFederator,andSearchManageronaJBossserver.

SearchAgents(includingIndexers)onanRMIserver.

SlicesonanRMIserver.

PrimodatabaseonanOracledatabaseserver.

June 12, 2011

19

Primo System Administration Guide

ThePrimosoftwarecontainsfourdifferentprocessesasshowninthefollowing
figure.
Theprocessescanrunondifferentmachines,thesamemachine,orsomeonthe
samemachineandtherestondifferentmachines.Usually,itisrecommendedto
havetheOracleandtheJBossPublishingPlatformPrimoBackOfficeonone
machineandtheJBossFrontEndandtheRMISearchServeronanother
machine.

Figure 4: Physical View of Primo System

Overview of the Publishing Process


ThePublishingProcessistheprocessthatPrimousestoretrieveandprocess
datafromexternallibrarysystems.Thisprocessinvolvesanumberofsteps,
whichareoutlinedinthefollowingfigure.

20

June 12, 2011

Chapter 1: System Architecture

Figure 5: Publishing Process

Eachofthestepsinthepublishingprocessisdiscussedindetailinthefollowing
sections.

Preparing the Source Data


BeforePrimobeginsharvestingdata,thesourcesystemmustpreparethe
following:

Thecompletedatasourcefortheinitialharvestingofthedata.

Adeltaofthedata,includingonlychangedrecords(new,updated,and
deleted),fortheongoingupdateofthedatabase.

AlltheinformationtobecontainedinthePNXdatabasetableshouldbe
includedinasinglerecordthatcanbeidentifiedbyauniqueandpersistentID.
Thismeansthatanyinformationthatisrelatedtothemainrecord(forexample,
holdingsinformationrelatedtothebibliographicrecord)mustbeaddedtothe
extractedrecord.
Thestructureoftherecordmustconformtooneofthefollowingformats:

MARCXML(http://www.loc.gov/standards/marcxml/).

DublinCoreXML(http://dublincore.org/documents/dcxmlguidelines/).

June 12, 2011

21

Primo System Administration Guide

NOTE:
TherecordcanincludenonstandardMARCorDublinCorefields,
includingnonnumericcodesforMARC.

Harvesting Data
Asinglesourcesystemcancontainseveraldatasources,suchasthefollowing
systems:

ForSFX,PrimomayharvestasingleSFXinstance,butasingleSFX
installationmayincludeseveraldatasources(thatis,instances).

ForAlephandVoyager,everybibliographicdatabaseisaseparatedata
source,butasingleinstallationofAlephorVoyagermayincludeseveral
bibliographicdatabasesthatareharvestedbyPrimo.

Theharvestingstageisthefirststepinthepublishingpipe.Primosupports
severalharvestingmethods,including:

FTP/SFTPHarvestingPrimocanharvestfilesfromaremoteserver.To
performFTPharvesting,Primomustbeabletoaccesstheserverusingthe
serverIP,thedirectoryname,username,andpassword.Forongoing
harvesting,Primoretainsthedateandtimeofthelastharvest.
ThePublishingPlatformharvestsallfileswithaservertimestampgreater
thanthelastharvestingdate.Filenamesmustbeunique.Optionally,thefile
canbedeletedonceitwassuccessfullyharvested.

CopyHarvestingPrimocanharvestfilesbycopyingfilesfromany
mounteddrive.Toperformcopyharvesting,PrimomusthaveREAD
permissionforthedirectory.

OAIHarvestingPrimocanharvestrecordsfromanOAIserverbysending
anOAIPMHrequestandprocessingtherecordsthataresentinresponseto
therequest.ToperformOAIharvesting,PrimoneedstheOAIserverIP
addressandportnumber,aswellastheOAIsettoharvest.Forongoing
harvesting,Primoretainsthedataandtimeofthelastrequest.

Normalizing the Harvested Data


Beforebeginningthenormalizationstage,recordsareclassifiedasfollows:

22

Normalrecordsincludenewandupdatedrecordsfromthedatasourcethat
needtobenormalizedandenrichedbeforebeingloadedtothepersistence
layer.

Deletedrecordsarerecordsthatweredeletedinthedatasourceandneedto
bedeletedfromthepersistencelayer.Theserecordsaredeleteddirectly
fromthepersistencelayeranddonotgothroughthenormalizationand
enrichmentstages.

June 12, 2011

Chapter 1: System Architecture

Recordsaredividedintogroupscalledbulks.Thedefaultbulksizeisupto1,000
records.Bulksarezippedinordertoreducethefilecountandthewrittendata
sizes,aswellasimproveperformance.
Inthenormalizationprocess,thesourcerecordsareconvertedtothePNX
formatusingthenormalizationmappingsetofthepipe.Formoreinformation
aboutthePNXformat,refertothePrimoTechnicalGuide.

Enriching the Data


Oncetherecordsarenormalized,theymaybeenrichedwithadditionaldata.
Everypublishingpipecanbeassignedanenrichmentset,whichincludesoneor
moreenrichmentroutines.

Loading Data into the Primo Database


Oncerecordshavebeennormalizedandenriched,theyareloadedintothePNX
tableinthePrimodatabase.ThePNXtableisanOracledatabasetableinwhich
thePNXrecordsarestoredbeforetheyareretrievedandloadedtotheSearch
Engine.TheduplicaterecorddetectionprocessisalsohandledinthePrimo
database.ThePrimodatabasehasanumberoftables,whichstorevarioustypes
ofdatausedinPrimo.

Processing Duplicate Records (Dedup)


Duringtheduplicaterecorddetectionprocess(Dedup),thepublishingplatform
locatesduplicaterecordsandassignsthemthesamematchID.Thisisperformed
byusingtheDedupvectorofthePNXrecord.Formoreinformationaboutthe
Dedupprocessandthematchingalgorithms,refertotheDuplicateDetection
ProcesssectioninthePrimoTechnicalGuide.

Dedup Process
ThepersistencelayerduplicationdetectiondatabasestorestheDedupvector.
Oncethevectorisstoredinthedatabase,itisremovedfromthenormalized
record.Partofthevectorisindexedinordertolocatecandidatesforamatch.
Whenarecordismatchedagainstthedatabase,thesystemfirstattemptstofind
amatchbasedontheRecordID.Ifamatchisnotfound,therecordisnewand
thesystemtriestofindamatchingrecordbasedonthevector.Ifamatchis
found,therecordisassignedtheMatchIDoftherecordwithwhichitis
matched.Onceamatchisfound,thematchingprocessstops.Ifamatchisnot
found,therecordisassignedanewMatchID.
IfthereisamatchontheRecordID,thesystemcomparesthevectorinthe
incomingrecordwithitsvectorinthedatabase.Ifthevectoristhesame,the
recordisassigneditspresentMatchID.Ifitisnotthesame,therecordistreated

June 12, 2011

23

Primo System Administration Guide

asanewrecord(theMatchIDisremoved)andthesystemtriestofindita
matchingrecord.
ItisimportanttodistinguishbetweentheinitialandongoingDedupprocess.
Duringtheinitialpublishingstage,alldatasourcesarefirstloadedtothe
persistencelayer,andonlywhenallrecordshavebeenloaded,willthe
duplicatedetectionprocessstart.Intheongoingpublishingstage,theduplicate
detectionprocessisrunaspartofeverypipe.Thedifferenceisduetothefact
thatintheinitialpublishingstage,theDedupisruninmultiprocessingmodeto
savetime,whileinongoingpublishingstage,everyrecordisDeduped
sequentially.

Merging Duplicate Records (Dedup)


OnceallmatchingrecordsarelocatedintheDedupprocess,thesystemcreatesa
mergedrecord.

Processing Records (FRBR)


Thegroupingprocess(FRBR)isbasedoncreatingavectorforeveryrecord.The
vectorincludesoneormorekeysthatidentifytheworkitrepresents.Records
thathaveamatchingkey(Primoattemptstomatchallkeysintherecord)are
addedtoagroupandareassignedtheIDofthegroup(frbrID).Eachrecordcan
belongtoonlyonegroup.Inotherwords,oncearecordismatchedwithan
existinggroup,Primoterminatesthegroupingprocessforthatrecord.
PrimocreatesamergedrecordfortheFRBRgroup.UnliketheDedupedmerged
record,theSearchEngineretrievesandindexesboththemergedFRBRrecord
andtheindividualrecordsintheFRBRgroup.

Overview of the Index and Search Process


AllnewdatamustbeindexedonceithasbeenprocessedbythePublishing
Process.Thisindexeddataisaccessedwhenthesystemperformsasearch.
EachSearchEnginemachineconsistsofoneormoreslices,whichistheatomic
entityoftheSearchEngine.Primoimplementsthefollowingtypesofslices:

RAMbasedslicesmatchrelativelysmalldocumentcollections(backward
compatiblewithPrimoVersion1.x).

Filesystembasedslicesmatchlargedocumentcollectionsandhavelower
memoryconsumption.

Thetypeofslicedefinesthesearch,theindexingtechnique,andthehotswap
behavior.

24

June 12, 2011

Chapter 1: System Architecture

Indexing in Primo
ThefollowingfigureisanexampleofhowPrimoindexesdata.

Figure 6: Indexing in Primo

TheindexingprocessinPrimoconsistsofthefollowingmainphases:

IndexingTheIndexManagertakestheXMLrecordsandparsesthem.It
thenwritesthemtoatemporaryfolder(<path>.mir)andindexesthem.
Duringtheindexing,thePNXtokensarenormalized(conversionto
lowercasecharacters,removalofpunctuation,andsoforth).

OptimizationThesystemoptimizestherecordsintoasinglefilefor
performancepurposes.

MirroringTheindexedrecordsarecopiedtoadirectoryfromwhichthe
sliceloads.

SwapThisphasereplacestheoldindexeswiththenewindexeswithno
downtime.HotswapisdoneontheredundantmachinefortheN+1Agent
topologyandtheslicemachinefortheN+1Slicetopology.

Indexing on RAM Slice


Thefollowingindexingphasesrunsequentially:Indexing,Optimization,
Mirroring,andSwap.Afterindexingcompletes,aredundantsliceisloadedto
RAMandfacetcacheisprepared.Oncethenewsliceisready,search
functionalityismovedtothenewsliceandtheoldsliceisshutdown.Ifthe
processfailsduringtheIndexingorOptimizationphases,themirrordirectoryis
restoredfromthemaindirectory.

June 12, 2011

25

Primo System Administration Guide

Indexing on File System Slice


Thisindexingmethodisintendedforlargedocumentcollectionsthatcreate
largeindexingfiles.Theindexingphasesoperateasfollows:Theindex
directoriesareplacedinanNFSfile.Theindexerplacesacopyofthemirror
directoryinthelocalpath(directattachedstorage).Afterindexingisperformed
inamirrordirectory,thenewindexiscopiedtothemaindirectory,where
optimizationisperformedonboththemainandmirrorfolders.Whennew
indexesareready,aredundantsliceiswarmedup,usinghighfrequencyterms
fromtheindextoprovidebettersearchperformance.Oncethenewsliceis
ready,searchfunctionalityismovedtothenewslice.
ThetopologytypeoftheSearchEnginedetermineswheretheindexingandhot
swapoperationswilltakeplace.

Method 1: All In One


WhenPrimoneedstocreateanewindex,theFrontEnd(FE)activatestheAgent
managertopreparetheindex.Oncetheindexisready,theFEactivatesthe
agenttostartupanewslicethatis,toloadanewindex.Oncethenewsliceis
running,theFEwillusethenewsliceandtheSearchenginewillshutdownthe
oldslice.

Method 2: 2-Tier/3-Tier
WhenPrimoneedstocreateanewindex,theFEactivatestheAgentmanageron
theBackOfficetopreparetheindex.Onceindexisready,theFrontEndwill
activateanadditionalAgentresidingontheSearchengineandinstructsitto
startupthenewslice,thatis,toloadanewindex.Oncethenewsliceisrunning,
theFEwillstarttousethenewsliceandtheSearchenginewillshutdownthe
oldslice.

Searching in Primo
Primousesthefollowingtypesofsearchestoenhancesearchperformance:

RAMslicesearchesusetheLuceneRAMDirectoy,whichloadstheindex
intoRAM,sothatsearchoperationsareperformeddirectlyfromRAM.This
provideshighersearchperformance;however,operationofthismode
requirestheavailableRAMtobeatleast2.4timestheindexsize.

FilesystemslicesearchesutilizesOSinmemorydiskcachetoachieve
performancelevelssimilartothatoftheRAMslicesearch.Thisdependson
theunderlyingimplementationofbufferingintheoperatingsystem.
BecauseofNFScachelimitations,itishighlyrecommendedtousedirect
attachedstoragefortheSearchengineservers.Theserverswillcopythe
slicefromtheNFStotheirlocaldisk.

WhenauserperformsasearchinthePrimoFrontEnd,theSearchEnginesends
aquerytoallregisteredslices(notviatheagentontheslicemachine).Theslice

26

June 12, 2011

Chapter 1: System Architecture

searchesitsindexinRAMandreturnsthetop200IDs,theirscores,andstatuses
totheFederator.Atthesametime,theslicebeginscalculatingfacets,using
anotherthread.TheSearchManagermergestheresultsfromalloftheslicesand
doesthefollowing:

Addssynonymsofeachwordbeingsearchedfortothequery.Thesystem
searchesforthesynonymsaswellasthewordsspecifiedinthequerybythe
user.

Takesthetoptenvalues(accordingtoscores)andrequeststhefullrecords
fromthePNX.Itreceivestherecordsandstorestheserecordstobe
displayedtotheuserintheFrontEnduserinterface.

Whenthesearchresultsineithernoorveryfewrecords,Primosearches
againusingstemminginordertoretrieveadditionalrecords.

Mergesallrecordsandretrievesthetop200mergedresults.Itthensendsthe
facetsoftheserecordstotheappropriateslices.Theslicescalculatehow
manytimestheserecordsappearintheentireresultsetandreturnthis
informationtotheSearchManager.

Searchesforspecificstaticfacetsinadditiontothe200facetssearchedfor
basedonthesearchquery.

Retrievesanaccuratecountoffacetvalues.ItthensendsthefullPNX
recordsandthefacetinformationforthetoptenvaluestotheFrontEnd
userinterface.

Figure 7: Search Process

June 12, 2011

27

Primo System Administration Guide

TheFederatorusesthehostmachineandportinformationin
search_schema.xmlwhenitperformsasearch(refertosearch_schema.xmlon
page29).
Agentsarerunseparately.Whenanagentbeginsrunning,itregisterstothe
SearchEngine.EachsliceisassignedauniqueIDwithinthesystem.Thepathis
thelocationofthedirectoryfromwhichthesliceisloading.
ThePrimoN+1topologyprovidesafailovercapabilityinsearchserversto
ensurecontinuousavailabilityofsearchoperations.Whenasystemfailureis
detectedononeofthesearchservers,theindexerwillautomaticallycopythe
failedsliceandstartupareplacementSearchengine,whichmaytakeafew
minutes.UntilthenewSearchserverstarts,theexisitingserverswillcontinueto
processPrimosearches,buttheresultswillnotbe100percentcomplete.Once
thereplacementindexerisupandrunning,thesearcheswillresumefull
accuracy.
NOTES:

ForN+1topologiesthathaveasingleslice(N=1),Primosearcheswillnot
beprocesseduntiltheindexerstartsupthefailedslice.

Untilareplacementofthefailedserverisupandrunning,thesystemwill
notbeabletorunindexingorswapping.

Inallothertopologies,themonitorautomaticallytriestorestartthesliceand
sendsanemailnotificationtotheSystemAdministratorwhenaearchengine
failureoccurs.
Filtersareusedasconstraintsthatareaddedtothesearchandareusedforquick
matches(thisisthesameasusingtheDeploybuttonintheBackOffice
interface).

Linguistic Issues

28

PrimolinguisticallysupportsEnglish,German,French,andDanish
languagesbycreatingdictionariesperlanguage(ifavailable)forthe
following:recognition,stopwordlists,specialstemmingalgorithm,
misspelledwords,synonyms,pluralizationalgorithm,andphonetic
algorithmfordidyoumeansuggestions.

Primocreatesindexesforstopwordstoallowenduserstosearchphrases
thatcontainstopwords.

Primodefinesasynonymcollectionperlanguage.Administratorscan
extendthiscollectionbyupdatingtheuser_synonymfile.

June 12, 2011

Chapter 1: System Architecture

Did You Mean


Iftheconfiguredresultthresholdisnotmet,thedidyoumeanfunctionality
isactivatedforthesearch.Thedidyoumeanismadeupofthefollowing:

Metaphoneanddoublemetaphonealgorithmstakewordsandencode
them.

Ngramencoding(forexample,peoplepeple,pople,andsoforth).UsingN
gramencoding,thesystemcheckshowclosethewordbeingsearchedforis
tothecandidate.

Textfilesofcommonlymisspelledwordsandhomonyms(currently
availableinEnglishonly).

ThemetaphoneandNGramrepositoriesarebasedontheregularindexand
areextendedwithphrases/typographical/grammaticalmistakesthatare
learnedfromthesearchstatistics.

NOTE:
Ifthewordexistsinthedictionary,theDidyoumeanlinkisnot
displayedintheFrontEnd.
InadditiontosearchinginthelocalPNXdatabase,Primosearchesonremote
repositoriesusingMetaLib.
Theactualdatatobesearchedissplitintomanageableslices.Theseslicesare
preparedbytheIndexer.Eachsliceissearchedbyadedicatedthread,but
multipleslicescanresideonthesamemachinesothatallCPUsareutilized.In
addition,multiplemachinesmaybeusedsothatthesearchprocessisnot
limitedtothememoryofonemachine.
TheFederatormanagesthedispersalofthesearchtoallslicesandthefederation
oftheresultsintoaunifiedresultset,whichisreturnedtotheFrontEndand
displayedtotheuser.

search_schema.xml
Thesearch_schema.xmldefinesthenumberandlocationofeachslice.
To view the file:
Enterthefollowingcommandstoviewthesearch_schema.xmlfile:
se_conf
vi search_schema.xml

June 12, 2011

29

Primo System Administration Guide

Thefollowingisasamplesearch_schema.xmlfile:
<?xml version="1.0" encoding="UTF-8"?>
<search_schema version="1.0" xmlns="http://www.exlibrisgroup.com/
xsd/jaguar/search_schema">
<federator>
<facet_count>250</facet_count>
<min_res_for_stemming>25</min_res_for_stemming>
<max_facets_to_sumup>50000</max_facets_to_sumup>
<max_results_stemming>25</max_results_stemming>
<enable_warmup>true</enable_warmup>
<warmup_queries_number>500</warmup_queries_number>
<cache_results>true</cache_results>
<didymean_threshold>
<res_threshold>50</res_threshold>
<score_threshold>0.75</score_threshold>
</didymean_threshold>
<synonyms>
<levels>
<level desc="very high">0.8</level>
<level desc="high">0.1</level>
<level desc="normal">0.01</level>
<level desc="low">0.005</level>
<level desc="very low">0</level>
</levels>
<threshold>normal</threshold>
</synonyms>
</federator>
<didymean>
<preferred_result>sx&lt;/preferred_result> &lt;!-- sx/ngram
--></preferred_result>

30

June 12, 2011

Chapter 1: System Architecture

<!-- sx/ngram -->


<sx_threshold>0.975</sx_threshold>
<ngram_threshold>0.65</ngram_threshold>
<freq_threshold>5</freq_threshold>
<!-- minimum occurences a suggestion must appear in data -->
<candidates_to_examine>20</candidates_to_examine>
<field>title</field>
<dictionary_languages>eng</dictionary_languages>
<advanced_merge_factor>500</advanced_merge_factor>
<advanced_merge_docs>500</advanced_merge_docs>
<validate_didymean>true</validate_didymean>
<add_search_statistics>true</add_search_statistics>
<search_statistics_fetch_param>all</
search_statistics_fetch_param>
<!-- search_statistics_fetch_param can be one of 3 things:
1) all = all the words will be fetched
2) a positive number x = x last searched words will be
fetched
3) a date in the format dd/mm/yyyy = all the searched words
from the date inclusively will be fetched -->
</didymean>
<filters>
<filter>scope:(north)</filter>
<filter>scope:("kings")</filter>
<filter>facet_frbrtype:(7 OR 6)</filter>
</filters>
<repository active="true">
<path>/exlibris/primo/indexes</path>
</repository>
<agents desc="collections of all search instances to be searched
by jaguar" auto_deploy="active" swapping_type="agents">
<agent port="9501" host="il-primo06.corp.exlibrisgroup.com"
connection_type="remote" active="true">
<slices slice_count="2" name="main" active="true"
xmlns="http://www.exlibrisgroup.com/xsd/jaguar/search_schema">
<slice id="1">
<path>/exlibris_primo/inst_1_index</path>
<load2ram>false</load2ram>
</slice>
<slice id="2">
<path>/exlibris_primo/inst_2_index</path>
<load2ram>false</load2ram>
</slice>
</slices>
</agent>
<agent port="9501" host="il-primo04.corp.exlibrisgroup.com"
connection_type="local" active="true">
<slices slice_count="0" name="main" active="true"
xmlns="http://www.exlibrisgroup.com/xsd/jaguar/search_schema"/>
</agent>
</agents>
<multiple_front_ends>
<mfe_master>il-primo04.corp.exlibrisgroup.com:2701</
mfe_master>

June 12, 2011

31

Primo System Administration Guide

<mfe_slaves>il-primo04.corp.exlibrisgroup.com:2701</
mfe_slaves>
<mfe_config>none</mfe_config>
</multiple_front_ends>
</search_schema>

Metasearch Functionality
PrimousesMetaLibasametaSearchEngine,viatheMetaLibXServer.Primo
sendsMetaLibalistofresourcesandaqueryandreceivesalistofresultsas
MARCrecords.EachresultincludesanOpenURL.Primothenconvertsthe
metasearchMARCrecordstoPNXrecordsusingtheontheflyMetaLibpipe.
Whenrelevant,themetasearchresultsareaddedtothelocalresultsandthe
mergedlististhendeduplicatedandranked,andfacetsarecalculated.

Third Node Functionality


Inadditiontolocalandremotesearch,Primosupportsplugincapabilitiesof
thirdpartysearchfunctionswithinthePrimoapplication.Thisfeatureallows
enduserstoutilizethestrengthofthePrimotoolset(lookandfeel,caching,
facetinghighlighting,statistics,eshelf,tagging,andreviews)withtheirsearch
methodsorspecialresources.

Secure Socket Layer (SSL)


SSLisaTransportlayerprotocolthatprovidessecurecommunicationsoverthe
Internet.FormoreinformationonimplementingSSL,refertothePatron
DirectoryServiceGuide.

Accessibility
PrimocomplieswiththefollowingHTMLstandardsandguidelines:

XHTML1.0Transitional

WCAG2.0GuidelinesPriority2(withexceptions)

Section508(withexceptions)

CSSlevel3

TheW3CWebContentAccessibilityGuidelines1.0,LevelA

Inaddtion,thefollowingtoolwasusedtovalidatePrimosWebpages:

32

TotalValidatorhttp://www.totalvalidator.com/

June 12, 2011

2
Starting and Stopping the System
Thissectionprovidescommandstostartandstopthesystemservers.
Thissectionincludes:

SystemStartupandShutdownCommandsonpage33

ShuttingDownthePrimoServersonpage35

StartingUpthePrimoServersonpage36

VerifyingSystemOperationonpage37

System Startup and Shutdown Commands


Thefollowingtableliststhealiasesandscriptsthatareusedtostartuporshut
downthevariousservers(suchastheBackOfficeandFrontEndservers)used
withPrimo:
Table 1. Primo Startup and Shutdown Commands

Alias/Script

Description

be_start

StartstheBackOffice(BO)server.

be_stop

StopstheBO.

be_restart

StopsandstartstheBOserver.

fe_start

StartstheFrontEnd(FE)server.NotethattheFE
serversmustbeupandrunningbeforeyoucanstart
theSEservers.

fe_stop

StopstheFEserver.

June 12, 2011

33

Primo System Administration Guide

Table 1. Primo Startup and Shutdown Commands

Alias/Script

Description

fe_restart

StopsandstartstheFEserver.

NOTE:
Becausethiscommandmayrestartyourserver
beforeithasfinishedshuttingdown,ExLibris
recommendsusingthefollowingcommandsto
restarttheFE:
fe_stop
fe_start
se_start

StartstheSearchEngine(SE)server.

se_stop

StopstheSEserver.

se_restart

StopsandstartstheSEserver.

NOTE:
TheFEserversmustbeupandrunningbefore
youcanstarttheSEservers.

34

start_apache

StartsthePDSApacheserver.

stop_apache

StopsthePDSApacheserver.

wd_start

StartstheWatchdogmonitor.

wd_stop

StopstheWatchdogmonitor.

$primoe_root/
primo_startup_all

StartsthegeneralPrimostartupscript.

$primoe_root/
primo_shutdown_all

StartsthegeneralPrimoshutdownscript.

June 12, 2011

Chapter 2: Starting and Stopping the System

Shutting Down the Primo Servers


ThisproceduredescribesthestepsusedtostartupPrimoforsingleand
multipleservertopologies.
IMPORTANT:
Theorderinwhichtheserversareshutdownisimportantandshouldbe
appliedtosingleservertopologiesaswell.
To shut down the Primo servers:
1

EnterthefollowingcommandtostopthePrimoApacheserver:
stop_apache

IfyouarereceivingPrimorequestsonHTTPport80,loginastherootuser
andenterthefollowingcommandstostoptheApacheserver:
apcb
./apachectl stop

NOTE:
IftheApacheserverisnotrunning,youwillseeandcanignorethe
followingerrormessage:
./apachectl stop: httpd (no pid file) not running

ShutdowntheBackOffice(BO)servers:
a

EnterthefollowingcommandtostoptheBO:
be_stop

b
3

RepeatthesestepsforeachBOinyourPrimotopology.

ShutdowntheFrontEnd(FE)servers,startingwiththemasterFE:
a

EnterthefollowingcommandtostoptheFE:
fe_stop

b
4

RepeatthesestepsforeachFEinyourPrimotopology.

ShutdowntheSearchEngine(SE)servers:
a

EnterthefollowingcommandtostoptheSE:
se_stop

June 12, 2011

RepeatthesestepsforeachSEinyourPrimotopology.

35

Primo System Administration Guide

Starting Up the Primo Servers


ThisproceduredescribesthestepsusedtostartupPrimoforsingleand
multipleservertopologies.
IMPORTANT:
Theorderinwhichtheserversarestartedupisimportantandshouldbe
appliedtosingleservertopologiesaswell.
To start up the Primo servers:
1

StartuptheBackOffice(BO)servers:
a

EnterthefollowingcommandtostartuptheBO:
be_start

b
2

RepeatthesestepsforeachBOinyourPrimotopology.

StartuptheFrontEnd(FE)servers,startingwiththemasterFE:
a

EnterthefollowingcommandtostartuptheFE:
fe_start

b
3

RepeatthesestepsforeachFEinyourPrimotopology.

StartuptheSearchEngine(SE)servers:
a

EnterthefollowingcommandtostartuptheSE:
se_start

RepeatthesestepsforeachSEinyourPrimotopology.

NOTE:
TheFEserversmustbeupandrunningbeforeyoustarttheSEs.
4

EnterthefollowingcommandtostartthePrimoApacheserver:
start_apache

IfyouarereceivingPrimorequestsonHTTPport80,loginastherootuser
andenterthefollowingcommandstostarttheApacheserver:
apcb
./apachectl_auto

36

June 12, 2011

Chapter 2: Starting and Stopping the System

Verifying System Operation


ThisprocedureverifiestheoperationoftheBO,FE,andSEserversafterthey
havebeenrestarted.
To verify that the system is working correctly:
1

Openthesearchuserinterface.

Performasearch.

OpentheBackOfficeuserinterface.

Checkthedashboard(refertoDashboardMonitoringinthePrimoBack
OfficeGuide).

Checkthesystemreports(refertoAccessingReportsandLogFileson
page73).

June 12, 2011

37

Primo System Administration Guide

38

June 12, 2011

3
Overview of the Primo Directory Structure
Thissectionincludes:

Introductiononpage39

ThePrimoRootDirectoryonpage39

TheProductionDirectoryonpage40

ThePipeRunDirectoryonpage42

TheJaguarRootDirectoryonpage42

JBossDirectoryStructureonpage43

PrimoDirectoryAliasesonpage45

Introduction
TherootdirectoryofthePrimosystemis/exlibris/primo/p<r>_<x>/.You
caninstallseveralinstancesofthePrimosystemonasingleserver.Forexample,
youmayinitiallyinstallaninstanceofPrimofortestingpurposes,aswellasa
productioninstance.The<r>indicatesthereleaseinwhichPrimowasinitially
installedand<x>indicatestheinstancenumberoftheinstallation.
ThePrimosystemdirectoriesandsubdirectoriesaredescribedinthefollowing
sections.

The Primo Root Directory


ThefollowingtableliststhedirectorystructureofthePrimorootdirectory
(/exlibris/primo/p<r>_<x>/ng/primo/).

June 12, 2011

39

Primo System Administration Guide

NOTE:
ThepublishdirectoryisthedefaultdirectoryusedbythePrimoBackEnd
andthesearchdirectoryisthedefaultdirectoryusedbythePrimoFront
End.

Table 2. Primo Root Directory Structure

Path

Description

home/system/publish/bin

ContainstheJBOSSstartup/shutdownscriptsand
otherconsoleapplicationscripts.

home/system/search/bin

Alias:be_bin,fe_bin.
home/system/publish/
conf

Containstheconfigurationinformationforthe
systemsFrontEndandBackOffice.

home/system/search/conf

Alias:be_conf,fe_conf.

home/profile/publish/
publish/templates

Containspublishingpipeconfigurationfilesand
normalizationruletemplates.

home/profile/publish/
publish/production

Containstheconfigurationfiles,normalization
mappingset,anddatafromthepublishingpipesin
theproductionenvironment.
Foradditionalinformationaboutthestructureof
theproductiondirectory,refertoTheProduction
Directoryonpage40.

The Production Directory


Theproductiondirectoryincludesconfigurationanddatafilesthatplayarolein
theproductionenvironment.Thisdirectoryisnotoverwrittenwhenthesystem
isupgraded.Sincetheproductiondirectorycanbeverylarge,itcanbemovedto
anotherlocation.Thelocationoftheproductiondirectoryisdefinedinthe
installationconfigurationfiles.
Thefollowingtableliststhesubdirectorystructureoftheproductiondirectory
(home/profile/publish/publish/production).

40

June 12, 2011

Chapter 3: Overview of the Primo Directory Structure

Table 3. Production Directory Structure

Path (relative to the


production directory)

Description

conf

Containstheproductionconfigurationfiles
usedbyallpipes,includingthePNXXSD
anddeduplicationmatchingrules.These
configurationfilesarecopiedfromanother
directoryduringtheinstallation.

conf/normalizationExport

Whenanormalizationsetisdeployed,the
XMLfilesusedbythenormalization
processarecreatedinthisdirectory.There
isasubdirectoryforeverynormalization
set.

log

ContainstheJBossandgeneralPrimolog
files.

pipes

Containsallthedirectoriescreatedper
pipe.Thedirectorynameisthenameofthe
pipe.
Alias:be_pipes

pipes/<pipename>

Whenanewpipeiscreated,adirectory
withthepipenameiscreatedwiththe
followingsubdirectories:confand
<Source_Code>.

pipes/<pipename>/conf

Containstwoconfigurationfiles:
rules.xmlthenormalization
mappingsetusedbythepipe.
source_rules_config.xml
informationaboutthedatasourcethatis
harvestedbythepipe.

pipes/<jobname>/<Source_Code>

Containssubdirectoriesforeveryrunofthe
pipe.Thedirectorynameincludesthedate
andtimeofthepiperunintheYYYY-MMDD@HH:MM:SSformat.Forexample:
2006-07-25@20.37.07

Foradditionalinformationaboutthe
structureofthepiperundirectory,referto
ThePipeRunDirectoryonpage42.

June 12, 2011

41

Primo System Administration Guide

Table 3. Production Directory Structure

Path (relative to the


production directory)

Description

processes

Containssubdirectoriesforeachprocess.
Withineachprocessthereare
subdirectories,inthedate/timeformat,for
everyrun.Thelogfilesforeachrunare
storedinthesesubdirectories.

The Pipe Run Directory


Thepiperundirectoryiscreatedatthetimethepipeisrun.Thedirectoryname
includesthedateandtimeofthepiperunintheYYYY-MM-DD@HH:MM:SSformat.
ThefollowingtableliststhedirectorystructureofthePipeRundirectory.
Table 4. Pipe Run Directory Structure

Path (relative to the


pipe run directory)

Description

harvest

Containstheoriginalfilesharvestedfromthesource.

log

Containsthefollowinglogfiles:
PipelogTheformatofthefileisasfollows:
work_<job-name>.log

HarvestlogTheformatofthefileisasfollows:
work_<job-name>_harvest.log

DedupGrouper.logContainsloginformation
pertainingtotheDedupstage.
FrbrGrouper.logContainsloginformation
pertainingtotheFRBRstage.

The Jaguar Root Directory


ThefollowingtableliststhedirectorystructureoftheJaguarSearchAgentroot
directory(/exlibris/primo/p<r>_<x>/ng/jaguar/).
Table 5. Jaguar Directory Structure

42

Path (relative to the


pipe run directory)

Description

home/profile/analysis

SearchEngineanalysisconfiguration.

June 12, 2011

Chapter 3: Overview of the Primo Directory Structure

Table 5. Jaguar Directory Structure

Path (relative to the


pipe run directory)

Description

home/profile/indexes/
last_fetched_date_
index.date

Containsthelastindexingdate.

home/profile/indexes/
last_fetched_date_
mir.date

Containsthelastindexingdate.

home/system/conf/
search_schema.xml

Searchschemaconfigurationfile.

home/system/conf/
indexing_schema.xml

Indexingschemaconfigurationfile.

JBoss Directory Structure


ThefollowingtableliststhedirectorystructureoftheJBossdirectory.
Table 6. JBoss Directory Structure

Path (relative to the


home directory

Description

profile

Containsyourlocalsettingsanddata.Thisdocument
doesnotdiscussthestructureofthisdirectory.

profile/publish/overwrites

Containtemplatesofconfigurationfiles.

profile/search/overwrites
system

Thisistheactivesoftwaredirectory.Itisnot
recommendedtochangeanyfileinthisdirectory
directly.Makeallchangesintheprofile/publish/
overwritesandprofile/search/overwrites
directoriesanduseset_globalstoimplementthe
changes.

system/publish/bin

ContainstheJBossstartup/shutdownandotherconsole
applicationscripts.

system/search/bin
system/publish/conf
system/search/conf

June 12, 2011

ContainsconfigurationfilessuchasJBPMprocess
definitionandmenudefinitionfiles.

43

Primo System Administration Guide

Table 6. JBoss Directory Structure

Path (relative to the


home directory

Description

system/publish/conf/i18n

Containsconfigurationfilesfori18n
(internationalization)supportintheWebinterfaces.

system/search/conf/i18n
system/thirdparty/
openserver/publish

TheJBosshomedirectory.

system/thirdparty/
openserver/search
system/thirdparty/
openserver/server/publish
system/thirdparty/
openserver/server/search

JBosscanrunusingdifferentconfigurationsettings
(suchasapacheandhttpd.conf ).Eachconfiguration
isactuallyadirectorythatholdssettings.
Forexample:
/J2EE components/logs

Thedefaultdirectoryistheconfigurationdirectory
usedbyPrimo.
system/thirdparty/
openserver/server/
publish/deploy

ContainsthePrimoJ2EEcompliantsoftware.
Thisdirectoryistheinterfacebetweentheapplication
serverandPrimo.

system/thirdparty/
openserver/server/search/
deploy
system/thirdparty/
openserver/server/
publish/log

ContainsthelogsoftheJBossbasedmodules.

system/thirdparty/
openserver/server/search/
log

44

June 12, 2011

Chapter 3: Overview of the Primo Directory Structure

Table 6. JBoss Directory Structure

Path (relative to the


home directory

Description

system/thirdparty/
openserver/server/
publish/deploy/

Thisdirectoryisapackageofallothermodules
(EnterpriseArchivethe.earfile)andisthe
interactiondirectorybetweenJBossandPrimo.

system/thirdparty/
openserver/server/search/
deploy/

Thisdirectorycontainsthefollowingfiles:
primo_publishing_app.ear
primo_library_app.ear
jaguar_web.earContainssoftwarefortheSearch
Federator.
jaguar-ds.xmlContainsthedatabase
configurationinformationfortheSearchFederator.
Thisdirectorycontainsasetof.wardirectories.Each
directoryisastandaloneWebapplication.
ThisdirectorycontainsPrimoreportdefinitionfiles.

system/thirdparty/
openserver/server/
publish/deploy/birt.war/
Report

Primo Directory Aliases


ThefollowingtableliststheavailablealiasesinPrimoforquicknavigation
withinthesystemdirectories.
NOTE:
The<r>indicatesthereleaseinwhichPrimowasinitiallyinstalledand
<x>indicatesthePrimocopy.

Table 7. Primo System Aliases

Alias

Path

Primo:
primo_home

/exlibris/primo/p<r>_<x>/ng/primo/home

primo_build

/exlibris/primo/p<r>_<x>/ng/primo/build

Front End:
fe_bin

June 12, 2011

/exlibris/primo/p<r>_<x>/ng/primo/home/system/
search/bin

45

Primo System Administration Guide

Table 7. Primo System Aliases

Alias

Path

fe_conf

/exlibris/primo/p<r>_<x>/ng/primo/home/system/
search/conf

fe_log

/exlibris/primo/p<r>_<x>/ng/primo/home/system/
thirdparty/openserver/server/search/log

fe_deploy

/exlibris/primo/p<r>_<x>/ng/primo/home/system/
thirdparty/openserver/server/search

fe_profile

/exlibris/primo/p<r>_<x>/ng/primo/home/profile/
search

fe_web

/exlibris/primo/p<r>_<x>/ng/primo/home/system/
thirdparty/openserver/server/search/deploy/
primo_library-app.ear/primo_library-libweb.war

Back Office:
be_bin

/exlibris/primo/p<r>_<x>/ng/primo/home/system/
publish/bin

be_conf

/exlibris/primo/p<r>_<x>/ng/primo/home/system/
publish/conf

be_log

/exlibris/primo/p<r>_<x>/ng/primo/home/profile/
publish/publish/production/log

be_deploy

/exlibris/primo/p<r>_<x>/ng/primo/home/system/
thirdparty/openserver/server/publish

be_profile

/exlibris/primo/p<r>_<x>/ng/primo/home/profile/
publish

be_production

/exlibris/primo/p<r>_<x>/ng/primo/home/profile/
publish/publish/production

be_pipes

/exlibris/primo/p<r>_<x>/ng/primo/home/profile/
publish/publish/production/pipes

Search Engine:

46

se_bin

/exlibris/primo/p<r>_<x>/ng/jaguar/home/system/
search/bin

se_conf

/exlibris/primo/p<r>_<x>/ng/jaguar/home/system/
search/conf

se_profile

/exlibris/primo/p<r>_<x>/ng/jaguar/home/profile

se_log

/exlibris/primo/p<r>_<x>/ng/jaguar/home/profile/
log

June 12, 2011

4
Performing System Cleanup
Thissectiondescribesthescriptsandproceduresthatyoucanusetoremove
unwanteddata,indexes,andlogfiles.
CAUTION:
Theproceduresinthissectioncancauseunrecoverablelossofdataor
unplanneddowntime.ContactExLibrisSupportifyouneedassistance
withanyoftheseprocedures.

Thissectionincludes:

CleanDatabaseScriptsonpage47

ReIndexingtheDatabaseonpage48

DeletingandReIndexingtheDatabaseonpage50

RemovingUnwantedDataonpage51

CleaningPrimoLogDirectoriesonpage52

CleaningApacheLogDirectoriesonpage53

CleaningPDSLogFilesonpage54

DiskSpaceCommandsonpage54

Clean Database Scripts


ThefollowingscriptsareusedtocleandatafromPrimosites:

clean_indexes.shThisscriptonlydeletesindexes.

clean_data_before_reload.shThisscriptdeletesthePNXdatabase

andindexes,butdoesnotdeletededupIDsandusergeneratedcontent
(includingtags,reviews,eShelf,andstatistics).Thisscriptisintendedfor
sitesthatareinproductionandneedtocreatethedatabasefromscratch.

June 12, 2011

47

Primo System Administration Guide

CAUTION:
Followingtheexecutionoftheclean_data_before_reload.sh
command,pipescantakelongertorun.

clean_data_all_before_golive.shThisscriptdeletestheentire

database,includingallusergenerateddata,indexes,anddedupIDs.Itis
intendedforPrimositesthatareswitchingtoproduction,sothattheycan
startwithacleandatabase.
Allofthescriptsarelocatedandexecutedfromthebe_bindirectory.Alogfile
iscreatedforeachscriptunderthesamedirectory,usingthefollowingnaming
convention:
<script_name>.log

Torunascript,enterthefollowingcommands:
be_bin
<script_name>

Re-Indexing the Database


Thisprocedureallowsthecustomertoreindexthedatabasewithoutcausing
downtime.TheFEusesexistingindexesforsearchretrieval,andhotswapping
replacestheoldindexeswithnewones.
To re-index the database without deleting the current indexes:
1

LogontotheFEserverandenterthefollowingcommandstoviewthe
search_schema.xmlfile:
se_conf
vi search_schema.xml

48

June 12, 2011

Chapter 4: Performing System Cleanup

Searchforthe<agent>tagtoviewthepathofthe<indexes>directory.
Inthefollowingexample,/exlibris/primo/p1_1/ng/jaguar/home/
profile/indexesisthepathofthe<indexes>directory:
<agents desc="collections of all search instances to be searched by jaguar"
auto_deploy="active" swapping_type="slices">
<agent port="9501" connection_type="local"
host="primo1.corp.exlibrisgroup.com" active="true">
<slices slice_count="1" name="main" active="true">
<slice id="1">
<path>/exlibris/primo/p1_1/ng/jaguar/home/profile/indexes/
inst_1_index</path>
<load2ram>true</load2ram>
</slice>
</slices>
</agent>

Ontheserverthatcontainstheindexes,enterthefollowingcommandto
backuptheindexesdirectory,where<date>isthecurrentdate:
cp -Rp indexes indexes.<date>

LogontotheBEserverastheprimouser.

Enterthefollowingcommandstoreindexthedatabase:
be_bin
./clean_indexes.sh

FromaWebbrowser,entertheURLfortheBackOfficeserver.Forexample:
http://primo.exlibris.com:1602/primo_publishing/admin/
acegilogin.jsp

FromtheBackOfficehomepage,clickPrimoHome>MonitorPrimoStatus
>ProcessMonitoring.

ClickExecutefortheIndexing_and_Didumean_and_Hotswapping
process.

LogontotheFEserverastheprimouser.

10 EnterthefollowingcommandstomonitorthejobexecutionontheFE:
fe_log
tail -f library_server.log

NOTE:
DonotrestarttheFEandsearchserverssothatyouwillbeabletokeep
searchingwiththeexistingindexes.

June 12, 2011

49

Primo System Administration Guide

Deleting and Re-Indexing the Database


Thisprocedureallowsthecustomertoperformafullreloadofalldatasources
andreindexingfromscratch,sincethedatabaseandindexesarefirstdeleted.
Untilthereloadandreindexinghascompleted,thesystemwillnotbe
available.Thisprocedureismainlyusedduringtheimplementationphaseto
testnormalizationrulesetstoseehowdatadisplaysintheFE.
Notethatyoucanreloadanentiredatasourcewithoutfirstdeletingthe
databasebyrunninganupdatepipe.Thismeansthatthealltherecordsinthe
databasefortherelevantdatasourcewillbeupdatedandreindexed.An
updatepipecanberuninthefollowingways:

Reharvesttheentiredatasource.

Runapipewhichtakesthedatafromthealreadyharvestedrecordsforthe
datasource.Tousethisoption,youshouldrunapipewithNotrequiredas
theharvestingmethod.Thepipeworksonallrecordsthathavealready
beenharvestedforthespecifieddatasource.

To delete and re-index the database:


1

LogontotheBEserverastheprimouserandenterthefollowingcommand
tostoptheBackOffice:
be_stop

Enterthefollowingcommandstocleanthedatabaseandindexes.Ifyou
wanttocleanonlytheindexes,usetheclean_indexes.shcommand
insteadoftheclean_data_before_reload.shcommand.
be_bin
./clean_data_before_reload.sh

CAUTION:
Followingtheexecutionoftheclean_data_before_reload.sh
command,pipescantakelongertorun.
Ifyouwanttocleanonlytheindexes,usetheclean_indexes.shcommand.
3

EnterthefollowingcommandtorestarttheBackOffice:
be_restart

50

FortheFEserverandtheSEservers,logonastheprimouserandenterthe
relevantcommandstorestartthePrimomodules:
a

fe_stop

fe_start

se_stop

June 12, 2011

Chapter 4: Performing System Cleanup

d
5

se_start

FromaWebbrowser,entertheURLfortheBackOfficeserver.Forexample:
http://primo.exlibris.com:1602/primo_publishing/admin/
acegilogin.jsp

FromtheBackOfficehomepage,clickPrimoHome>MonitorPrimoStatus
>PipeMonitoring.

Foreachrelevantpipe,clickExecute.

NOTE:
Sinceonlyonepipecanrunatatime,executethenextrelevantpipeafter
thepreviouspipecompletes.
8

Afterallrelevantpipeshavecompleted,logontotheBEserverastheprimo
userandenterthefollowingcommandtoconnectoldtagswithPNX
records:
./restore_ext_tags.sh

FromtheBackOfficehomepage,clickPrimoHome>MonitorPrimoStatus
>ProcessMonitoring.

10 ClickExecutefortheIndexing_and_Didumean_and_Hotswapping
process.
11 LogontotheFEserverastheprimouser.
12 EnterthefollowingcommandstomonitorthejobexecutionontheFE:
fe_log
tail -f library_server.log

Removing Unwanted Data


Afteranextendedperiodofuse,itmaybecomenecessarytoremoveunwanted
userdatafromthePrimodirectorystructure.
To remove unwanted data:
1

Verifythattherearenopipesrunning.

Enterthebe_pipesaliastomovetothepipesdirectory.Forexample:
be_pipes

EnterthepwdcommandtodisplaythePATHofthecurrentdirectory:
/exlibris/primo/p1_1/ng/primo/home/profile/publish/publish/
production/pipes

June 12, 2011

51

Primo System Administration Guide

Enterthelscommandtodisplaythecontentsofthedirectory.Forexample:
ls
Blue_Bay_Aleph/
Blue_Bay_Aleph_No_Harvest/
Blue_Bay_Digitol/

Primo_Demo_Marc_Pipe/
Primo_Demo_Metalib_Pipe/
Primo_Demo_Metalib_Update_DS/

Enterthefollowingcommandstomovetoapipedirectory:
cd <pipe name>/<source code>

Enterthelscommandtodisplaythecontentsofthedirectory.Forexample:
ls
2008-11-20@19.00.56/
2008-11-20@19.14.32/

2008-11-20@19.17.18/
2008-11-20@19.17.28/

2008-11-20@19.25.04/
2008-11-20@19.37.32/

Enterthefollowingcommandtoremovealldirectoriesandsubdirectories
fromthecurrentdirectory:
rm -r *

Enterthe<fe|be|se>_logaliastomovetothelogsdirectory.Forexample:
be_log

Deletethecontentsofeachlogdirectory.

Cleaning Primo Log Directories


ThefollowingscriptsallowyoutocleanthePrimologdirectories:

clean_all_logs.shdeletesBE,FE,SElogsinanallinoneenvironment

oramixedenvironment(forexample,FEandSErolesareassignedtothe
samemachine).Thiscommandisstoredunderthebe_bindirectory.

52

clean_be_logs.shdeletesBElogsonserversthatareassignedtheBE
role.Thiscommandisstoredunderthebe_bindirectory.

clean_fe_logs.shdeletesFElogsonserversthatareassignedtheFE
role.Thiscommandisstoredunderthefe_bindirectory.

clean_se_logs.shdeletesSElogsonserversthatareassignedtheSE
role.Thiscommandisstoredunderthese_bindirectory.

June 12, 2011

Chapter 4: Performing System Cleanup

To execute a delete Primo log script:


1

Logontotheserverastheprimouser.

Enteranaliastomovetothedirectorythatcontainsthelogscriptthatyou
wanttorun.Forexample,toruntheclean_all_logs.shscript,enterthe
followingcommand:
be_bin

Enterthedeletelogscript.Forexample,toclearalllogdirectories,enterthe
followingcommand:
./clean_all_logs.sh [number of days old]

NOTE:
Ifyoudonotspecifyavaluefor[number of days old],thedefault
valueof30daysisused.
4

Atthefollowingprompt,enterytodeletethelogfilesthatare30daysold:
Are you certain you want to delete the BE, FE and SE logs that are
30 days old? Continue? y/n:

Cleaning Apache Log Directories


Theclean_apache_logs.shscriptallowsyoutocleantheApachelogdirectory
bybackingupandcompressingthefollowinglogfiles:

access_log

access_log_ssl

error_log

error_log_ssl

Thisscriptislocatedunderthefollowingdirectory(be_bin),where<r>
indicatesthereleaseinwhichPrimowasinitiallyinstalledand<c>indicatesthe
Primocopy:
/exlibris/primo/p<r><c>/ng/primo/home/system/publish/bin

June 12, 2011

53

Primo System Administration Guide

To execute the delete Apache log script:


1

Logontotheserverastheprimouser.

NOTE:
IfyourenvironmentredirectsApachetoport80,youwillneedtologonas
therootusertorunthescript.Tologonastherootuser,entersuandthen
enterthepasswordoftherootuserwhenprompted.
2

Enterthefollowingcommandtomovetothedirectorythatcontainsthelog
script:
be_bin

Enterthefollowingcommandtorunthescript:
./clean_apache_logs.sh

Cleaning PDS Log Files


Theclean_pds_logs.shbacksuptheactivePDSlogfiletoacompressedfile,
addingatimestamptothefilename(forexample,
pds_server.log.24Mar09.gz)andcreatesanemptypds_server.logfilein
thesourcedirectory($LOGDIR).ExLibrisSupportrecommendsthatyourunthe
scriptonceamonth.
Thisscriptislocatedunderthefollowingdirectory(be_bin),where<r>isthe
PrimoversioninwhichPrimowasfirstinstalledand<x>isthePrimoinstance:
/exlibris/primo/p<r>_<x>/ng/primo/home/system/publish/bin

To execute the delete PDS log script:


1

Logontotheserverastheprimouser.

Enterthefollowingcommandtomovetothedirectorythatcontainsthelog
script:
be_bin

Enterthefollowingcommandtorunthescript:
./clean_pds_logs.sh

Disk Space Commands


Theamountofavailablediskspaceinyourfilesystemsdeterminestheamount
ofdatayoucanstoreinyourdatabaseandmakeavailabletoyourusers.After

54

June 12, 2011

Chapter 4: Performing System Cleanup

settinguptheinitialamountofdiskspace,yoursystemmightneedmore
spaceforexample,ifyouaddnewlibrariestoyourdatasources.
Diskspaceinthefollowingtwolocationscanbecomeacriticalfactor:

Pipesdirectories

Indexdirectory

Checking Disk Space


To check disk space in the pipes directory:
1

Enterthefollowingcommandtomovetotheproductiondirectory:
be_production

Enterthefollowingcommandtodisplaythetotalamountofdiskspaceof
thedirectory,theamountofuseddiskspace,andtheavailablediskspace:
df -kh

Thefollowingisanexampleoftheoutput:
primo.corp.exlibrisgroup.com-p1(1) >>be_production
primo.corp.exlibrisgroup.com-p1(1) >>df -kh
Filesystem
Size Used Avail Use% Mounted on filer01:/vol/data4/
primo
400G 359G
42G 90% /exlibris
primo.corp.exlibrisgroup.com-p1(1) >>

To check disk space in the index directory:


1

Gototheindexdirectory.

Enterthefollowingcommandtodisplaydiskinformation:
df -kh

Thefollowingisanexampleoftheoutput:
Il-primo05.corp.exlibrisgroup.com-p1(1)>>df -kh
FilesystemSize UsedAvailUse%Mounted on
Filer01:/vol/data1/primoshare15G14G91% /exlibris_primo

Freeing Disk Space


Youcanfreediskspacebycleaninguptheoldpipesandprocessexecution
directories,aswellasthelogdirectories.Formoreinformationoncleaninglog
directories,refertoCleaningPrimoLogDirectoriesonpage52.

June 12, 2011

55

Primo System Administration Guide

56

June 12, 2011

5
Copying Primo Data from One Machine
to Another
Thissectionincludes:

Introductiononpage57

CopyingAllConfigurationDataonpage57

CopyingViewConfigurationDataonpage61

RestoringfromBackuponpage63

CopyingNormalizationSetsonpage64

Introduction
Youcancopyallconfigurationdatasuchasnormalizationsets,mappingtables,
backendconfigurations,orcodetablesfromonePrimoinstallationtoanother
installation.Thisiscommonlyperformedwhenmovingfromthestaging
installationtotheproductioninstallationasapartoftheregular
implementationflow.
Inaddition,importandexportscriptsareprovidedtocopythefollowingdata
separately:normalizationsets,viewsconfiguration,andtheentiredatabase.

Copying All Configuration Data


Export/importallconfigurationdatascriptsperformthefollowing:

Exportandpackagingofallconfigurationtablesandconfigurationfilesin
thestagingenvironment.

Importofallconfigurationtablesandconfigurationfilesintheproduction
environment.

June 12, 2011

57

Primo System Administration Guide

Beforeperformingtheimport,theimportscriptscheckthatthetarget
installationhasthesameServicePacklevelasthesourceinstallation.Before
importexecution,allexistingconfigurationtablesaredropped.
Theproceduresexportandimportthefollowingtablesandfiles:

Export/importscriptsexport/importthefollowingOracletables:
Table 8. Oracle Configuration Tables

Table Name

Table Name

C_C_CODE_COLUMN_NAMES

C_V_LAYOUT_SET_PAGES

C_C_CODE_TABLES

C_V_PAGES

C_C_MAPPING_TABLES

C_V_PAGE_TILES

C_C_TABLE_OF_TABLES

C_V_SCOPES

C_I_INSTITUTION

C_V_SCOPE_VALUES

C_I_INSTITUTION_IP

C_V_TABS

C_I_LIBRARY

C_V_TAB_SCOPE

C_I_RESTRICTION

C_V_TILES

C_N_BASIC_ROUTINES

C_V_UICOMPONENTS

C_N_DATA_SOURCE

C_V_VIEWS

C_N_ENRICHMENT

C_V_VIEW_LAYOUT_SET

C_N_ENRICHMENT_MAPPING

C_V_VIEW_TILE_CONFIG

C_N_ENRICHMENT_SET

M_P_WORK

C_N_MAPPING_SET

M_P_PROCESS_CONTEXT

C_N_MAPPING_SOURCE

RT_PIPE_CONFIGURATION

C_N_MAPPING_TARGET

RT_PROCESS_CONFIGURATION

C_N_MAPPING_TRANSFORMATION

RT_SCHEDULE

C_N_SCOPES

R_ROLE

C_N_SOURCE_CONDITION

R_STAFF

C_V_LAYOUT_SET

R_STAFF_ROLE_MAPPING

NOTE:
Theexport/importscriptsdonotcopyanyconfigurationdatathatis
relatedtotheinstallationconfiguration.Allofthedatathatappearsonthe

58

June 12, 2011

Chapter 5: Copying Primo Data from One Machine to Another

PrimoHome>AdvancedConfiguration>GeneralConfiguration
Wizardpageisnotcopiedfromthestagingenvironmenttothe
productionenvironmentandmustbeupdatedmanuallyinthe
productionenvironment.

Export/importscriptscopyalldatafromconfigurationfilesinthefollowing
location:
/exlibris/primo/p<r>_<x>/ng/primo/home/system/thirdparty/
openserver/server/search/deploy/primo_library-app.ear/
primo_library-libweb.war/
css/
help/
images/
static_htmls/

Export/importscriptscopyallPDSrelatedconfigurationfromthedata
locatedinthe/exlibris/primo/p<r>_<x>/pds/conf_tablefile.

To copy all configuration data:


1

LogontotheFEserverofthesourceinstallation.

EnterthefollowingcommandstoexporttheOracletablesandconfiguration
files,where<exp_dir>istheexportdirectory:
be_bin
./exp_config_tables.sh <exp_dir>

Theexportedtablesandconfigurationfilesareplacedunderthefollowing
directory:
/exlibris/primo/p<r>_<x>/ng/primo/home/profile/publish/knp/
export/<exp_dir>

Theconfig_tables.export.logfileiscreatedandstoredunderthe
followingdirectory:
/exlibris/primo/p<r>_<x>/ng/primo/home/profile/publish/knp/
log/<exp_dir>

LogontotheFEserverofthesourceinstallation.

EnterthefollowingcommandstoexportthePDSrelatedconfigurationfiles:
be_bin
./exp_pds_config.sh <exp_dir>_pds

Theconfigurationfilesareplacedunderthefollowingdirectory:
/exlibris/primo/p<r>_<x>/ng/primo/home/profile/publish/knp/
export/<exp_dir>_pds

June 12, 2011

59

Primo System Administration Guide

LogontotheFEserverofthetargetinstallation.

UseFTPtocopythefilesunderthe<exp_dir>directorycreatedinStep3to
thefollowingdirectoryonthetargetmachine,where<imp_dir>isthe
importdirectory:
/exlibris/primo/p<r>_<x>/ng/primo/home/profile/publish/knp/
import/<imp_dir>

Enterthefollowingcommandstoimporttheconfigurationfilesfromthe
exportdirectory,where<r>isthereleaseinwhichPrimowasinitially
installed,<copy>isthePrimocopyonthesourcemachine,and<imp_dir>
istheimportdirectory.
be_bin
./imp_config_tables.sh p<r><copy>_prm00 <imp_dir>

Forexample,iftheexportwasdonefrom/exlibris/primo/p1_2,use
p12_prm00.
Theconfig_tables.import.logfileiscreatedandstoredunderthe
followingdirectory:
/exlibris/primo/p<r>_<x>/ng/primo/home/profile/publish/knp/
log/<imp_dir>

LogontotheFEserverofthetargetinstallation.

UseFTPtocopythefilesunderthe<exp_dir>_pdsdirectorycreatedin
Step5tothefollowingdirectoryonthetargetmachine:
/exlibris/primo/p<r>_<x>/ng/primo/home/profile/publish/knp/
import/<imp_dir>_pds

10 EnterthefollowingcommandtoimportthePDSrelatedconfigurationfiles:
./imp_pds_config.sh <imp_dir>_pds

NOTE:
ThisscriptworksonlyforlocalPDSconfigurations,suchasAlephand
LDAP.IfyouareusingCASorShibboleth,youwillneedtoconfigurePDS
onthenewcomputer.FormoreinformationonconfiguringPDS,seethe
PatronDirectoryServicesGuide.
11 RestarttheBackOfficeonthetargetserver.
12 OnthetargetBackOfficehomepage,clickDeployAlltodisplaytheDeploy
Listpage.
13 SelectalloftheitemsintheDeployListandthenclickDeploy.
14 VerifythattheimportedconfigurationsappearintheBackOffice.

60

June 12, 2011

Chapter 5: Copying Primo Data from One Machine to Another

Copying View Configuration Data


Theimport/exportscriptsthatareusedtocopyviewsfromthestagingserverto
theproductionserverperformthefollowingtasks:

Exportallviewsfromthesourceserveraswellasmappingtablesandcode
tablesthatarerelevanttotheviews.

Copyalldatafromtheconfigurationfilesinthefollowingsubdirectoriesof
/exlibris/primo/p<r>_<x>/ng/primo/home/system/thirdparty/
openserver/server/search/deploy/primo_library-app.ear/
primo_library-libweb.war:

css/

help/

images/

static_htmls/

Beforeimportingtheviews,thescriptscreateabackupoftheviewsand
relatedtables,executevalidationroutinestoensurethattheviewswill
functioninthenewenvironment,andthenreplaceallviewsandtables.

VerifythattargetinstallationhasthesameServicePacklevelasthesource
installation.

Viewsarelinkedtomanyelements,includinginstitutionsandscopes.These
elementswillnotbeexportedwiththeviews.Theimportprogramverifies
thattheinstitutionsandscopescodesinthetargetinstallationarethesame
astheinstitutionandscopecodesinthesourceinstallation.

NOTE:
Validationforremotescopesisnotpossible.IfthedefinitionsforMetaLib
onthestagingandproductionenvironmentsaredifferentandthe
QuickSetsdonotmatch,theremotesearchscopeswillbeempty.
To copy the view configuration data:
1

IntheBackOfficeontheserverthatcontainsthesourceconfiguration,
performaDeployAll.

LogontotheFEserverofthesourceinstallation.

June 12, 2011

61

Primo System Administration Guide

Enterthefollowingcommandstoexporttheviewconfigurationdatatothe
specifieddirectory<my_views>:
be_bin
./exp_all_views.sh <my_views>

Theexportdirectorycontainsalloftheexportedconfigurationfiles,which
areplacedunderthefollowingdirectory:
/exlibris/primo/p<r>_<x>/ng/primo/home/profile/publish/knp/
export/<my_views>

Theviews_tables.export.logfileiscreatedandstoredunderthe
followingdirectory:
/exlibris/primo/p<r>_<x>/ng/primo/home/profile/publish/knp/
log/<my_views>

LogontotheFEserverofthetargetinstallation.

UseFTPtocopythefilesunderthe<my_views>directorycreatedinStep7
tothefollowingdirectoryonthetargetmachine,onwhich<my_views>is
theexportdirectory:
/exlibris/primo/p<r>_<x>/ng/primo/home/profile/publish/knp/
import/<my_views>

Enterthefollowingcommandstoimporttheviewconfigurationdatafrom
theexportdirectory,where<r>isthereleaseinwhichPrimowasinitially
installed,<copy>isthePrimocopyonthesourcemachine,and<my_views>
isthenameoftheexportdirectory.
be_bin
./imp_all_views.sh p<r><copy>_prm00 <my_views>

Forexample,iftheexportwasdonefrom/exlibris/primo/p1_2,use
p12_prm00.
Theviews_tables.import.logfileiscreatedandstoredunderthe
followingdirectory:
/exlibris/primo/p1_2/ng/primo/home/profile/publish/knp/log/

<my_views>
7

RestarttheBackOfficeonthetargetserver.

OnthetargetBackOfficehomepage,clickDeployAlltodisplaytheDeploy
Listpage.

SelectalloftheitemsintheDeployListandthenclickDeploy.

10 VerifythatimportedconfigurationsappearintheBackOffice.

62

June 12, 2011

Chapter 5: Copying Primo Data from One Machine to Another

Restoring from Backup


Beforeimportingtheviews,theimport/exportscriptscreateabackupofthe
existingviewsandrelatedtables.
Theviewsbackupfileisstoredinthe$primo_dev/prm00/filesdirectory,
usingthefollowingformat:
views_tables_import_backup.<timestamp>.export.gz_aa

To restore views configuration from the backup:


1

Enterthefollowingcommandtomovetothebackupdirectory:
cd $primo_dev/prm00/files

Executethefollowingcommandstodeletetheimporteddata:
set t_list="C_V_LAYOUT_SET C_V_LAYOUT_SET_PAGES C_V_PAGES
C_V_PAGE_TILES C_V_SCOPES C_V_SCOPE_VALUES C_V_TABS C_V_TAB_SCOPE
C_V_TILES C_V_UICOMPONENTS C_V_VIEWS C_V_VIEW_LAYOUT_SET
C_V_VIEW_TILE_CONFIG C_C_CODE_TABLES C_C_MAPPING_TABLES
C_C_TABLE_OF_TABLES C_C_CODE_COLUMN_NAMES"
foreach i ($t_list)
sqlplus -s ${ORA_USER_PREFIX}prm00/${ORA_USER_PREFIX}prm00 <<!
drop table $i cascade constraints;
exit
!
end

Executethefollowingcommandstorestorethepreviousdata,where
<backup_file>isthenameofthebackupfilestoredunderthe
$primo_dev/prm00/filesdirectory:
mknod $TMPDIR/imp_pipe.$$ p
cat <backup file> | gunzip > $TMPDIR/imp_pipe.$$ &
imp LOG=$TMPDIR/views_recovery.log FILE=$TMPDIR/imp_pipe.$$
USERID=${ORA_USER_PREFIX}PRM00/${ORA_USER_PREFIX}PRM00
TOUSER=${ORA_USER_PREFIX}PRM00 FROMUSER=${ORA_USER_PREFIX}PRM00
INDEXES=N IGNORE=Y

NOTE:
Itispossibletosuppressthecreationofthebackupfilebyaddingthe
nobackupparametertotheimportcommand.Forexample:
be_bin
./imp_all_views.sh p<r><copy>_prm00 <my_views> nobackup

June 12, 2011

63

Primo System Administration Guide

Copying Normalization Sets


Theimport/exportscriptsusedforcopyingnormalizationsetsareintendedto
beusedwhencopyingdatafromthestaginginstallationtotheproduction
installation.
Thesescriptsexportallnormalizationsets,oraspecificnormalizationsetand
theNormalizationsubsystemmappingtablesthatareusedintherelevant
mappingsetforthesourceserver.
To copy Normalization Sets:
1

IntheBackOffice,fortheserverthatcontainsthesourceconfiguration,
performaDeployAll.

LogontotheFEserverofthesourceinstallation.

EnterthefollowingcommandstoexporttheNormalizationSet,where
<set_name>isthemappingsetnameasitappearsontheNormalization

RulesConfigurationpageintheBackOffice:
be_bin
./export_nm_config.sh <set_name>

Forexample,ifthemappingsetnameintheBackOfficeiscalledALEPH
MARCTemplate(V1),enterthefollowingcommands:
be_bin
./export_nm_config.sh "ALEPH MARC - Template (V1)"

Theexportdirectorycontainsalloftheexportedconfigurationfiles,which
areplacedunderthefollowingdirectory,where<timestamp>isdatethat
theexportwasperformed:
/exlibris/primo/p<r>_<x>/ng/primo/home/profile/publish/knp/
export/knp_<timestamp>/nm_rules

LogontotheFEserverofthetargetinstallation.

UseFTPtocopythefilesunderthenm_rulesdirectorycreatedinStep7to
thefollowingdirectoryonthetargetmachine,where<imp_dir>isthe
importdirectory:
/exlibris/primo/p<r>_<x>/ng/primo/home/profile/publish/knp/
import/<imp_dir>

64

Verifythatthefollowingfilesexistinthe<imp_dir>/nm_rulesdirectory:

rules.xml

rules_add.xml

mapping_tables.xml

nm.properties

June 12, 2011

Chapter 5: Copying Primo Data from One Machine to Another

Ifamappingsetwiththisnamealreadyexistsandyouwanttooverwriteit,
setthefollowingparametertotrueinthenm.propertiesfile:
import.normalization.rules.force

Ifyoudonotwanttooverwritethemappingset,renamethevalueofthe
followingparameterinthenm.propertiesfile:
import.normalization.rules.mappingset

Ifyouwanttoimporttheruleswithoutthemappingtables,renamethe
mapping_tables.xmlfile.

10 Ifyouwanttoimportthemappingtableswithouttherules,renamethe
rules.xmlfile.
11 Enterthefollowingcommandstoimportthemappingsetfromtheexport
directory,where<imp_dir>isthenameoftheimportdirectory.
be_bin
./import_nm_config.sh <imp_dir>

12 RestarttheBackOfficeonthetargetserver.
13 LogontothetargetBackOffice.
14 OnthetargetBackOfficehomepage,clickDeployAlltodisplaytheDeploy
Listpage.
15 SelectalloftheitemsintheDeployListandthenclickDeploy.
16 VerifythatimportedconfigurationsappearintheBackOffice.

June 12, 2011

65

Primo System Administration Guide

66

June 12, 2011

6
Primo Port Configurations
Thissectionincludes:

Introductiononpage67

RedirectingPortsonpage67

IPTablesonpage68

Introduction
ThedefaultHTTPportsforPrimosBackOffice(BO),FrontEnd(FE),andPDS
are160y,170y,and899y,respectively(whereyisthecopynumber,startingwith
1).ThedefaultHTTPSport(SecureHTTP)forPDSis1443.
Thenonstandardnatureofthesedefaultscanpresentabarriertouse.To
overcomethisbarrier,theseportsshouldnotbechangedandaccesstothem
shouldnotbeblocked.Instead,thestandardports(suchas80forHTTPand443
forHTTPS)shouldberedirectedortranslatedtoPrimosdefaultports.
IMPORTANT:
Theuseofmod_jktoredirecttheporttoport80isnotrecommendedor
supportedbyExLibrisSupport.

Redirecting Ports
ToperformportredirectiononyourPrimoserver,youcanchoosefromthe
followingmethods:

AwebservercaneitherbeaproxyorrewritetheURL.

AnetworkbasedorhostbasedfirewallcanperformPortAddress
Translations(PAT)andNetworkAddressPortTranslations(NAPT).

AnetworkbasedloadbalancercanperformPATandNAPT.

June 12, 2011

67

Primo System Administration Guide

Giventhelargevarietyofenvironments,thereisnosinglesolutionthatwill
workinallcases.Asolutionshouldbeselectedbasedoncurrentandfuture
need,alongwithavailableresourcesandtechnicalskill.Theabilityofthe
vendorstoassistwithbothinitialsetupandongoingissuesshouldalsobe
considered.
Toredirectports,ExLibrisrecommendstheuseofIPtables,whichisahost
basedfirewallfoundonmostmodernLinuxsystems.Itisoftenalreadybeing
used,iswellunderstood,andperformswell.Anexampleimplementationcan
befoundbelow.
NOTE:
Becauseportredirectionisprovidedbyloadbalancersandfirewalls,Ex
Librisdoesnotprovidesupportforthemethodsdescribedinthissection.

Overlapping Services
Arequestneedstobeuniquelyidentifiableinorderforittoberedirected
correctly.Inadefaultconfiguration,usingadifferentportissufficient.
However,therecanbeaproblemiftwoservices(suchasthePrimoFEandPDS)
runonthesameserverandneedtobeaccessedfromthesameport(suchasport
80).Inthiscase,theonlyuniquelyidentifiableelementistheURL.Tousethe
URL,thesolutionmustbeLayer7awarethatisunderstandsHTTP/HTTPS.
Thiscanbothlimitpossiblesolutionsandincreasecomplexity.
OnealternativeistosetupPDStouseSSLencryptedsessionstomovethe
defaultPDSportto1443andtheredirectportto443.Sincetheservicesno
longerneedthesameport,thereisnolongeraconflict.
AnotheralternativeistousedistinctiveIPaddressesand/orDNSnamesto
changethedestinationportbasedonthedestinationIPaddressandDNSname.
Forexample,assumethatthePrimoFEandPDSbothrunonserver1,whichhas
IPaddress=10.20.30.40andDNSserver1=10.20.30.40.IfIPaddress10.20.30.41
andDNSserver1pds=10.20.30.41areaddedtoserver1tochangetheaccessfor
PrimoandPDStoserver1pds,portredirectionwouldbesetupasfollows:

server1:80redirectstoserver1:1701

server1pds:80redirectstoserver1pds:8991

IP Tables
Linux2.4.xand2.6.xkernelsprovidetheip_tablespacketfilterthatallowsfor
statefulandstatelesspacketfiltering,NAPT,PAT,andotherpacket
manipulations.Specificrulesaregroupedintochains,whicharealsogrouped
intotables.

68

June 12, 2011

Chapter 6: Primo Port Configurations

Thecommandlineprogramiptablesallowsyoutosetup,maintain,and
inspectthetables,chains,andrules.Intheexamplesbelow,eachsolutionis
presentedasasetofiptablescommands.Formoreinformation,refertothe
iptablesdocumentationforyouroperatingsystem.
Sincethesecommandsmustusuallyberunastherootuser,theyshouldbe
reviewedcarefullybeforeexecution.Inaddition,thecommandswillneedtobe
runeverytimetheserverisrebooted.Onmanysystemsthiscanbeautomated
bysavingtheoutputofiptables-savein/etc/sysconfig/iptables.

IP Table Examples
Inthefollowingexamples,PrimoandthePDSarebothinstalledonasingle
servercalledserver1(AllinOnetopology).IthasanIPaddressof10.10.5.5in
whichtheDNSmapstoprimo.library.edu.TheBO,FE,andPDSusethedefault
portsof1601,1701,and8991,respectively.

Example 1: Port 80 to Primo FE


Thisisthesimplestportredirectionthatconsistsofthefollowingparts:

Redirectingrequestsonport80toport1701.

Ensuringaccesstoports80and1701.

Allowingestablishedconnectionstocontinue.

NOTE:
ThissolutioncanalsobeusedtoredirecttotheBOandPDS.
# Port Redirection
iptables t nat A OUTPUT d localhost p tcp --dport 80 j REDIRECT
--to-ports 1701
iptables t nat A OUTPUT d 10.10.5.5 p tcp --dport 80 j REDIRECT
--to-ports 1701
iptables t nat A PREROUTING d 10.10.5.5 p tcp --dport 80 j
REDIRECt --to-ports 1701
# Allow access to ports 80 and 1701
iptables A INPUT p tcp i eth0 --dport 80 j ACCEPT
iptables A INPUT p tcp i eth0 --dport 1701 j ACCEPT
# Allow established connections to continue
iptables A INPUT m state --state RELATED,ESTABLISHED j ACCEPT
iptables A OUTPUT m state --state RELATED,ESTABLISHED j ACCEPT

Example 2: Port 80 to Primo FE, Port 443 to PDS


ThisportredirectiondealswiththeissueofoverlappingservicesbyusingPDS
withSSL.SeethePatronDirectoryServicesGuidefordetailsonsettingupPDSto
runonport1443withSSL.

June 12, 2011

69

Primo System Administration Guide

Inaddition,theURLsforthePDS_URL,PDS_INTERNAL_URL,and
PDS_Configuration_URLfieldsonthePrimoHome>AdvancedConfiguration
>GeneralConfiguration>Installationsubsystempageneedstobeupdated(for
example,http://primo.library.edu:8991/pdstohttps://
primo.library.edu/pds).
# Port Redirection - FE
iptables t nat A OUTPUT d localhost p tcp --dport 80 j REDIRECT
--to-ports 1701
iptables t nat A OUTPUT d 10.10.5.5 p tcp --dport 80 j REDIRECT
--to-ports 1701
iptables t nat A PREROUTING d 10.10.5.5 p tcp --dport 80 j
REDIRECt --to-ports 1701
# Port Redirection PDS
iptables t nat A OUTPUT d localhost p tcp --dport 443 j
REDIRECT --to-ports 1443
iptables t nat A OUTPUT d 10.10.5.5 p tcp --dport 443 j
REDIRECT --to-ports 1443
iptables t nat A PREROUTING d 10.10.5.5 p tcp --dport 443 j
REDIRECT --to-ports 1443
# Allow access to
iptables A INPUT
iptables A INPUT
iptables A INPUT
iptables A INPUT

ports 80,
p tcp i
p tcp i
p tcp i
p tcp i

1701, 443, &


eth0 --dport
eth0 --dport
eth0 --dport
eth0 --dport

1443
80 j ACCEPT
1701 j ACCEPT
443 j ACCEPT
1443 j ACCEPT

# Allow established connections to continue


iptables A INPUT m state --state RELATED,ESTABLISHED j ACCEPT
iptables A OUTPUT m state --state RELATED,ESTABLISHED j ACCEPT

Example 3: Port 80 to Primo FE and PDS


Thisportredirectiondealswiththeissueofoverlappingservicesbyaddingthe
IPaddress10.12.6.6toserver1.ADNSentryiscreatedthatmaps
pds.library.eduto10.12.6.6.
Inaddition,theURLsforthePDS_URL,PDS_INTERNAL_URL,and
PDS_Configuration_URLfieldsonthePrimoHome>AdvancedConfiguration
>GeneralConfiguration>Installationsubsystempageneedstobeupdated(for
example,http://primo.library.edu:8991/pdstohttp://
pds.library.edu/pds).

70

June 12, 2011

Chapter 6: Primo Port Configurations

# Port Redirection FE (10.10.5.5)


iptables t nat A OUTPUT d localhost p tcp --dport 80 j REDIRECT
--to-ports 1701
iptables t nat A OUTPUT d 10.10.5.5 p tcp --dport 80 j REDIRECT
--to-ports 1701
iptables t nat A PREROUTING d 10.10.5.5 p tcp --dport 80 j
REDIRECt --to-ports 1701
# Port Redirection PDS (10.12.6.6)
iptables t nat A OUTPUT d 10.12.6.6 p tcp --dport 80 j REDIRECT
--to-ports 8991
iptables t nat A PREROUTING d 10.12.6.6 p tcp --dport 80 j
REDIRECT --to-ports 8991
# Allow access to
iptables A INPUT
iptables A INPUT
iptables A INPUT

ports 80,
p tcp i
p tcp i
p tcp i

1701, & 8991


eth0 --dport 80 j ACCEPT
eth0 --dport 1701 j ACCEPT
eth0 --dport 8991 j ACCEPT

# Allow established connections to continue


iptables A INPUT m state --state RELATED,ESTABLISHED j ACCEPT
iptables A OUTPUT m state --state RELATED,ESTABLISHED j ACCEPT

June 12, 2011

71

Primo System Administration Guide

72

June 12, 2011

7
Accessing Reports and Log Files
Youcanaccessreportsandlogfilestoobtaininformationaboutyoursystem.
Thissectionincludes:

PrimoReportsonpage73

AccessingPrimoLogsonpage74

Primo Reports
ThefollowingtableliststhereportsavailableinPrimo.ThePrimoreportsare
createdinprintablePDFformat.Forinformationonhowtoaccessreports,refer
tothePrimoBackOfficeGuide.
Table 9. Primo Reports

Report Name

Description

ListReports:
Codetables

Displaysallcodetablespersubsystem.Includes
informationonthelevelofthetableandifitisenabled.

DataSources

Displaysthesourcesofdatainthesystem.

GeneralParameters

Displaysthesystemparameters.

IPs

DisplaystheoncampusIPaddressesassociatedwith
institutions.

Institutions

Displaysthesysteminstitutions.

MappingTables

Displaysthemappingtablesbysubsystem.

Pipes

Displaysthepipesusedtopublishsystemdata.
Includestheharvestingandnormalizertypesand
whenthepipewaslastrun.

Processes

Displaystheprocessesandwhentheywerelastrun.

June 12, 2011

73

Primo System Administration Guide

Table 9. Primo Reports

Report Name

Description

Restrictions

Displaysthesearchrestrictions.Includestheuser
group,andiftherestrictionsapplytousersthatareon
oroffcampus.

Scopes

Displaysthesearchscopesandincludessearchand
deliveryrestrictions.

StaffUsers

Displaystheregisteredsystemusers,theirroles,and
contactinformation.

TopSearchesBasedon
ProcessingTime

Displaysthesearchstring,numberofsearches,average
numberofresults,andaverageresponsetimeofthetop
searches,basedonprocessingtime.

TopSearcheswithNo
Results

Displaysthesearchstring,numberofsearches,and
averageresponsetimeofthetopsearcheswithno
results.

Views

Displaysthepreconfiguredsystemscreenviewsand
whethertheyarecurrentlydeployed.

StatisticalReports:
ClickStatistics

Displaysstatisticsconcerningthenumberofclicksthat
occurredinthePrimoFrontEnd.

PNXStatistics

DisplaysPNXstatistics.

SearchStatistics

Displaysstatisticsconcerningthesearchesperformed
inthesystem.

Accessing Primo Logs


Pipe Logs
ErrorscanbeviewedintheBackOfficeuserinterface.Iftherearenoerrorsin
theBackOfficeuserinterface,butthepipestoppedinthemiddleofapiperun,
youneedtocheckthelogfileforthepipeontheserver.
To view a pipes logs on the server:
1

Enterthefollowingcommandtomovetothepipesdirectory:
be_pipes
cd <pipe_name>/<source_name>/<pipe_date>/log/

Somecommonerrorsfoundinthepipelogsare:

74

June 12, 2011

Chapter 7: Accessing Reports and Log Files

No valid files found in source directoryThiscanoccurwhen

Datetoharvestfromislaterthanthedateofthefile.

Failed while trying to split recordsIndicatesaproblemwith

yoursourcefiles.
Thelogfileincludesthefollowinginformation:

Timestamp

Typeofmessage,whichcanbeoneofthefollowing:

FATALThepipefailed.

ERRORArecordfailedduringprocessing.

WARNAnoncriticalerroroccurred.

INFOInformationmessages.

DEBUGDebugmessagesgeneratedonlyduringdebuggingofthe
application.

ThreadnameIndicatesthepipetaskandbulkbeingprocessed.

Logmessage

Thefollowingisasamplesectionofapipelogfile:
08-08-2006 12:45:23,504 INFO [DirectoryTreeBuilder] () - Building
directory tree. The production path is /exlibris/primo/p1_1/ng/primo/
primo_publishing/home/system/publish/production/Sanity3/data/2006-0808@12.45.17
08-08-2006 12:45:23,530 INFO [DirectoryTreeBuilder] () - Loading bulk
data into the database.
08-08-2006 12:45:23,574 INFO [DirectoryTreeBuilder] () - Execution of
com.exlibris.publish.engine.harvest.DirectoryTreeBuilder took 89
08-08-2006 12:45:23,584 INFO [DirectoryTreeBuilder] () - Token
messaged consumed.
08-08-2006 12:45:23,585 INFO [DirectoryTreeBuilder] () - Loading token
to resume execution.
08-08-2006 12:45:23,591 INFO [DirectoryTreeBuilder] () - Resuming
token
08-08-2006 12:45:23,616 INFO [DirectoryTreeBuilder] () - Finished
processing thread
08-08-2006 12:45:28,114 INFO [OAISplitter] () - Saving bulk. bulk Id=0
deleted=false
08-08-2006 12:45:29,382 INFO [OAISplitter] () - Loading bulk data into
the database.
08-08-2006 12:45:33,150 INFO [OAISplitter] () - Saving bulk. bulk Id=1
deleted=false
08-08-2006 12:45:34,241 INFO [OAISplitter] () - Loading bulk data into
the database.

June 12, 2011

75

Primo System Administration Guide

JBoss-Related Logs
Bydefault,allJBossrelatedlogfilesarelocatedinthefollowingdirectories:

/exlibris/primo/p<v>_<c>/ng/primo/home/system/thirdparty/
openserver/server/publish/log

/exlibris/primo/p<v>_<c>/ng/primo/home/system/thirdparty/
openserver/server/search/log

InPrimo,thefollowingtypesoflogfilesareavailable:

boot.log

localhost_access_log.log

library_server.log,publish_server.log,andagent_9501.log

boot.log
Theboot.loglogfileistheJBossmicrokernelstartuplog.Itcontains
informationaboutthemicrokernelstartup,classpath,andenvironment
parameters.

localhost_access_log.log
Thelocalhost_access_log.<date>.logisanHTTPaccesslog.Itlistsall
HTTPrequestswithaGET/POSTlisting.ThislogfileissimilartotheApache
HTTPDserveraccesslog.
JBossusesTomcatasaWebcontainerimplementation.The
localhost_access_loglogisactuallyaTomcatlog.
Thefollowingisanexampleofthecontentsofalogfile:
Client Ip,
Date & Time,
HTTP Method, URL, Http
Version Http return code, msg length
10.1.235.71 - [01/Jan/2006:12:08:11 +0200] "GET /mng/css/
loginStyles.css HTTP/1.1" 200 6350
10.1.235.71 - [01/Jan/2006:12:08:11 +0200] "GET /mng/css/
generalStyles.css HTTP/1.1" 200 43888
The localhost_access_log log is refreshed daily and the date is
included in the log file name. For example:
localhost_access_log.2005-12-31.log
localhost_access_log.2006-01-01.log

Thelocalhost_access_loglogcanbecustomizedbyeditingthefollowing
files:

76

home/profile/overwrites/thirdparty/openserver/server/publish/
deploy/jbossweb-tomcat.sar/server.xml.tmpl

June 12, 2011

Chapter 7: Accessing Reports and Log Files

home/profile/overwrites/thirdparty/openserver/server/search/
deploy/jbossweb-tomcat.sar/server.xml.tmpl

library_server.log, publish_server.log, and agent_9501.log


Thelibrary_server.log,publish_server.log,andagent_9501.logfiles
arethemainlogfilesforJBossactivity.PrimomodulesthatrununderJBoss
writeinformationtothislogfile.
Eachtimetheserverisrestarted,atimestampisadded.Yourlogdirectory
mightappearasfollows:
-rw-rw-r-1 prm
exlibris
library_server.log.2005-12-29

174985 Dec 29 23:57

-rw-rw-r-1 prm
exlibris 17546674 Dec 30 23:57
library_server.log.2005-12-30
-rw-rw-r-1 prm
exlibris
library_server.log.2005-12-31

281074 Dec 31 23:57

-rw-rw-r-1 prm
exlibris
library_server.log.0101.1050

5698992 Jan

1 11:09

-rw-rw-r-1 prm
exlibris
library_server.log.0101.1100

36822 Jan

1 10:51

-rw-rw-r-1 prm
exlibris
library_server.log.0101.1108

36822 Jan

1 11:01

142407 Jan

1 14:25

-rw-rw-r-1 prm
library_server.log

exlibris

Fromthisexample,itisclearthattheserverwasupfromthe29/1231/12
(rolledover).On01/01,theserverwasrestartedat10:50,11:00,and11:08.
Thelibrary_server.logfileisthecurrentactivelogfile.Usingthefollowing
commandcanbeusefulwhendebuggingtheserver.
tail -f library_server.log

June 12, 2011

77

Primo System Administration Guide

Forexample:
2005-11-06 19:10:17,988 INFO [com.exlibris.Primo.
delivery.DeliverySessionsMng] Cleaning old delivery session 1131296885128.
2005-11-06 19:15:32,941 INFO [com.exlibris.Primo.repository.jobs.
IndexFileSynchronizerJob] found 8 items to index
2005-11-06 19:15:33,425 INFO [com.exlibris. Primo.
repository.jobs.IndexFileSynchronizerJob] Indexing DIGITAL ENTITY:4530
at 484ms
2005-11-06 19:08:49,128 ERROR [com.exlibris. Primo
.delivery.DefaultAccessRightsChecker] Fail to parse access right
metadata. Exception: error: The element type "xb:access_right_md" must
be terminated by the matching end-tag "</xb:access_right_md>". Cause:
org.xml.sax.SAXParseException: The element type "xb:access_right_md"
must be terminated by the matching end-tag "</xb:access_right_md>".

Eachmessageinthelogfilehasasetoffixedheaderinformationandadynamic
message.Allofthelogmessagesaredefinedinthefollowingfile:
home/system/conf/ExLibMessageFile.properties

Forexample:
50005=Unable to create Ingest jobs log, ingest id = {0}, exception =
{1}
50006=Removed ingest activity {0} from the database.
50007=Removed ingest {0} from the disk.

Thepublish_server.logandlibrary_server.logfilescanbeconfiguredby
editingthefollowingfiles,respectively:

home/profile/overwrites/thirdparty/openserver/server/publish/
conf/log4j.xml

home/profile/overwrites/thirdparty/openserver/server/search/
conf/log4j.xml

Usingthelibrary_server.logfile,youcancontrolthelogentryformat
pattern,disableandenablelogmessages,anddefinetheloglevel(suchas
information,warning,orerror)foreachJavapackage.

78

June 12, 2011

Chapter 7: Accessing Reports and Log Files

Watchdog Logs
Thewatchdog.logfileenablesyoutokeeptrackofallwatchdogactivityand
thestatusofallmonitoredcomponents.
To view the log file:
1

Enterthefollowingcommandtomovetothe/exlibris/primo/p3_1/ng/
jaguar/home/profile/logdirectory:
se_log

Enterthefollowingcommandtoviewthelogfile:
vi watchdog.log

Forexample:
2008-08-29 09:29:04,765 INFO
xml completed

[t-Thread-0] [c-Monitorer] - Loading of

2008-08-29 09:29:07,761 INFO


started, adding processes

[t-Thread-0] [c-Monitorer] - Schedular

2008-08-29 09:29:07,761 INFO [t-Thread-0] [c-Monitorer] - process 1,


named Database has been scheduled to run every 10 seconds
2008-08-29 09:29:07,761 INFO [t-Thread-0] [c-Monitorer] - process 2,
named Back End has been scheduled to run every 10 seconds
2008-08-29 09:29:07,761 INFO [t-Thread-0] [c-Monitorer] - process 3,
named PDS has been scheduled to run every 60 seconds
2008-08-29 09:29:07,761 INFO [t-Thread-0] [c-Monitorer] - process 4,
named Front End has been scheduled to run every 10 seconds
2008-08-29 09:29:07,761 INFO
watchdog configuration

[t-Thread-0] [c-Monitorer] - reset

2008-08-29 09:29:08,790 INFO [t-DefaultQuartzScheduler_Worker-1] [cMonitorSchedularJob] - be.Back End retruned status: 'OK'
2008-08-29 09:29:08,837 INFO [t-DefaultQuartzScheduler_Worker-0] [cMonitorSchedularJob] - be.Database retruned status: 'OK'
2008-08-29 09:29:09,773 INFO [t-DefaultQuartzScheduler_Worker-2] [cMonitorSchedularJob] - be.PDS retruned status: 'NOT OK'
2008-08-29 09:29:15,645 INFO [t-DefaultQuartzScheduler_Worker-0] [cEmailNotifier] - Sending failure email notification to

June 12, 2011

79

Primo System Administration Guide

80

June 12, 2011

8
Managing the Primo Database
ThePrimodatabaseisbasedonOracle11gRDBMS.
Thissectionincludes:

IntroductiontotheOracleDatabaseonpage81

DatabaseSchemaonpage83

DatabaseUtilitiesonpage89

Introduction to the Oracle Database


AtypicalPrimoinstallationincludesasingledatabaseschema,P<r><x>_PRM00,
where<r>indicatesthereleaseinwhichPrimowasinitiallyinstalledand<x>
indicatesthenumberoftheinstallation(forexample,P21_PRM00).Thisschema
containsdataandconfigurationinformation.

Oracle Users in Primo


ThefollowingarethePrimoOracleusers:

P<r><n>_PRM00ConnectstotheOracledatabase(defaultpassword:
P<r><n>_PRM00).Thisusercanselect,insert,update,anddeletetablesfrom
theP<r><n>_PRM00schema.

PRIMO_ADMINInadditiontotheprivilegesoftheP<r><n>_PRM00user,this

usercancreate,delete,andalterOracletables,indexes,users,triggers,and
soforth.ThePRIMO_ADMINuserisusedinallPrimoprocedures.

PRIMO_DBAProvidesaccesstodatabaseadministrationoperationsonthe

Primosystem,suchasstartupandshutdown.

P<r><n>_RPT00:ProvidesaccesstotheRPT00views,whichareconfigured

fromtablesinPRM00.TheseviewsallowyoutocreateyourownBIRT
reports,whichcanbeviewedfromtheBackOffice.Forexample,the
PRIMO_BO_AUDIT_TABLEviewprovidesaccesstothedataregarding

June 12, 2011

81

Primo System Administration Guide

databaseactivityintheBackOffice.Formoreinformationoncreatinguser
definedreports,seethePrimoTechnicalGuide.

P<r><n>_PRM00_SHARED:Usedinternallybythesystemtomanageshared

dataforPrimoCentralandshouldnotberemoved.
TheconnectionbetweentheseOracleusersandPrimoserversandproceduresis
transparenttotheenduserusingthePrimoFrontEndandBackOffice
interfaces.

Tablespaces in Primo
AnOracledatabaseconsistsofseverallogicalunitscalledtablespaces.Each
tablespaceconsistsofoneormorephysicaldatafilesthatcanbestoredonone
ormoredisks.
ThefollowingtableshowsthePrimotablespaces.Notethateachtablspacemay
havemultiplefiles.

Table 10. Primo Tablespace Information

Tablespace Name Usage

Physical File

LOG

OracleDBsystemtables

/exlibris/oradata/prm3/
log01.dbf

SYSAUX

OracleDBsystemtables

/exlibris/oradata/prm3/
sysaux01.dbf

SYSTEM

Oraclesystemtables

/exlibris/oradata/prm3/
system01.dbf

TEMP

Temporaryspaceforsorting,
indexcreation,andsoforth.

/exlibris/oradata/prm3/
temp01.dbf

TS_P_DAT

Primotables

/exlibris/oradata/prm3/
prm3_ts_p_dat_01.dbf

TS_P_IDX

Primoindexes

/exlibris/oradata/prm3/
prm3_ts_p_idx_01.dbf

TS_ENRICH_DATA

PNXenrichmentrelated
content

/exlibris/oradata/prm3/
prm3_ts_enrich_data_01.dbf

TS_ENRICH_IDX

Enrichmentindexes

/exlibris/oradata/prm3/
prm3_ts_enrich_idx_01.dbf

TS_EXL_DEF

ExLibrisdefinitions

/exlibris/oradata/prm3/
prm3_ts_exl_def_01.dbf

TS_PNX_ADD_DATA

PNXadditionaldata

/exlibris/oradata/prm3/
prm3_ts_pnx_add_data_01.dbf

82

June 12, 2011

Chapter 8: Managing the Primo Database

Table 10. Primo Tablespace Information

Tablespace Name

Usage

Physical File

TS_PNX_ADD_IDX

PNXadditionaldataindexes

/exlibris/oradata/prm3/
prm3_ts_pnx_add_idx_01.dbf

TS_PNX_DATA

PNXcontent

/exlibris/oradata/prm3/
prm3_ts_pnx_data_01.dbf

TS_PNX_IDX

PNXindexex

/exlibris/oradata/prm3/
prm3_ts_pnx_idx_01.dbf

TS_PNX_EXT_DATA

PNXextensioncontent

/exlibris/oradata/prm3/
prm3_ts_pnx_ext_data_01.dbf

TS_PNX_EXT_IDX

PNXextensionindexes

/exlibris/oradata/prm3/
prm3_ts_pnx_ext_idx_01.dbf

TS_SRC_REC_DATA

Harvestedsourcerecord
content

/exlibris/oradata/prm3/
prm3_ts_src_rec_data_01.dbf

TS_SRC_REC_IDX

Harvestedsourcerecord
indexes

/exlibris/oradata/prm3/
prm3_ts_src_rec_idx_01.dbf

TS_STATS_DATA

Primoapplicationstatistics
content

/exlibris/oradata/prm3/
prm3_ts_stats_data_01.dbf

TS_STATS_IDX

Primoapplicationstatistics
indexes

/exlibris/oradata/prm3/
prm3_ts_stats_idx_01.dbf

TSLOB

OracleDBsystemtables

/exlibris/oradata/prm3/
tslob01.dbf

UNDOTBS1

OracleDBsystemtables

/exlibris/oradata/prm3/
undotbs101.dbf

USERS

OracleDBsystemtables

/exlibris/oradata/prm3/
users01.dbf

Database Schema
ThePrimodatabaseconsistsofmanytablesusedtostoredata,system
information,processstates,andmore.

June 12, 2011

83

Primo System Administration Guide

ThefollowingisalistofthetabletypesinthePrimodatabase.Theprefixofeach
tabledescribesitsmajorfunction.
Table 11. Primo Database Tables

Schema

Description

Tables

C_CTables

CommonConfigurationTables.
Tableswithcommonfieldsare
groupedtogetherintoasingletable
toimproveprocessingspeed.One
ofthefieldsofacommontableis
thenameofthetabletowhicheach
recordbelongs.Thisgroupoftables
containsconfigurationdatafor
thesecommontablesandallthe
recordsofthetables.

C_C_TABLE_OF_TABLES
containsmetadatainformation
fortheC_C_MAPPING_TABLES
andC_C_CODE_TABLEStables.
C_C_CODE_COLUMN_NAMES
containsmetadatainformation
oneachcolumnforthe
C_C_MAPPING_TABLESand
C_C_CODE_TABLEStables.
C_C_MAPPING_TABLES
containstherecordsofthe
generictables(eachtablehassix
columns).
C_C_CODE_TABLEScontains
therecordsofcodetables(for
internalizationsupport).

C_GTables

GlobalConfigurationTables.Tables
thatcontainglobalsystem
configurationparameters.

C_G_CONFIGURATIONcontains
globalsystemconfiguration
parameters.

C_ITables

InstitutionConfigurationTables.
Tablesthatcontainconfiguration
parametersconcerningthe
institutionproviding
bibliographicalservices.

C_I_INSTITUTION

84

C_I_INSTITUTION_IP
C_I_LIBRARY
C_I_RESTRICTION

June 12, 2011

Chapter 8: Managing the Primo Database

Table 11. Primo Database Tables

Schema

Description

Tables

C_NTables

NormalizationConfiguration
Tables.Tablesthatcontainglobal
normalizationrulesforthe
publishingprocess.

C_N_BASIC_ROUTINES
C_N_ENRICHMENT
C_N_ENRICHMENT_MAPPING
C_N_ENRICHMENT_SET
C_N_MAPPING_SET
C_N_MAPPING_SOURCE
C_N_MAPPING_TARGET
C_N_MAPPING_TRANSFORMATION
C_N_SCOPES
C_N_SOURCE_CONDITION
C_N_TRANSFORMATION_GROUP
C_N_DATA_SOURCE
C_N_PROCESS_CONFIGURATION

C_VTables

ViewingConfigurationTables.
Tablesthatcontainenduser
viewinginformation.

C_V_LAYOUT_SET
C_V_LAYOUT_SET_PAGES
C_V_PAGES
C_V_PAGE_TILES
C_V_SCOPES
C_V_SCOPE_VALUES
C_V_TABS
C_V_TAB_SCOPE
C_V_TILES
C_V_VIEWS
C_V_VIEW_LAYOUT_SET
C_V_VIEW_TILE_CONFIG

M_PTables

PipeMonitoringConfiguration
Tables.Tablesthatcontainpipe
monitoringinformation.

M_P_BULK_CONTEXT
M_P_FAILED_RECORDS
M_P_PROCESS_CONTEXT
M_P_WORK
M_P_PROC_EXE

RTables

ParametersConfigurationTables.
Tablesthatcontainuserparameters.

R_ROLE
R_STAFF
R_STAFF_ROLE_MAPPING

June 12, 2011

85

Primo System Administration Guide

Table 11. Primo Database Tables

Schema

Description

Tables

STables

StatisticsConfigurationTables.
Tablesthatcontainaccumulated
systemstatistics.ThePrimo
reportingsystemusesthesetables
asitsdatasource.

S_CLICK_SUMMARIES

UserConfigurationTables.Tables
thatcontainendusercustomization
andpersonalparameters.

U_BASKETcontainsthe
electronicbasket.

UTables

S_SEARCH_SUMMARIES

U_PREFERENCEcontainsuser
preferences.
U_RSScontainsRSS
information.
U_SAVED_SEARCHcontains
usersavedsearches.

PTables

PNXConfigurationTables.PNX
relatedtables.

P_PNXcontainsallthePNX
records.Forafulldescriptionof
thistable,refertoP_PNXTable
onpage87.
P_PNX_EXTENSIONcontains
additionalinformationonPNX
records,whererequired.For
example,tags,reviews,and
syndetics(anexternal
knowledgebasethatholdsextra
informationabouttherecord,
forexample,theTOCofabook).
P_SOURCE_RECORDcontains
originalsourcerecordsfor
renormalization,ifrequired.
P_DEDUP_VECTORcontains
informationtosupportthe
dedupprocess.
P_FRBR_KEYScontains
informationtosupportthe
FRBRprocess.
P_FRBR_MATCHEStemporary
tableforuseduringFRBR
processing.
P_DEDUP_COMPONENT
P_PNX_CLICK

86

June 12, 2011

Chapter 8: Managing the Primo Database

Table 11. Primo Database Tables

Schema

Description

Tables
P_PNX_XREF
P_RPNX

NOTE:
AlldefaultdatacreatedbythePrimosystemisnotedasupdatedby
Primo.

P_PNX Table
TheP_PNXtablecontainsthePrimoPNXrecords.Thefollowingtablelistsand
describesthefieldsintheP_PNXtable.
Table 12. P_PNX Table Fields

Field Name

Description

ID

Theinternalidentificationnumberoftherecord.

RECORDID

Thesourcesystemrecordidentificationnumberofthe
record.

PART_1,PART_2,PART_3,
PART_4,PART_5,
STRING_CLOB

ThePNXxmlcodeoftherecord.

CREATION_DATE

ThedateonwhichtherecordwascreatedinPrimo.

UPDATED_DATE

ThedateonwhichtherecordwasupdatedinPrimo.

UPDATED_BY

Thenameoftheuserwhoranthepipethatcreatedthe
record.

MATCHID

Thededupmatchidentificationnumberoftherecord.

GROUPID

TheFRBRmatchidentificationnumberoftherecord.

June 12, 2011

87

Primo System Administration Guide

Table 12. P_PNX Table Fields

Field Name

Description

PERSISTCONTROL

Thecurrentprocessingstageoftherecord.Possible
values:
1NEW_STATUS
2UPDATED_STATUS
3AFTER_DEDUPED_STATUS
4AFTER_DEDUPED_MERGE_STATUS
5AFTER_FRBR_STATUS
6AFTER_FRBR_MERGE_STATUS
7DELETED_STATUS

SECONTROL

Thecurrentindexingstatus.Possiblevalues:
1SE_CONTROL_NEW_STATUS
2SE_CONTROL_UPDATED_STATUS
3SE_CONTROL_DELETED_STATUS

PIPE_NAME

Thenameofthepipefromwhichtherecordwas
loaded.

PREVIOUS_TYPE

Fordedupanddedupmergepurposes.

SOURCE_ID

Thenameofthesourcefromwhichtherecordwas
loaded.

DATA_SOURCE_CODE

Thecodenameofthedatasourceassociatedwiththe
pipe.

BULK_ID

Thenameofthebulkfromwhichtherecordwas
loaded.

TYPE

Thetypeoftherecord.Possiblevalues:
1REGULAR_TYPE
2DEDUP_MEMBER_TYPE
3DEDUP_SINGLE_TYPE
4DEDUP_MERGE_TYPE
5FRBR_MEMBER_TYPE
6FRBR_SINGLE_TYPE
7FRBR_MERGE_TYPE

88

EXTENSION_EXISTS

Indicateswhetheranextensionexists.

PUBLISHING_WORK_ID

PipeID.

June 12, 2011

Chapter 8: Managing the Primo Database

Database Utilities
ThefollowingtableliststhedatabaseutilitiesthataresupportedinPrimo.
Table 13. Supported Database Utilities

Number

Utility Name

Refer to

O/1

OracleServer

OracleServer(UtilO/1)on
page93

O/1/1

ActivateOracleServer

ActivateOracleServer(UtilO/1/1)
onpage94

O/1/2

CloseOracleServer

CloseOracleServer(UtilO/1/2)on
page94

O/1/3

ShowRunningOracleServer

ShowRunningOracleServer(Util
O/1/3)onpage95

O/1/4

ShowOracleServerStatus

ShowOracleServerStatus(Util
O/1/4)onpage96

O/2

OracleListener

OracleListener(UtilO/2)on
page97

O/2/1

ActivateOracleListener

ActivateOracleListener(UtilO/2/
1)onpage98

O/2/2

CloseOracleListener

CloseOracleListener(UtilO/2/2)
onpage98

O/2/3

ShowRunningOracleListener

ShowRunningOracleListener
(UtilO/2/3)onpage99

O/2/4

ShowListenerStatus

ShowListenerStatus(UtilO/2/4)
onpage99

O/2/5

ShowListenerServices

ShowListenerServices(UtilO/2/
5)onpage101

O/3

OracleLogs

OracleLogs(UtilO/3)onpage103

O/3/1

ViewOracleALERTLOG

ViewOracleALERTLOG(UtilO/
3/1)onpage103

O/6

NLS

NLS(UtilO/6)onpage104

O/6/1

ShowNLSParameters

ShowNLSParameters(UtilO/6/1)
onpage105

O/7

Archiving

Archiving(UtilO/7)onpage105

O/7/1

TurningArchivingOn

TurningArchivingOn(UtilO/7/1)
onpage107

June 12, 2011

89

Primo System Administration Guide

Table 13. Supported Database Utilities

90

Number

Utility Name

Refer to

O/7/2

TurningArchivingOff

TurningArchivingOff(UtilO/7/
2)onpage107

O/7/3

ShowArchivingStatus

ShowArchivingStatus(UtilO/7/
3)onpage108

O/9

DatabaseUsers

DatabaseUsers(UtilO/9)on
page108

O/9/1

ListDatabaseUsers

ListDatabaseUsers(UtilO/9/1)on
page109

O/9/2

CreateaNewUser

CreateaNewUser(UtilO/9/2)on
page110

O/11

Oracleuserpasswordutility

OracleUserPasswordUtility(Util
O/11)onpage113

O/13

DatabaseFiles

DatabaseFiles(UtilO/13)on
page114

O/13/1

ListofDatabaseFiles

ListofDatabaseFiles(UtilO/13/1)
onpage114

O/13/2

ResizeOracleDatafile

ResizeOracleDatafile(UtilO/13/
2)onpage115

O/13/3

AddFiletoTablespace

AddFiletoTablespace(UtilO/13/
3)onpage116

O/13/4

ShowDatafileFreeBlocksby
Kbytes

ShowDatafileFreeBlocksby
Kbytes(UtilO/13/4)onpage118

O/13/5

ShowDatafileFreeBlocksby
BlockID

ShowDatafileFreeBlocksby
BlockID(UtilO/13/5)onpage118

O/14

DatabaseFree/UsedSpace

DatabaseFree/UsedSpace(UtilO/
14)onpage119

O/14/1

AllTablespacesFreeSpace
Summary

AllTablespacesFreeSpace
Summary(UtilO/14/1)on
page120

O/14/2

NumberofFreeExtentsbySize
inaTablespace

NumberofFreeExtentsbySizein
aTablespace(UtilO/14/2)on
page121

O/14/3

AllFreeExtentsofMinSizein
aTablespace

AllFreeExtentsofMinSizeina
Tablespace(UtilO/14/3)on
page122

June 12, 2011

Chapter 8: Managing the Primo Database

Table 13. Supported Database Utilities

Number

Utility Name

Refer to

O/14/4

SpaceUsedbyaRepository/
RepositoriesinEach
Tablespace

SpaceUsedbyaRepository/
RepositoriesinEachTablespace
(UtilO/14/4)onpage123

O/14/5

SpaceUsedbyaGroupof
RepositoriesinEach
Tablespace

SpaceUsedbyaGroupof
RepositoriesinEachTablespace
(UtilO/14/5)onpage123

O/14/6

CoalesceContiguousFree
Extents

CoalesceContiguousFreeExtents
(UtilO/14/6)onpage124

O/14/8

PrimoTablespacesTotal/Free/
UsedSpaceReport

PrimoTablespacesTotal/Free/
UsedSpaceReport(UtilO/14/8)
onpage127

O/14/9

CleanTemporaryTablespace
FreeStorage

CleanTemporaryTablespaceFree
Storage(UtilO/14/9)onpage127

O/14/10

SpaceUsedbyPRM00Schema

SpaceUsedbyaPRM00Schema
(UtilO/14/10)onpage128

O/17

DatabaseTablespaces

DatabaseTablespaces(UtilO/17)
onpage128

O/17/1

CreateaTablespace

CreateaTablespace(UtilO/17/1)
onpage129

O/17/2

ListTablespaceFiles

ListTablespaceFiles(UtilO/17/2)
onpage131

O/17/4

ShowTablespacesDefinition

ShowTablespacesDefinition
(UtilO/17/4)onpage131

O/17/5

ShowTablespaceAllocated/
Free/UsedSpace

ShowTablespaceAllocated/Free/
UsedSpace(UtilO/17/5)on
page132

O/18

OracleStatistics

OracleStatistics(UtilO/18)on
page133

O/18/1

PerformanceStatistics

PerformanceStatistics(UtilO/18/
1)onpage134

O/18/2

RollbackSegmentsDefinitions

RollbackSegmentsDefinitions
(UtilO/18/2)onpage134

O/18/3

RollbackSegmentsDynamic
Allocation

RollbackSegmentsDynamic
Allocation(UtilO/18/3)on
page136

O/18/4

ViewLongOperations

ViewLongOperations(UtilO/18/
4)onpage136

June 12, 2011

91

Primo System Administration Guide

Table 13. Supported Database Utilities

92

Number

Utility Name

Refer to

O/18/5

I/OStatistics

IOStatistics(UtilO/18/5)on
page137

O/18/6

SortOperations

SortOperations(UtilO/18/6)on
page137

O/19

SharedPool

SharedPool(UtilO/19)on
page138

O/19/1

ShowSGABuffers

ShowSGABuffers(UtilO/19/1)
onpage139

O/19/2

FlushSharedPool

FlushSharedPool(UtilO/19/2)on
page140

O/20

MultiThreadedServer

MultiThreadedServer(UtilO/20)
onpage140

O/20/1

ShowMTSParameters

ShowMTSParameters(UtilO/20/
1)onpage141

O/20/2

ShowListenerServices

ShowListenerServices(UtilO/20/
2)onpage141

June 12, 2011

Chapter 8: Managing the Primo Database

Oracle Server (Util O/1)


TheOracleServermenuallowsyoutomanagetheOracleserver.
Figure 2:
O. Managing ORACLE
-----------------0. Exit Procedure
1. Oracle Server
2. Oracle Listener
3. Oracle Logs
4. Resumable Space Allocation
6. Nls
7. Archiving
9. Database Users
10. SQL*Plus Session
11. Oracle user password utility
12. Database Verification Utility
13. Database Files
14. Database Free/Used Space
16. Database Links
17. Database Tablespaces
18. Oracle Statistics
19. Shared Pool
20. Multi Threaded Server
21. Create/Recreate reports(RPT00) schema
Please select [exit]:
Figure 8: Managing Oracle Menu

To access the Oracle Server menu:


1

Logontotheserverwiththeprimouser.

EnterthefollowingcommandstodisplaytheManagingOraclemenu.
dlib prm00
util o

Enteroption1todisplaytheOracleServermenu.
Figure 3:
O.1 Oracle Server
--------------0. Exit Procedure
1. Activate Oracle Server
2. Close Oracle Server
3. Show Running Oracle Server
4. Show Oracle Server Status
Figure 9: Oracle Server Menu

June 12, 2011

93

Primo System Administration Guide

Activate Oracle Server (Util O/1/1)


InorderforPrimotointeractwithOracle,theOracleservermustberunning.
WhenPrimoisinstalledonthesameserverasthePrimodatabase,itdoesnot
requiretheListener.However,theListenermustrunontheserverifathird
partyproductisusedtoconnectPrimoandthedatabaseorifthereisaremote
serverconnectedtothedatabase.Forexample,whenPrimoisinstalledonone
serverandthedatabaseisonadifferentserver,theListenermustberunningon
thedatabaseserverinorderforPrimotooperatecorrectly.
PrimoandOraclemaystartautomaticallyatboottime(ifthisoptionisset
duringinstallation).
NOTES:

ThisoperationrequiresthePRIMO_DBAusernameandpassword.

ThisutilitywillnotbeavailableiftheOracledatabaseandthePrimo
applicationareinstalledonseparateservers.

To start up the Oracle server:


1

Enteroption1fromtheOracleServermenu.
Thefollowingpromptdisplays:
To continue you will need to enter PRIMO DBA username/password.
Username/password: primo_dba/<primo_dba password>

EnterthePRIMO_DBAusernameandpasswordtoactivatetheOracleserver.

NOTE:
ThePRIMO_DBAuser,whichiscreatedduringinstallation,isprovided
withdatabaseadministrationprivilegesthatallowyoutostartuporshut
downthedatabase.

Close Oracle Server (Util O/1/2)


NOTE:
ThisoperationrequiresthePRIMO_DBAusernameandpassword.
ThisutilityshutsdowntheOracleserverimmediatelybyactivatingtheOracle
shutdownimmediateoption.Alltheclientsconnectedtotheserverare
immediatelyloggedout.

94

June 12, 2011

Chapter 8: Managing the Primo Database

To shut down the Oracle server:


1

Enteroption2fromtheOracleServermenu.Toaccessthismenu,seeOracle
Server(UtilO/1).
Thefollowingpromptdisplays:
Do you want to restart Oracle server after closing? yes/[no]

Enteryestoshutdownandtherestarttheserverautomatically.
Thefollowingpromptdisplays:
To close Oracle server enter PRIMO DBA username/password.
username/password:primo_dba/<primo_dba password>

NOTE:
Torestarttheserverlater,seeActivateOracleServer(UtilO/1/1)on
page94.
3

EnterthePRIMO_DBAusernameandpasswordtoactivatetheOracleserver.

NOTE:
ThePRIMO_DBAuser,whichiscreatedduringinstallation,isprovided
withdatabaseadministrationprivilegesthatallowyoutostartuporshut
downthedatabase.

Show Running Oracle Server (Util O/1/3)


Thisutilitydisplaysthebackgroundprocessesandthedispatchersandshared
serversthatareusedbyyourOracleinstance(database).
NOTE:
Iftheutilityfailstogenerateanyoutput,activatetheOracleserver(see
ActivateOracleServer(UtilO/1/1)onpage94).
TodisplayOracleprocesses,enteroption3fromtheOracleServermenu.

June 12, 2011

95

Primo System Administration Guide

TherunningprocessesforyourOracleinstancedisplays.Forexample:
oracle
oracle
oracle
oracle
oracle
oracle
oracle
oracle
oracle
oracle
oracle
oracle
oracle
oracle
oracle
oracle
oracle
oracle
oracle
oracle
oracle
oracle
oracle
oracle

22017
22019
22021
22024
22026
22028
22030
22032
22034
22044
22069
22071
22073
22075
22077
22079
22081
22099
22101
22422
22662
22697
25373
29099

1 0 Jan01
1 0 Jan01
1 0 Jan01
1 0 Jan01
1 0 Jan01
1 0 Jan01
1 0 Jan01
1 0 Jan01
1 0 Jan01
1 0 Jan01
1 0 Jan01
1 0 Jan01
1 0 Jan01
1 0 Jan01
1 0 Jan01
1 0 Jan01
1 0 Jan01
1 0 Jan01
1 0 Jan01
1 0 Jan01
1 0 Jan01
1 0 Jan01
1 28 Jan05
1 31 Jan05

?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?

00:00:34
00:00:01
00:00:05
00:36:37
00:13:56
00:02:23
00:01:18
00:00:01
00:00:45
00:00:48
00:00:41
00:34:52
00:43:00
00:44:03
00:42:52
00:46:16
00:42:26
00:43:38
00:43:22
00:00:00
00:00:00
00:00:05
13:23:52
13:23:30

ora_pmon_prm1
ora_psp0_prm1
ora_mman_prm1
ora_dbw0_prm1
ora_lgwr_prm1
ora_ckpt_prm1
ora_smon_prm1
ora_reco_prm1
ora_cjq0_prm1
ora_mmon_prm1
ora_mmnl_prm1
ora_d000_prm1
ora_d001_prm1
ora_d002_prm1
ora_d003_prm1
ora_d004_prm1
ora_d005_prm1
ora_d006_prm1
ora_d007_prm1
ora_qmnc_prm1
ora_q000_prm1
ora_q001_prm1
ora_s000_prm1
ora_s001_prm1

NOTE:
ThisutilityisrelevantonlyifyouarerunningtheOracleserveronthe
samenodeasthePrimoserver.

Show Oracle Server Status (Util O/1/4)


ThisutilitydisplaysthestatusoftheOracleserver.
TodisplaythestatusoftheOracleserver,enteroption4fromtheOracleServer
menu.

96

June 12, 2011

Chapter 8: Managing the Primo Database

ThefollowingisanexampleoftheoutputoftheUtilO/1/4ShowOracleServer
Statusutility:
Figure 4:
INSTANCE_N HOST_NAME
VERSION
STARTUP_TI STATUS
LOGINS
---------- --------------- ------------ ---------- ---------- --------prm1
il-primo05.corp 10.2.0.1.0
01-JAN-07
OPEN
ALLOWED
.exlibrisgroup.
com

BANNER
---------------------------------------------------------------Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE
10.2.0.1.0
Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

Oracle Listener (Util O/2)


TheOracleListenermenuallowsyoutomanagetheOracleListener.
Figure 5:
O.2 Oracle Listener
----------------0. Exit Procedure
1. Activate Oracle Listener
2. Close Oracle Listener
3. Show Running Oracle Listener
4. Show Listener Status
5. Show Listener Services
Figure 10: Oracle Listener Menu

NOTE:
ThisutilitywillnotbeavailableiftheOracledatabaseandthePrimo
applicationareinstalledonseparateservers.
To access the Oracle Listener menu:
1

Logontotheserverwiththeprimouser.

EnterthefollowingcommandstodisplaytheManagingOraclemenu.
dlib prm00
util o

Enteroption2todisplaytheOracleListenermenu.

June 12, 2011

97

Primo System Administration Guide

Activate Oracle Listener (Util O/2/1)


NOTE:
ThisutilityrequirestheOraclesoftwareownerpassword.
Whenauserprocessmakesaconnectionrequestusingaconnectstring,the
OracleListenerprocessexaminestherequestandconnectstheuserprocesstoa
serverprocess.IfOracleandPrimoareinstalledonthesameserverandno
thirdpartyproductsareusedtoconnecttothedatabaseandnoconnectionsare
madefromaremoteserver,PrimocanworkwithouttheListener.Inanyother
case,boththeOracleserverandtheOracleListenermustberunning.Theymay
bestartedautomaticallyatboottime(thisisdeterminedduringinstallation)and
alsocontrolledbythePrimoOracleManagementutilities.
To start up the Oracle Listener:
1

Enteroption1fromtheOracleListenermenu.
Thefollowingpromptdisplays:
To continue you will need to enter Oracle's password.
Password:

EntertheOraclepasswordtostartuptheOracleListener.

Close Oracle Listener (Util O/2/2)


NOTE:
ThisutilityrequirestheOraclesoftwareownerpassword.
ThisutilityshutsdowntheOracleListenerimmediately.Youhaveanoptionto
restartthelistenerautomatically.
To shut down the Oracle Listener:
1

Enteroption2fromtheOracleListenermenu.
Thefollowingpromptdisplays:
Do you want to restart Oracle Listener after closing? yes/[no]

EnteryestoshutdownandthenrestarttheListenerautomatically.
Thefollowingpromptdisplays:
To restart Oracle Listener enter oracle's password.
Password:

98

June 12, 2011

Chapter 8: Managing the Primo Database

NOTE:
TostarttheListenerlater,seeActivateOracleListener(UtilO/2/1)on
page98.
3

EntertheOraclepasswordtorestarttheOracleListener.

Show Running Oracle Listener (Util O/2/3)


ThisutilitydisplaystheactiveOracleListener.TodisplaytheactiveOracle
Listener,enteroption3fromtheOracleListenermenu.
Thefollowingexampleshowstheresultsofthisutility:
oracle
5127
1 0 Jan01 ?
00:08:09 /exlibris/app/oracle/
product/102/bin/tnslsnr LISTENER -inherit

Show Listener Status (Util O/2/4)


ThisutilitydisplaysthestatusoftheOracleListener.
TodisplaythestatusoftheOracleListener,enteroption4fromtheOracle
Listenermenu.

June 12, 2011

99

Primo System Administration Guide

Thefollowingexampleshowstheresultsofthisutility:
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 07-JAN-2007
14:06:58
Copyright (c) 1991, 2005, Oracle.

All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
-----------------------Alias
LISTENER
Version
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date
01-JAN-2007 07:14:47
Uptime
6 days 6 hr. 52 min. 11 sec
Trace Level
off
Security
ON: Local OS Authentication
SNMP
ON
Listener Log File
/exlibris/app/oracle/product/102/network/log/
listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ilprimo05.corp.exlibrisgroup.com)(PORT=1521)))
Services Summary...
Service "prm1.il-primo05.corp.exlibrisgroup.com" has 1 instance(s).
Instance "prm1", status READY, has 9 handler(s) for this
service...
Service "prm1_XPT.il-primo05.corp.exlibrisgroup.com" has 1
instance(s).
Instance "prm1", status READY, has 9 handler(s) for this
service...
The command completed successfully

100

June 12, 2011

Chapter 8: Managing the Primo Database

Show Listener Services (Util O/2/5)


ThisutilitydisplaystheOracleListenerservices.TodisplaytheOracleListener
services,enteroption5fromtheOracleListenermenu.
Thefollowingexampleshowstheresultsofthisutility:
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 07-JAN-2007
14:07:33
Copyright (c) 1991, 2005, Oracle.

All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Services Summary...
Service "prm1.il-primo05.corp.exlibrisgroup.com" has 1 instance(s).
Instance "prm1", status READY, has 9 handler(s) for this
service...
Handler(s):
"DEDICATED" established:3 refused:0 state:ready
LOCAL SERVER
"D007" established:72296 refused:0 current:5 max:972
state:ready
DISPATCHER <machine: il-primo05.corp.exlibrisgroup.com, pid:
22101>
(ADDRESS=(PROTOCOL=ipc)(KEY=#22101.1))
"D006" established:71245 refused:0 current:5 max:972
state:ready
DISPATCHER <machine: il-primo05.corp.exlibrisgroup.com, pid:
22099>
(ADDRESS=(PROTOCOL=ipc)(KEY=#22099.1))
"D005" established:71779 refused:0 current:3 max:972
state:ready
DISPATCHER <machine: il-primo05.corp.exlibrisgroup.com, pid:
22081>
(ADDRESS=(PROTOCOL=ipc)(KEY=#22081.1))
"D004" established:72279 refused:0 current:2 max:972
state:ready
DISPATCHER <machine: il-primo05.corp.exlibrisgroup.com, pid:
22079>
(ADDRESS=(PROTOCOL=ipc)(KEY=#22079.1))
"D003" established:71468 refused:0 current:1 max:972
state:ready
DISPATCHER <machine: il-primo05.corp.exlibrisgroup.com, pid:
22077>
(ADDRESS=(PROTOCOL=tcp)(HOST=ilprimo05.corp.exlibrisgroup.com)(PORT=38790))
"D002" established:72525 refused:0 current:0 max:972
state:ready
DISPATCHER <machine: il-primo05.corp.exlibrisgroup.com, pid:
22075>

June 12, 2011

101

Primo System Administration Guide

(ADDRESS=(PROTOCOL=tcp)(HOST=ilprimo05.corp.exlibrisgroup.com)(PORT=38789))
"D001" established:71704 refused:0 current:4 max:972
state:ready
DISPATCHER <machine: il-primo05.corp.exlibrisgroup.com,
22073>
(ADDRESS=(PROTOCOL=tcp)(HOST=ilprimo05.corp.exlibrisgroup.com)(PORT=38788))
"D000" established:60036 refused:0 current:1 max:972
state:ready
DISPATCHER <machine: il-primo05.corp.exlibrisgroup.com,
22071>
(ADDRESS=(PROTOCOL=tcp)(HOST=ilprimo05.corp.exlibrisgroup.com)(PORT=38787))
Service "prm1_XPT.il-primo05.corp.exlibrisgroup.com" has 1
instance(s).
Instance "prm1", status READY, has 9 handler(s) for this
service...
Handler(s):
"DEDICATED" established:3 refused:0 state:ready
LOCAL SERVER
"D007" established:72296 refused:0 current:5 max:972
state:ready
DISPATCHER <machine: il-primo05.corp.exlibrisgroup.com,
22101>
(ADDRESS=(PROTOCOL=ipc)(KEY=#22101.1))
"D006" established:71245 refused:0 current:5 max:972
state:ready
DISPATCHER <machine: il-primo05.corp.exlibrisgroup.com,
22099>
(ADDRESS=(PROTOCOL=ipc)(KEY=#22099.1))
"D005" established:71779 refused:0 current:3 max:972
state:ready
DISPATCHER <machine: il-primo05.corp.exlibrisgroup.com,
22081>
(ADDRESS=(PROTOCOL=ipc)(KEY=#22081.1))
"D004" established:72279 refused:0 current:2 max:972
state:ready
DISPATCHER <machine: il-primo05.corp.exlibrisgroup.com,
22079>
(ADDRESS=(PROTOCOL=ipc)(KEY=#22079.1))
"D003" established:71468 refused:0 current:1 max:972
state:ready
DISPATCHER <machine: il-primo05.corp.exlibrisgroup.com,
22077>
(ADDRESS=(PROTOCOL=tcp)(HOST=ilprimo05.corp.exlibrisgroup.com)(PORT=38790))
"D002" established:72525 refused:0 current:0 max:972
state:ready
DISPATCHER <machine: il-primo05.corp.exlibrisgroup.com,
22075>
(ADDRESS=(PROTOCOL=tcp)(HOST=ilprimo05.corp.exlibrisgroup.com)(PORT=38789))

102

pid:

pid:

pid:

pid:

pid:

pid:

pid:

pid:

June 12, 2011

Chapter 8: Managing the Primo Database

"D001" established:71704 refused:0 current:4 max:972


state:ready
DISPATCHER <machine: il-primo05.corp.exlibrisgroup.com, pid:
22073>
(ADDRESS=(PROTOCOL=tcp)(HOST=ilprimo05.corp.exlibrisgroup.com)(PORT=38788))
"D000" established:60036 refused:0 current:1 max:972
state:ready
DISPATCHER <machine: il-primo05.corp.exlibrisgroup.com, pid:
22071>
(ADDRESS=(PROTOCOL=tcp)(HOST=ilprimo05.corp.exlibrisgroup.com)(PORT=38787))
The command completed successfully

Oracle Logs (Util O/3)


TheOracleLogsmenuallowsyoutoviewtheOraclelogfile.
Figure 6:
O.3 Oracle Logs
--------------0. Exit Procedure
1. View Oracle ALERT LOG
Figure 11: Oracle Logs Menu

To access the Oracle Logs menu:


1

Logontotheserverwiththeprimouser.

EnterthefollowingcommandstodisplaytheManagingOraclemenu.
dlib prm00
util o

Enteroption3todisplaytheOracleLogsmenu.

View Oracle ALERT LOG (Util O/3/1)


ThisutilitydisplaysthelatestentriestotheOraclealertlog.Bydefault,thelast
100linesaredisplayed.
To view the Oracle alert log:
1

Enteroption1fromtheOracleLogsmenu.
Thefollowingpromptdisplays:
The Database Contains the Following Files:
Enter number of lines to see from log : [100]

June 12, 2011

103

Primo System Administration Guide

Enterthenumberoflinestodisplayfromthelog.
Thefollowingexampledisplaysthelast15linesofthelog:
Fri Jun 26 00:47:00 2009
SMON: enabling cache recovery
Fri Jun 26 00:47:03 2009
Successfully onlined Undo Tablespace 1.
Fri Jun 26 00:47:03 2009
SMON: enabling tx recovery
Fri Jun 26 00:47:04 2009
Database Characterset is UTF8
Opening with Resource Manager plan: SYSTEM_PLAN
where NUMA PG = 1, CPUs = 2
replication_dependency_tracking turned off (no async multimaster
replication found)
Starting background process QMNC
QMNC started with pid=14, OS id=15328
Fri Jun 26 00:47:12 2009
Completed: ALTER DATABASE OPEN
Enter CR to continue...

TypeENTERtoreturntotheOracleLogsmenu.

NLS (Util O/6)


TheNLSmenuallowsyoutoviewtheNLS(NationalLanguageSupport)
parameters.
Figure 7:
O.6 NLS
--------------0. Exit Procedure
1. Show NLS Parameters
Figure 12: NLS Menu

To access the NLS menu:


1

Logontotheserverwiththeprimouser.

EnterthefollowingcommandstodisplaytheManagingOraclemenu.
dlib prm00
util o

104

Enteroption6todisplaytheNLSmenu.

June 12, 2011

Chapter 8: Managing the Primo Database

Show NLS Parameters (Util O/6/1)


PrimousestheUTF8characterset.ThisutilityshowstheNLS(National
LanguageSupport)definitionofthedatabase.
To view the NLS parameter settings:
1

Enteroption1fromtheNLSmenu.
Forexample,theutilitydisplaysthesettingsoftheparameters:
Figure 8:
PARAMETER
VALUE
===========================================================
NLS_LANGUAGE
AMERICAN
NLS_TERRITORY
AMERICA
NLS_CURRENCY
$
NLS_ISO_CURRENCY
AMERICA
NLS_NUMERIC_CHARACTERS
.,
NLS_CALENDAR
GREGORIAN
NLS_DATE_FORMAT
DD-MON-RR
NLS_DATE_LANGUAGE
AMERICAN
NLS_CHARACTERSET
UTF8
NLS_SORT
BINARY
NLS_TIME_FORMAT
HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT
DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT
HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT
DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY
$
NLS_NCHAR_CHARACTERSET
UTF8
NLS_COMP
BINARY
NLS_LENGTH_SEMANTICS
BYTE
NLS_NCHAR_CONV_EXCP
FALSE
19 rows selected.
Enter CR to continue...

TypeENTERtoreturntotheNLSmenu.

Archiving (Util O/7)


PrimobackupandrecoveryproceduresarebasedonOracle.Inordertoprovide
completerecoveryofdatauptothetimeoffailure,theOracledatabasemode
mustbearchivelogmode.Thisensuresfullrecoveryuptothetimeoffailure.
Hotbackupcannotbeperformedwithoutfirstenablingarchivelogmodeofthe
database.
Ifthedatabaseisinnoarchivelogmode,onlycoldbackupscanbeperformed.A
coldbackuprestoresdatatothetimethelastbackupwasperformed.This
meansthatallchangesfromthetimeoffailurearelost.

June 12, 2011

105

Primo System Administration Guide

ExLibrishighlyrecommendsarchivelogmodebecauseinthismode,bothcold
andhotbackupscanbeusedtorecoverthedatabaserightuptothetimeofthe
failure.Toensureacompleterecovery,allthearchivefilesthatweregenerated
fromthetimeofthebackup(hotorcold)untilthetimeoffailuremustbe
available.
RefertotheOraclebackupmanualformoreinformationonthepreliminary
actionsthatarerequiredbeforeusingUtilO/7.
NOTES:

Changingthearchivingmodeshutsdownthedatabaseandrestartsitin
archivelogmode.
Whenrunningpipes(suchaspipessettoNoHarvestingUpdateData
Source)thataddorchangealargeamountofdata,itisrecommended
thatyoustopOraclearchiving,asthisslowsdowntheprocessandfills
upthedisk.Immediatelyaftertheprocessiscomplete,performafull
coldbackupandthenturnarchivingbackon.

Alwaysperformafullcoldbackupimmediatelyafterswitchingto
archivelogmode.Ifyoudonotdothis,therewillbeagapinthe
archivelogfiles,whichwillpreventafullrecovery.

TheArchivingmenuallowsyoutomanagearchiving.
Figure 9:
O.7 Archiving
--------------0. Exit Procedure
1. Turning Archiving On
2. Turning Archiving Off
3. Show Archiving Status
Figure 13: Archiving Menu

To access the Archiving menu:


1

Logontotheserverwiththeprimouser.

EnterthefollowingcommandstodisplaytheManagingOraclemenu.
dlib prm00
util o

106

Enteroption7todisplaytheArchivingmenu.

June 12, 2011

Chapter 8: Managing the Primo Database

Turning Archiving On (Util O/7/1)


WhenyourunyourdatabaseinARCHIVELOGmode,youenablethearchiving
oftheredolog.
NOTES:

TurningarchivingonrequiresaPrimoDBAusernameandpassword.

Changingthearchivingmodeshutsdownthedatabaseandrestartsitin
archivelogmode.

To turn on Oracle archiving mode:


1

StopPrimoprocesses(serversandbatchprocedures)usingthestartup
scriptsdescribedinStartingandStoppingtheSystemonpage33.

FromtheArchivingmenu,enteroption1toturnonarchiving.

Atthefollowingprompt,enterthePRIMO_DBAusername/password:
To continue you will need to enter PRIMO_DBA username/password.
username/password:

RestartPrimousingthestartupscriptsdescribedinStartingandStopping
theSystemonpage33.

Turning Archiving Off (Util O/7/2)


WhenyourunyourdatabaseinNOARCHIVELOGmode,youdisablethe
archivingoftheredolog.
NOTES:

RequiresPrimoDBAusernameandpassword.

Changingthearchivingmodeshutsdownthedatabaseandrestartsit
witharchivelogmodeoff.

To turn off Oracle archiving mode:


1

StopPrimoprocesses(serversandbatchprocedures)usingthestartup
scripts,asdescribedinStartingandStoppingtheSystemonpage33.

FromtheArchivingmenu,enteroption2toturnoffarchiving.

June 12, 2011

107

Primo System Administration Guide

Atthefollowingprompt,enterthePRIMO_DBAusername/password:
To continue you will need to enter PRIMO_DBA username/password.
username/password:

RestartPrimousingthestartupscriptsdescribedinStartingandStopping
theSystemonpage33.

Show Archiving Status (Util O/7/3)


ThisutilitydisplaysthecurrentarchivingstatusofOracle.
NOTE:
YouwillneedaPrimoDBAusernameandpasswordtoviewthestatus.
Toviewthearchivingstatus,enteroption3fromtheArchivingmenutoview
thestatus.Forexample,thefollowingoutputdisplaysifarchivingisoff:
Figure 10:
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jan 7 14:09:12 2007
Copyright (c) 1982, 2005, Oracle.

All rights reserved.

idle> Connected.
idle> idle> Database log mode
No Archive Mode
Automatic archival
Disabled
Archive destination
/exlibris/oradata/prm1/arch/
Oldest online log sequence
6717
Current log sequence
6721
idle> Disconnected from Oracle Database 10g Enterprise Edition
Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining Scoring Engine options
When archiving is on, the following two lines are displayed, as
follows:
SQL> SQL> Database log mode
Archive Mode
Automatic archival
Enabled
Figure 14: Archiving Status

Inaproductiondatabase,alwayssettheDatabaselogmodetoArchivemode.

Database Users (Util O/9)


TheDatabaseUsersmenuallowsyoutoviewandcreatedatabaseusers.

108

June 12, 2011

Chapter 8: Managing the Primo Database

Figure 11:
O.9. Database Users
------------------0. Exit Procedure
1. List Database Users
2. Create a New User
Please select [exit]:
Figure 15: Database Users Menu

To access the Database Users menu:


1

Logontotheserverwiththeprimouser.

EnterthefollowingcommandstodisplaytheManagingOraclemenu.
dlib prm00
util o

Enteroption9todisplaytheDatabaseUsersmenu.

List Database Users (Util O/9/1)


Thisutilitylistsalloftheusersinthedatabase.Tolistthedatabaseusers,enter
option1fromtheDatabaseUsersmenu.Forexample:

June 12, 2011

109

Primo System Administration Guide

Figure 12:
The Database prm1 Contains the Following Users:
======================================================
ANONYMOUS
CTXSYS
DBSNMP
DIP
DMSYS
EXFSYS
MDSYS
MGMT_VIEW
ORACLE_OCM
ORDPLUGINS
ORDSYS
OUTLN
P21_PRM00
P23_PRM00
PRIMO
PRIMO_ADMIN
PRIMO_BACKUP
PRIMO_DBA
SI_INFORMTN_SCHEMA
SYS
SYSMAN
SYSTEM
TSMSYS
WMSYS
XDB
Enter CR to continue...
Figure 16: List of Database Users

NOTE:
SomeoftheusersarePrimocollectionusersandothersareadministrative
users.

Create a New User (Util O/9/2)


Thisutilitycreatesanewuserwithadefaultpasswordthatisthesameasthe
username.
NOTE:
Ifthenameoftheuseralreadyexists,allthetablesanddataofthatuser
aredeleted.Theuseriscreatedwithemptytables.

110

June 12, 2011

Chapter 8: Managing the Primo Database

To create a new database user:


1

Enteroption2fromtheDatabaseUsersmenu.

Atthefollowingprompt,enterthenewusername:
Enter User Name to Create New User:

Atthefollowingprompt,enteryestocontinue:
enter yes to create oracle user <new_user>

Atthefollowingprompt,enternotoreconfirm:
default password is P21_<new_user>
if user <new_user> exists all data will be erased!!!
enter no to reconfirm

June 12, 2011

111

Primo System Administration Guide

Atthefollowingprompt,typeENTERtoreturntotheDatabaseUsersmenu:
source create_ora_user_b P21_<new_user>
create_ora_user_b P21_<new_user>
SQL*Plus: Release 10.2.0.4.0 - Production on Sat Jul 11 06:46:35
2009
Copyright (c) 1982, 2007, Oracle.

All Rights Reserved.

Enter user-name:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit
Production
With the Partitioning, OLAP, Data Mining and Real Application
Testing options
SQL> EXIT
Disconnected from Oracle Database 10g Enterprise Edition Release
10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application
Testing options
SQL*Plus: Release 10.2.0.4.0 - Production on Sat Jul 11 06:46:35
2009
Copyright (c) 1982, 2007, Oracle.

All Rights Reserved.

Enter user-name:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit
Production
With the Partitioning, OLAP, Data Mining and Real Application
Testing options
SQL> old
1: DROP USER &&1 CASCADE
new
1: DROP USER P21_<new_user> CASCADE
DROP USER P21_<new_user> CASCADE
*
ERROR at line 1:
ORA-01918: user 'P21_<new_user>' does not exist
User created.
Grant succeeded.
Disconnected from Oracle Database 10g Enterprise Edition Release
10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application
Testing options
Enter CR to continue...

112

June 12, 2011

Chapter 8: Managing the Primo Database

Oracle User Password Utility (Util O/11)


ThisutilityallowsyoutochangethepasswordsforthefollowingOracleusers:

PRIMO_ADMIN

PRIMO_DBA

P<r><n>_PRM00

NOTE:
ThepasswordforeachOracleusermustbeidenticalonallPrimoservers
(BE,FE,andSE).
To change the password of an Oracle user:
1

ShutdownallPrimoservers(BE,FE,andSE).

FromtheBEserver,enterthefollowingcommandstodisplaytheManaging
Oraclemenu:
dlib prm00
util o

Enteroption11tochangeanOracleuserspassword.

Atthefollowingprompt,entertheusernametoupdate:
Change Oracle user password.
The script must be executed on all Primo servers.
The Primo software must be down before the script execution.
Enter user name (PRIMO_ADMIN,PRIMO_DBA,P21_PRM00):

Atthefollowingprompt,enterthenewpassword:
Password input must be identical in all Primo servers.
Please, enter new password. Password may contain letters, numbers
and _ (underscore).

Atthefollowingprompt,enterthePRIMO_DBAusername/password.
Otherwise,typeENTERtoexit.
If you want to update this password in Oracle
Enter PRIMO_DBA user/password i.e. PRIMO_DBA/PRIMO_DBA , or press
[Enter] to exit :

NOTE:
ThisstepisomittedfortheFEandSEserversbecausethepasswordwas
changedpreviouslyontheBEserver.

June 12, 2011

113

Primo System Administration Guide

Atthefollowingprompt,typeENTERtoreturntotheManagingOracle
menu.
Change password in Oracle
Changing DB password in BE global.properties file...
Changing DB password in FE global.properties file...
Changing DB password in SE global.properties file...
Running set globals...Please wait...
Enter CR to continue...

Repeatsteps2through7fortheFEandSEservers.

NOTE:
WhenchangingthepasswordforthePRIMO_ADMINandPRIMO_DBAusers,
thesystemdoesnotapplychangestotheglobal.propertiesfiles.
9

StartallPrimoservers(BE,FE,andSE).

Database Files (Util O/13)


TheDatabaseFilesmenucontainsutilitiesthatallowyoutomanagedatabase
files.
Figure 13:
O.13 Database Files
--------------0. Exit Procedure
1. List of Database Files
2. Resize Oracle Datafile
3. Add File to Tablespace
4. Show Datafile Free Blocks by KBytes
5. Show Datafile Free Blocks by BlockID
Please select [exit]:
Figure 17: Database Files Menu

To access the Database Files menu:


1

Logontotheserverwiththeprimouser.

EnterthefollowingcommandstodisplaytheManagingOraclemenu.
dlib prm00
util o

Enteroption13todisplaytheDatabaseFilesmenu.

List of Database Files (Util O/13/1)


ThisutilityliststheOracledatafilesandtheirsizes.Tolistthedatabasefiles,
enteroption1fromtheDatabaseFilesmenu.Forexample:

114

June 12, 2011

Chapter 8: Managing the Primo Database

Figure 14:
The Database prm1 Contains the Following Files:
======================================================
T
---------LOG
SYSAUX
SYSTEM
TSLOB
TS_P_DAT
UNDOTBS1
USERS

NAME
--------------------------------------------------

T
---------TEMP

NAME
--------------------------------------------------

/exlibris/oradata/prm1/prm1_log01.dbf
/exlibris/oradata/prm1/prm1_sysaux01.dbf
/exlibris/oradata/prm1/prm1_system01.dbf
/exlibris/oradata/prm1/prm1_tslob01.dbf
/exlibris/oradata/prm1/prm1_ts_p_dat_01.dbf
/exlibris/oradata/prm1/prm1_undotbs01.dbf
/exlibris/oradata/prm1/prm1_users01.dbf

/exlibris/oradata/prm1/prm1_temp01.dbf

SIZE K
---------71680
1048576
655360
512000
7340032
2097152
204800
SIZE K
---------4194304

F
-6
3
1
5
7
2
4
F
-1

Enter CR to continue...

Figure 18: List of Database Files

Resize Oracle Datafile (Util O/13/2)


ThisutilityallowsyoutoenlargeorreducethesizeofanOracledatafile.
NOTE:
RequiresthePRIMO_DBAusernameandpassword.
To change the size of an Oracle data file:
1

Enteroption2fromtheDatabaseFilesmenu.

Atthefollowingprompt,enterthePRIMO_DBAusername/password:
To resize a database file enter PRIMO_DBA username/password.
username/password:

Atthefollowingprompt,enterthenameofthetablespace:
Enter Tablespace name:

Atthefollowingprompt,enterthefilename(includingthefullpath)that
youwanttoresize:
Enter file name to resize:

Atthefollowingprompt,enterthenewfilesize:
Enter new file size (MB):

June 12, 2011

115

Primo System Administration Guide

Atthefollowingprompt,enterytocontinue:
confirm (y/[n]):

Atthefollowingprompt,typeENTERtocontinue:
resizing
SQL*Plus: Release 10.2.0.4.0 - Production on Sat Jul 11 00:19:27 2009
Copyright (c) 1982, 2007, Oracle.

All Rights Reserved.

idle> Connected.
idle> idle>
Database altered.
idle> Disconnected from Oracle Database 10g Enterprise Edition Release
10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing
options
Enter CR to continue...

Add File to Tablespace (Util O/13/3)


Tablespacesarecomposedofoneormoredatafiles.Thisutilityallowsyouto
addfilestotablespaces.Ifatablespacedoesnothaveenoughfreespaceforthese
files,itneedstobeexpanded.Forinformationonexpandingtablespaces,see
DatabaseTablespaces(UtilO/17)onpage128.
NOTE:
ThisutilityrequiresthePRIMO_DBAusernameandpassword.
To add a data file to a tablespace:
1

Enteroption3fromtheDatabaseFilesmenu.

Atthefollowingprompt,enterthePRIMO_DBAusername/password:
To add a file to a tablespace enter PRIMO_DBA username/password.
username/password:

Atthefollowingprompt,enterthenameofthetablespace:
Enter Tablespace name:

Atthefollowingprompt,enterthenewfilename(includingthefullpath):
Enter new file name:

116

June 12, 2011

Chapter 8: Managing the Primo Database

Atthefollowingprompt,enterthefilesize:
Enter file size (MB):

Atthefollowingprompt,enterytocontinue:
confirm (y/[n]):

Atthefollowingprompt,typeENTERtocontinue:
SQL*Plus: Release 10.2.0.4.0 - Production on Sat Jul 11 00:44:50 2009
Copyright (c) 1982, 2007, Oracle.

All Rights Reserved.

idle> Connected.
idle> idle>
Tablespace altered.
idle> Disconnected from Oracle Database 10g Enterprise Edition Release
10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing
options
Enter CR to continue...

June 12, 2011

117

Primo System Administration Guide

Show Datafile Free Blocks by Kbytes (Util O/13/4)


Thisutilitydisplaysthefreedatafileblocks.Todisplaythefreedatafileblocks,
enteroption4todisplayfromtheDatabaseFilesmenu.Forexample:
Figure 15:
TABLES
-----TS_P_D
AT

F
--7

BLOCK_ID
---------162169

KBYTES
---------128

NAME
----------------------------------/exlibris/oradata/prm1/prm1_ts_p_da
t_01.dbf

SYSTEM

55681

64

/exlibris/oradata/prm1/prm1_system0
1.dbf

SYSAUX

24977

64

/exlibris/oradata/prm1/prm1_sysaux0
1.dbf

SYSAUX

24993

64

/exlibris/oradata/prm1/prm1_sysaux0
1.dbf

TABLES
------

F
---

BLOCK_ID
----------

KBYTES
----------

NAME
-----------------------------------

SYSAUX

25185

64

/exlibris/oradata/prm1/prm1_sysaux0
1.dbf

SYSAUX

32889

64

/exlibris/oradata/prm1/prm1_sysaux0
1.dbf

UNDOTB
S1

81

64

/exlibris/oradata/prm1/prm1_undotbs
01.dbf

Enter CR to continue...

Figure 19: List Free Blocks of Data

Show Datafile Free Blocks by BlockID (Util O/13/5)


Thisutilitydisplaysthefreedatafileblockspertablespace.
To display the free data file blocks:
1

Enteroption5fromtheDatabaseFilesmenu.

Atthefollowingprompt,enterthenameofthetablespace:
Tablespace Name:

Atthefollowingprompt,specifythedatafilenumberofthetablespace:
Datafile Number:

118

June 12, 2011

Chapter 8: Managing the Primo Database

NOTE:
Todeterminethedatafilenumber,seeListofDatabaseFiles(UtilO/13/1)
onpage114.
4

Atthefollowingprompt,typeENTERtoreturntotheDatabaseFilesmenu:
Figure 16:
Enter
new
Enter
new

value for ts: old


4: where TABLESPACE_NAME = '&&ts'
4: where TABLESPACE_NAME = 'TS_P_DAT'
value for fl_no: old
5: and FILE_ID = &&fl_no
5: and FILE_ID = 9

BLOCK_ID
BYTES
---------- ---------33149737
93782016
33068329 665845760
33013801 445644800
32946601 550502400
32847913 807403520
32786729 500170752
32761001 208666624
32760361
3145728
32758697
2097152
32758441
1048576
32758185
1048576
Enter CR to continue...
Figure 20: List of Free Data Blocks by Block ID

Database Free/Used Space (Util O/14)


TheDatabaseFree/UsedSpacemenuallowsyoutodisplayinformationabout
thefreeandusedspaceinthetablespace.
Figure 17:
O.14. Database Free/Used Space
------------------------0. Exit Procedure
1. All Tablespaces Free Space Summary
2. Number of Free Extents by Size in a Tablespace
3. All Free Extents of Min Size in a Tablespace
4. Space Used by a Repository/Repositories in Each Tablespace
5. Space Used by a Group of Repositories in Each Tablespace
6. Coalesce Contiguous Free Extents
7.
8. Primo Tablespaces Total/Free/Used Space Report
9. Clean Temporary Tablespace Free Storage
Figure 21: Database Free/Used Space Menu

June 12, 2011

119

Primo System Administration Guide

To access the Database Free/Used Space menu:


1

Logontotheserverwiththeprimouser.

EnterthefollowingcommandstodisplaytheManagingOraclemenu.
dlib prm00
util o

Enteroption14todisplaytheDatabaseFree/UsedSpacemenu.

All Tablespaces Free Space Summary (Util O/14/1)


ThisutilityprovidesdetailsaboutfreespaceintheOracleDBA_FREE_SPACE
table.Itgeneratesareportwiththefollowingfourcolumns:

TABLESPACE_NAME:Thenameofthetablespace.

TOTAL_FREE_SPACE:Thetotalamountoffreespaceinthetablespace(in
megabytes).

MAX_EXTENT:Thesizeofthelargestcontiguousextentofthetablespace
(inmegabytes).

NUM_FREE_EXTENTS:Thenumberoffreeextentsinthetablespace.

Ifatablespacehasnofreespaceleft,itwillnotappearinthereport.
NOTE:
Itisimportanttoreviewthisreportfromtimetotimetoprepare
additionalresourcesforthedatabase.

120

June 12, 2011

Chapter 8: Managing the Primo Database

Todisplayasummaryofthefreespacefortablespaces,enteroption1fromthe
DatabaseFree/UsedSpacemenu.Forexample:
Figure 18:
TABLESPACE_NAME
-----------------TS0
TS_P_IDX
UNDOTBS1
SYSAUX
TSLOB
USERS
LOG
SYSTEM
TS1
TS_P_DAT

TOTAL_FREE_SPACE
---------------9.94296183
1024.50027
2861.94711
69.9759389
71.9770382
200.031756
63.9726412
159.96287
9.94296183
229289.89

MAX_EXTENT
---------9.94296183
1024.50027
729.338137
21.6994198
71.9770382
200.031756
63.9726412
159.96287
9.94296183
3970.18089

NUM_FREE_EXTENTS
---------------1
1
33
17
1
1
1
1
1
438

Temporary Tablespace Space Usage


TABLESPACE_NAME
SIZE M
------------------------------ ---------TEMP
0

Sort Segments Usage (in Temporary Tablespace)


TABLESPACE_NAME
Total M
Used M
Free M
------------------------------- ---------- ---------- ---------TEMP
16381
0
16381
Enter CR to continue...
Figure 22: Display of Free Space

Number of Free Extents by Size in a Tablespace (Util O/14/2)


Thisutilityliststhenumberofextentsofacertainsize(truncatedinmegabytes)
inthetablespace.
To display the free extents for a tablespace, enter
1

Enteroption2fromtheDatabaseFree/UsedSpacemenu

Atthefollowingprompt,enterthetablespacename:
Enter Tablespace name:

June 12, 2011

121

Primo System Administration Guide

Atthefollowingprompt,typeENTERtoreturntotheDatabaseFree/Used
Spacemenu:
Figure 19:
SIZE IN MB NUM OF EXTENTS
---------- -------------3970
28
3944
1
3737
1
3496
1
3445
1
3388
1
3257
1
3170
1
3098
1
3084
1
3063
1
Enter CR to continue...
Figure 23: List of Free Extents

All Free Extents of Min Size in a Tablespace (Util O/14/3)


Thisutilityliststheexactsize(inmegabytes)ofallfreeextentsthatarelarger
thanagivensize.Youarepromptedforthetablespacenameandtheminimum
size(inmegabytes)thatyouwishtoinvestigate.
To display the free extents for a tablespace:
4

Enteroption3fromtheDatabaseFree/UsedSpacemenu.

Atthefollowingprompt,enterthetablespacename:
Enter Tablespace name:

Atthefollowingprompt,entertheminimumsizeoftheextentstodisplay.
Enterto0todisplayalloftheextents.
Enter Min size (MB) of free extent [0=ALL]:

122

June 12, 2011

Chapter 8: Managing the Primo Database

Atthefollowingprompt,typeENTERtoreturntotheDatabaseFree/Used
Spacemenu:
EXTENT_SIZE
----------3970.18089
3970.18089
3970.18089
3970.18089
3970.18089
3970.18089
Enter CR to continue...

Space Used by a Repository/Repositories in Each Tablespace


(Util O/14/4)
Thisutilityliststheamountofspacethateachrepositoryoccupiesineach
tablespace.Ifatruncatednameisused,alloftherepositoriesstartingwiththe
givencharactersarelisted,andtheoccupiedspaceislistedforeachoneofthem.
To display the size of each repository per tablespace:
1

Enteroption4fromtheDatabaseFree/UsedSpacemenu.

Atthefollowingprompt,entertheunitname(suchasprmorprm00):
Enter unit name (full or truncated, e.g. primo):

Atthefollowingprompt,typeENTERtoreturntotheDatabaseFree/Used
Spacemenu:
OWNER
TABLESPACE_NAME
-------------------------- --------------------------P21_PRM00
TS_P_DAT

SIZE_MB
----------8008.27408

Enter CR to continue...

Space Used by a Group of Repositories in Each Tablespace


(Util O/14/5)
Thisutilityliststhetotalamountofspacethatalloftherepositorieswhose
namesstartwiththegivencharactersoccupyineachtablespace.

June 12, 2011

123

Primo System Administration Guide

To display the total amount of space for all of the repositories per
tablespace:
1

Enteroption5fromtheDatabaseFree/UsedSpacemenu.

Atthefollowingprompt,entertheunitname(suchasprm):
Enter first 3 characters of unit code (e.g. primo):

Atthefollowingprompt,typeENTERtoreturntotheDatabaseFree/Used
Spacemenu:
TABLESPACE_NAME
SIZE_MB
------------------------------ ---------TS_P_DAT
8008.27408
Enter CR to continue...

Coalesce Contiguous Free Extents (Util O/14/6)


Thisutilityisnotrequiredwhenusingalocallymanagedtablespace.Itis
retainedforbackwardcompatibility(andwillberemovedinfutureversions).
NOTE:
ThisutilityrequiresthePRIMO_DBAusernameandpassword.
Freespaceinadatabasemaybecomposedofextentsofvarioussizes.Itis
worthwhiletousethisproceduretocoalescethecontiguousfreeextentsto
createlargerfreeextents.Performthisprocedureperiodically.
To coalesce free extents:
1

Enteroption6fromtheDatabaseFree/UsedSpacemenu.

Atthefollowingprompt,enterthePRIMO_DBAusernameandpassword:
To Coalesce Tablespaces enter PRIMO_DBA username/password.
username/password:

124

June 12, 2011

Chapter 8: Managing the Primo Database

Atthefollowingprompt,typeENTERtoreturntotheDatabaseFree/Used
Spacemenu:
SQL*Plus: Release 10.2.0.4.0 - Production on Sat Jul 11 20:37:29
2009
Copyright (c) 1982, 2007, Oracle.

All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit
Production
With the Partitioning, OLAP, Data Mining and Real Application
Testing options
SQL> alter tablespace LOG coalesce;
alter tablespace SYSAUX coalesce;
alter tablespace SYSTEM coalesce;
alter tablespace TS0 coalesce;
alter tablespace TS1 coalesce;
alter tablespace TSLOB coalesce;
alter tablespace TS_P_DAT coalesce;
alter tablespace TS_P_IDX coalesce;
alter tablespace USERS coalesce;
Disconnected from Oracle Database 10g Enterprise Edition Release
10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application
Testing options
SQL*Plus: Release 10.2.0.4.0 - Production on Sat Jul 11 20:37:29
2009
Copyright (c) 1982, 2007, Oracle.

All Rights Reserved.

SQL> Connected.

June 12, 2011

125

Primo System Administration Guide

SQL> SQL>
'ALTERTABLESPACE'||TABLESPACE_NAME||'COALESCE;'
----------------------------------------------------------alter tablespace LOG coalesce;
alter tablespace SYSAUX coalesce;
alter tablespace SYSTEM coalesce;
alter tablespace TS0 coalesce;
alter tablespace TS1 coalesce;
alter tablespace TSLOB coalesce;
alter tablespace TS_P_DAT coalesce;
alter tablespace TS_P_IDX coalesce;
alter tablespace USERS coalesce;
9 rows selected.

Tablespace altered.

Tablespace altered.
SQL> Disconnected from Oracle Database 10g Enterprise Edition
Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application
Testing options
Enter CR to continue...

126

June 12, 2011

Chapter 8: Managing the Primo Database

Primo Tablespaces Total/Free/Used Space Report (Util O/14/8)


Thisutilityliststhetotalspacethateachrepositoryoccupiesineachtablespace
andtheamountoffreespaceinthetable.Todisplaythetotalspaceeach
repositoryoccupies,enteroption8fromtheDatabaseFree/UsedSpacemenu.
Forexample:
Figure 20:
NAME
TOTAL SIZE M
------------------------------ -----------TS_P_IDX
1024
TS0
10
TSLOB
72
TS_P_DAT
259072
TS1
10
NAME
TOTAL FREE M
------------------------------ -----------TS0
9
TS_P_IDX
1023
TSLOB
71
TS1
9
TS_P_DAT
229163
NAME
TOTAL USED M
------------------------------ -----------TS_P_DAT
29907
Enter CR to continue...
Figure 24: Tablespace Report

Clean Temporary Tablespace Free Storage (Util O/14/9)


Insomecases,thetemporarytablespacedoesnotfreenonusedpagesquickly
enough.Thisutilitymanuallyfreesthesepages.
To clean temporary tablespace:
1

Enteroption9fromtheDatabaseFree/UsedSpacemenu.

Atthefollowingprompt,enterthenameofthetemporarytablespace:
To Free Temporary Segments Enter Temporary Tablespace:

Atthefollowingprompt,enterthePRIMO_DBAusernameandpassword:
Enter PRIMO_DBA username/password:

June 12, 2011

127

Primo System Administration Guide

Atthefollowingprompt,typeENTERtoreturntotheDatabaseFree/Used
Spacemenu:
QL*Plus: Release 10.2.0.4.0 - Production on Sat Jul 11 12:52:41 2009
Copyright (c) 1982, 2007, Oracle.

All Rights Reserved.

idle> Connected.
idle>
Tablespace altered.
idle> idle> Disconnected from Oracle Database 10g Enterprise Edition
Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application
Testing options
Enter CR to continue...

Space Used by a PRM00 Schema (Util O/14/10)


ThisutilitydisplaysthespaceusedbythePRM00schema.Todisplaythespace
usedbythePRM00schema,enteroption10fromtheDatabaseFree/UsedSpace
menu.Forexample:
Figure 21:
NAME
TOTAL SIZE M
------------------------------ -----------P21_PRM00
8003
Enter CR to continue...

Database Tablespaces (Util O/17)


TheDatabaseTablespacemenuallowsyoutomanagetablespaces.
Figure 22:
O.17. Database Tablespaces
-------------------------0. Exit Procedure
1. Create a Tablespace
2. List Tablespace Files
4. Show Tablespace Definitions
5. Show Tablespace Allocated/Free/Used Space
Please select [exit]:
Figure 25: Database Tablespace Menu

128

June 12, 2011

Chapter 8: Managing the Primo Database

To access the Database Tablespaces menu:


1

Logontotheserverwiththeprimouser.

EnterthefollowingcommandstodisplaytheManagingOraclemenu.
dlib prm00
util o

Enteroption17todisplaytheDatabaseTablespacesmenu.

Create a Tablespace (Util O/17/1)


Typically,alltherequiredtablespacesarecreatedduringsysteminstallation.
Thisutilityallowsyoutocreateadditionaltablespaces.
To create a tablespace:
1

Enteroption1fromtheDatabaseTablespacesmenu.

Atthefollowingprompt,enterthePRIMO_DBAusernameandpassword:
To Create a new Tablespace, Enter PRIMO_DBA username/password.
username/password:

Atthefollowingprompt,enterthenameofthenewtablespace:
Enter Tablespace name:

Atthefollowingprompt,enterthenewfilename(includefullpath):
Enter new file name (full path) :

Atthefollowingprompt,enterthesizeofthefile:
Enter new file size (MB):

Atthefollowingprompt,entertheallocationtype(AUTOorUNIFORM):
==============================================================
Tablespaces can be created with a UNIFORM size for all extents
or with allocation type AUTOALLOCATE which means
Oracle will decide how to define extents
Util o 17 4 can be used to see current definitions
for existing tablespaces
==============================================================
Tablespace Allocation Type : [AUTO/UNIFORM]

IfyouhaveselectedUNIFORM,entertheuniformsizeofeachextent:
UNIFORM SIZE : [128K/1M/4M/128M/1920M]

June 12, 2011

129

Primo System Administration Guide

Athefollowingprompt,enterytoconfirm:
Tablespace: TEST1
File:
/exlibris/oradata/prm0/test1_01.dbf
File size:
100MB
Allocation : UNIFORM SIZE 4M
confirm (y/[n]):

Atthefollowingprompt,enterytocontinue:
CREATE TABLESPACE TEST1
DATAFILE '/exlibris/oradata/prm0/test1_01.dbf' SIZE 100M
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 4M
SEGMENT SPACE MANAGEMENT AUTO
ONLINE;
Enter CR to continue...

10 Atthefollowingprompt,enterytocontinue:
SQL*Plus: Release 10.2.0.4.0 - Production on Sat Jul 11 15:13:43
2009
Copyright (c) 1982, 2007, Oracle.
idle> Connected.
idle> idle>
2
3
Tablespace created.

All Rights Reserved.

idle> idle> Disconnected from Oracle Database 10g Enterprise Edition


Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application
Testing options
Enter CR to continue...

11 Atthefollowingprompt,typeENTERtoreturntotheDatabaseTablespaces
menu:
SQL*Plus: Release 10.2.0.4.0 - Production on Sat Jul 11 15:13:43
2009
Copyright (c) 1982, 2007, Oracle.
idle> Connected.
idle> idle>
2
3
Tablespace created.

All Rights Reserved.

idle> idle> Disconnected from Oracle Database 10g Enterprise Edition


Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application
Testing options
Enter CR to continue...

130

June 12, 2011

Chapter 8: Managing the Primo Database

List Tablespace Files (Util O/17/2)


Thisutilityliststhetablespacesinthedatabase.
To list a tablespaces files:
1

Enteroption2fromtheDatabaseTablespacesmenu.

Atthefollowingprompt,enterthenameofthetablespace:
Enter Tablespace name:

Atthefollowingprompt,typeENTERtoreturntotheDatabaseTablespaces
menu:
Tablespace TS_P_DAT consist of the following files:
NAME
-------------------------------------------------/exlibris/oradata/prm1/prm1_ts_p_dat_01.dbf

SIZE K
---------7340032

F
--7

Enter CR to continue...

Show Tablespaces Definition (Util O/17/4)


Youmayneedtoincreasethespacethatcertaindatabasetablesuse.All
tablespacesinPrimoarecreatedaslocallymanagedtablespaces.Whenworking
withlocallymanagedtablespaces,thewordlocalappearsintheEXTMGMT
(extentmanagement)column.
Whenusinglocallymanagedtablespaces,thefollowingtypesofextent
allocationappearintheALLOC_TYPcolumn:

SYSTEM(AutoAllocate)Inautoallocation,Oracleautomaticallyassumes
fullcontrol,allocatingextentsasneededandtakingintoaccounttheinitial
allocationofthetable/indexasconfiguredinthecreatetable/index
command.Forexample,ifinitialallocationofthetable/indexis1GB,Oracle
mightsplitthe1GBinto50extents,asingleextent,oranyothercombination
ofextents.

UNIFORMInuniformallocation,theDBAdeterminesastandardsizefor
alltheextentsinthetablespace.Alltheextentsinthetablespaceareofthat
size,withoutregardtotheextentdefinitionsintheCreateTablecommand.
TheDBAdetermineswhichtableisassignedtowhichtablespacedepending
onthetablesize.Hence,inuniformallocation,thereisnofragmentation,
andspaceutilizationisoptimal.Forexample,whencreatingatablespace
withauniformextentsizeof10MB,fiveextentswillbeusedforatableof50
MB.

June 12, 2011

131

Primo System Administration Guide

Todisplaythetablespacedefinitions,enteroption4fromtheDatabase
Tablespacesmenu.
Figure 23:
TS_NAME
-----------LOG
SYSAUX
SYSTEM
TEMP
TEST1
TSLOB
TS_P_DAT
UNDOTBS1
USERS

EXT_MGMT
---------LOCAL
LOCAL
LOCAL
LOCAL
LOCAL
LOCAL
LOCAL
LOCAL
LOCAL

ALLOC_TYP
--------SYSTEM
SYSTEM
SYSTEM
UNIFORM
UNIFORM
SYSTEM
SYSTEM
SYSTEM
UNIFORM

INIT_EXT
---------65536
65536
65536
1048576
4194304
65536
65536
65536
40960

NEXT_EXT
----------

1048576
4194304

40960

TYPE
---PERM
PERM
PERM
TEMP
PERM
PERM
PERM
UNDO
PERM

STAT
---ONL
ONL
ONL
ONL
ONL
ONL
ONL
ONL
ONL

Enter CR to continue...

Figure 26: Tablespace Definitions Example

Inadditiontotheextentmanagementtypes,thisutilitydisplaythefollowing
informationforeachtablespace:

Segmentallocation

Tablespace(forpermanentortemporaryobjectsorforundosegments)

Tablespacestatus(onlineoroffline)

Show Tablespace Allocated/Free/Used Space (Util O/17/5)


Thisutilitydisplaysthefollowingparametersforatablespace:

Totaltablespacesize

Amountoffreespace

Amountofusedspace

To display allocated, free, and used space for a tablespace:


1

Enteroption5fromtheDatabaseTablespacesmenu.

Atthefollowingprompt,enterthenameofthetablespace:
Enter Tablespace name :

132

June 12, 2011

Chapter 8: Managing the Primo Database

Atthefollowingprompt,typeENTERtoreturntotheDatabaseTablespaces
menu:
Tablespace TS_P_DAT :
_____________________________
TOTAL SIZE M
-----------7168
TOTAL FREE M
-----------5597
TOTAL USED M
-----------1570
Enter CR to continue...

Oracle Statistics (Util O/18)


TheOraclesStatisticsmenuallowsyoutodisplayOraclestatistics.
Figure 24:
O.18. Oracle Statistics
----------------------0. Exit Procedure
1. Performance Statistics
2. Rollback Segments Definitions
3. Rollback Segments Dynamic Allocation
4. View Long Operations
5. IO Statistics
6. Sort Operations
Please select [exit]:
Figure 27: Oracle Statistics Menu

To access the Oracle Statistics menu:


1

Logontotheserverwiththeprimouser.

EnterthefollowingcommandstodisplaytheManagingOraclemenu.
dlib prm00
util o

Enteroption18todisplaytheOracleStatisticsmenu.

June 12, 2011

133

Primo System Administration Guide

Performance Statistics (Util O/18/1)


ThisutilityprovidesOracleperformancestatisticsforfinetuningyourdatabase.
Todisplaytheperformancestatistics,enteroption1fromtheOracleStatistics
menu.
Figure 25:
SYSTEM GLOBAL AREA (sga)
BYTES
734003200
=======================================================
BUFFER CACHE HIT RATIO (db_block_buffers)
GETS
MISSES RATIO
4054336
225243 94.44%
=======================================================
STATISTIC (db_block, DBWR, sort_area)
NAME
VALUE
opened cursors current
32
db block gets
937066
consistent gets
3117272
physical reads
225243
physical writes
92082
Enter CR to continue...

Rollback Segments Definitions (Util O/18/2)


Thisutilitydisplaystherollbacksegmentsdefinitions.

134

June 12, 2011

Chapter 8: Managing the Primo Database

To display the rollback segments definitions:


1

Enteroption2fromtheOracleStatisticsmenu.

Atthefollowingprompt,typeENTERtocontinue:
SYSTEM GLOBAL AREA (sga)
BYTES
734003200
=======================================================
BUFFER CACHE HIT RATIO (db_block_buffers)
GETS
MISSES RATIO
4054336
225243 94.44%
=======================================================
STATISTIC (db_block, DBWR, sort_area)
NAME
VALUE
opened cursors current
32
db block gets
937066
consistent gets
3117272
physical reads
225243
physical writes
92082
DBWR checkpoints
37
redo log space requests
0
sorts (memory)
105305
sorts (disk)
1
Enter CR to continue...

Atthefollowingprompt,typeENTERtoreturntotheOracleStatisticsmenu:
=======================================================
DATA DICTIONARY CACHE (shared_pool_size)
GETS
MISSES RATIO
1442213
22892 98.41%
=======================================================
LIBRARY CACHE (shared_pool_size)
EXECUTIONS
MISSES LIBCACHEPROZ
552613
1160 99.79%
Enter CR to continue...

June 12, 2011

135

Primo System Administration Guide

Rollback Segments Dynamic Allocation (Util O/18/3)


Thisutilitydisplaystherollbacksegmentsdynamicallocation.Todisplaythe
rollbacksegmentsdynamicallocation,enteroption3fromtheOracleStatistics
menu.Forexample:
Figure 26:
NAME
SYST
_SYS
_SYS
_SYS
_SYS
_SYS
_SYS
_SYS
_SYS
_SYS
_SYS

EXT
6
69
72
68
72
64
73
72
64
64
70

RSSIZE
385024
121757696
146923520
142729216
168943616
101834752
162652160
154263552
101834752
175235072
152166400

WRITES SHRN
5160
0
4661252
2
4952028
2
11195842
3
7438446
3
2825568
3
6144544
3
11230104
3
3382754
2
6435860
3
5199072
3

AVGSHR WRAPS
0
0
2097152
4
2097152
2
2796202
6
2446677
1
2446677
2
1398101
0
1747626
3
3145728
4
3495253
5
2097152
2

CUREXT
0
2
68
0
69
2
70
3
2
2
2

WAITS
0
0
0
1
0
0
0
0
0
1
0

Enter CR to continue...

View Long Operations (Util O/18/4)


ThisutilitydisplaysOraclelongoperations,iftheyoccurinthesystematthe
timetheutilityisrun.Thefollowinginformationdisplays:

SID:sessionidentifier.

OPNAME:operationname.

TARGET:theobjectonwhichtheoperationisbeingperformed.

DONESOFAR:percentageofworkalreadydone.

To display the Oracle long operations:


1

EnterthefollowingcommandstodisplaytheManagingOraclemenu:
dlib prm00
util o

Enteroption18todisplaytheOracleStatisticsmenu.

Enteroption4.

Atthefollowingprompt,typeCNTLCtoexitthedisplay:
Long Operation Currently running :
To stop do Ctrl C

136

June 12, 2011

Chapter 8: Managing the Primo Database

IO Statistics (Util O/18/5)


Thisutilitydisplaysthefollowinginformation:

BLOCK_GETSblockgetsforthissession.

CONSISTENT_GETSconsistentgetsforthissession.

PHYSICAL_READSphysicalreadsforthissession.

BLOCK_CHANGESblockchangesforthissession.

CONSISTENT_CHANGESconsistentchangesforthissession.

TodisplayI/Ostatistics,enteroption5fromtheOracleStatisticsmenu.For
example:
Figure 27:
TO STOP DO ctrl C
BLOCK_GETS CONSISTENT_GETS PHYSICAL_READS BLOCK_CHANGES CONSISTENT_CHANGES
34881
418724
4141
34949
2
34881
418727
4141
34949
2
.
.
.

TypeCNTLCtoexitthedisplay.

Sort Operations (Util O/18/6)


Thisutilitydisplayssortoperationsiftheyoccurinthesystemwhentheutility
isrunning.Todisplaysortoperations,enteroption6fromtheOracleStatistics
menu.Forexample:
Figure 28:
Sort Operations in the system:
.
.
.

TypeCNTLCtoexitthedisplay

June 12, 2011

137

Primo System Administration Guide

Shared Pool (Util O/19)


TheSharedPoolmenuallowsyoutodisplayinformationassociatedwithshared
pools.
Figure 29:
O.19. Shared Pool
----------------0. Exit Procedure
1. Show SGA Buffers
2. Flush Shared Pool
Please select [exit]:
Figure 28: Shared Pool Menu

To access the Shared Pool menu:


1

Logontotheserverwiththeprimouser.

EnterthefollowingcommandstodisplaytheManagingOraclemenu.
dlib prm00
util o

138

Enteroption19todisplaytheOracleStatisticsmenu.

June 12, 2011

Chapter 8: Managing the Primo Database

Show SGA Buffers (Util O/19/1)


ThisutilityliststhevariousSGAbuffers.TodisplaySGAbuffers,enteroption1
fromtheSharedPoolmenu.Forexample:
Figure 30:
.
.
.
NAME
-----------------------------fixed_sga
buffer_cache
log_buffer
ENQUEUE STATS
VIRTUAL CIRCUITS
transaction
table definiti
KGSKI scheduler heap 2 de
KTCN: Obj Invalidation Se
kgl lock hash table state
ksunfy: nodes of hierarch

BYTES
---------2043456
461373440
6340608
11928
3736
417296
896
232
2336
9800
320

NAME
-----------------------------ASM file
qmn tasks
kwqmncal: allocate buffer
kspd run-time context
kzekm heap descriptor
incr ckpt write count arr
kglsim main lru size
FileOpenBlock
Core dump directory
log_checkpoint_timeout
PX subheap

BYTES
---------19200
4128
4048
16
304
168
151040
1447104
520
12360
130616

NAME
-----------------------------partitioning d
message pool freequeue
sched job queue
LGWR-network Server info
Parameter Handle
PARAMETER TABLE
state objects
pso tbs: ksunfy
recov_kgqbtctx
Cursor Stats
enqueue

BYTES
---------352520
954768
3616
27648
1656
2048
5680
78000
4392
1290728
355224

Enter CR to continue...

June 12, 2011

139

Primo System Administration Guide

Flush Shared Pool (Util O/19/2)


ThisutilityremovesalloftheOracleobjectsfromthesharedpool.
To remove the Oracle objects from the shared pool:
1

Enteroption2fromtheSharedPoolmenu.

Atthefollowingprompt,enterthePRIMO_DBAusernameandpassword:
To continue you will need to enter PRIMO_DBA username/password.
username/password:

Multi Threaded Server (Util O/20)


InastandardOracleconfiguration,aseparateserverprocessiscreatedonbehalf
ofeachuserprocess.ThisiscalledaDedicatedServerProcess(orShadow
process)becauseitactsonlyonbehalfoftheassociateduserprocess.
OraclealsosupportstheSharedServerArchitecture(orMultiThreadedServer
ArchitectureMTS)inwhichthereareseveralserverprocesses,eachserving
severaluserprocesses.
InPrimo,TheMTSinfrastructureexistsinthedatabasebutisonlyimplemented
inspecialcases,andincoordinationwithExLibris.Thisgroupofutilities
supportsMTS.
Thefollowingmenuallowsyoutomanagetheseservers.
Figure 31:
O.20. Multi Threaded Server
--------------------------0. Exit Procedure
1. Show MTS Parameters
2. Show Listener Services
Please select [exit]:
Figure 29: Multi Threaded Server Menu

To access the Multi Threaded Server menu:


1

Logontotheserverwiththeprimouser.

EnterthefollowingcommandstodisplaytheManagingOraclemenu.
dlib prm00
util o

140

Enteroption20todisplaytheMultiThreadedServermenu.

June 12, 2011

Chapter 8: Managing the Primo Database

Show MTS Parameters (Util O/20/1)


ThisutilityliststheMTSparameters.TodisplaytheMTSparameters,enter
option1fromMultiThreadedServermenu.Forexample:
Figure 32:
PRIMO_DBA/PRIMO_DBA
SQL*Plus: Release 10.2.0.4.0 - Production on Sat Jul 11 16:45:09
2009
Copyright (c) 1982, 2007, Oracle.

All Rights Reserved.

idle> Connected.
idle> idle> idle> Disconnected from Oracle Database 10g Enterprise
Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application
Testing options
Enter CR to continue...
Figure 30: Show MTS Parameters

Show Listener Services (Util O/20/2)


ThisutilityliststheMTSdispatchersperinstance.TodisplaytheMTS
dispatchers,enteroption2fromtheMultiThreadedServermenu.Forexample:
Figure 33:
MTS Dispatchers by Instance
===========================

Service "ENC" has 1 instance(s).


Instance "ENC", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
Service "prm1" has 1 instance(s).
Instance "prm1", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
Service "prm1.rattlesnake.corp.exlibrisgroup.com" has 1 instance(s).
Instance "prm1", status READY, has 1 handler(s) for this service...
Handler(s):
Service "prm1_XPT.rattlesnake.corp.exlibrisgroup.com" has 1 instance(s).
Instance "prm1", status READY, has 1 handler(s) for this service...
Handler(s):
Enter CR to continue...

Figure 31: Show Liistener Services

June 12, 2011

141

Primo System Administration Guide

142

June 12, 2011

9
Guidelines for Fault-Tolerant
Configurations
ThissectionprovidestheguidelinesneededtodefinefaulttolerantPrimo
configurations.
Thissectionincludes:

MultipleBOConfigurationonpage143

MultipleFrontEndConfigurationsonpage144

MultiplePDSConfigurationonpage147

LoadBalancerRequirementsonpage148

Multiple BO Configuration
AmultipleBOconfigurationinPrimoallowsclientstoconfigureoneormore
failoverserversforthePrimoBO.Inthisconfiguration,onlyoneserverisactive,
whiletheothersareinactive.
NOTE:
IfafailureoccursintheactiveBOserver,aninactiveservermustbe
startedmanuallytoprovideBOservice.

Guidelines
WhenconfiguringamultipleBOconfiguration,thefollowingguidelinesmust
befollowed:

OnlyoneBOservercanbeactiveatatime;allothersmustbeinactive.

ToavoidhavingtochangeanumberofBackOfficeparametersmanually,all
BOserversmustbedirectedtoasingledatabaseusingaloadbalancer.
Alternatively,ifaloadbalancerisnotused,accesstheInstallationsubsystem

June 12, 2011

143

Primo System Administration Guide

oftheGeneralConfigurationWizardinthePrimoBackOfficeandchange
thefollowingparameterstousethehostnameofthenewBackOffice:

pds_url,pds_configuration_url,Reports URL,Help Base URL,


reporting_base,primo_admin_base,primo_base,andSearch
Statistics Report URL.

TheBE_HOSTparametermustbedefinedasacommonhostnameonallBO
servers.

TheBOserversmustsharethesameng/primo/home/profile/publish/
publish/productiondirectoryusingNFS.

Addanentrytothebe_stopscripttoremovethestartupcontrolfilefrom
theng/primo/home/profile/publish/publish/productiondirectory.

ToensurethatonlyoneBOserverisactiveandrunning,addthefollowing
checkstothebe_startscript:

ChecktoseethattheotherBOserversareaccessibleandrunthe
be_stopscriptforBOservers.

ChecktoseethattherearenoconnectionstotheotherBOserversBO
port.

Checkthatthestartupcontrolfiledoesnotexistintheshared
ng/primo/home/profile/publish/publish/productiondirectory.

Addanentrytothebe_startscripttocreateastartupcontrolfileinthe
ng/primo/home/profile/publish/publish/productiondirectoryforthe
activeBOserver.

Multiple Front End Configurations


Toimproveworkloadbalance,itispossibletodefinemultipleFrontEndservers
(FE).Atthistime,thefollowingMultipleFrontEnd(MFE)configurationsare
possible:

MultipleFEsandasingleSearchEngineserver(ManytoOne
configuration)

MultipleFEsandmultipleSearchEngineservers(ManytoMany
configuration)

NOTE:
Tobenefitfromtheseconfigurations,aloadbalancermustbeintegrated
withinyourPrimoinstallation.Formoreinformation,seeLoadBalancer
Requirementsonpage148.

144

June 12, 2011

Chapter 9: Guidelines for Fault-Tolerant Configurations

Many-to-One Configuration
Inthisconfiguration(asshowninthefollowingfigure),everyFEhasthesame
SEconfiguration.OneoftheFEsisdefinedasthemaster,whichreceives
commandsfromtheBackOffice(BO)andperformsagentslicingmonitoring.
TheotherFEsaredefinedasslaves,whichreceivecommandsthatare
forwardedfromthemaster.
Figure 34:

Figure 32: Many-to-One Configuration

Many-to-Many Configuration
InadditiontoworkloadbalancingacrossFEs,thisconfiguration(asshownin
thefollowingfigure)distributestheloadofnumeroussearchesovermultiple
SearchEngines,preventingdowntimeifaSearchEnginefails.

June 12, 2011

145

Primo System Administration Guide

Figure 35:

Figure 33: Many-to-Many Configuration

NOTES:
InaManytoManyconfiguration,theparentindexdirectoriesofthe
masterandslaveFEsshouldbedifferent.Thefollowingexampleshowsa
correctdirectorystructureinwhichtheparentdirectories(asshownin
bold)aredifferent:
MasterFE:
/exlibris/primo/indexes/master_index/inst_1_index

SlaveFE:
/exlibris/primo/indexes/slave_index/inst_1_index

Failover of an FE
WhentheBOisstarted,itcheckstoseeifthemasterFEisrunning.Ifitis
initiallydown,thefollowingmessagemaydisplay:
The FrontEnd seems to be down. Continuing to check every 30
seconds

Itwillcheckthemasterevery30secondsuntilitisup.Oncethemasterisup,the
BOwillretrievealistoftheslaveFEsincasethemasterfails.Ifthemasterfails,
theBOrandomlychoosesoneoftheslavestobethenewmaster.

146

June 12, 2011

Chapter 9: Guidelines for Fault-Tolerant Configurations

Configuring the FE Servers


FromtheBOinterface,populatetheMFE_MASTER,MFE_FRONTENDS,and
MFE_CONFIGfieldsonthePrimoHome>AdvancedConfiguration>
GeneralConfigurationpagetoassigntherolesoftheFEserversinamultiple
FEconfiguration.
NOTE:
ContactExLibrisSupportbeforeimplementingthisconfiguration.

Multiple PDS Configuration


AmultiplePDSconfigurationinPrimoallowssitestoconfigureoneormore
failoverserversforthePrimoPDS.Inthisconfiguration,onlyoneserveris
active,whiletheothersareinactive.
NOTE:
IfafailureoccursintheactivePDSserver,aninactiveservermustbe
startedmanuallytoprovidePDSservice.

Guidelines
WhenconfiguringamultiplePDSconfiguration,thefollowingguidelinesmust
befollowed:

AllPDSserversmustbeconfiguredusingthefollowingpageintheBack
Office:
PrimoHome>OngoingConfigurationWizards>PDSConfiguration
Wizard

AllPDSserversmustusethehostnameofthecurrentlyconfiguredPDS.
Updatethepds_configuration_urlfieldonthefollowingpageintheBack
Office:
PrimoHome>AdvancedConfiguration>GeneralConfiguration

OnlyonePDSservercanbeactiveatatime.AllotherPDSserversmustbe
inactive.Setthepds_urlandpds_internal_urlfieldsonthefollowingpage
intheBackOfficetothehostnameoftheactivePDS:
PrimoHome>AdvancedConfiguration>GeneralConfiguration

AllFEserversmustberestartedafterachangetothePrimoHome>
AdvancedConfiguration>GeneralConfigurationpage.

Forinformationonloadbalancerconfigurations,seeLoadBalancer
Requirementsonpage148.

June 12, 2011

147

Primo System Administration Guide

Load Balancer Requirements


Tosupportfaulttolerance,highavailability,andbetterperformance,Primo
MFE(MultipleFrontEnd)configurationsallowloadbalancing.Formore
informationonPrimotopologies,contactExLibrisSupport.
Theloadbalancer(LB)distributestheworkloadbetweentheactiveFrontEnds
(FE)anddistrbutestheentireworkloadtotheremainingFEsifanFEfails.
LBscanbehardwarebased(suchasF5,Cisco,andsoforth)orsoftwarebased
(suchasApache).PrimodoesnotrequireaspecifictypeofLB,butitmust
supportstickysessions.

How Does It Work?


Inalltopologysetups,allMFEsareactiveandrespondtoincomingrequests.
AtypicalPrimoMFEconfigurationincludestwoormorePrimoFrontEnd(FE)
serversrunningonahostassignedinternalIP,receivingHTTPrequestviaport
1701.
EndusersidentifiedbysourceIPsmustbebalancedbetweenexistingPrimo
serversbasedonthePrimoserverscomputationalpower.Forexample,ifyour
environmentusestwoPrimoserversandbothhaveanequalamountof
computationalpower,theloadbalancershouldassignhalfofthesessionsto
eachserver.
EachFEmustberunningaPDSserver,butonlyoneofthemisactiveatatime.
ThefollowingfiguresillustratethefailoverprocesswhenanLBisusedinan
MFEconfiguration.NotethatPDS2willremainactiveaftertherestorationof
FE1/PDS1.
Figure 36:

Figure 34: Primo Load Balancing Diagram

148

June 12, 2011

Chapter 9: Guidelines for Fault-Tolerant Configurations

Figure 37:

Figure 35: Front End Failure - Load Balancer


Figure 38:

Figure 36: Front End Restoration - Load Balancer

Load Balancer Setup


ThesetupofaLBvariesbetweenthevarioustypesofLBs.Youneedtomake
surethatalltheMFEsaredefinedcorrectlyintheLBandthatthePDSisdefined
correctlyintheLB.TosupportthefailoverofthePDSserver,youneedto
configurethepds_urlandpds_internal_urlparametersintheBackOfficetothe
LBaddress.

June 12, 2011

149

Primo System Administration Guide

Sticky Sessions
Thestickysessionfeatureenablestheloadbalancertobindauserssessiontoa
specificapplicationinstancesothatallrequestscomingfromtheuserduringthe
sessionaresenttothesameapplicationinstance.
PrimorequiresthisfeaturetobeactivatedontheLBsothatalloftheHTTP
requestsbelongingtoauserssessionareroutedtothesameserver.

Removing Servers for Maintenance Purposes


AnyofthePrimoFEserverscanberemovedfromtheloadbalancinggroupfor
maintenancepurposes.
Theloadbalancinggroupmustbereconfiguredsothattheloadbalancerdoes
notcontinuetosendrequeststotheremovedserver.
NOTE:
RemovingoneormoreFEserversdecreasesPrimoperformance.

Load Balancer Monitor Guidelines


ExLibrisrecommendsthatyourloadbalancerprovideamonitorutilitythat
gathersthefollowingstatisticsforeachserverineachgroup:

150

Status

Numberofrequestsperformed

Cumulativesizeofthedatasent

Cumulativesizeofthedatareceived

Currentconnectionsillustratethetrendofsuccessfulconnectionsovertime

June 12, 2011

Chapter 9: Guidelines for Fault-Tolerant Configurations

Load Balancer Test Case


ThefollowingfigureshowsanMFEloadbalancingtestcaseperformedbyEx
Libris:
Figure 39:

Figure 37: Load Balancer Test Case

NOTES:

LoadBalancerbrand,model,type,configuration,andinfrastructure
setupisunderfullcustomerresponsibility.

TheLBmustsupportstickysessionsinorderforPrimotoworkproperly.

TheTimeOutparameterisnecessaryforremotesearch.

ExLibrisrecommendsusingahardwareloadbalancerfortheProduction
environment.

June 12, 2011

151

Primo System Administration Guide

152

June 12, 2011

10
Configuring SSL for Primo
ThissectiondetailstheprocedurerequiredtoimplementSecureSocketLayers
(SSL)withinPrimoforsecureauthenticationviaPDS.Formoreinformationon
PDS,refertothePatronDirectoryServicesGuide.

Implementing SSL
TheExLibrisstaffandsitestaffmustconfirmtheexactpathtotheSSL
certificatesandnamesoftheSSLCertificateFileand
SSLCertificateKeyFilefiles.Thecertificatesarelocatedinthefollowing
directory:
$httpd_root/SSLconf/conf

Ifthelocalinstallationisthefirstinstallationontheserver,the$httpd_root
environmentparameterinPrimotypicallyreferstothefollowingpath:
/exlibris/primo/p1_1/primoe/apache

To implement the SSL changes:


1

Editthefollowingfiles:

$httpd_root/conf/ssl.conf

$httpd_root/conf/ssl.conf.tml

Maketherelevantconfigurationchangesineachofthefiles:

Confirmorchangetheport(thedefaultportwithinthessl.conftable
is443).Forexample,changethefollowingline:
Listen @_HTTPS_PORT

to:
Listen 443

June 12, 2011

ChangethepathsandnamesoftheSSLCertificateFileand
SSLCertificateKeyFileparameters.Forexample,changethe

153

Primo System Administration Guide

followinglines,where<r>indicatesthereleaseinwhichPrimowas
initiallyinstalledand<c>indicatesthePrimocopy:
SSLCertificateFile /exlibris/primo/p<r><c>/primoe/apache/
SSLconf/conf/@_SSL_CERTFILE
SSLCertificateFile /exlibris/primo/p<r><c>/primoe/apache/
SSLconf/conf/@_SSL_CERTKEY

to:
SSLCertificateFile /exlibris/primo/p<r><c>/primoe/apache/
SSLconf/conf/new.cert.cert
SSLCertificateKeyFile /exlibris/primoe/p<r><c>/primoe/
apache/SSLconf/conf/new.cert.key

Inthe/exlibris/primo/p<r><c>/primoe/apache/bin/apachectl_auto
file,addthe-DSSLstringtothe$httpd_bin/httpd -d $httpd_rootline.
Forexample:
$httpd_bin/httpd -d $httpd_root -DSSL

Openthefollowingfilesforediting:

/exlibris/primo/p<r><c>/primoe/apache/bin/apachectl

/exlibris/primo/p<r><c>/primoe/apache/bin/apachectl.tml

Addthe-DSSLstringtoeachofthefiles.Forexample,changethefollowing
line:
HTTPD="/exlibris/primo/p<r><c>/product/bin/httpd -d
/exlibris/primo/p<r><c>/primoe/apache"

to:
HTTPD="/exlibris/primo/p<r><c>/product/bin/httpd -d
/exlibris/primo/p<r><c>/primoe/apache -DSSL"

Ifmod_sslisshared,itmustbeloadedexplicitlyviathethehttpd.conf
file.Toloaditexplicitly,performthefollowingsteps:
a

Enterthefollowingcommandtoseethatthemod_ssl.sofileexists:
ls $primo_product/local/apache/modules

Enterthefollowingcommandstoeditthehttpd.conffile:
apcc
vi httpd.conf

Addthefollowinglinetothehttpd.conffile:
LoadModule ssl_module $primo_product/local/apache/modules/
mod_ssl.so

154

June 12, 2011

Chapter 10: Configuring SSL for Primo

EnterthefollowingcommandstorestarttheApacheserver:
apcb
apachectl stop
apachectl_auto

NOTE:
Ifport443isused,youwillneedtorestarttheApacheserverastheroot
user.
8

EnterthefollowingcommandstoeditthePDSDefinitionsfile:
pdsroot
cd program
vi PDSDefinitions

Changethefollowinglines:
> our ($server_httpd)

= "http://servername:8991";

> our ($server_httpsd)

= "http://servername:443";

> our ($server_pds)

= "http://servername:8991/pds";

to:
> our ($server_httpd)

= "https://servername:443";

> our ($server_httpsd)

= "https://servername:443";

> our ($server_pds)

= "https://servername:443/pds";

10 LogontothePrimoBackOffice.
11 FromthePrimoHome>AdvancedConfiguration>General
Configurationpage,selectInstallationfromthesubsystemdropdownlist.
12 SetthePDS_URLfieldtohttps://<server-name>:443/pds.

June 12, 2011

155

Primo System Administration Guide

156

June 12, 2011

Index
Symbols
$httpd_root, 153

A
Aleph, 22
Apache, 35, 36
apachectl, 35, 36

B
BackOffice, 14, 17, 37
Initial configuration, 17
Ongoing maintenance, 17
be_start, 36
be_stop, 35
bibliographicrecord, 21
boot.log, 76

FrontEnd, 14, 18
FTP/SFTPharvesting, 22

G
groupingprocess, 24

H
Harvesting, 21
Harvestingmethods, 22
Copy harvesting, 22
FTP/SFTP harvesting, 22
OAI harvesting, 22

I
Indexer, 14, 16
Indexing, 24, 25
Initialconfiguration, 17

C
Copyharvesting, 22

D
Database, 14
Dedupprocess, 23
Deduprecords
merge, 24
Deduplication, 16, 23
Didyoumean, 29
Documents
related, 12

E
Enrichment, 16, 23
ExLibMessageFile.properties, 78

F
Facets, 27
fe_start, 36
fe_stop, 35
FileSystemSlice, 26
FRBR, 24
FRBRgroup, 24
FRBRID, 24

June 12, 2011

J
JBoss, 77
JBossserver, 19

L
library_server.log, 77
LinguisticIssues, 28
Listreports, 73
Loadingdata, 23
localhost_access_log.log, 76
Logs
JBoss, 76
Pipes, 74
Watchdog, 79
Lucene, 18

M
Metaphone, 29
Mirroring, 25
MultipleFrontEndconfigurations, 144
Many-to-Many, 144
Many-to-One, 144
MultiplePDSconfiguration, 147

157

Primo System Administration Guide

N
Ngramencoding, 29
NGramrepositories, 29
Normalization, 16, 22

O
OAIharvesting, 22
Ongoingconfiguration, 17
Optimization, 25
Oracle
tablespaces, 82
Users, 81
Oracledatabaseserver, 19
Oracledatabasetable, 23
OracleUsers
PRIMO_ADMIN, 81
PRIMO_DBA, 81
PRM00_SHARED, 82
RPT00, 81

P
PDS, 153
PDSserver, 147
persistentID, 21
Pipe, 73
Pipelogs, 74
PNX, 27
PNXformat, 15
PNXtable, 23
Primocomponents
Back Office, 14
Database, 14
Front End, 14
Indexer, 14
Publishing platform, 14
Search agent, 14
Search Engine, 14
Search Federator, 14
Primodatabase, 19
primo.log, 74
PRIMO_ADMIN, 81
PRIMO_DBA, 81
primo_shutdown_all, 34
primo_startup_all, 34
PRM00_SHARED, 82
Publishingplatform, 14, 15, 19
Publishingprocess, 20

RMIserver, 19
RPT00, 81

S
Searchagent, 14, 18, 19
SearchEngine, 14, 16, 18
SearchFederator, 14, 18, 28
Searchmanager, 27
Searching, 24, 26
search_schema.xml, 28
se_start, 36
se_stop, 35
SFX, 22
Slices, 24
File system-based, 24
RAM-based, 24
SSL, 32
SSL(SecureSocketLayers), 153
Statisticalreports, 74
Statistics, 74
Swap, 25

T
tablespaces, 82

U
Users
Oracle, 81

V
Voyager, 22

W
Watchdog
Logs, 79
watchdog.log, 79

R
RAMSlice, 25, 26
Reports, 73

158

June 12, 2011

You might also like