ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Is_Archive_Enabled

  • Definition
  • Syntax
  • Return type
  • Examples

Definition

Use the Is_Archive_Enabled function to determine if the specified table has been enabled for archiving. If it is, Is_Archive_Enabled returns TRUE; if not, it returns FALSE. If the table is not registered with the geodatabase, Is_Archive_Enabled returns NOT REGISTERED. Be aware that if a table doesn't exist in the database (for example, if you mistyped the name), a message that the table is not registered is returned because Is_Archive_Enabled only checks the geodatabase system tables for the presence or absence of the table.

Syntax

<geodatabase administrator schema>.is_archive_enabled(<table owner>, <table name>)

Return type

String

TRUE is returned if the specified table is registered with the geodatabase and has been enabled for archiving.

FALSE is returned if the specified table is registered with the geodatabase but has not been enabled for archiving.

NOT REGISTERED is returned if the specified table is not registered with the geodatabase, does not exist in the database, or you do not have access to the table.

Examples

The following examples show the use of Is_Archive_Enabled in each supported database management system.

In the first example, the function is run on a table (trees) that is not enabled for archiving.

In the second example, the function is run on a table (birds) that is enabled for archiving.

In the third example, the function is run on a table (sales) that is not registered with the geodatabase.

IBM Db2

Example 1

VALUES sde.IS_ARCHIVE_ENABLED('LOGIN1', 'TREES')

FALSE

Example 2

VALUES sde.is_archive_enabled('LOGIN1', 'BIRDS')

TRUE

Example 3

VALUES sde.is_archive_enabled('LOGIN5', 'SALES')

NOT REGISTERED

IBM Informix

Example 1

EXECUTE FUNCTION sde.is_archive_enabled('login1', 'trees');

FALSE

Example 2

EXECUTE FUNCTION sde.is_archive_enabled('login1', 'birds');

TRUE

Example 3

EXECUTE FUNCTION sde.is_archive_enabled('login5', 'sales');

NOT REGISTERED

Microsoft SQL Server

Example 1

DECLARE @owner varchar(128) = 'login1';
DECLARE @table varchar(128) = 'trees';

SELECT dbo.is_archive_enabled(@owner, @table) "Enabled for archiving?"

Enabled for archiving?
FALSE

Example 2

DECLARE @owner varchar(128) = 'login1';
DECLARE @table varchar(128) = 'birds';

SELECT dbo.is_archive_enabled(@owner, @table) "Enabled for archiving?"

Enabled for archiving?
TRUE

Example 3

DECLARE @owner varchar(128) = 'login5';
DECLARE @table varchar(128) = 'sales';

SELECT dbo.is_archive_enabled(@owner, @table) "Enabled for archiving?"

Enabled for archiving?
NOT REGISTERED

Oracle

Example 1

SELECT sde.gdb_util.IS_ARCHIVE_ENABLED('LOGIN1', 'TREES')
 FROM DUAL;

SDE.GDB_UTIL.IS_ARCHIVE_ENABLED('LOGIN1', 'TREES')
---------------------------------------------------------
FALSE

Example 2

SELECT sde.gdb_util.IS_ARCHIVE_ENABLED('LOGIN1', 'BIRDS')
 FROM DUAL;

SDE.GDB_UTIL.IS_ARCHIVE_ENABLED('LOGIN1', 'BIRDS')
---------------------------------------------------------
TRUE

Example 3

SELECT sde.gdb_util.IS_ARCHIVE_ENABLED('LOGIN5', 'SALES')
 FROM DUAL;

SDE.GDB_UTIL.IS_ARCHIVE_ENABLED('LOGIN5', 'SALES')
---------------------------------------------------------
NOT REGISTERED

PostgreSQL

Example 1

SELECT sde.is_archive_enabled('login1', 'trees');

FALSE

Example 2

SELECT sde.is_archive_enabled('login1', 'birds');

TRUE

Example 3

SELECT sde.is_archive_enabled('login5', 'sales');

NOT REGISTERED

Related topics

  • Archive_View_Name
  • The archive process

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal