managing arcsde application servers - esridownloads2.esri.com/support/documentation/sde... · in...

Download Managing ArcSDE Application Servers - Esridownloads2.esri.com/support/documentation/sde... · IN THIS CHAPTER 1 Introducing the ArcSDE application server 1 • The ArcSDE application

If you can't read please download the document

Upload: ngodung

Post on 09-Feb-2018

232 views

Category:

Documents


3 download

TRANSCRIPT

  • ArcGIS

    9Managing ArcSDE Application Servers

  • Copyright 19992005 ESRIAll rights reserved.Printed in the United States of America.

    The information contained in this document is the exclusive property of ESRI. This work is protected under United States copyright law and otherinternational copyright treaties and conventions. No part of this work may be reproduced or transmitted in any form or by any means, electronic ormechanical, including photocopying and recording, or by any information storage or retrieval system, except as expressly permitted in writing by ESRI.All requests should be sent to Attention: Contracts Manager, ESRI, 380 New York Street, Redlands, CA 92373-8100, USA.

    The information contained in this document is subject to change without notice.

    U.S. GOVERNMENT RESTRICTED/LIMITED RIGHTSAny software, documentation, and/or data delivered hereunder is subject to the terms of the License Agreement. In no event shall the U.S. Governmentacquire greater than RESTRICTED/LIMITED RIGHTS. At a minimum, use, duplication, or disclosure by the U.S. Government is subject to restrictionsas set forth in FAR 52.227-14 Alternates I, II, and III (JUN 1987); FAR 52.227-19 (JUN 1987) and/or FAR 12.211/12.212 (Commercial TechnicalData/Computer Software); and DFARS 252.227-7015 (NOV 1995) (Technical Data) and/or DFARS 227.7202 (Computer Software), as applicable.Contractor/Manufacturer is ESRI, 380 New York Street, Redlands, CA 92373-8100, USA.

    ESRI, SDE, ArcView, MapObjects, the ESRI globe logo, ArcInfo, ArcSDE, ArcCatalog, ArcEditor, ArcMap, ArcGIS, ArcIMS, ArcStorm, Arc Objects,StreetMap, ArcInfo Librarian, GIS by ESRI, and www.esri.com are trademarks, registered trademarks, or service marks of ESRI in the United States, theEuropean Community, or certain other jurisdictions.

    The names of other companies and products herein are trademarks or registered trademarks of their respective trademark owners.

  • III

    Contents Introducing the ArcSDE application server 1The ArcSDE application server 2Properties of an ArcSDE application server 4Tips on learning about the ArcSDE application server 5

    Creating ArcSDE application servers 7The ArcSDE home directory 8The DBMS database 9The ArcSDE DBMS administration account 10The ArcSDE service on UNIX and Windows 11Windows installs 12Accessing an ArcSDE application server through a firewall 14

    Configuring ArcSDE application servers 15The services.sde file 16Operating system services files 18The service name on Windows 19ArcSDE DBMS environment variables 20ArcSDE system environment variables 21The dbinit.sde file format 23Displaying ArcSDE system environment variables 24Adjusting ArcSDE application server initialization parameters 25Displaying the ArcSDE initialization parameters 38

    Managing ArcSDE application servers 39Before starting an ArcSDE application server 40Starting a local ArcSDE application server on Windows 41Starting a remote ArcSDE application server on Windows 42Starting a local ArcSDE application server on UNIX 43The sdemon command output 44Starting a remote ArcSDE application server on UNIX 45Pausing, resuming, and shutting down an ArcSDE application server 46

    1

    2

    3

    4

  • IV MANAGING ARCSDE APPLICATION SERVERS

    Shutting down an ArcSDE application server during the editing of a multiversioned table 49Removing ArcSDE sessions (Windows and UNIX) 50

    Monitoring ArcSDE application servers 53Displaying ArcSDE application server status and lock table information 54How ArcGIS uses ArcSDE locking 56Displaying ArcSDE application server statistics 57Displaying ArcSDE user session information 58

    Troubleshooting the ArcSDE application server 59What happens when you start an ArcSDE application server 60What happens when an ArcSDE client connects to an application server 62What happens when an ArcSDE client direct connects to the DBMS 64Common ArcSDE startup problems on UNIX servers 65Common ArcSDE startup problems on Windows servers 67Setting the Windows SharedSection 69The Windows Event Viewer 70Examining the ArcSDE error logfiles 71ArcSDE intercept 72ArcSDE tracing 73

    ArcSDE data dictionary 75

    ArcSDE table definitions 97

    ArcSDE application server command references 113

    ArcSDE initialization parameters 125

    5

    6

    A

    B

    C

    D

  • CONTENTS V

    Glossary 133

    Index 143

  • IN THIS CHAPTER

    1

    Introducing the ArcSDE application server 1 The ArcSDE application server

    Properties of an ArcSDE applica-tion server

    Tips on learning about theArcSDE application server

    This chapter introduces the key components of the ESRI ArcSDE applicationserver and provides an overview of the underlying configuration. Subsequentchapters discuss the creation, configuration, and management of the ArcSDEapplication server. The appendices contain descriptions of the ArcSDE homedirectory, the data dictionary, table definitions, listings of the ArcSDEcommands, and the ArcSDE initialization parameters.

  • 2 MANAGING ARCSDE APPLICATION SERVERS

    An ArcSDE application server conveys spatial data betweengeographic information system (GIS) applications and adatabase. The database may be any one of the supporteddatabase management systems (DBMSs) such as Oracle, SQLServer, Informix, or DB2. The database could also be aregistered collection of ArcGIS coverages or shapefiles. Theapplications that can connect to and access spatial data from anArcSDE application server include ArcGIS Desktop, ArcIMS,ArcView 3, ArcInfo Workstation, MapObjects, and ArcSDECAD Client, as well as custom-built applications created by eitheryou or an ESRI business partner.

    Two-tiered versus three-tiered architecture

    ArcSDE provides two alternative methods of connecting to thedatabase instancedirect connection to the database instance ina two-tiered architecture or connecting through the ArcSDEapplication server in a three-tiered architecture. If it is yourintention to adopt the two-tiered approach, then you shouldconsult the Appendix titled Making a Direct Connection in theArcSDE Configuration and Tuning Guide for PDF file,located in the documentation folder on the ArcSDE CD. Thisguide is primarily concerned with the administration of theArcSDE application server. However, information concerningsuch things as the management of server configurationparameters (Chapter 3 and Appendix D) and troubleshooting(Chapter 6) also apply to direct connections.

    The ArcSDE application server

  • INTRODUCING THE ARCSDE APPLICATION SERVER 3

    Individual clientconnections to

    the ArcSDEapplication

    server.

    Dedicated gsrvrprocessescommunicate with theDBMS on behalf ofthe client.

    The sdemon command allows theadministrator to manage and monitor the

    ArcSDE service.

    ArcSDE servicethegiomgr process

    manages clientconnections.

    C1 Connection request C3 Connection request

    C2 Connection request C4 Connection request

    Verifies connection (username/password)

    Spawns one dedicated "gsrvr" process persuccessful connection

    ArcSDE Server Process"giomgr"

    Listens for connection requests

    C1 gsrvr C4 gsrvr

    Client 3(for example, ArcIMS)

    Client 4(for example, CAD Client)

    Client 1(for example, ArcView GIS)

    Client 2 (for example, ArcInfo)

    Managed by sdemon

    DBMS

  • 4 MANAGING ARCSDE APPLICATION SERVERS

    The ArcSDE application server, a client/server configuration,has a number of defining properties; these are introduced in thefollowing sections.

    The home directory

    Each ArcSDE application server has its own home directory,which is defined by the system variable, SDEHOME. The homedirectory contains the ArcSDE binary executable files, dynamicshared libraries, configuration files, and internationalizationcode pages.

    The ArcSDE application server monitorthe giomgrprocess

    Each ArcSDE application server has one giomgr process. Thisprocess listens for user application connection requests, spawnsgsrvr processes, and cleans up disconnected user processes.

    The giomgr will not start if a valid server license has not beeninstalled. Contact ESRI customer support if you have notalready obtained a valid license.

    The gsrvr process

    The giomgr process spawns a gsrvr process for each applicationconnected to the ArcSDE application server. The gsrvr processis dedicated to a single-user application connection. Itcommunicates with the database on behalf of the connectedapplication. The gsrvr process responds to the applicationsquery and edit requests to the database.

    The Transmission Control Protocol/Internet Protocolservice name and port number

    The ArcSDE application server, through the giomgr process,listens for application connection requests on a dedicated TCP/IP service name and port number. The gsrvr process, inturn, communicates with the application on the same TCP/IPservice and port number. All communication between theapplications and the ArcSDE application server take place usingthe TCP/IP service name and port number.

    The configuration parameters

    The ArcSDE application server can be configured to optimize thedata flow between the connected applications and the database.

    The configuration parameters are stored in theSDE.SERVER_CONFIG metadata table, making them accessible tomultiple application servers and direct connections. Theparameters are managed by editing the configuration files andloading the values into the SDE.SERVER_CONFIG table. Thedefault configuration file, giomgr.defs, is located in the etc folderof SDEHOME.

    Properties of an ArcSDE application server

  • INTRODUCING THE ARCSDE APPLICATION SERVER 5

    Tips on learning about the ArcSDE application server

    About this book

    This book is designed to help you create and maintain an ArcSDEapplication server. It discusses the ArcSDE application serverhow to configure the application server, as well as how to monitorits usage. In addition to showing how to configure and manageyour ArcSDE application, it also shows you how to monitor yourservice and cope with problems that may arise.

    The focus of this book is not the creation or administration of aDBMS. This is a separate topic; for information on that topic,see the ArcSDE Configuration and Tuning Guide for PDF file, ArcSDE_Config_Gd_.pdf, located inthe documentation folder on the ArcSDE CD.

    Contacting ESRI

    If you need to contact ESRI for technical support, refer toContactingTechnical Support in the Getting more help sectionof the ArcGIS DesktopHelp system.

    You can also visit ESRI on the Web at www.esri.com for moreinformation on ArcSDE and ArcInfo.

    ESRI education solutions

    ESRI provides educational opportunities related to geographicinformation science, GIS applications, and technology. You canchoose among instructor-led courses, Web-based courses, andself-study workbooks to find education solutions that fit yourlearning style. For more information, go to www.esri.com/education.

  • IN THIS CHAPTER

    7

    2 The ArcSDE home directory

    The DBMS database

    The ArcSDE DBMS administrationaccount

    The ArcSDE service on UNIX andWindows

    Windows installs

    Accessing an ArcSDE applicationserver through a firewall

    Creating ArcSDE application servers

    Before you can create an ArcSDE application server, you must install theArcSDE software. For ArcSDE installation instructions, refer to the ArcSDEInstallation Guide for your DBMS.

    When you install ArcSDE, the ArcSDE software is copied into a directorycalled the home directory, or SDEHOME.

    The DBMS must be prepared by running the sdesetup utility for yourDBMS. This utility creates the required ArcSDE and Geodatabase metadatatables under the SDE users schema.

    Before you start an ArcSDE application server, check the following:

    The ArcSDE software has been installed correctly, and the defaulthome directory (SDEHOME) has been established. On Windows, anyinstallation errors will be reported to the \SDE90ORA.LOGfile.

    A supported DBMS database has been configured for ArcSDE.

    An ArcSDE user account exists in the DBMS, with enough freespace available to store the ArcSDE repository.

    A unique TCP/IP service name and port number is available.

  • 8 MANAGING ARCSDE APPLICATION SERVERS

    The ArcSDE home directory, also known by the system variablethat stores its location (either %SDEHOME% on Windows or$SDEHOME on UNIX), contains all of the executable files anddynamic libraries required to run an ArcSDE application server.This directory structure is automatically set up during theinstallation process. Each independent ArcSDE applicationserver requires its own home directory.

    The ArcSDE application servers configuration files must then beupdated to reflect the unique properties of the new applicationserver. Many ArcSDE application servers can run on a singlecomputer, with each application server requiring its own homedirectory, TCP/IP service name, and port number. The hardwareplatform must have sufficient resources available to support theprocesses of the ArcSDE software and the DBMS.

    Refer to the ArcSDE Installation Guide for more informationabout creating additional ArcSDE application servers.

    The ArcSDE home directory

  • CREATING ARCSDE APPLICATION SERVERS 9

    ArcSDE stores data in a DBMS database. This database mustexist before the ArcSDE application server can be created.Consult your DBMS documentation for guidance on creating aDBMS database. You should also review the basic adviceprovided in the ArcSDE Configuration and Tuning Guide for, which is located in the documents directory of theCDROM installation media and in the ArcSDE home directory(SDEHOME).

    Microsoft SQL Server, IBM Informix, and IBM DB2 supportedservers may contain one or more databases, although be awarethat DBMS vendors vary in their definition of a database. AnArcSDE application server can only connect to one databaseserver and to one database.

    Configuration parameters that control the manner in which anArcSDE application server connects to a database may be storedin the dbinit.sde file. This file is located in the %SDEHOME%\etcdirectory on Windows and in the $SDEHOME/etc directory onUNIX. This avoids the need to rely on environment variables setwhen the user logs in. The dbinit.sde file is discussed in detail inChapter 3, Configuring ArcSDE application servers.

    For optimum performance, the database and the ArcSDEapplication server should coexist on the same host. However, it ispossible for ArcSDE to connect to a database hosted on a remotemachine. For more information on establishing a remoteconnection to an ArcSDE service, refer to the ArcSDEConfiguration and Tuning Guide for .

    The DBMS database

  • 10 MANAGING ARCSDE APPLICATION SERVERS

    An ArcSDE application server requires the creation of an ArcSDEDBMS administration account. On Windows, the ArcSDEinstallation process gave you the opportunity to create anArcSDE DBMS administration account and the necessary DBMSstorage space to store the data dictionary tables owned by theArcSDE administrator account. If this step was bypassed duringthe installation, it must be completed before the ArcSDEapplication server can be started up.

    The procedure for creating the ArcSDE DBMS administrationaccount differs for each ArcSDE product. For information onhow to create the ArcSDE DBMS administration account, refer toArcSDE Installation Guide.

    Under the ArcSDE DBMS administration account, ArcSDE storesits data dictionary tables. The tables are created and initiallypopulated by the ArcSDE sdesetup command line utility. There isa separate utility for each DBMS.

    The ArcSDE DBMS administration account

  • CREATING ARCSDE APPLICATION SERVERS 11

    Registering an ArcSDEservice on UNIX

    1. Edit the $SDEHOME/etc/services.sde file.

    2. Add the same service nameand port number to theoperating system/etc/services file.

    The ArcSDEservice on UNIXand WindowsEach ArcSDE application serverlistens for user connections ona dedicated TCP/IP servicename and port number throughthe giomgr process.

    On UNIX systems, edit the$SDEHOME/etc/services.sdefile and the /etc/services file toinclude the service name.

    On Windows systems, theArcSDE application server iscreated during the ArcSDEsoftware installation as aWindows service. The servicename is stored in the registryunderHKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcInfo\ArcSDE\ArcSDE for\.

    1

    2

    #

    # ESRI ArcSDE service name and port number

    #

    esri_sde 5151/tcp

    .

    .

    .

    nfsd 2049/udp # NFS server daemon (clts)

    nfsd 2049/tcp # NFS server daemon (cots)

    lockd 4045/udp # NFS lock daemon/manager

    lockd 4045/tcp

    esri_sde 5151/tcp # ArcSDE 9 service

    dtspc 6112/tcp # CDE subprocess control

    fs 7100/tcp # Font server

    .

    .

    $SDEHOME/etc/services.sde file

    Operating system /etc/services file

    Tip

    Port numberAlthough it is not used at thisstage, the port number in theSDEHOME/etc/services.sde file isincluded to remind the ArcSDEadministrator that the servicename is assigned to the 5151/TCPport in the operating systemservices file.

  • 12 MANAGING ARCSDE APPLICATION SERVERS

    Windows installsThe installation programautomatically enters the servicename and port number for thedefault service name in both theregistry and the Windowsservices file,C:\winnt\system32\drivers\etc\services.

    The installation program alsocreates the Windows service,setting it to automaticthat is, itwill automatically start up whenthe server host is rebooted.

    Like all Windows services, theArcSDE application server isstarted and stopped from theWindows services menu.

    Although it is more convenientto start the ArcSDE applicationserver from the Windowsservice menu, it is sometimesnecessary to use the sdemoncommand because errormessages are printed directly tothe MSDOS command windowinstead of the event log. Usingsdemon to start the service canbe useful when trying todiagnose a startup problem.Unlike the Windows service,the sdemon command reads theservice name from the%SDEHOME%\etc\services.sdefile. Edit this file to ensure thatit contains the correct informa-tion before using sdemon.

    Verifying an ArcSDEservice on Windows

    1. Open the Control Panel anddouble-click AdministrativeTools.

    2. From the AdministrativeTools menu, click Services.

    3. From Services, make surethe ArcSDE service has beenstarted.

    1

    2

    3

  • CREATING ARCSDE APPLICATION SERVERS 13

    Monitoring the ArcSDEservice

    1. Use the sdemon commandat the Windows MSDOScommand prompt to trapArcSDE application servererror messages.

    1

    Tip

    Adding more ArcSDEservicesIf additional ArcSDE applicationservers are required, use thesdeservice command to define thenew Windows service. For acomplete description of thesdeservice command, seeAppendix C: ArcSDE applicationserver command references.

  • 14 MANAGING ARCSDE APPLICATION SERVERS

    Accessing an ArcSDE application server through a firewall

    To provide access to an ArcSDE application server inside asystem security firewall, the host computer on which theArcSDE application server is installed should be listed in yourdomain name server (DNS) database. The DNS must beregistered with your Internet service provider (ISP) or directlywith Network Solutions (formerly called InterNIC), theorganization that registers Internet domain names.

    Your DNS resolves the IP address of your computer to the name,or universal resource locator, you wish to make accessible to theInternet. In most cases, you will have more machines within yourlocal network than you will have Internet IP addresses for. In thiscase, you would maintain your own set of internal IP addressesknown only to your local area network (LAN). Your firewall, orproxy server software, will translate your internal IP addresses toInternet IP addresses when you access computers outside yourLAN.

    Since ArcSDE application servers listen for connections on aTCP/IP port number that corresponds to your service name, youmust also add the TCP/IP port number to the computers hostname when connecting to it.

    For ArcSDE applications built with the ArcSDE C applicationprogramming interface (API), the host must always be specifiedusing host name.

    For ArcSDE Java applications you can specify an ArcSDE hostname in two ways. You can either use the DNS name, if it isavailable, or you can connect to it directly using its Internet IPaddress.

    For example, ESRIs domain nameesri.comhas beenregistered with Network Solutions, and we identified our DNS asIP address 198.102.62.1. Our DNS has the IP address for the

    ArcSDE host Toshi in its DNS database. The internal IP addressfor Toshi is 46.1.2.324, which is translated to the IP address198.102.62.5 when Toshi sends and receives information throughthe firewall. The ArcSDE application server running on Toshi islistening for connections on the service name esri_sde3, whichcorresponds to TCP/IP port number 5165. So, if you wish toconnect to that particular ArcSDE application server, you mustspecify either the host name toshi.esri.com:5165 or identifyToshi by its IP address 198.102.62.5:5165. In both cases youmust also include the service port number, 5165.

    The giomgr process bequeaths the port number to the gsrvrprocess following a successful connection. Therefore, allcommunication to the ArcSDE application server occurs on thesame TCP/IP port number.

    If you cannot connect to an ArcSDE application server through afirewall, test the accessibility of the remote ArcSDE host withyour Internet browser by specifying either the server name andTCP/IP port number or the IP address and TCP/IP port numberas the URL.

    The correct syntax is:

    :

    :

  • IN THIS CHAPTER

    15

    Configuring ArcSDE application servers3 The services.sde file

    Operating system services files

    The service name on Windows

    ArcSDE DBMS environmentvariables

    ArcSDE system environmentvariables

    The dbinit.sde file format

    Displaying ArcSDE systemenvironment variables

    Adjusting ArcSDE applicationserver initialization parameters

    Displaying the ArcSDE initializa-tion parameters

    ArcSDE conveys spatial data between a DBMS and applications.Configuring an ArcSDE application server focuses on maximizing datatransfer between the server and the client with limited shared resources. Therequirements of the application, the number of users, and the amount of datarequested influence the configuration of the ArcSDE service.

    The ArcSDE application server can be configured by modifying theparameters in the configuration metadata tables stored in the ArcSDE usersschema or the configuration files services.sde and dbinit.sde, located in theSDEHOME/etc directory.

  • 16 MANAGING ARCSDE APPLICATION SERVERS

    The services.sde file

    Each ArcSDE application server communicates with the databasemanagement system and the applications through a TCP/IP port.TCP/IP ports are defined by name in the operating systemsservices file.

    The SDEHOME\etc\services.sde file contains the service nameand the unique TCP/IP port number on which the ArcSDEapplication server accepts connection requests. This port numberis also assigned to each user or gsrvr process that the ArcSDEapplication server initiates. The port number listed in theservices.sde file does not designate operating system port use. Itis included in the services.sde by convention as a reminder of theport number assigned to the service name in the operatingsystems services file.

    ESRI has registered the default esri_sde service name and 5151TCP/IP port number with the Information Sciences Institute,Internet Assigned Numbers Authority.

    The default services.sde file created during the installationprocess will contain the following:

    #

    # ESRI ArcSDE Remote Protocol

    #

    esri_sde 5151/tcp

    To change the default service name, simply edit the file andrestart the service.

    On UNIX systems the sdeservice.sde file is always used. OnWindows systems, however, the services.sde file is used onlywhen the service is started from the MSDOS prompt using thesdemon command. If the service was started from the Windowsservice panel, ArcSDE uses the service name stored in theregistry underHKEY_LOCAL_MACHINE\HARDWARE\ESRI\ArcInfo\ArcSDE\ArcSDEfor \esri_sde.

    When a match is found, ArcSDE starts the giomgr process. Itlistens for user connection requests on the TCP/IP port numberassigned to the service name.

    When the ArcSDE application server is started with the sdemoncommand, the service searches the system services file for aservice name that matches the service name in the services.sdefile.

    If a match is not found, ArcSDE returns the following error onUNIX systems:

    $ sdemon -o startsdemon -o startsdemon -o startsdemon -o startsdemon -o start

    Please enter the SDE DBA password: *************************

    This instances service name esri_sde not foundin system services file.

    To diagnose startup problems on a Windows platform, examinethe event log. For more information, see Chapter 6,Troubleshooting the ArcSDE application server.

    Mapping the SDEHOME/etc/services.sde entries to the system servicesfile entries

    Matches the service name in the operating system's services file with the service name from the $SDEHOME/etc/services.sde fileand uses the corresponding port number for ALLcommunication.

    for example, 'esri_sde'

    5151/tcp

    sdemon command

    for example, 'esri_sde' 5151/tcp #ArcSDE service

    Reads the service name from $SDEHOME/etc/services.sde.

  • CONFIGURING ARCSDE APPLICATION SERVERS 17

    The services.sde file in each SDEHOME\etc directory shouldcontain only one service name. If you add more than one servicename to this file, ArcSDE will use the first one it encounters andignores the rest.

    The operating system services file contains many service names.At least one of them must match your service name, found in theservices.sde file. Enter the service name into the operating systemservices file on the server and client machines.

    Here is an example from an operating system services file thatcontains two ArcSDE services:

    esri_sde 5151/tcp # ArcSDE default service

    esri_sde2 5161/tcp # another ArcSDE service

    This defines two service names: esri_sde and esri_sde2.

    On UNIX systems, you can use the Network Information Service(NIS) services file if you are running NIS to avoid unnecessaryduplication of effort when updating the client and server localsystem services files.

    The dbinit.sde file of the new service must also be edited so itcontains the connection information of the second DBMS. Formore information on setting the DBMS connection variables inthe dbinit.sde file, see ArcSDE DBMS environment variables inthis chapter.

    One host computer supporting two ArcSDE application servers

    Multiple ArcSDE application servers running on the same hostrequire unique service names and port numbers. If you intend tocreate another ArcSDE application server on the same host, youmust edit one of the services.sde files and amend the servicename and port number accordingly. You must also update thesystem services file to include the new ArcSDE applicationserver.

    Host Machine/etc/services file

    DBMS 1 DBMS 2

    gsrvr processes

    giomgr processes

    esri_sde 5151/tcp # ArcSDE default service giomgr portesri_sde2 5161/tcp # ArcSDE service # 2 giomgr port

    ArcSDE Service 1"esri_sde"

    port number 5151/tcp

    ArcSDE Service 2"esri_sde2"

    port number 5161/tcp

  • 18 MANAGING ARCSDE APPLICATION SERVERS

    Forcing a search of localservices on HPUX

    1. Copy the nsswitch.conf filefrom the /usr/newconfig/etcdirectory to the /etc directory.

    2. Edit the file and change theline services: nis files toservices: files nis.

    Operating systemservices filesThe services file on aWindows platform is located underthe winnt\system32\drivers\etcdirectory. Use an editor, such asNotepad, that does not embedformat characters to edit theWindows services file.

    The services file for UNIX systemsis located at /etc/services.

    Some UNIX systems directapplications to search the NISservices file rather than thelocal services file. If you wishto have the operating systemsearch the local services fileinstead, you must force it to doso.

    Forcing a search of thelocal services on IBMAIX

    1. In the /etc directory, create thefile netsvc.conf.

    2. Add the lineservices=local.nis.

    # /etc/nsswitch.conf:

    #This file uses NIS (YP) in conjunction with# files.

    # "hosts:" and "services:" in this file are used

    # only if the /etc/netconfig file has a "-" for# nametoaddr_libs of "inet" transports.

    # the following two lines obviate the "+" entry

    # in /etc/passwd and /etc/group.

    passwd: files nisgroup: files nis# consult /etc files only if nis is down.

    hosts: files nis dnsnetworks: nis [NOTFOUND=return] filesprotocols: nis [NOTFOUND=return] files

    rpc: nis [NOTFOUND=return] filesethers: nis [NOTFOUND=return] filesnetmasks: nis [NOTFOUND=return] files

    bootparams: nis [NOTFOUND=return] filespublickey: nis [NOTFOUND=return] filesnetgroup: nis

    automount: files nisaliases: files nis# for efficient getservbyname() avoid nis

    services: files nissendmailvars: files

    2

  • CONFIGURING ARCSDE APPLICATION SERVERS 19

    The service nameon WindowsOn Windows systems, theservices.sde file is onlyaccessed when the ArcSDEapplication server is startedwith the sdemon command.When the service is startedfrom the services menu, theservice name is read from thesystem registry.

    To change the service name inthe Windows registry, use thesdeservice administration com-mand.

    1. Shut down the ArcSDEapplication server from theWindows NT Services dialogbox by clicking Stop.

    2. From a DOS commandprompt, remove the oldservice name using thesdeservice command withthe delete option.

    3. From a DOS commandprompt, create the newservice name with thesdeservice -o create option.

    4. Restart the ArcSDE applica-tion server from the Servicesdialog box. Notice theservice name has changed.

    1

    4

    3

    2

    See Also

    For more information about thesdeservice command, seeAppendix C: ArcSDE applicationserver command references.

  • 20 MANAGING ARCSDE APPLICATION SERVERS

    The dbinit.sde file and the application server

    The ArcSDE application server reads system environmentvariables from the SDEHOME\etc\dbinit.sde file for such thingsas establishing the DBMS server to connect to and limiting themessages written to the sde error log (sde_.log)file. System environment variables set within the dbinit.sde fileoverride those set within the system environment of the user thatstarts the application server. For variables absent from both thedbinit.sde file and the user environment, default ArcSDE settingsare used.

    The system environment variables that control the ArcSDEapplication servers connection to a DBMS depend on eachindividual DBMS.

    For more details on setting environment variables, refer to theArcSDE Installation Guide for < DBMS>.

    ArcSDE DBMS environment variables

  • CONFIGURING ARCSDE APPLICATION SERVERS 21

    ArcSDE system environment variables

    By default, SDEHOME determines on which ArcSDE applicationserver the sdemon command will operate. This variable can beoverridden by the -H option of the sdemon command.

    setenv SDEHOME d:\arcexe\arcsdesetenv SDEHOME d:\arcexe\arcsdesetenv SDEHOME d:\arcexe\arcsdesetenv SDEHOME d:\arcexe\arcsdesetenv SDEHOME d:\arcexe\arcsde

    SDESERVER determines the host of the ArcSDE applicationserver for the connecting client application. This variable can beoverridden by specifying the host in the application. If the hostis not specified during connection and the SDESERVER variableis not set, the client application attempts to connect to anArcSDE application server running on the local host.

    setenv SDESERVER brunosetenv SDESERVER brunosetenv SDESERVER brunosetenv SDESERVER brunosetenv SDESERVER bruno

    SDEINSTANCE is set in the environment of the client applicationand determines the ArcSDE service name to connect to.Specifying the service in the application overrides this variable. Ifthis variable is not set and the service name is not specified in theapplication, the service name defaults to esri_sde.

    setenv SDEINSTANCE esri_sdesetenv SDEINSTANCE esri_sdesetenv SDEINSTANCE esri_sdesetenv SDEINSTANCE esri_sdesetenv SDEINSTANCE esri_sde

    SDEDATABASE can be entered for the DBMS and has multipledatabase connection possibilities within a single applicationserver. Specifying the database through the application overridesthis variable. If the variable is not set and the database is notspecified upon connection, the ArcSDE client connects to thedefault database.

    setenv SDEDATABASE city_engsetenv SDEDATABASE city_engsetenv SDEDATABASE city_engsetenv SDEDATABASE city_engsetenv SDEDATABASE city_eng

    SDEUSER specifies the username through which the ArcSDEclient application will connect. Specifying the username in theapplication overrides this variable. If this variable is not set andthe username is not specified in the application, an error isreturned. A username must be specified.

    setenv SDEUSER bobsetenv SDEUSER bobsetenv SDEUSER bobsetenv SDEUSER bobsetenv SDEUSER bob

    SDEPASSWORD specifies the password for the usernameentered by the ArcSDE client application. Specifying the

    password on the application connection tool overrides thisvariable. If the variable is not set and the password is notspecified in the application, the application may prompt for thepassword. If the application does not prompt for the password,an error is returned.

    setenv SDEPASSWORD fools.goldsetenv SDEPASSWORD fools.goldsetenv SDEPASSWORD fools.goldsetenv SDEPASSWORD fools.goldsetenv SDEPASSWORD fools.gold

    SDETMP allows you to set the temp directory for the serversusing this variable, but it will only be checked if the TEMPkeyword is not set in the SDE.SERVER_CONFIG table.

    setenv SDETMP c:\tempsetenv SDETMP c:\tempsetenv SDETMP c:\tempsetenv SDETMP c:\tempsetenv SDETMP c:\temp

    SDEDBECHO echoes the contents of the dbinit.sde file duringstartup. For ArcSDE application servers started locally on a UNIXsystem, the output of SDEDBECHO is written to the screen. TheSDEDBECHO output for an ArcSDE application server started ona remote UNIX ArcSDE application server is written to itssde.errlog file.

    setenv SDEDBECHO TRUEsetenv SDEDBECHO TRUEsetenv SDEDBECHO TRUEsetenv SDEDBECHO TRUEsetenv SDEDBECHO TRUE

    SDEVERBOSE reports internal messaging to the screen uponstartup and writes gsrvr process startup and shutdown messagesto sde.errlog.

    setenv SDEVERBOSE TRUEsetenv SDEVERBOSE TRUEsetenv SDEVERBOSE TRUEsetenv SDEVERBOSE TRUEsetenv SDEVERBOSE TRUE

    Set SDEATTEMPTS to the number of times you want the sessionto attempt to connect to an ArcSDE application server. Undernormal conditions, only one attempt is required; however, shouldthe ArcSDE application server become too busy satisfying theconnection requests of many users at the same time, severalattempts may be required before a session is able to establish aconnection. Each time a session fails to establish a connection, itwaits until the IP time out occurs. The IP time out is set by yournetwork administrator but defaults to 75 seconds on mostoperating systems. By default, SDEATTEMPTS is set to 4. Thisshould be adequate for most environments.

    setenv SDEATTEMPTS 4setenv SDEATTEMPTS 4setenv SDEATTEMPTS 4setenv SDEATTEMPTS 4setenv SDEATTEMPTS 4

  • 22 MANAGING ARCSDE APPLICATION SERVERS

    Set SDENOIPTEST to true if you do not want ArcSDE to test forthe presence of the SERVER name in the HOSTS file. By defaultSDENOIPTEST is not set. Setting this variable can be useful ifyou have not set up the HOSTS file. The client will attempt toconnect to the server for SDEATTEMPTS (4 times by default).

    setenvSDENOIPTEST TRUEsetenvSDENOIPTEST TRUEsetenvSDENOIPTEST TRUEsetenvSDENOIPTEST TRUEsetenvSDENOIPTEST TRUE

    Set GIOMGRLOGREFRESH to true if you wish to have thegiomgr.log file overwritten each time the ArcSDE server is started.If you wish to accumulate the log messages (the default), do notset the variable.

    setenv GIOMGRLOGREFRESH TRUEsetenv GIOMGRLOGREFRESH TRUEsetenv GIOMGRLOGREFRESH TRUEsetenv GIOMGRLOGREFRESH TRUEsetenv GIOMGRLOGREFRESH TRUE

    Set SDELOGAPPEND to true if you want the sde error logfile toaccumulate log messages and be truncated each time the server isrestarted. Do not set the variable if you want the sde error logfileto be truncated upon startup.

    setenv SDELOGAPPEND truesetenv SDELOGAPPEND truesetenv SDELOGAPPEND truesetenv SDELOGAPPEND truesetenv SDELOGAPPEND true

    ESRI_US_STREETS_DIR specifies the folder that stores theArcGIS StreetMap USA reference data used by the ArcSDEStreetMap USA locators. Set this environment variable to thefolder containing the usa.edg file and other .edg StreetMap USAstreet data files. Note that the value of this environment variableshould not contain a trailing slash (/) or backslash (\).

    setenv ESRI_US_STREETS_DIRsetenv ESRI_US_STREETS_DIRsetenv ESRI_US_STREETS_DIRsetenv ESRI_US_STREETS_DIRsetenv ESRI_US_STREETS_DIR d:\streetmap usa\usa\streets d:\streetmap usa\usa\streets d:\streetmap usa\usa\streets d:\streetmap usa\usa\streets d:\streetmap usa\usa\streets

    LOCATION_ERRLOG defines the file to which ArcSDE locationerrors are logged. The value of this environment variable shouldcontain the fully qualified name of the logfile. This file does notneed to exist before setting the environment variable because thelocation framework creates it automatically. ArcSDE locationerrors will be logged to this file whenever theLOCATION_VERBOSE environment variable is set to TRUE.

    setenv LOCATION_ERRLOGsetenv LOCATION_ERRLOGsetenv LOCATION_ERRLOGsetenv LOCATION_ERRLOGsetenv LOCATION_ERRLOG c:\temp\location.errlog c:\temp\location.errlog c:\temp\location.errlog c:\temp\location.errlog c:\temp\location.errlog

    Set the LOCATION_VERBOSE environment variable to TRUE tolog ArcSDE location errors. If the LOCATION_ERRLOGenvironment variable is also set, location errors are logged to thespecified file. If the LOCATION_ERRLOG environment variable isnot set, or the specified file cannot be created, location errors arelogged to SDEHOME\etc\location.errlog.

    setenv LOCATION_VERBOSE TRUEsetenv LOCATION_VERBOSE TRUEsetenv LOCATION_VERBOSE TRUEsetenv LOCATION_VERBOSE TRUEsetenv LOCATION_VERBOSE TRUE

  • CONFIGURING ARCSDE APPLICATION SERVERS 23

    The dbinit.sde file format

    The dbinit.sde file consists of comments and commands.Comments are any lines preceded by the pound sign (#). Forexample:

    # This is the system environment for# the esri_sde ArcSDE application server

    The commands in the dbinit.sde file accept two keywords: set andunset. The set command enables the system variable and assignsit the value following the equal sign. The syntax of the setcommand is:

    set =

    In this example, the SDEDBECHO variable is set to true, whichechoes the variables set in the dbinit.sde file when the ArcSDEapplication server is started.

    set SDEDBECHO=TRUE

    The unset command disables the system variable. It is usefulbecause it ensures that an undesired variable set in the loginenvironment is not set when ArcSDE starts. The syntax of theunset command is:

    unset

    The following example of the unset command ensures that theOracle TWO_TASK variable is not set:

    unset TWO_TASK

  • 24 MANAGING ARCSDE APPLICATION SERVERS

    Displaying ArcSDE system environment variables

    To display the environment variables for an ArcSDE applicationserver that is currently running, use:

    $ sdemon -o info -I varssdemon -o info -I varssdemon -o info -I varssdemon -o info -I varssdemon -o info -I vars

    A list of environment variables is returned in the format:

    =

    The variables in the list are a combination of those found in thelogin system environment file and the dbinit.sde. The variablesset in the dbinit.sde file always override the system environmentfile settings.

    On Windows systems the application server is started as aWindows service; therefore, it may not have the sameenvironment setting as the logged in users environment. Thus,there will probably not be agreement with the MSDOS setcommand for the logged in user.

  • CONFIGURING ARCSDE APPLICATION SERVERS 25

    The ArcSDE application server initialization parameters storedin the SDE.SERVER_CONFIG table control the configurationof the application server. The parameters are read when theArcSDE application server starts.

    The default values satisfy the needs of most ArcSDEinstallations. With the exception of adjusting theMINBUFFSIZE and MAXBUFFSIZE parameters to improvedata loading performance, the remainder of the parametersshould not be altered unless you are certain you need to do so.

    ArcSDE applications making direct connects to a DBMS alsoread the parameters from the SDE.SERVER_CONFIG table. Notall initialization parameters that apply to the ArcSDE applicationserver apply to ArcSDE applications making a direct connection.

    See Appendix D: ArcSDE initialization parameters for a full list ofinitialization parameters. The following sections discuss in moredetail some of the individual parameters and their impact on theArcSDE application server.

    READONLY parameter

    The READONLY parameter allows you to start the ArcSDEapplication server in READONLY mode. Set this parameter toTRUE if you want to disable all writes by ArcSDE clients.

    When the READONLY parameter is set to FALSE, the defaultvalue, the ArcSDE application will allow users to edit the data ofthe ArcSDE feature classes and tables that they have writepermissions for.

    Session parameters

    The session parameters are CONNECTIONS, TEMP, andTCPKEEPALIVE.

    The CONNECTIONS parameter restricts the number of concurrentconnections allowed by an ArcSDE application server.

    Adjusting ArcSDE application server initialization parameters

    The CONNECTIONS parameter does not restrict the number ofdirect connections. The default is 64 on UNIX and 48 onWindows.

    The TEMP parameter specifies the full path to the directory thatthe ArcSDE application server uses for temporary things, suchas the shared memory file on UNIX systems and temporarystorage for the attribute binary large objects (BLOBs), that arelarger than specified by the BLOBMEM parameter. For moreinformation on this parameter, please refer to the sectionManaging BLOB data later in this chapter. A directory with atleast 5 MB of available space should be specified. More spacemay be required for ArcSDE application servers that supportapplications allowing users to concurrently access binary largeobjects stored in attribute BLOB columns.

    Note that some files created by the ArcSDE application server arealways stored in the /tmp directory. For instance, thes.sde.iomgr file is a UNIX protocol socket used forconnections to the ArcSDE application server. It must always becreated in a known location so that local clients, unaware of theSDEHOME location and the setting of TEMP, can find it. Thus itis always created in /tmp.

    Sometimes the computer on which an application is runningcrashes or a user unexpectedly terminates an application. Unlessthe TCPKEEPALIVE parameter is set to TRUE, the ArcSDEapplication server process does not detect the absence of theclient process and does not disconnect from the DBMS server.When this happens, the ArcSDE application server processremains, and the administrator must manually terminate it.

    The TCP/IP KEEPALIVE interval is a systemwide parameter thataffects all application server processes running in the TCP/IPenvironment.

  • 26 MANAGING ARCSDE APPLICATION SERVERS

    Client/Server transport buffers

    .

    ArcSDEClient

    (forexample,ArcMap)

    Connection/Query

    Client TransportBuffer

    Result Set

    ArcSDEServer

    ServerTransportBuffer

    By setting the ArcSDE TCPKEEPALIVE parameter to TRUE, thesystem TCP/IP KEEPALIVE settings are used. The default testinterval is two hours of idle timethat is, the system checks theconnected sessions every two hours.

    When this happens, any ArcSDE connections whose clientprocesses have been terminated are disconnected. If the networkenvironment in which the ArcSDE application server operates isreliable, TCPKEEPALIVE may be set to TRUE. However, be awarethat a disconnection may be triggered by short-term networkoutages (~10 minutes) when TCPKEEPALIVE is set to TRUE. Bydefault, TCPKEEPALIVE is set to FALSE.

    The TCPKEEPALIVE parameter does not affect directconnections.

    Transport buffer parameters

    After a user connects to an ArcSDE application server from anapplication, such as ArcMap or ArcCatalog, the featureclasses and tables stored in the database can be accessed. Eachtime any of these items are accessed, an ArcSDE stream iscreated. An ArcSDE stream is a mechanism that transports databetween the database the ArcSDE application server is currentlyconnected to and an application such as ArcMap. For furtherinformation on streams and the parameters available to controltheir operation, see Streams later in this chapter.

    When an ArcSDE stream is created, the ArcSDE applicationserver process allocates transport buffers on both the client andthe server. Transport buffers reduce I/O and improve performanceby accumulating records and sending them across the network inbatches rather than as individual records.

    The records are collected in the ArcSDE application serverprocess transport buffer and sent to the ArcSDE client transportbuffer when the application is querying the database.Alternatively, the records are collected in the clients transport

    buffer and sent to the ArcSDE application server processtransport buffer when the application is writing data to thedatabase.

    Three parameters control the transport buffers.

    MAXBUFSIZE The total amount of memory allocatedto each transport buffer

    MINBUFSIZE The minimum threshold of eachtransport buffer

    MINBUFOBJECTS The minimum number of records pertransport buffer

    The MAXBUFSIZE represents the total amount of memory thatis allocated to each transport buffer. The transport buffer stopsaccumulating records once MAXBUFSIZE is reached and waitsfor the request to send the records to the other buffer.

    The MINBUFSIZE and MINBUFOBJECTS parameters are lowerthresholds that prevent the records from being sent until one ofthem is attained. For example, if the application requests data,the request is deferred until the server transport buffer reacheseither MINBUFSIZE or MINBUFOBJECTS.

  • CONFIGURING ARCSDE APPLICATION SERVERS 27

    The data transfer process from an ArcSDE application server transferbuffer to an ArcSDE client

    When creating a geodatabase, you should raise the parameters toincrease the transmission speed of data loading. Once loading iscomplete, reduce the transport buffers.

    Before raising the MAXBUFSIZE parameter too high, considerthe maximum overall impact to the servers memory budget. Thedefault MAXBUFSIZE adds 64 kilobytes per stream perArcSDE user connection. For example, if there are 100 usersusing an application that displays seven feature classes, ArcSDEallocates a total of 44,800 kilobytes (100 * 7 * 64) of memoryfor the servers transport buffers. Doubling the MAXBUFSIZEin this example would result in 89,600 kilobytes of memoryallocated to the servers transport buffers. Excessive paging mayresult on the server if MAXBUFSIZE is set too high andphysical memory is not available to satisfy it.

    Set MINBUFSIZE to no more than one-half of theMAXBUFSIZE.

    Setting MINBUFSIZE too high increases wait time. IfMAXBUFSIZE is 64K and MINBUFSIZE is 56K, the client willwait until the 56K threshold is reached before sending thetransport buffer.

    Reducing the MINBUFSIZE parameter improves thecooperative processing between client and server.

    MINBUFOBJECTS depends on the size (bytes) of a row of data.MINBUFOBJECTS is examined first, then MINBUFSIZE. If thethreshold of either parameter is breached, the contents of thetransport buffer are sent.

    ArcSDE application developers can override the giomgr.defstransport buffer parameters with the C API functionSE_connection_set_stream_spec.

    1. Transfer bufferempty.

    MAXBUFSIZE

    MINBUFSIZE

    2. < MINBUFSIZEClient sends query toserver. Buffer loadingbegins no transfer to client.

    MAXBUFSIZE

    MINBUFSIZE

    6. = MAXBUFSIZEIf client is not waiting fortransfer and buffer is full,buffer loading STOPS.

    MAXBUFSIZE

    MINBUFSIZE

    5. > MINBUFSIZEBuffer loading continuesuntil client is waitingagain.

    MAXBUFSIZE

    MINBUFSIZE

    3. = MINBUFSIZEIf client is waiting, datatransfer begins.

    MAXBUFSIZE

    MINBUFSIZE

    to Client

    4. > MINBUFSIZEIf client is not waiting,buffer loading continues.

    MAXBUFSIZE

    MINBUFSIZE

    to Client

  • 28 MANAGING ARCSDE APPLICATION SERVERS

    Array buffer parameters

    For each ArcSDE stream that is created, ArcSDE allocates anarray buffer.

    Whenever possible, groups of records are transferred betweenArcSDE and the DBMS server. For DBMSs that haveimplemented array inserts, ArcSDE inserts records into the DBMSserver array. All supported DBMSs, except Microsoft Access,have implemented array fetch mechanisms, so whenever ArcSDEissues a select statement on behalf of the user, it fetches or getsthe records in an array.

    Array buffers reduce the amount of I/O occurring betweenArcSDE and the DBMS server by fetching and inserting data inlarger chunks. Less I/O results in better performance. However,excessive paging can result if the array buffers are set larger thannecessary. As a general rule, approximately 100 records is theoptimum number that most applications can handle in the arrayprocess.

    The array buffer parameters determine the size of the arraybuffers. Parameters that affect query performance areSHAPEPTSBUFSIZE, ATTRBUFSIZE, MAXARRAYSIZE, andMAXARRAYBYTES.

    MAXARRAYSIZE 100 #Max.array fetch size

    MAXARRAYBYTES 550000 #Max.array bytes allocated per stream

    SHAPEPTSBUFSIZE 400000 #Shape POINTS array buffer size

    ATTRBUFSIZE 50000 #Attribute arraybuffer size

    The array buffer parameters define the number of recordstransferred together for insert and query operations. During anarray insert, ArcSDE fills the array buffer with records from theserver transport buffer and transfers the entire array to the

    DBMS. ArcSDE queries data in an array by using array buffers toreceive the data.

    Estimating SHAPEPTSBUFSIZE

    Array inserts of feature geometry are divided into two parts:feature metadata and point data. Feature metadata, including thefeature ID, number of points, and entity type, requires the sameamount of space for each feature. The space required to storethe point data, on the other hand, varies according to the numberof points in the feature.

    SHAPEPTSBUFSIZE determines the buffer size for the pointdata. The default setting is based on an array size of 100. TuningSHAPEPTSBUFSIZE to the optimal setting is critical toperformance. ArcSDE estimates the average size of all featuresbased on the array size (MAXARRAYSIZE) and the size of thepoints buffer (SHAPEPTSBUFSIZE). If a feature exceeds theaverage size, it is flagged as truncated and fetched separately.

    ArcSDE server array buffers

    Connection/Query

    ArcSDE data stream>>(returned result set )

  • CONFIGURING ARCSDE APPLICATION SERVERS 29

    For example, suppose SHAPEPTSBUFSIZE is 400,000 (400K), andthe array size per fetch (MAXARRAYSIZE) is 100 rows (or100 features). The features in this example do not haveannotation, z-values, or measures, so each point requires eightbytes (four bytes for the x-value and four bytes for the y-value).

    Dividing SHAPEPTSBUFSIZE by MAXARRAYSIZE returns themaximum space available for each features points within thearray buffer.

    400000 bytes / 100 = 4000 bytes400000 bytes / 100 = 4000 bytes400000 bytes / 100 = 4000 bytes400000 bytes / 100 = 4000 bytes400000 bytes / 100 = 4000 bytes

    Further dividing the maximum space available to each feature bythe number of bytes each point requires returns the total numberof points that can be stored in the maximum space available foreach feature.

    4000 / 16 = 2504000 / 16 = 2504000 / 16 = 2504000 / 16 = 2504000 / 16 = 250

    In this case, ArcSDE expects each feature to have no more than250 points. When ArcSDE encounters features with 251 ormore points, the feature is skipped and fetched separately,forcing an additional I/O fetch from the DBMS.

    If the shape contains z-values or measures, divide by 24 insteadof 16. If the shape contains both z-values and measures, divideby 32.

    Setting the SHAPEPTSBUFSIZE parameter too small results in ahigher number of features to be fetched individually, whichdiminishes performance. Setting this parameter too high wastesmemory.

    Array Buffer

    1 432

    98 99 100

    =

    ...

    ...

    250 pointsper row(feature)

    4 KBper row(feature)

    SHAPEPTSBUFSIZE = 400K

    MAXARRAYSIZE = 100 ROWS (FEATURES)FEATURE POINT SIZE = 16 bytes

    The SHAPEPTSBUFSIZE and MAXARRAYSIZE parameters determine thenumber of points that can be stored in the maximum space available foreach feature within an ArcSDE array buffer.

  • 30 MANAGING ARCSDE APPLICATION SERVERS

    Determining 90 percentof the most queriedfeature classes for anoptimumSHAPEPTSBUFSIZEsetting

    1. Determine the total numberof features in the featureclass by issuing this SQLquery.

    2. Determine the largestnumber of points in thefeature class to use as astarting point in the step.

    3. Through iteration, determinethe number of points90 percent of the featureshave. Start by using an x-value that is 0.75 * maximumnumofpts. Increase ordecrease the x-value untilthe feature count is90 percent of total features.

    4. Multiply the number of pointsby the number of rows(MAXARRAYSIZE) the arraywill hold and the number ofbytes required by each point.

    For instance, ifMAXARRAYSIZE is set to100, 90 percent of thefeatures have 710 or fewerpoints, and each pointrequires 8 bytes, set theSHAPEPTSBUFSIZE to568000.

    Queries used under the ArcSDE binary model(SqlServer, Oracle LONG RAW and Oracle LOB).

    select count(*) total features from f;

    select max(numofpts) maximum numofpts fromf;

    select count(*) 'feature count' from fwhere numofpts < X;

    SHAPEPTSBUFSIZE = (MAXARRAYSIZE) * (numberof points) * (point size)

    568000 = 100 * 710 * 16

    Queries used under the object relationalmodel (DB2, Informix and Oracle Spatial)

    select count(*) 'total features' from table;

    select max(numpoints))'maximum numofpts' from ;

    - DB2 and Informix

    select max((select count(*)from table(p.shape.SDO_ORDINATES))/2) * points from ;

    - Oracle Spatial

    select count(*) 'feature count' from tablewhere numpoints() < X;

    SHAPEPTSBUFSIZE = (MAXARRAYSIZE) * (numberof points) * (point size)

    568000 = 100 * 710 * 8

    1

    2

    3

    4

    Tip

    Point sizeThe number of bytes required byeach point depends on its coordi-nate type. If the feature class onlyhas x,y coordinates, the number ofbytes each point requires is 16. Ifeither z-values or measures arepresent, 24 bytes are required. Ifboth z-values and measures arepresent, 32 bytes are required.

    1

    2

    3

    4

  • CONFIGURING ARCSDE APPLICATION SERVERS 31

    Estimating ATTRBUFSIZE

    ATTRBUFSIZE defines the array buffer size for attribute (non-BLOB) data. Tuning the attribute array buffer is similar to theSHAPEPTSBUFSIZE. The default 50,000 setting allows 100 rowswith 500 bytes of attribute data each.

    Performance is affected when the number of rows that can befetched into the attribute buffer does not match theMAXARRAYSIZE parameter setting. For queries involvingmultiple columns, add the number of bytes per column to get atotal row size. The ATTRBUFSIZE divided by row size cannotexceed the number of rows specified by MAXARRAYSIZE.ArcSDE will automatically reduce the size of the attribute bufferto hold MAXARRAYSIZE rows.

    Setting MAXARRAYSIZE

    As mentioned, MAXARRAYSIZE sets the number of rows thatthe server will fetch per request. The recommended default valueis 100. Optimal values can range between 20 and 150 on differentplatforms and DBMSs. Once the shape points data(SHAPEPTSBUFSIZE) and attribute buffer (ATTRBUFSIZE) arecorrectly tuned, try several array sizes to determine the optimalsetting for each installation.

    Setting MAXARRAYBYTES

    Control the maximum number of bytes per stream with theMAXARRAYBYTES parameter. This value represents the totalbytes that can be allocated to both ATTRBUFSIZE andSHAPEPTSBUFSIZE for each stream.

    MAXARRAYBYTES is simply a way to manage the memoryallocations for array buffers on the server. The sum ofATTRBUFSIZE and SHAPEPTSBUFSIZE must be less than orequal to MAXARRAYBYTES. If it isnt, the ArcSDE applicationserver will not start. If this problem occurs, either increase

    MAXARRAYBYTES or decrease either ATTRBUFSIZE orSHAPEPTSBUFSIZE.

    This value cannot be changed with theSE_connection_set_stream_spec function and can only bealtered in the sde.server_config table by the ArcSDEadministrator.

    Managing BLOB data

    The BLOB parameters, MAXBLOBSIZE and BLOBMEM,determine the server-side buffer requirements for BLOB datatypes. MAXBLOBSIZE determines the maximum number of bytesthe server will accept. A BLOB is either written to memory or disk,depending on the size. BLOBMEM determines the maximumBLOB size for in-memory storage. That is, the server allocatesBLOBMEM bytes to hold the BLOB. A BLOB that exceeds thissize is written to disk.

    Maximum initial features (Oracle only)

    The MAXINITIALFEATS parameter controls the initial featuresargument that may be submitted to either the sdelayer commandor the SE_layer_create function. Based on the value of initialfeatures, sdelayer or SE_layer_create calculates the initial andnext extent of the feature and spatial index table. To prevent thepossibility of a user inadvertently entering a large initial featuresvalue and, thus, acquiring an initial extent beyond what isneeded, the administrator can limit the initial features value bysetting the MAXINITIALFEATS parameter.

    Statistics

    The MAXDISTINCT parameter controls the number of distinctvalues a call to either the SE_table_calculate_stats or theSE_stream_calculate_table_statistics function can return.

  • 32 MANAGING ARCSDE APPLICATION SERVERS

    Setting this parameter to 0 allows an unlimited number of distinctvalues to be returned by the applications that call these functions.However, the distinct values are generated in memory on theserver and passed to the clients memory when the list is complete.Calculating the statistics of a large table could pose a threat to theclient and server resources. A prudent database administrator willset this value high enough to allow most queries to complete, butnot so high as to expose the server or the client application to amemory shortage. Should a user receive the error messageSE_TOO_MANY_DISTINCTS, the MAXDISTINCT parametermay be raised, but this should be done cautiously as it impactsboth client and server memory. It may be advisable to examine theapplications to determine whether queries could be performedmore efficiently.

    Streams

    You have read about streams in the section Transport bufferparameters earlier in this chapter. To recap briefly, each time auser accesses a feature class or business table, an ArcSDE streamis created to transfer the information between the client and theserver. An ArcSDE stream is a mechanism that transports databetween the DBMS database and an application such as ArcMap.The resources allocated to each stream are significant; it is,therefore, important that the ArcSDE administrator understandshow they operate and how to control the impact they have on theresources of the ArcSDE host computer.

    The administrator controls the behavior with theSTREAMPOOLSIZE parameter.

    STREAMPOOLSIZE

    The process of creating a stream requires the allocation ofmemory and other resources. These are released when usersclose the stream, which normally happens when they disconnectfrom the ArcSDE application server.

    If the STREAMPOOLSIZE is set to a value greater than 0,ArcSDE creates a pool of released stream resources for reuse.In this case, when a user releases a stream, the ArcSDEapplication server first checks the stream pool to determine if itis full. If it is not, the released stream resources are added tothe pool; otherwise, the resources are deallocated. When thesame user application creates a stream, the ArcSDE applicationserver checks the stream pool for an available stream. If oneexists, ArcSDE removes it from the pool and allocates it to theuser application.

    Raster parameters

    ArcSDE stores images similar to the way it stores features, in aDBMS BLOB column. For more information about raster tables,see Appendix B: ArcSDE table definitions.

    RASTERBUFSIZE

    The RASTERBUFSIZE parameter controls raster data transfer,which operates in a fashion similar to streamed data (seeTransport buffer parameters and Array buffer parameters inthis chapter).

    The RASTERBUFSIZE is specified in bytes and must be largeenough to hold the largest raster tile. The default ArcInfo tile sizeis 128 * 128 pixels. Data that is eight bits per pixel has a tile size of16,384 bytes (128 * 128).

    The raster transfer includes both an array buffer and transportbuffers. The raster array buffer is set at two times the

  • CONFIGURING ARCSDE APPLICATION SERVERS 33

    RASTERBUFSIZE parameter, while the raster transport buffersare set to the RASTERBUFSIZE. Therefore, the memory allocatedto raster transfer on the server is three times RASTERBUFSIZE.On the client, RASTERBUFSIZE bytes of memory are allocated tothe client raster transport buffer. The raster buffers are allocatedwhen raster tiles are accessed by a stream. The raster buffers arenot deallocated until the stream is closed (unless the stream isadded to the stream poolsee STREAMPOOLSIZE). In otherwords, a user can elect to display an image and a feature classtogether in ArcMap. The raster buffers are allocated on demandwhen a user selects an image stored in the feature classsbusiness table.

    If the ArcSDE application server encounters a raster tile that doesnot fit into the transport buffer, theSE_RASTERBUFFER_TOO_SMALL error is returned. If usersreport this error, determine the tile size they are using. If they areusing a 256 x 256 tile size on an 8-bit image, the RASTERBUFSIZEmust be at least 65,536 bytes (256 * 256 * 1). The pixel depthmust be taken into account when calculating the number of bytesper pixel. For example, an image with a 64-bit pixel depth and a tilesize of 256 * 256 requires a RASTERBUFSIZE of 524,288 bytes(256 * 256 * 8). If memory is at a premium, advise users to specifya smaller tile size rather than raise the RASTERBUFSIZE.

    Maximum time difference

    The maximum time difference that a clients system clock candeviate from an application servers system clock can be set withthe giomgr.defs MAXTIMEDIFF parameter. The parameter isspecified in seconds. It prevents an unauthorized entry byindividuals who may have captured a network packet with asniffer software that contains an ArcSDE connection string.Because the encrypted password is time stamped, the packetcannot be resent at a later time if MAXTIMEDIFF is set lowenough (for example, 60 seconds).

    If legitimate connections receive a -99 password received wassent 7 MAXTIMEDIFF seconds before error, reset the clientmachines system time to the hosts system time.

    To disable MAXTIMEDIFF, set it to -1.

    The MAXTIMEDIFF parameter does not affect directconnections.

    Controlling transactions

    The AUTOCOMMIT parameter lets you control the commit rateof large transactions and prevents the DBMS logfiles that storerollback information from filling. The default value of 1,000specifies that a transaction is committed whenever it reaches1,000 updates. Setting this parameter to 0 disables automaticcommits and requires the application to explicitly commit thetransactions.

    Logfiles

    ArcSDE provides logfiles to store lists of table rows. ArcMap, forexample, stores selection sets exceeding 100 rows in a logfile.Physically, the list of row IDs, referred to as the logfile, are storedin a logfile data table.

    At ArcSDE version 9, enhancements to the logfile data storagewere introduced to solve problems experienced by someapplications using the ArcSDE shared logfile method.

    ArcSDE 8.3 and prior releases store logfiles in theSDE_LOGFILES and SDE_LOGFILE_DATA tables created in eachusers schema. By default these logfile tables were created byArcSDE the first time the user connected and all deletes from theSDE_LOGFILE_DATA table were deferred until the userterminates the session. This type of logfile data storage isreferred to as the ArcSDE shared logfile method.

    ArcIMS users, and to some extent ArcGIS users, experiencedproblems with the deferred delete functionality of the ArcSDE

  • 34 MANAGING ARCSDE APPLICATION SERVERS

    shared logfile method. The number of rows contained within theSDE_LOGFILE_DATA table could grow in size, reaching millionsof records, until the user disconnected. The deletion of the rowsfollowing the disconnect could take several minutes. Starting atArcSDE 9, all logfile entries are deleted immediately.

    Also, since the logfile tables must be created in the usersschema, DBMS administrators were required to grant privileges toeach user that would allow them to create the required dataobjects.

    Another shortcoming of the ArcSDE shared logfile method is thatall sessions connecting as the same user wrote to the same table.This contributed to the inflated growth of theSDE_LOGFILE_DATA table.

    Enhancements to the logfile system beginning with ArcSDE 9allow administrators to create standalone and session logfiles, aswell as pools of logfiles owned by the sde user that can bechecked out by other users.

    Therefore, beginning at ArcSDE 9, logfile data can be stored inone of three kinds of tables that include standalone, session, andshared.

    Standalone logfile data tables

    Standalone logfile tables contain a single logfile. When the logfileis deleted, the table is immediately truncated to remove therecords. The truncation avoids the costly logging of changes tothe DBMS.

    Standalone logfiles are created in the users schema only whennone are available for checkout from the sde users logfile pool.

    Standalone logfiles are used until the users quota, defined by theMAXSTANDALONELOGS server configuration parameter, isexhausted.

    Standalone logfiles are checked out of the logfile pool until thepool is exhausted. The total number of logfiles in the pool isdefined by the SESSIONLOGPOOLSIZE server configurationparameter. Set the HOLDLOGPOOLTABLE parameter to TRUE ifyou want users to retain the checked out logfiles following alogfile delete.

    Session logfile data tables

    Session logfile data tables are dedicated to a single session andmay contain multiple logfiles. When a logfile is deleted, therecords are immediately removed from the session logfile datatable. The table is truncated if no other logfiles are present;otherwise the logfile records are deleted.

    Session logfiles are used if the ALLOWSESSIONLOGFILEparameter is set to TRUE and the users quota of standalonelogfiles has not been exhausted.

    Session logfiles are created in the users schema when theycannot be checked out from the sde users logfile pool.

    Shared logfile data tables

    ArcSDE reverts to using the ArcSDE shared logfile data table, thedefault, if it cannot use a standalone or session logfile data table.This will happen if MAXSTANDALONELOGS is exhausted andALLOWSESSIONLOGFILE is FALSE. If the shared logfile tablescannot be created, ArcSDE returns an SE_NO_ACCESS (-15).

  • CONFIGURING ARCSDE APPLICATION SERVERS 35

    ALLOWSESSIONLOGFILE

    Allows your users to use a session logfile. By default thisparameter is set to FALSE.

    SESSIONLOGPOOLSIZE

    Specifies the number of logfiles that may be borrowed from thesde users logfile pool. Once the users have exhausted the pool,ArcSDE will attempt to create either the standalone or sessionlogfile in the users schema. By default the logfile pool is set to 0.If you do not want your users creating logfiles in their ownschemas, set this value high enough that all logfiles areborrowed.

    HOLDLOGPOOLTABLE

    Set to TRUE, this parameter directs the user session to retain alogfile table that it has borrowed from the sde user until thesession disconnects from ArcSDE. Setting the parameter toFALSE will result in the sde users logfiles being shared among agreater number of sessions at the expense of the allocation ordeallocation of the logfile tables. By default this parameter is setto TRUE.

    MAXSTANDALONELOGS

    The maximum number of standalone logfiles a user may use. Bydefault this parameter is set to 0.

    States

    ArcSDE uses states to manage the chronological order ofchanges made to the registered tables of the geodatabase. Statesare added, updated, and deleted as are other objects of thedatabase. As a change is made to a registered table, states areadded to the database. States are deleted when versions areremoved from the database and the state tree is trimmed. Changesstored in the form of adds and deletes in tables associated withthe registered tables are coalesced into the base tables. Theintensity with which ArcSDE interacts with the states treedepends on the application and the number of users. Periodically,you need to compress the database using either ArcCatalog orthe sdeversion administration command to reduce the size of thestate tree. The following parameters help to reduce the interactionwith the state tree but should be used to replace or delaynecessary maintenance of the state tree.

    STATEAUTOLOCKING

    By default the autolocking of the states is disabled (set toFALSE) and should not be set to TRUE if you are editingmultiversioned tables with applications constructed by ESRI.ESRIs applications are designed not to delete or alter states thatare currently opened by other sessions. However, if you are usinga non-ESRI application that manages states external toArcObjects you should set this parameter to TRUE. ESRIsapplications will then lock states in use to protect them frombeing deleted by the third party application. TurningSTATEAUTOLOCKING on adds overhead to management of thestate tree and does adversely affect the performance of theArcGIS desktop applications attempting to perform edits on thegeodatabase.

  • 36 MANAGING ARCSDE APPLICATION SERVERS

    Collecting session statistics

    The PROCSTATS parameter specifies the optional updateinterval, expressed in seconds, by which ArcSDE updates theSDE.PROCESS_INFORMATION table with each users sessionstatistics.

    By default it is set to -1, which disables the writing of sessionstatistics to the SDE.PROCESS_INFORMATION table.

    Set PROCSTATS to 0 if you want a session to update thePROCESS_INFORMATION table whenever the statistics change.

    Set PROCSTATS to a value greater than 0 to periodically updatethe PROCESS_INFORMATION table with the sessions statistics.Statistics are written if it has been more than the number ofseconds specified since the last update. For example, ifPROCSTATS is set to 10, the PROCESS_INFORMATION table isupdated at a minimum interval of 10 seconds and only if a changehas occurred.

    Updating the PROCESS_INFORMATION table adds overhead tothe session. Therefore, the PROCSTATS variable should only bealtered from its default if you need to collect session statistics fordebugging purposes.

    The statistics stored in the PROCESS_INFORMATION table canbe accessed directly through a SQL query on the table.Alternatively, you can access them using the sdemon -o info -Istats administration tool or through the ArcSDE C-API functionsSE_connection_get_instance_statistics andSE_instance_get_statistics or through the ArcSDE Java APIfunction SeInstance.SeInstanceStats.

    As of ArcSDE 9, a summary statistic is not written to thegiomgr.log file when a session disconnects from an applicationserver if PROCSTATS is set to -1, the default value.

    Changing the precision of the geometry storage

    By default geometry is stored in a 32-bit integer. ArcSDE convertsthe geometry from world coordinates to integers by applying theoffset, multiplying by the system units, and truncating theremainder before storing the value into the integer. The 32-bitinteger satisfies the storage requirements of most datasets;however, if your dataset requires a high degree of precision andcovers an extensive area, you may find that it will not fit within a32-bit integer, in which case your should store your spatial data ina 64-bit geometry column. To change the default geometrystorage characteristic of your instance, set theDEFAULTPRECISION parameter to 64. The default value is 32.

    NULL features and the Oracle8i optimizer

    If you are using ArcSDE for Oracle8i and at least some of yourfeature classes contain NULL features, you should considersetting the DETECT8XNULLSHAPE parameter to TRUE. Doingso will use a more optimal execution plan for queries that accessthese feature classes. If you do not have any NULL features oryou are not experiencing performance problems with such featureclasses, do not set this parameter to TRUE.

    Changing the precision to the ArcSDE longinteger

    Prior to ArcSDE 8.1 for Oracle, the maximum number of digitsstored in an ArcSDE long integer was 10. However, this meantthat any value exceeding 2,147,483,648 or less than -2,147,483,649could not be read into a C signed long integer. Therefore, the longinteger value was shortened to nine digits and stores a maximumvalue of 999,999,999 and a minimum value of -999,999,999.However, legacy data created with a prior version of ArcSDE forOracle may have long integer data exceeding nine digits. If this isthe case, you can set the PRECISION10 parameter to TRUE.Doing so will allow ArcSDE to read these long integer values.

  • CONFIGURING ARCSDE APPLICATION SERVERS 37

    Disabling 64-bit integers

    Although ArcSDE has added support for 64-bit integers, someapplications may not have. If this is the case, you must set theINT64TYPES parameter to false. Doing so will preventapplications from creating fields with the SE_64INT_TYPE andwill display existing 64-bit integer fields as double precision.

    Setting the time last modified interval

    Periodically ArcSDE applications query the ArcSDE objectmetadata tables for XML columns, spatial columns, and rastercolumns to search for new objects or changes to existing objects.To avoid actually querying the metadata tables, ArcSDE will firstconsult the SDE.SDE_TABLES_MODIFIED table to determine ifthe metadata table itself was modified since the last time theapplication queried it. If no change has been recorded for themetadata table, the ArcSDE application uses the objects cachedinformation.

    The TLMINTERVAL parameter allows you to set the number ofseconds that must elapse before the application can consult theSDE.SDE_TABLES_MODIFIED table for changes to an objectsmetadata table. If the schema of your database is static, you canset the TLMINTERVAL very high, which directs the applicationsto never consult the SDE.SDE_TABLES_MODIFIED table andalways use the objects cached metadata.

    Disabling the automatic registration of objectrelational spatial data types

    ArcSDE hosts three object relational spatial data types, InformixDataBlade, DB2 Spatial Extender, and Oracle Spatial. In eachimplementation it is possible for users to create tables thatcontain one of these data types outside of an ArcSDEapplication. Unless the DISABLEAUTOREG parameter is set to

    TRUE, during startup the ArcSDE application server scans theDBMS metadata for any new spatial columns that are notincluded in the ArcSDE registry. If it finds one, it adds referencesto the table and the new spatial column in the ArcSDE metadatatables. If you prefer to manually control the addition of thesespatial columns to the ArcSDE metadata, set DISABLEAUTOREGto TRUE. By default this parameter is FALSE.

    Enabling layer autolocking

    As of ArcSDE 9, layer autolocking has been disabled by default.Layer autolocking can be enabled for the ArcSDE server bysetting the server configuration parameterLAYERAUTOLOCKING to TRUE, in which case layers that havetheir autolocking property enabled will autolock shapes whenthey are edited in NORMAL_IO mode. By default, a layer iscreated with its autolocking property enabled. To disableautolocking for a particular layer, use the sdelayer administrationcommands alter operation.

    Layer autolocking occurs when the shape of a qualified layer isedited. The area within the shapes envelope is automaticallylocked, prohibiting other sessions from editing shapes whoseenvelope intersects the locked area.

    Layer autolocking is disabled by ArcSDE if any of the followingconditions are true:

    The server configuration parameter LAYERAUTOLOCKINGis set to FALSE.

    The layers autolocking property is disabled. The layer is in LOAD_ONLY_IO mode. The layers business table is multiversioned.

  • 38 MANAGING ARCSDE APPLICATION SERVERS

    Displaying the ArcSDE initialization parameters

    C:\> sdemon -o info -I configsdemon -o info -I configsdemon -o info -I configsdemon -o info -I configsdemon -o info -I config

    ArcSDE I/O Manager Configuration Parameters atFri Feb 14 15:52:43 2003

    -

    ArcSDE Version 9.0ArcSDE Server Build for Underlying DBMS Max. Server Connections 64Root Path D:\arcsdeTemp Path C:\TempMin. Transmission Buffer Size 16384 BytesMax. Transmission Buffer Size 65536 BytesMin. Transmission Buffer Count 512 ObjectsMax. Initial Features 10000 ObjectsMax. stream pool size 3 streamsMax. BLOB Size 1000000 BytesMax. in Memory BLOB Size 1000000 BytesMax. Distincts 512Autocommit Frequency 1000Shape Point Buffer Size 400000 BytesAttribute Buffer Size 50000 BytesMax. Array Size 100Max. Array Bytes 550000 BytesMax. Client/Server Time Diff. UnlimitedState Caching OnStream State Autolocking OffInstance name arcsdePort Number 9000/tcpTCP/IP Keepalive on Connections OffInstance Type Read/WriteMax. Raster Buffer Size 102400 BytesDefault Layer Precision 32-bitTime last mod (TLM) interval (sec) 1Num. of logfiles in logfile pool 0Max. num. of standalone logfiles 0Allow session logfiles OnHold log pool tables OnConnection counts 0Layer Autolocking OffAllow Int64 columns Off

    You can list the current ArcSDE initialization parameters usingthe sdemon command with the -o info -I config options.

  • IN THIS CHAPTER

    39

    4 Before starting an ArcSDE appli-

    cation server

    Starting a local ArcSDE applica-tion server on Windows

    Starting a remote ArcSDE applica-tion server on Windows

    Starting a local ArcSDE applica-tion server on UNIX

    The sdemon command output

    Starting a remote ArcSDE applica-tion server on UNIX

    Pausing, resuming, and shuttingdown an ArcSDE applicationserver

    Removing ArcSDE sessions(Windows and UNIX)

    Managing ArcSDE application servers

    The administrator who manages the ArcSDE application servers can place theserver in one of three states: running, paused, or shutdown. Although it isdesirable to maintain the application server in the most productive state(running), at times it is necessary to shut it down.

    The tools you use to manage an application server depend on whether it hasbeen installed on a Windows or a UNIX system. On UNIX systems, theadministrator uses the sdemon command. Application servers installed onWindows are started and stopped from the Services menu. In both cases, thesdemon command is used to pause and resume the application server.

    Application servers installed on either Windows or UNIX can be managedfrom a remote computer using the sdemon command. However, only a remoteUNIX system can manage application servers installed on a UNIX system.

  • 40 MANAGING ARCSDE APPLICATION SERVERS

    Before you can start the ArcSDE application server, you mustsatisfy the following conditions:

    The database management system instance must be started.

    The DBMS sde user account must exist.

    The system environment must be set such that theArcSDE application server can connect to the DBMS as thesde user.

    The ArcSDE home directory must exist.

    An ArcSDE server license must have been installed.

    Before starting an ArcSDE application server

  • MANAGING ARCSDE APPLICATION SERVERS 41

    Starting a localArcSDEapplicationserver onWindowsYou can start an ArcSDEapplication server on Windowsfrom the Services menu. Thename of the service alwaysbegins with ArcSde service,and the service name itself isenclosed in parenthesesforexample:ArcSde service(arcsde).If the service fails to start, makea note of the Windows errornumber and see the CommonArcSDE startup problems onWindows servers inChapter 6, Troubleshooting theArcSDE application server.

    1. To open the Control Panel,click Start, click Settings, andclick Control Panel.

    2. Double-click AdministrativeTools to open the Administra-tive Tools menu.

    3. Double-click Services to openthe Services menu.

    4. Click the ArcSDE applicationserver name and click StartService arrow. The statuschanges to Started.

    2

    3

    The status changes to Started, and the Start Service arrow isunavailable.

    4

  • 42 MANAGING ARCSDE APPLICATION SERVERS

    Starting a remoteArcSDEapplication serveron WindowsYou can start a remoteWindows ArcSDE applicationserver from another Windowsmachine.

    The remote computer must beaccessible over the network. Theping command can be used froman MSDOS prompt to deter-mine whether the remote ArcSDEapplication server host can bereached.

    Remote startup is initiated using thesdemon command from an MSDOS command prompt. The -s and -i options identify the remote hostcomputer and the remoteArcSDE application server.

    Using the ping commandto verify a remotenetwork connection

    1. At the MSDOS commandprompt, type the commandping followed by the nameor TCP/IP address of theremote computer.

    C:\> ping brunoping brunoping brunoping brunoping bruno

    Pinging bruno.esri.com [46.1.1.92] with 32bytes of data:

    Reply from 46.1.1.92: bytes=32 time

  • MANAGING ARCSDE APPLICATION SERVERS 43

    1. Type the command sdemonwith the -o start option tostart the ArcSDE applicationserver.

    2. You will be prompted to typein a password. The passwordwill not be displayed on thescreen for system security.

    Starting a localArcSDEapplicationserver on UNIXThe sdemon command managesArcSDE application serversconfigured on UNIX systems.

    $ sdemon -o startsdemon -o startsdemon -o startsdemon -o startsdemon -o start

    Please enter the ArcSDE DBA password:

    1

    2

    Tip

    Starting the ArcSDEapplication server on UNIXYou must be logged in as either theowner of the ArcSDE applicationservers home directory,$SDEHOME, or as the userroot to start an ArcSDEapplication server.

    Tip

    The sdemon command with-p optionYou may enter the password aspart of the sdemon commandforexample, $ sdemon -o start -pmy_passwordbut the passwordwill be displayed on the screen.

  • 44 MANAGING ARCSDE APPLICATION SERVERS

    The sdemon command output

    The output of the sdemon command during startup looks likethis:

    ESRI ArcSDE I/O Manager - Release 9.0 Tue Jun24 13:59:40 PST 2003

    DBMS Connection established...

    RDBMS: "Oracle"

    Instance Name: "topo"

    IOMGR Process ID (PID): 21891

    ArcSDE Instance topo started Wed Aug 20 08:48:442003

  • MANAGING ARCSDE APPLICATION SERVERS 45

    Starting a remoteArcSDEapplication serveron UNIXBefore an ArcSDE applicationserver on a UNIX system canbe started from a remote UNIXor a Windows machine, youmust complete four configura-tion steps.

    The dbinit.sde file must containthe database connection andthe library path to the ArcSDEand DBMS dynamic libraries.

    You must also add additionalone-line entries to the/etc/services and the/etc/inetd.conf files, thenreinitialize the inetd daemon.

    After you have completed the fourconfiguration steps, you can test theremote startup procedure fromeither a UNIX or aWindows NT computer usingthe sdemon command with the-s and -i options.

    1. Create the$SDEHOME/etc/ dbinit.sdefile. This is an example of thevariables in the dbinit.sdefile.

    2. As the root user, duplicatethe service name in the /etc/services file as a userdatagram protocol (UDP)entry that uses the same portnumber.

    3. Again as the root user,update the /etc/inetd.conf file.Add this line to the bottom ofthe file.

    4. This is an example of a /etc/inetd.conf file.

    5. As the root user, identify therelevant process using theUNIX command ps - pipedthrough grep. Reinitializethe inetd daemon by sendingit a signal hang-up orSIGHUP.

    As the ArcSDE administrator,make sure the applicationserver is not started.

    6. From either a UNIX orWindows NT computer, typethe sdemon command withthe start, server, and servicename options to remotelystart an ArcSDE applicationserver.

    set ORACLE_HOME=/ultra1/oracleset ORACLE_SID=oraset LD_LIBRARY_PATH=/usr/lib:/ultra1/

    oracle/lib:/ultra1/oraexe/sdeexe90/libunset TWO_TASK

    esri_sde 5151/tcpesri_sde 5151/udp

    # \etc\services

    dgram udp wait /bin/sderemote iomgr_inetd

    # SDE remote start-up entries.

    esri_sde dgram udp wait sde /ultra1/oraexe/sdeexe90/bin/sderemote iomgr_inetd /ultra1/oraexe/sdeexe90

    1

    2

    3

    $ ps -u root | grep inetdps -u root | grep inetdps -u root | grep inetdps -u root | grep inetdps -u root | grep inetdroot 112 1 0 Aug 28 ? 0:08 /usr/sbin/inetd -s

    $ kill -HUP 112kill -HUP 112kill -HUP 112kill -HUP 112kill -HUP 112

    $ sdemon -o statussdemon -o statussdemon -o statussdemon -o statussdemon -o status

    ArcSDE Instance esri_sde Status on ultra atThu Aug 28 11:32:56 2003

    ArcSDE instance esri_sde is not available onultra.

    $ sdemon -o start -p my_password -s ultra -isdemon -o start -p my_password -s ultra -isdemon -o start -p my_password -s ultra -isdemon -o start -p my_password -s ultra -isdemon -o start -p my_password -s ultra -iesri_sdeesri_sdeesri_sdeesri_sdeesri_sde

    ArcSDE Instance esri_sde started Thu Aug 2811:35:28 2003

    5

    6

    4

    Tip

    /etc/inetd.conf file entryThis must be a single-line entrywith no carriage returns or newlines.

  • 46 MANAGING ARCSDE APPLICATION SERVERS

    Pausing,resuming, andshutting dow