Question: I want to run [inspectdb](https://docs.djangoproject.com/en/dev/ref/django-admin/#django-admin-inspectdb) against an Oracle database. The user account that I use is a read only user that owns 0 tables. It, however, has access to the schema that contains all the tables. How do I specify a schema when using `inspectdb`?

My command, currently, is: `python manage.py inspectdb --database "oradb" > test_model.py`

This only outputs a file with `from django.db import models`.

Answer: 
César's answer is true regarding Oracle support. However, I was able to generate a rough model by modifying `django\db\backends\oracle\introspection.py` in two places.

Change the `cursor.execute` line in `get_table_list` to read:

```
cursor.execute("SELECT TABLE_NAME FROM ALL_TABLES WHERE OWNER = 'OTHERSCHEMA'")

```

Change the `user_table_cols` to `ALL_TAB_COLUMNS` in the first `cursor.execute` line in `get_table_description` to read: 

```
cursor.execute("""
        SELECT
            column_name,
            data_default,
            CASE
                WHEN char_used IS NULL THEN data_length
                ELSE char_length
            END as internal_size
        FROM ALL_TAB_COLUMNS
        WHERE table_name = UPPER(%s)""", [table_name])

```

Next, change the second `cursor.execute` line in `get_table_description` to read: `cursor.execute("SELECT * FROM OTHERSCHEMA.%s WHERE ROWNUM < 2" % self.connection.ops.quote_name(table_name))`

Since this is a legacy database where policy prevents changes to the database, this was good for a one time run. 

A few more changes are needed once the model is complete. It appears a few of my classes are missing primary key references and foreign key references. I will add these manually.

The last change I made was to modify all of the `class Meta:` instances to reference the correct schema:

```
class Meta:
    db_table = u'"SCHEMA"."TABLE_NAME"'     # Notice the quoting needed

```
Try to specify the search\_path, by adding an option in your DATABASES variable at settings.py, like that:

```
'OPTIONS': {
       'options': '-c search_path=myschema'
}

```

The full DATABASES variable should be:

```
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'mydatabase',
        'USER': 'postgres',
        'PASSWORD': 'mypassword',
        'HOST': 'localhost',
        'PORT': '5432',
        'OPTIONS': {
            'options': '-c search_path=myschema'
        }
    }
}

```

After that `python migrate inspectdb` should work on your schema