Select to view content in your preferred language

VersionedVIew update

2471
16
08-07-2024 11:34 AM
vijaybadugu
Frequent Contributor

We've registered datasets as versioned with the traditional type. This generated versioned views with default triggers on them: v[versionnumber]_insert, _update, and _delete. Recently, we updated a few more columns in the existing feature class with GLOBAL_ID. When I try to open those views in the SQL client, the new columns do not appear in the view. What needs to be done to update the view with the latest columns? How can I see those updated columns in the view and triggers?

0 Kudos
16 Replies
vijaybadugu
Frequent Contributor

I did copy to the temp folder ,/close/open pro. i am getting the error 

 

vijaybadugu_0-1723121202204.png

 

0 Kudos
vijaybadugu
Frequent Contributor

I tried with another database. after enabling Registered as versioned, it ran without any issues for the first time. after that, it starts throwing same error. does view register anywhere  in database ? like GDB_ITEMS  

0 Kudos
vijaybadugu
Frequent Contributor

It worked. The problem is, we have to drop the view from SQL Server and run the tool to regenerate. At the same time, the name is updated in registry table. 

is there a way to rename existing one and regenerate again ?

CreatingVersionedView, does it only creates a view in sql server ? After creating a view, can we rename and update manually in registrytable with an update statement?

MarceloMarques
Esri Regular Contributor

You cannot register multi versioned views with the Geodatabase Repository. The multi versioned views are created by ArcGIS software to work exclusively with Traditional Versions. We use the multi versioned views to select and edit data via SQL statements in the Traditional Versions. You shall not rename multi versioned views, if becomes invalid, then drop the view and try to create it again. Also, you shall not try to edit the view information directly in the ArcSDE Repository Tables or you risk corrupting the Geodatabase. Note, multi version views are different from regular database views that you can register with the geodatabase, for more info about database views see the ArcGIS documentation. I hope this clarifies.

Views in an enterprise geodatabase—ArcGIS Pro | Documentation

| Marcelo Marques | Esri Principal Product Engineer | Cloud & Database Administrator | OCP - Oracle Database Certified Professional | "About: In 1992, I embarked on my journey with Esri Technology, and since 1997, I have been working with ArcSDE Geodatabases, right from its initial release. Over the past 33 years, my passion for Spatial Databases and GIS data has become a central part of my career.." | “ The mountains are calling and I must go.” – John Muir |
vijaybadugu
Frequent Contributor

Thanks. There is an extra argument to pass name of the view to the CreateVersionedView method. Firstly, i will drop the view from SQL Server and re create using python script that you shared.

vijaybadugu
Frequent Contributor

I successfully created a versioned views. I am trying to add a trigger on A' table , using update statement of versioned view, I am getting below error while editing the data in ArcGIS Pro.

vijaybadugu_0-1723147445778.png

 

 

0 Kudos
MarceloMarques
Esri Regular Contributor

this type of changes to the multi version view are not supported, the multi version view code cannot be modified manually because you will break the multi version view functionality and behavior to work with geodatabase traditional versions, you can look into adding a trigger to the featureclass base table or to the Adds Table, but that also can lead into issue when editing the data in traditional versions using ArcGIS Pro, and you will need to test the trigger extensively and make sure no issues happens after geodatabase version reconcile and post. The overall recommendation is to not tamper with the geodatabase and not try to implement logic via triggers, you can corrupt the geodatabase behavior and cause issues with traditional versioning, instead you need to use ArcGIS Pro Attribute Rules.

| Marcelo Marques | Esri Principal Product Engineer | Cloud & Database Administrator | OCP - Oracle Database Certified Professional | "About: In 1992, I embarked on my journey with Esri Technology, and since 1997, I have been working with ArcSDE Geodatabases, right from its initial release. Over the past 33 years, my passion for Spatial Databases and GIS data has become a central part of my career.." | “ The mountains are calling and I must go.” – John Muir |
0 Kudos