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

Archive_View_Name

  • Definition
  • Syntax
  • Return type
  • Examples

Definition

You can use the Archive_View_Name SQL function to determine the name of the archive view that was defined on a archive-enabled table that is not registered as versioned.

When you enable archiving on a nonversioned table, several fields are added to the table that allow ArcGIS to implement archiving functionality. In addition, an archive view is created on the table. If you want to edit the table using SQL, you must do so through the archive view. This view automatically updates the archive fields that were added to the table when you enabled archiving.

Syntax

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

Return type

String

Examples

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

The first example queries the birds table, which is enabled for archiving.

The second example queries the trees table, which is not enabled for archiving and, therefore, does not have an associated archive view.

IBM Db2

Example 1

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

BIRDS_EVW

Example 2

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

IBM Informix

Example 1

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

birds_evw

Example 2

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

Microsoft SQL Server

Example 1

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

SELECT dbo.archive_view_name(@owner, @table)

BIRDS_EVW

Example 2

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

SELECT dbo.archive_view_name(@owner, @table)

Oracle

Example 1

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

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

Example 2

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

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

PostgreSQL

Example 1

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

birds_evw

Example 2

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

Related topics

  • Is_Archive_Enabled

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