POST
|
ArcGIS needs to create 2 tables, 4 indexes, and 1 sequence. This will be done the 1st time the user selects more than 100 features from a feature class. At that point, you should be able to revoke the CREATE TABLE and CREATE SEQUENCE permissions. I had a similar question with similar DBA concerns and go into it in a little more detail:Oracle Read-Only User 10.2
... View more
02-17-2016
01:51 PM
|
0
|
0
|
328
|
POST
|
>> sdeping -i sde:oracle11g -u [username] -p [password]@[tnsName] -v
ArcSDE 10.2 Connection Test Utility Wed Feb 17 15:30:06 2016
------------------------------------------------------------------------
Server: (none)
Instance: sde:oracle11g
Database: (none)
Username: [username]
RDBMS: Oracle
Version: 10.2.0
Description: 10.2.2 Patch 290200 geodatabase(Oracle)
Release: 102002
Connect Delay: 8.18 secs Got 8 seconds the 1st time, but after that it dropped below 800 ms
... View more
02-17-2016
01:43 PM
|
0
|
1
|
901
|
POST
|
I have the full "Administrator" 11gR2 client and use a tnsnames.ora file
... View more
02-17-2016
11:01 AM
|
0
|
2
|
900
|
POST
|
Yes, thanks. That is in the same set of documentation I was looking at. It just would have been helpful if the documentation would have gone ahead and provided a link to that page when it mentioned "logfile tables". Also, the python tool is documented, but at the time of reading, I didn't necessarily gather from it that it would create the log tables, just switch the logfile type. I'm not sure if I fully understand the session logfile options. If I switch to session logfiles, will that only affect that user schema and the others will continue to operate how they have been? I took it as being a global change which is why I wrote it off, but if it only affects the current user schema, that is an option for sure... ... although, looking at it more, it still looks to me like the user needs create table access which is actually worse, b/c they need it every time they connect instead of just once.
... View more
02-17-2016
10:52 AM
|
0
|
0
|
900
|
POST
|
Vince Angelo -- apparently I can't DM you and I didn't want to hijack the other thread, but luckily this applies here as well. I've never used the se_tools before. I tried sdeping -i sde:oracle11g:[dbserver]:[port] -u [username] -p [password] -v attempting to get the connection time, but I get an ORA-00903 invalid table with no other output
... View more
02-17-2016
10:10 AM
|
0
|
6
|
900
|
POST
|
Vince Angelo Nice. Really didn't expect for there to be a an arcpy tool for that. That's great! Still doesn't really help my situation too much, but definitely good to know. Those DBA's like to control as much as the database as possible. Also, I'm assuming the python script requires sysdba access. Most of the GDB Admin tools seem to (ex:create user schema...). That's definitely a deal breaker. For security, we can't have remote sysdba access and the database is running on a Solaris box so it's not like you can (or want) to install ArcMap on the DB box. Plus, they wouldn't give us sysdba access anyway... It would be nice/helpful if these tools were mentioned/linked to from the previously mentioned ESRI documentation. As for "reverse engineering", I get what you're saying. Right now it "currently works that way", but we can't say it will always work that way, or even at 10.4 it works that way. I'm only "reverse engineering" the solution because it is not openly documented. If it (and other topics) were fully documented by geodatabase release, an organization could ensure that the changes that they made were complying the geodatabase model. It really wouldn't be "reverse engineering" at that point, but complying with standards. Will edit my question to include the alternate solutions.
... View more
02-17-2016
09:45 AM
|
0
|
2
|
900
|
POST
|
I'm needing to create an Oracle Read Only User in a 10.2 Oracle GDB. I'm reading the documentation for Adding Users To Oracle. I see that a user must be able to create the Log File tables. About 1/4 the way down the Log file documentation (under heading "Permissions required for shared log files"), the help suggests that you do the following to create a read-only user: Create "Read Only" User Grant more than just read only Need Create Table, Create Session, Create Sequence, Insert/Update/Delete Have read-only user "make a selection that exceeds the selection threshold" (100 records) The log tables/sequences are created Revoke the extra permissions Create Table, Create Sequence This might be a fine way to "let ArcMap do what it needs to do" and then take back control, but in a large company with source control, change management and DBA environment promotion, my DBA's aren't going to like this approach. They would much rather do everything in a more precise, scriptable (documented) method. This process seems to create 2 tables, 4 indexes, and 1 sequence. Can I not just copy the DDL from these objects in DEV to give to my DBA's to push up to production? This seems to work. If so, I'm not sure why this isn't documented. The new steps would be: Create Read Only User Need to be able to INSERT/UPDATE/DELETE tables in own schema. Need CREATE SESSION, of course Create DB Objects TABLES SDE_LOGFILE_DATA SDE_LOGFILES INDEXES SDE_LOGFILE_DATA_IDX1 SDE_LOGFILE_DATA_IDX2 SDE_LOGFILES_PK SDE_LOGFILES_UK SEQUENCES SDE_LOGFILE_LID_GEN <EDIT> Thanks to Vince Angelo Other alternatives to creating the logfile objects via SQL or having a user manually select 101+ features in Arcmap: arcpy.ConfigureGeodatabaseLogFileTables_management sdeping utility with the -L option New to 10.4 Create Database User now creates the log file tables when the tool is ran Haven't tested these methods. All 3 methods would be scriptable/automated, but they are not as explicit as just creating the objects in SQL and still require the extra permissions to be added/revoked. Message was edited by: Jason Tipton Added some alternatives to SQL creation. Edited Again to add 10.4 update
... View more
02-17-2016
08:35 AM
|
0
|
13
|
3286
|
POST
|
How exactly are you measuring connect time in ms? Our Oracle databases regularly take close to 10,000 ms starting from the point where I double click the connection in ArcMap 10.2.2 until it actually opens. In SQL Developer the same database opens in under 2,000 ms. We have maybe a "thousand" tables. I would still measure it in "hundreds" though.
... View more
02-17-2016
07:58 AM
|
0
|
3
|
901
|
POST
|
Otherwise the DataType for the column will be geometry or geography for SQL Server spatial types. You can check this from the table designer or select DATA_TYPE
from INFORMATION_SCHEMA.COLUMNS
where COLUMN_name = 'shape'
AND TABLE_NAME = 'YOUR_TABLE'
... View more
02-17-2016
07:42 AM
|
2
|
0
|
2065
|
POST
|
Yeah, I went down that route already. The problem is that it fails on import so "arcpy" doesn't exist so there's nothing to reload. reload(arcpy) Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'arcpy' is not defined It seems to be something cached at a non-python level.
... View more
11-16-2015
12:12 PM
|
0
|
0
|
602
|
POST
|
Sorry, that was supposed to be False. Edited my post to reflect. And it doesn't seem to matter about the Exception. The Exception is: "RuntimeError: NotInitialized". But once it hits the exception once inside the session, you will never be able to import arcpy without starting a new session. Added full traceback to my post.
... View more
11-16-2015
11:59 AM
|
0
|
0
|
602
|
POST
|
So, this seems ridiculous, but what I have so far is to make a seperate module (let's say foo.py for now) and all it will do is to import arcpy. Then, call that module by: while subprocess.call(r'python.exe \\path\to\foo.py') <> 0:
pass
import arcpy This will prevent the code from loading arcpy until another process is able to load arcpy. When it finally succeeds, it the process will return 0 and exit the loop. At that point, we assume that it is safe to proceed and then we can import arcpy in our own code. I would really like to handle this a little better. EDIT: I am marking this answer as correct until somebody comes up with a better working solution.
... View more
11-16-2015
10:07 AM
|
1
|
2
|
602
|
POST
|
I have Windows Services that need to run 24x7 (except for reboots). They use the arcpy package and a Floating License. I have run into issues with the service obtaining a license. For example, the license manager might be down. What I need is to try and import arcpy. If that fails, keep trying every x amount of seconds until it is successful. So, you would think something like this works: arcpy_imported = False
while arcpy_imported is False:
try:
import arcpy
arcpy_imported = True
except Exception as ex:
print ex
time.sleep(2) But it does not. You can import arcpy all day long and if it fails the 1st time, it will fail infinitely. I tested this by disconnecting from the network, running "import arcpy" a few times, then connect back to the network and running "import arcpy" a few times. Traceback: import arcpy Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\__init__.py", line 21, in <module> from arcpy.geoprocessing import gp File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\geoprocessing\__init__.py", line 14, in <module> from _base import * File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\geoprocessing\_base.py", line 592, in <module> env = GPEnvironments(gp) File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\geoprocessing\_base.py", line 589, in GPEnvironments return GPEnvironment(geoprocessor) File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\geoprocessing\_base.py", line 545, in __init__ self._refresh() File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\geoprocessing\_base.py", line 547, in _refresh envset = (set(env for env in self._gp.listEnvironments())) RuntimeError: NotInitialized It would never succeed with the same python session open. I could open a separate session, and successfully import arcpy, come back to the failing session, and it continues to fail. This means, that when the LM goes down for whatever reason, no amount of error handling can keep my services running without manually restarting them. Well, OK, I could write something to monitor these services and automatically restart them when this problem arises, but I would rather handle it within the actual service. Any ideas?
... View more
11-16-2015
09:27 AM
|
0
|
5
|
3516
|
Title | Kudos | Posted |
---|---|---|
2 | 09-03-2015 07:41 AM | |
1 | 03-13-2015 11:49 AM | |
1 | 02-17-2016 03:22 PM | |
1 | 02-29-2016 07:29 AM | |
1 | 02-18-2016 04:00 PM |
Online Status |
Offline
|
Date Last Visited |
12-05-2023
02:29 PM
|