Definition
Use the Is_Archive_Enabled function to determine if the specified table has been enabled for archiving.
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.
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
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
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
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