Home    |    Concepts   |   API   |   Samples
Concepts > Logfiles > Basic Principles
Types of Log Files

There are three types of log files:

1. Shared log files

This is the default architecture for ArcSDE 9.0 and higher, except in SQL Server. For SQL Server databases, the default are session log files created in tempdb.

Each user owns two tables: SDE_logfiles and SDE_logfile_data.

Shared log files are created the first time a user's selection exceeds 100 features. If you use shared log files, remember:

  • Users require CREATE TABLE permission
  • If permissions are insufficient, selections cannot be made
  • Log files are no longer checked on connection

2. Session log files

Session log files are dedicated to a single gsrvr, not a database user. You can arrange for a pool of session log files to be shared among users, and gsrvrs can also create their own session log files on the fly.  As mentioned in the previous section, session log files are the default for SQL Server databases.

Using session log files dramatically reduces contention for log files, since a single connection is using the log file. Similarly, since only one connection is using the log file, the table will not grow as large as it would when dozens or hundreds of connections are using the same log file.

And finally, some delete optimizations can be made in special circumstances. If the gsrvr knows that there is only one open log file, then it can use a TRUNCATE TABLE statement on the log file data table rather than a DELETE. Truncating a table is orders of magnitude faster than deleting. This is not possible with the current log file implementation, since the gsrvr doesn't know if other connections are in the process of creating log files. If a database such as Informix does not implement the truncate statement efficiently, then we may drop and recreate the table instead of truncating it.

Tables created:

SDE_logfiles—Stores selection set properties

SDE_session_n—Stores selection ID and OBJECTIDs of selection; created per session, not for each user

3. Stand-alone log files

Stand-alone log files are useful in several situations. These log files can contain data from, at most, one log file. The advantage of this log file configuration is that it can always be truncated and will never grow beyond the size of a single selection set. Of course, there has to be a user configurable limit on how many of these stand-alone log files can be created by a connection. For example, if 100 users are creating selection sets on 50-layer maps, an unrestricted growth of stand-alone log files would result in 5000 log file tables being created. To avoid this, set the MAXSTANDALONELOGFILE parameter appropriately.

Tables created:

SDE_logfiles—Stores selection set properties

SDE_logdata_<sde_id>_<selection>—Stores OBJECTID of selection set

feedback | privacy | legal