Showing posts with label guest. Show all posts
Showing posts with label guest. Show all posts

Thursday, 6 August 2015

Guest user/role - strange issues

We had two strange issues in AutoCAD Map related to guest users/roles (SecurityAdmin). Complexity is raised by the fact that we also have an job-enabled industry model and a topology.

Issue #1
Map crashed when we deleted a feature in "Live" state (from a certain feature class beloging to an area-topology)  when using a guest user/role (SecurityAdmin). 

The feature actually got deleted - the issue was the crash.

CER report and Map log file contained the following piece of information:

System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
 bei Autodesk.Map.IM.Data.FeatureClass.GetChildrenFeatureIDs(IEnumerable`1 fids, HashMap`2 parentToChildren, Int32 depth, Boolean geometryFeaturesOnly)
 bei Autodesk.Map.IM.Map.MapLogicImpl.RegenenerateFromModificationLog(Boolean regenerate)
 bei Autodesk.Map.IM.Map.MapLogicImpl.MapDrawBurstDisposed(MapDrawBurstImpl burst, Boolean disposing)
 bei Autodesk.Map.IM.Map.MapDrawBurst.Dispose()
 bei Autodesk.Map.IM.Map.MapLogicImpl.DeleteFidTidArray(FidTidArray fta)
 bei Autodesk.Map.IM.Map.MapLogicImpl.DeleteFeatures(String prompt)
 bei Autodesk.Map.IM.Map.MapDocument.Delete_Interaction(Object sender, InteractionEventArgs e)
 bei Autodesk.Map.IM.CommandRegistry.API.BaseCommandRegistry.Execute(String globalName, CommandExecute commandCallback, Boolean async, Document document, Object[] args)
 bei Autodesk.Map.IM.CommandRegistry.API.BaseCommandRegistry.Execute(String globalName, Boolean async, Object[] args)


 This issue has been resolved by re-creating the Guest-user/role in SecurityAdmin.

Issue #2

It was not possible to create a new feature (for a certain feature class beloging to an area-topology) in an "open" job when:

- using a guest user/role (Security Admin)
and
- using a non-Admin Map user.

We got the following error message : 

Vorgang ist fehlgeschlagen, da ein Spatial-Index nicht in der Fachschale vorhanden ist.

(Industry model does not have a spatial index. )

No message appeared in Map's log file.

There was no issue creating the feature when logging in with a Map user who has Admin permission (Map-Admin, not Windows or Oracle Admin). 

My colleague showed me the issue on his machine yesterday. He had done several tests over the last two days. The issue always occured whilst testing. Today I did a test on my machine and the issue did not occur. Then my colleague did test on his machine again and got the same result.. We tried to find out if the issue is related to a certain workflow but to no avail. 

Map 2013, SP2






Friday, 15 August 2014

replace data user

If you make use of "guest users" you might want to replace a data user by another data user without users noticing the exchange.

There is no feature in SecurityAdministrator to replace a data user automatically. We have had the need to replace an existing data user with another (newer) data user a couple of times. First I created a few SQL statements which produced the required SQL statements for performing the switch. But it was quite a lot of manual labour involved and as I had to alter 10 guest users it became clear that a slightly more automated procedure would be helpful. I put Batch and SQL files together and semi-automated the first part of the process. Replacing a data user now doesn't take longer than 5 minutes. If one wanted to the process could be automated further.

First batch file
- it only gives you the name of the second role associated with the guest user - you need to put the name into the second batch file
- it also creates the GRANT statement for the guest user in order to be able to create synonyms (and the corresponding REVOKE statement as well).

Second batch file
- it requires to fill in the names / password of the existing data user, the new data user and the guest user and the name of the two roles as well
- it creates all sql statements you need to run to perform the switch

SQL scripts
- you need to run 5 resulting sql scripts manually
- the scripts need to be executed with different users

script 1
The guest user gets direct grants from the data user.
These grants need to be replaced.

script 2
The grants from the "old"  data user (the one which is replaced) to the guest user need to be revoked.

script 3
The guest user has synonyms pointing to the data user.
These synonyms need to be replaced.

script 4
There are two roles associated with a guest user. Grants to these roles need to be replaced.

script 5
The grants from the "old"  data user (the one which is replaced) to the guest user roles need to be revoked.


So far we haven't seen any issues replacing the data user (neither in AutoCAD Map nor in AIMS - both only operate with guest users). But there is no guarantee that the scripts above do all things required for a complete switch.

Download: https://drive.google.com/file/d/0B-MpwgWFuw57aktZbUdYcTA1eXM/edit?usp=sharing

Map 2103, SP2