We have two tables:
[Server1].[Instance1].[Database1].[dbo].[Districts]
-- a versioned polygon feature class with only two fields: a shape and a foreign key[Server1].[Instance2].[Database2].[dbo].[vwDistricts]
-- a rather straightforward view on a non-spatial table containing the other end of the foreign key and useful information about the districts.
I have created a map service--on a standalone ArcGIS Server instance running v 10.6.1--that contains a join between these two tables. The view is fed by a separate table in [Database2]
that holds the authoritative values for these data so it is necessary to maintain this join to keep the data fresh. The problem is that the resulting map service publishes fully qualified field names (Database1.dbo.Districts.DistrictNumber
and Database2.dbo.vwDistricts.Name
), and I'd like very much to avoid revealing specific database names & table names to the world.
I've tried publishing from ArcMap and from ArcGIS Pro (v 2.6.1). In ArcGIS Pro, I unchecked the Join Tool's "Maintain Fully Qualified Field Names" setting; but that gives me no love, not even intermittently. Is there a reliable way (either in ArcMap or Pro or elsewise) to get that map service published with unqualified names?
AS
statement to create an alias for your field name? It would help if you could post some of the SQL query your service is using as its data source.AS
in the view. This is on MS SQL Server 2016, AGS 10.4.1, MXD published from ArcMap 10.7.1. The difference would appear to be that my tables are all in the same SQL Server instance and yours are not. So maybe you can test using a modified query which draws all its data from one instance.