|
POST
|
@OlivierLefevre it's been awhile since I've used the following tool, but the below should help you copy File Based items: https://community.esri.com/t5/arcgis-enterprise-documents/copy-content-between-portals/ta-p/920460
... View more
12-23-2021
07:59 AM
|
0
|
1
|
2001
|
|
POST
|
Try with the attached datasets. Publish each as editable feature services (i.e. Airports_Source, Airports_Target). In the below example, I published the services as hosted ArcGIS Server services. Here is how I set up GeoEvent: 1. Create a Poll an ArcGIS Server For Features input for the Airports_Source feature service JakeSkinner_0-1640267033536.png 2. Create a Update a Feature output for the Airports_Target using name field as the Unique Feature Identifier Field: JakeSkinner_0-1640267513747.png 3. Create a new GeoEvent Definition with only the name and fcc fields: JakeSkinner_4-1640267304788.png 4. Create a GeoEvent Service. Add a Field Mapper Processer between the input and output: JakeSkinner_5-1640267374382.png JakeSkinner_6-1640267414758.png I did not have to specify any fields as the TRACK_ID in this example. Let me know if you are able to get this to work on your end.
... View more
12-23-2021
05:54 AM
|
1
|
0
|
4309
|
|
POST
|
@ChrisSpadi this can be accomplished using arcpy: - remove all fields except Title and FID_'s --> Delete Field - then remove the FID_ from the field name --> Alter Field - then replace all values -1 or below with a blank field --> Calculate Field - then generate a report with the table in PD --> Report. The report template must first exist in the Pro project
... View more
12-22-2021
11:12 AM
|
4
|
1
|
2653
|
|
POST
|
I agree with @jcarlson . If you are looking to overwrite a feature service, I recommend performing a truncate/append. Here is a tool that can help: https://community.esri.com/t5/arcgis-online-documents/overwrite-arcgis-online-feature-service-using/ta-p/904457
... View more
12-22-2021
09:16 AM
|
1
|
0
|
4697
|
|
POST
|
@Oiligriv , Try rebuilding portal's index by going to Portal Administrator > System > Indexer > Reindex > change Mode to Full > Reindex.
... View more
12-21-2021
05:39 AM
|
0
|
1
|
1180
|
|
POST
|
In your field mapper, you're only sending the field to update. It does not know which record to update without sending the sequence_id.
... View more
12-21-2021
05:09 AM
|
0
|
3
|
4333
|
|
POST
|
In your Field Mapper, include the sequence_id fields. These will be needed so it knows which features to update.
... View more
12-21-2021
03:49 AM
|
1
|
6
|
4337
|
|
POST
|
@DavidColey @Anonymous User This appears to be a bug. I was able to reproduce with a fresh install of ArcGIS Enterprise 10.9.1. Was the tech support analyst able to reproduce?
... View more
12-21-2021
03:46 AM
|
0
|
1
|
5441
|
|
POST
|
Hi @JamieLambert, Do you have the JOB_ID field set for the Unique Feature Identifier Field for the Update a Feature output? GeoEvent will use this field to determine if a new record should be created, or an existing record will be updated. Also, are the geometries the same between the two feature services? If they are not, this may be causing the event to fail.
... View more
12-20-2021
05:43 AM
|
0
|
8
|
4352
|
|
POST
|
@Anonymous User are you able to published hosted feature services to ArcGIS Enterprise? I found the following bug: BUG-000128322 : Hosted Feature layers fail to publish to ArcGIS Enterprise portal with an error, “Publish Service error: Access to this resource is not allowed”, when Server Admin URL during Federation, has a “/” after arcgis You can check the ArcGIS Server Admin URL by: Navigate to Portal Administrator directory Federation Servers Click on server name the Admin URL will be listed here
... View more
12-17-2021
11:40 AM
|
1
|
4
|
8830
|
|
POST
|
@JayJohnsonWashoeCounty @MohammedElsayed Yes, you will have to be an Administrator, or you can create a custom Role with Admin Group privileges: JakeSkinner_0-1637071565204.png
... View more
11-16-2021
06:06 AM
|
0
|
0
|
9035
|
|
DOC
|
@SushilPradhan I could not reproduce this with ArcGIS Pro 2.8.3. I developed this tool at a much earlier version than ArcGIS Pro 2.8, so 2.6 should work. I would try one of the following: Upgarde ArcGIS Pro to 2.8 Re-download the tool
... View more
10-22-2021
09:33 AM
|
0
|
0
|
11147
|
|
DOC
|
@SushilPradhan you need to run the tool in ArcGIS Pro.
... View more
10-22-2021
06:44 AM
|
0
|
0
|
11158
|
|
POST
|
Hi @dstrigl, Did you update the Email Settings in the Portal Administrator Directory? https://www.esri.com/arcgis-blog/products/arcgis-enterprise/administration/whats-new-in-arcgis-enterprise-10-8-1-emails/
... View more
10-12-2021
01:44 AM
|
0
|
1
|
2908
|
|
POST
|
I agree with @George_Thompson that you should not truncate these tables in the geodatabase. You should always proceed with extreme caution before making any edits to the SDE repository tables. Below is a script that I've had success with. It compresses a geodatabase and writes a delta report out to a CSV file showing the before/after counts of the A & D tables. import requests, json, arcpy, sys, linecache, time, csv
from arcpy import env
env.overwriteOutput = 1
# Disable warnings
requests.packages.urllib3.disable_warnings()
startTime = time.clock()
# Variables
adminConnection = r"C:\DB_Connections\GIS.sde" # DBO connected user (or SDE user)
federatedAGS = "true" # Specify true if AGS is federated, false if not
portalServer = "portal.esri.com" # Portal instance
portalUsername = "portaladmin" # Portal Admin account
portalPassword = "**********" # Portal admin account password
agsServer = "server.esri.com" # ArcGIS Server instance
serverPort = 6443
agsUsername = '' # Do not specify if ArcGIS Server is federated
agsPassword = '' # Do not specify if ArcGIS Server is federated
deleteVersions = "KEEP_VERSION" # DELETE_VERSION
abortConflicts = "NO_ABORT" # ABORT_CONFLICTS
resolveConflicts = "FAVOR_EDIT_VERSION" # FAVOR_TARGET_VERSION
reports = r"C:\TEMP" # Directory to write Delta Report
# Split the services
serviceList = []
# Dictionary of all versioned feature classes
versionedFeatureClasses = {}
# Function to report errors
def PrintException():
exc_type, exc_obj, tb = sys.exc_info()
f = tb.tb_frame
lineno = tb.tb_lineno
filename = f.f_code.co_filename
linecache.checkcache(filename)
line = linecache.getline(filename, lineno, f.f_globals)
arcpy.AddError('Error: Line {} -- "{}": {}'.format(lineno, line.strip(), exc_obj))
sys.exit()
# Function to get all services
def getServices():
baseUrl = "https://{0}:6443/arcgis/admin/services".format(agsServer)
if serverPort == '6080':
baseUrl = "http://{0}:{1}/arcgis/admin/services".format(agsServer, serverPort)
else:
baseUrl = "https://{0}:{1}/arcgis/admin/services".format(agsServer, serverPort)
params = {'f': 'json', 'token': token}
r = requests.post(baseUrl, data = params, verify=False)
catalog = json.loads(r.content)
services = catalog['services']
for service in services:
if service['type']!= 'StreamServer':
serviceList.append(service['serviceName'] + '.' + service['type'])
folders = catalog['folders']
for folderName in folders:
if str(folderName) not in ('System', 'Utilities', 'DataStoreCatalogs', 'Hosted'):
r = requests.post(baseUrl + "/" + folderName, data = params, verify=False)
catalog = json.loads(r.content)
services = catalog['services']
for service in services:
serviceList.append(str(folderName) + "/" + service['serviceName'] + '.' + service['type'])
# Function to start and stop services
def startStopServices(START_STOP):
for service in serviceList:
if START_STOP == 'stop':
print("Stopping {}".format(service))
else:
print("Starting {}".format(service))
if serverPort == '6080':
baseUrl = "http://{0}:{1}/arcgis/admin/services".format(agsServer, serverPort)
else:
baseUrl = "https://{0}:{1}/arcgis/admin/services".format(agsServer, serverPort)
params = {'f': 'json', 'token': token}
r = requests.post(baseUrl + "/" + service + "/" + START_STOP, data = params, verify=False)
response = json.loads(r.content)
print("\t" + str(response))
# Function to get delta table counts
def getDeltaTableCount(egdb_conn):
arcpy.env.workspace = adminConnection
fcList = []
for dataset in arcpy.ListDatasets("*"):
for fc in arcpy.ListFeatureClasses("*", "", dataset):
if arcpy.Describe(fc).isVersioned == True:
fcList.append(fc)
for fc in arcpy.ListFeatureClasses("*"):
if arcpy.Describe(fc).isVersioned == True:
fcList.append(fc)
for fc in fcList:
egdb_conn = arcpy.ArcSDESQLExecute(adminConnection)
try:
sqlDBO = "SELECT registration_id FROM dbo.sde_table_registry where table_name = '{0}' and owner = '{1}'".format(fc.split(".")[-1], fc.split(".")[-2])
registrationId = egdb_conn.execute(sqlDBO)
except:
pass
try:
sqlDBO = "SELECT registration_id FROM sde.sde_table_registry where table_name = '{0}' and owner = '{1}'".format(fc.split(".")[-1], fc.split(".")[-2])
registrationId = egdb_conn.execute(sqlDBO)
except:
pass
try:
sqlDBO = "SELECT registration_id FROM sde.table_registry where table_name = '{0}' and owner = '{1}'".format(fc.split(".")[-1].upper(), fc.split(".")[-2].upper())
registrationId = egdb_conn.execute(sqlDBO)
except:
pass
sqlDBO = "SELECT COUNT(*) FROM {0}.a{1}".format(fc.split(".")[-2], registrationId)
aCount = egdb_conn.execute(sqlDBO)
sqlDBO = "SELECT COUNT(*) FROM {0}.d{1}".format(fc.split(".")[-2], registrationId)
dCount = egdb_conn.execute(sqlDBO)
try:
versionedFeatureClasses[str(fc)].append(aCount)
versionedFeatureClasses[str(fc)].append(dCount)
except:
versionedFeatureClasses[str(fc)] = [aCount, dCount]
return versionedFeatureClasses
# Function to get current State ID
def getStateID(adminConnection):
egdb_conn = arcpy.ArcSDESQLExecute(adminConnection)
sqlDBO = '''SELECT state_id FROM dbo.sde_states'''
sqlSDE = '''SELECT state_id FROM sde.sde_states'''
sqlORCL = '''SELECT state_id FROM sde.states'''
try:
state_id = egdb_conn.execute(sqlDBO)
deltaCounts = getDeltaTableCount(egdb_conn)
except:
pass
try:
state_id = egdb_conn.execute(sqlSDE)
deltaCounts = getDeltaTableCount(egdb_conn)
except:
pass
try:
state_id = egdb_conn.execute(sqlORCL)
deltaCounts = getDeltaTableCount(egdb_conn)
except:
pass
try:
state_id = int(state_id)
except:
state_id = int(state_id[-1][0])
print("Current State ID: " + str(state_id))
return state_id, deltaCounts
# If federated
if federatedAGS == 'true':
if portalUsername and portalPassword:
try:
# Generate token for Portal
tokenURL = 'https://{}:7443/arcgis/sharing/rest/generateToken/'.format(portalServer)
params = {'f': 'json', 'username': portalUsername, 'password': portalPassword, 'referer': 'https://' + portalServer, 'expiration': str(1440)}
r = requests.post(tokenURL, data = params, verify = False)
response = json.loads(r.content)
token = response['token']
except:
PrintException()
else:
token = ''
# If not federated
if federatedAGS == 'false':
if agsUsername and agsPassword:
try:
if serverPort == '6080':
tokenURL = 'http://{}:6080/arcgis/tokens/'.format(agsServer)
else:
tokenURL = 'https://{}:6443/arcgis/tokens/'.format(agsServer)
params = {'username': agsUsername, 'password': agsPassword, 'client': 'requestip', 'f': 'pjson', 'expiration': str(1440)}
r = requests.post(tokenURL, data = params, verify = False)
response = json.loads(r.content)
token = response['token']
except:
PrintException()
else:
token = ''
# Get Current State ID
current_state_id, deltaCounts = getStateID(adminConnection)
# Get All Services
getServices()
# Stop AGS services
if '' in serviceList:
serviceList.remove('')
if len(serviceList) > 0:
startStopServices("stop")
# Block new connections to the database.
print("Blocking new connections to the database")
arcpy.AcceptConnections(adminConnection, False)
# Disconnect all users
print("Disconnecting all users from database")
arcpy.DisconnectUser(adminConnection, "ALL")
# Get a list of versions to pass into the ReconcileVersions tool.
print("Getting list of all versions")
versionList = arcpy.ListVersions(adminConnection)
for version in versionList:
if 'default' in version.lower():
if 'dbo' in version.lower():
defaultVersion = 'dbo.DEFAULT'
elif 'sde' in version.lower():
defaultVersion = 'sde.DEFAULT'
# Execute the ReconcileVersions tool.
print("Reconciling/posting/deleting all versions")
try:
arcpy.ReconcileVersions_management(adminConnection, "ALL_VERSIONS", defaultVersion, versionList, "LOCK_ACQUIRED", abortConflicts, "BY_OBJECT", resolveConflicts, "POST", deleteVersions, reports + "\\CompressLog.txt")
except:
reconcileMessage = "Reconcile failed: " + arcpy.GetMessages() + ". Check reconcilelog.txt file in the " + str(reports + "\\CompressLog.txt")
if sendEmail == 'true':
email("Reconcile failed", reconcileMessage)
arcpy.AddWarning(reconcileMessage)
pass
# Run the compress tool.
print("Running compress")
try:
arcpy.Compress_management(adminConnection)
print("Compress was successful")
compressMessageSuccess = 'True'
except Exception as e:
compressMessage = 'Compress failed: ' + arcpy.GetMessages() + ". Please check the sde.COMPRESS_LOG file within the geodatabase"
arcpy.AddWarning(compressMessage)
pass
# Allow the database to begin accepting connections again
print("Allow users to connect to the database again")
arcpy.AcceptConnections(adminConnection, True)
# Clear workspace cache
arcpy.ClearWorkspaceCache_management()
# Start AGS services
if len(serviceList) > 0:
startStopServices("start")
# Get New State ID
new_state_id, deltaCounts = getStateID(adminConnection)
# Write delta table counts to CSV
print("Writing delta counts to CSV")
csv = open(reports + "\\DeltaCounts.csv", "w")
columnTitleRow = "Feature Class,A table count (Before Compress),A table count (After Compress),D table count (Before Compress), D table count (After Compress)\n"
csv.write(columnTitleRow)
for val in deltaCounts:
row = val + "," + str(deltaCounts[val][0]) + "," + str(deltaCounts[val][2]) + "," + str(deltaCounts[val][1]) + "," + str(deltaCounts[val][3]) + "\n"
csv.write(row)
csv.close()
endTime = time.clock()
elapsedTime = round((endTime - startTime) / 60, 2)
print("Compressed completed in " + str(elapsedTime) + " mins. \nNew State ID: " + str(new_state_id))
... View more
10-04-2021
09:42 AM
|
1
|
1
|
1612
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-08-2026 12:27 PM | |
| 4 | 05-07-2020 05:14 PM | |
| 1 | 03-25-2026 04:16 AM | |
| 1 | 03-16-2026 01:00 PM | |
| 1 | 12-22-2025 10:39 AM |
| Online Status |
Offline
|
| Date Last Visited |
Tuesday
|