GlobalID_Name

Definition

GlobalID_Name takes a table as an input parameter and returns the name of the globalID field in the table.

The globalID field is added to allow the table to participate in geodatabase replication. The GlobalID_Name function does not return other GUID fields.

A null string is returned if the table does not have a globalID field. If the table is not registered with the geodatabase or does not exist, a message indicating the table is not registered with the geodatabase or a null string is returned.

Syntax

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

In most geodatabases, the geodatabase administrator schema is sde. However, it is dbo in dbo-schema geodatabases in SQL Server, and in user-schema geodatabases in Oracle, it is the name of the user's schema.

Return type

String

Examples

The following are examples of using the GlobalID_Name function in each database type.

The first example queries for the name of the globalID column in the signs table owned by insp3.

The second example queries for the name of the globalID column in the addresses table owned by planner. The table does not contain a globalID column.

The third example queries for the name of the globalID column in the businesses table owned by insp3. The businesses table is not registered with the geodatabase.

DB2

VALUES sde.globalid_name('INSP3', 'SIGNS')

GlobalID
VALUES sde.globalid_name('PLANNER', 'ADDRESSES')
VALUES sde.globalid_name('INSP3', 'BUSINESSES')

Oracle

SELECT sde.gdb_util.globalid_name('INSP3', 'SIGNS')
FROM DUAL;

SDE.GDB_UTIL.GLOBALID_NAME('INSP3', 'SIGNS')
--------------------------------------------------
GLOBALID
SELECT sde.gdb_util.globalid_name('PLANNER', 'ADDRESSES')
FROM DUAL;

SDE.GDB_UTIL.GLOBALID_NAME('PLANNER', 'ADDRESSES')
--------------------------------------------------
SELECT sde.gdb_util.globalid_name('INSP3', 'BUSINESSES')
FROM DUAL;

SDE.GDB_UTIL.GLOBALID_NAME('INSP3', 'BUSINESSES')
--------------------------------------------------

ORA-20220: Class INSP3.BUSINESSES not registered to the Geodatabase.

PostgreSQL

SELECT sde.globalid_name('insp3', 'signs');

globalid
SELECT sde.globalid_name('planner', 'addresses');
SELECT sde.globalid_name('insp3', 'businesses');

NOT REGISTERED

SQL Server

SELECT sde.globalid_name('insp3', 'signs');

GlobalID
SELECT sde.globalid_name('planner', 'addresses');

NULL
SELECT sde.globalid_name('insp3', 'businesses');

NOT REGISTERED

Related Topics

6/19/2015