The workflow for users who require the ability to work with views, is to access the view as a query layer or simply drag/drop the view (assuming it has a spatial attribute) into the map and define the required properties when necessary.
The workflow you have described can lead to unknown behaviors and errors in the application (ArcObjects) when working with this object. The reason is because, the object they are deleting is a geodatabase table and we support additional capabilities on tables that we cannot support on views.
With that said i would be interested in hearing more about situations where a view needs to be registered with the geodatabase. Could you describe workflows where you have required this capability?
I've posted a comment regarding 'Create SDE spatial view from ArcGIS Desktop' on the Ideas website a year ago:
This idea has been marked as implemented, but as per my comment, the functionality of a query layer differs from an SDE (or as ArcSDE is gone, a geodatabase) view. I have never understood why a tool like 'sdetable -o create_view" does not have an ArcToolbox counterpart as nearly all my clients use geo views for performance reasons. For over 10 years I have explained my clients how to use the create_view command as a hacky workaround and now it seems I have to explain them the even hackier workaround David Gifford suggested. Last year I spoke to Sannon Shields at the Esri UC who told me that there are quite a lot of customers who worry about losing the create_view command.
I wouldn't recommend the procedure David outlined to clients, for the very reason Chet mentioned -- ArcGIS sets different properties in the geodatabase for views than tables; by creating a table and replacing it with a view there's a great deal of "undefined behavior" possible -- While generating a micro black hole that consumes the server room is unlikely, some of the more likely complications could be indistinguishable.
It's interesting the lengths people are going to in order to try to replace gdb registered spatial views. Isn't it clear by now that this is functionality that's relied upon in your product? As David Gifford said (hoping you'd come to the rescue at the 11th hour ), please tell us you're planning spatial view improvements at 10.3.1. If not, what more can this community do to tell you it's a priority for us?
I agree. We don't have an overly complicated or large set of GDB's compared to most people and I haven't had to use many of the commands other people mention. We don't have a full time DBA to really know the super details of SQL Server or SDE Admin- we know enough to keep things running smoothly.
But we use sdetable -o create_view consistently. When we upgraded SDE to 10.1 (yes, still there) and I tried using query layers to see if I could get by without commands - it was a pain, confusing, and it was slow. I reverted back to the old way with create_view. It is the one thing that will keep us from upgrading sooner.
Nate's reasons for registering a view are exactly mine too. How do you suggest we do these things with a view without being able to register them? Let's not get into semantics about workflows etc, the fact is people use spatial views with Esri software.
Please help me here and explain what "undefined behaviour" I could expect? All I'm trying to do is find an alternative to the sdetable -o create_view or sdelayer -o register command.
From my perspective, situations where a view needs to be registered with the gdb are:
Nate - To answer part of your post - the 3rd bullet: This bug for the unique identifier prompt has been brought up as a high priority for a fix and is planned for the 10.3.1 currently. This is a major usability defect that many users have been asking for. If you have an association to this defect then please keep track of this and verify when the release date is closer, but I am pretty sure it will make it into the 10.3.1 release.
UPDATE to this: This fix did not make it into the 10.3.1 release.
NIM085661 - ArcGIS does not set the first not-null field it finds as the unique identifier for a database view.
I would argue the "fix" shows the limitations of not allowing views to be registered on the server side. Although implementing this fix will make the prompts go away, it is really just changing band-aids and not addressing the core issue. What happens if the first not-null field isn't the unique identifier?
We're using ArcGIS 10.2.2 and 10.1 and are troubled by this bug. You say " If you have an association to this defect then please keep track of this and verify when the release date is closer"
How do we keep track of NIM085661? I cannot find any reference to it on support.esri.com. We won't be ready to upgrade to 10.3 for a while. I'm assuming that we'll be able to get a patch for 10.2.2 and/or 10.1?