Okay it is clear that this is a tablespaces issue. I should have
spotted it earlier. I'm sure all my problems will be resolved once I
just change the tablespaces to something other than system or sysaux
and get the default tablespace for the user changed.

Thanks for the assistance.

On 18 Sep, 13:02, Mike Conley <mconl...@gmail.com> wrote:
> What does the second query report for tablespace_name? SYSTEM?
>
> If so, you need to talk to your DBA about why the default tablespace for
> your owner is SYSTEM. Normally the system is configured to have user tables
> go somewhere else.
>
> From the SQLAlchemy side, the maintainers of databases/oracle.py might
> consider removing SYSTEM, SYSAUX condition from the table_names query when
> schema is provided. I'm not sure of side effects, but should be OK, because
> table list will still be filtered by schema name.
>
> You could experiment with this yourself to see if that is the issue and
> submit a ticket
>
> A crude experiment (no guarantees, this might break everything) is to do
> this early in your script, some time before creating engine and reflecting
> the tables.
>
> import sqlalchemy.databases.oracle
>
> def my_table_names(self, connection, schema):    # a modified version of
> OracleDialect.table_names()
>         # note that table_names() isnt loading DBLINKed or synonym'ed tables
>         if schema is None:
>             s = "select table_name from all_tables where
> nvl(tablespace_name, 'no tablespace') NOT IN ('SYSTEM', 'SYSAUX')"
>             cursor = connection.execute(s)
>         else:
>             # remove SYSTEM, SYSAUX tablespace filter from original query
>             s = "select table_name from all_tables where OWNER = :owner"  #
> removed SYSTEM tablespace filter
>             cursor = connection.execute(s, {'owner':
> self._denormalize_name(schema)})
>         return [self._normalize_name(row[0]) for row in cursor]
>
> sqlalchemy.databases.oracle.OracleDialect.table_name = my_table_names
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to