Thursday, 13 March 2014

Creating Security Role takes a very long time

We ran into the following issue: it was not possible to create a security role as the process took a long time and eventually we had to kill SecurityAdminitrator before it finished. Whilst the process is running SecurityAdministrator doesn't respond anymore and it looks like the application has crashed. But SecurityAdmin is just waiting that the following SQL statement finishes in Oracle:

insert into mdsys.sdo_geom_metadata_table(sdo_OWNER, sdo_table_name, sdo_column_name, sdo_DIMINFO, sdo_SRID) select 'WT_EW_05_INFO', s.synonym_name, m.column_name, m.DIMINFO, m.SRID from all_sdo_geom_metadata m, all_synonyms s where m.owner=s.table_owner and m.TABLE_NAME = s.TABLE_NAME and s.owner='WT_EW_05_INFO'

We had that issue with Oracle 11.2.0.3 on AIX.

Autodesk Support suggested using SQL Tuning Advisor to find a better execution plan. So we did and it resolved the issue. The security role is now created within seconds. Drawback is - you need an extra license for Oracle's Tuning Package (luckily we have one).  You need to use Enterprise Manager to run the advisor.


AutoCAD Map 2013, SP2




Gastdokument anlegen dauert extrem lange

Das Anlegen eines Gastdokumentes dauerte extrem lange (mehrere Stunden bevor wir abgebrochen haben). Während der Erstellung des Oracle Benutzers und dessen Einrichtung scheint der Sicherheits-Administrator wie abgestürzt und reagiert nicht mehr. In Oracle läuft jedoch folgende Anweisung:

insert into mdsys.sdo_geom_metadata_table(sdo_OWNER, sdo_table_name, sdo_column_name, sdo_DIMINFO, sdo_SRID) select 'WT_EW_05_INFO', s.synonym_name, m.column_name, m.DIMINFO, m.SRID from all_sdo_geom_metadata m, all_synonyms s where m.owner=s.table_owner and m.TABLE_NAME = s.TABLE_NAME and s.owner='WT_EW_05_INFO'

Wir hatten das Problem mit Oracle 11.2.0.3 unter AIX.

Der Vorschlag vom Autodesk Support war, über den Oracle SQL Tuning Advisor einen alternativen Ausführungsplan ermitteln zu lassen. Das hat bei uns das Problem auch behoben - nur benötigt man dafür  die separate Lizenz für das Tuning Paket (die wir auch haben).

Oracle ermittelt dabei Abfragen, die mit hohem Ressourcenverbrauch bzw. langer Laufzeit einhergehen und schlägt einen alternativen Ausführungsplan vor. Dieser kann dann gespeichert werden, so dass in Zukunft bei der gleichen Abfrage der optimierte Ausführungsplan zur Anwendung kommt. Die Einstellungen dafür muss man über den Enterprise Manager vornehmen.

Noch am Rande - die SELECT Anweisung im genannten Statement läuft ohne weiteres durch. Erst im Zusammenhang mit dem INSERT kommt es zur extrem langen Ausführungszeit. 


Map 2013, SP2

Tuesday, 18 February 2014

Calculation




Make sure that the name of a calculation has no trailing space when you create it. Otherwise you will get an error message when generating graphics – something along the lines:

Saving objects in cache failed.
Index out of range.

You need to open the layer file in an editor and delete the trailing space:

<CalculatedProperty>
      <Name>AL_ABSTLINIE_ID </Name>
to

<CalculatedProperty>
      <Name>AL_ABSTLINIE_ID</Name>

Map 2103. SP2

Berechnung




Enthält die Bezeichnung der Berechnung am Ende ein Leerzeichen gibt es eine Fehlermeldung beim Bildaufbau

Speichern der Objekte im Cache fehlgeschlagen.
Der eingegebene Index liegt außerhalb des Bereichs des Lesevorgangs.

Den Fehler kann man nur in der XML Datei beheben.

<CalculatedProperty>
      <Name>AL_ABSTLINIE_ID </Name>
zu
<CalculatedProperty>
      <Name>AL_ABSTLINIE_ID</Name>

Map 2013, SP2

Friday, 24 January 2014

Display WMS/WFS requests sent by Map (FDO)



If you need to monitor / check http requests sent by FDO WMS/WFS providers you can use Fiddler. Setting it up correctly took me some time and caused head scratching as well. Fiddler is not aware of FDO http requests – you need to reroute the requests to Fiddlers internal proxy server. I sit behind a network proxy which makes things bit more complicated. 

