Creating a geodatabase in DB2 on Linux or UNIX
The sdesetup command creates all the geodatabase system tables, functions, types, and stored procedures in the DBMS. The sdesetup command must execute successfully to create your geodatabase and for ArcSDE to function correctly.
The sde user requires DBADM authority and should be added to a group with SYSMON authority to run sdesetup to create a geodatabase.
When you execute the sdesetup command, certain files are read to populate system tables in the geodatabase. In most cases, you do not need to alter these files. Exceptions include the following circumstances:
- For geodatabases in DB2, it is important that you edit the DATA_DICTIONARY keyword in the dbtune.sde file prior to running the sdesetup command to designate which table spaces the database should use to store certain system tables.
- If any clients will be connecting to the geodatabase using an ArcSDE service, you must alter the operating system services file and the ArcSDE services.sde file. The services.sde file can be found in the $SDEHOME/etc directory.
- If clients will be using an ArcSDE service to connect, and you want to set environment variables for the service to use, alter the dbinit.sde file, which is also in the $SDEHOME/etc directory.
The following steps explain how to alter setup files and run sdesetup.
-
If clients will connect using an ArcSDE service, modify the services file in the system etc directory, adding a line to define the TCP/IP port number and name to use for your ArcSDE service. To change the services file requires root access. Open the file in a text editor and add a line similar to this one:
esri_sde 5151/tcp # ArcSDE service on pinetree
Note:Users connecting to your service can use the number 5151 as the service name. If they prefer to use the name esri_sde to connect, they must add this same line to their system services file.
- If you will use an ArcSDE service, open the $SDEHOME/etc/services.sde file in a text editor and add the same line that you added to the /etc/services file.
- Alter the dbtune.sde file found in $SDEHOME/etc to set the storage parameters under the DATA_DICTIONARY keyword. You can also alter other parameters under the DEFAULTS keyword to specify storage for user data in the geodatabase.
-
Optionally, you can set environment variables in the dbinit.sde file found in the $SDEHOME/etc directory. Variables set in this file are used by the ArcSDE service each time it starts. The syntax for setting these environment variables is as follows:
set <variablename>=<value>
-
Run the sdesetup command found in $SDEHOME/bin.
Complete usage syntax for the sdesetup command can be found in the sdesetup topic in the ArcSDE Administration Command Reference, which can be found on your installation media.
sdesetup -o install -d DB2 -s db2server -D db2gdb -u sde -l sde/licenses/license.dat