FDO WMS in Map - http requests are shown in Fiddler
Here is my configuration – actually quite simple:

- Fiddler (4.4.5.9)
- Fiddler Options > Gateway > "Use System Proxy"
(when changing settings there restart Fiddler).

- Map 2013 SP2 Data Connect > FDO WMS Provider, proxy settings:
  Proxy-server: 127.0.0.1, port: 8888 (Fiddlers internal proxy)
  username /-password: my Windows credentials required to get through our network proxy server.
 
This doesn't work for all WMS servers I have tested so far. 
 
Further information can be found at the Map guy(de) blog.




 



FDO WMS/WFS - Anfragen abfangen



Wenn es mit FDO WMS/WFS nicht richtig funktioniert kann es hilfreich sein die Anfrage (GetCapabilities, GetMap etc.), die Map an den WMS/WFS Server sendet, zu kennen. Ein geeignetes Tool dafür ist Fiddler.

Jetzt gibt es im Zusammenhang mit Map (bzw. FDO) noch zu beachten, dass Fiddler nicht ohne weiteres die Http-Anfragen von Map erkennt. Dazu muss man Map so konfigurieren, dass die Anfragen über den Fiddler-eigenen internen Proxy Server umgeleitet werden.

Komplizierter wird die Situation dann, wenn man - wie ich - selber noch hinter einem Proxy Server sitzt.

Ich habe das nach einigen Versuchen soweit hinbekommen, dass ich für diverse WMS Server die Aufrufe nachverfolgen kann. Für einige WMS Server geht die Abfrage überhaupt nicht mehr (Fehlermeldung: Der HTTP-Server hat als Gateway oder Proxy während der Verarbeitung der Anforderung eine ungültige Antwort vom Upstream-Server erhalten.). Bei einigen WMS Servern sehe ich die Anfragen nicht - das liegt eventuell an HTTPS Konfiguration.


WMS Layer in Map - entsprechende Requests werden in Fiddler angezeigt
Hier die Kurzbeschreibung meiner Konfiguration:
- Fiddler (4.4.5.9)
- Fiddler Options > Gateway > "Use System Proxy"
(Achtung: wenn man dort Einstellungen setzt unbedingt Fiddler neu starten).

- Map 2013 SP2 FDO WMS, Proxyeinstellungen:
  Proxyserver: 127.0.0.1, Anschluss: 8888 (der interne Proxy von Fiddler)
  Benutzername /-passwort: mein Windows Benutzername - erforderlich, um mich am richtigen Netzwerk-Proxyserver in unserem Netzwerk anzumelden
  
Map 2013 - Proxyeinstellungen für FDO WMS und Fiddler


Hilfreiche Infos zu dem Thema gibt es auch im Map guy(de)Blog.

Thursday, 23 January 2014

"Convert to industry model" – known limitations in Map 2013 Sp2



Map 2013 comes with a new feature called "Convert to industry model" which allows import of GIS data (via FDO) and CAD drawings (DWG) into an industry model (command: _mapconverttomodel). There are a few limitations I have found so far setting the tool up for different SHP and DWG imports into Oracle based industry models:

-       mapping file stores file name of input data file used when creating the mapping file. Later on mapping file cannot be applied to file with different file name. You need to adapt file name (either of file or in mapping file)

-      you cannot import multiple SHP files at the same time although you can set up the mapping for. Right now you need to import each file separately – this also requires to create a mapping fileseparately

-      the mapping dialog box is a bit confusing when you open an existing mapping file as it shows all boxes ticked on the data source side although not all attributes have been configuried for import

-      an empty layer in DWG file will stop the import process if the layer is part of your mapping but does not contain any cad features to import

-      so far all polygon SHP files have been imported incorrectly with the result that Oracle Spatial throws error messages when validating the geometry (same result is shown when you run 1-Click Maintanence with the Geometry check option enabled). Polygon features are displayed in Map nonetheless. Geometry can be mended with Oracle Spatial SQL (or just use GeoRaptor in SQLDeveloper).

-        When importing a SHP with an DATE datatype and it is mapped to VARCHAR2 column then Map adds "DATE" in front of the date. You need to clean it up yourself with SQL.

According to support some issues have already been resolved in Map 2014.