Home » RDBMS Server » Server Administration » Temporary tablespace not seen on user_tablespaces (Oracle 11g on Linux)
|
|
|
|
|
Re: Temporary tablespace not seen on user_tablespaces [message #567992 is a reply to message #567990] |
Tue, 09 October 2012 00:46 |
John Watson
Messages: 8960 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
You can trust your DBA:orcl> create user fred identified by fred
2 default tablespace users temporary tablespace temp;
User created.
orcl> alter user fred quota unlimited on users;
User altered.
orcl> alter user fred quota unlimited on temp;
alter user fred quota unlimited on temp
*
ERROR at line 1:
ORA-30041: Cannot grant quota on the tablespace
orcl> grant create session to fred;
Grant succeeded.
orcl> conn fred/fred
Connected.
Session altered.
orcl> select tablespace_name from user_tablespaces;
TABLESPACE_NAME
------------------------------
USERS
orcl> select * from v$version;
BANNER
----------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for 32-bit Windows: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
orcl>
|
|
|
Re: Temporary tablespace not seen on user_tablespaces [message #568001 is a reply to message #567990] |
Tue, 09 October 2012 01:29 |
|
Michel Cadot
Messages: 68716 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Quote: they insist that quota clause must be applied to this temporary tablespace before it can appear under the user_tablespaces.
The definition of user_tablespaces is the following one:
select ts.name, ts.blocksize, ts.blocksize * ts.dflinit,
decode(bitand(ts.flags, 3), 1, to_number(NULL),
ts.blocksize * ts.dflincr),
ts.dflminext,
decode(ts.contents$, 1, to_number(NULL), ts.dflmaxext),
decode(bitand(ts.flags, 3), 1, to_number(NULL), ts.dflextpct),
ts.blocksize * ts.dflminlen,
decode(ts.online$, 1, 'ONLINE', 2, 'OFFLINE',
4, 'READ ONLY', 'UNDEFINED'),
decode(ts.contents$, 0, (decode(bitand(ts.flags, 16), 16, 'UNDO',
'PERMANENT')), 1, 'TEMPORARY'),
decode(bitand(ts.dflogging, 1), 0, 'NOLOGGING', 1, 'LOGGING'),
decode(bitand(ts.dflogging, 2), 0, 'NO', 2, 'YES'),
decode(ts.bitmapped, 0, 'DICTIONARY', 'LOCAL'),
decode(bitand(ts.flags, 3), 0, 'USER', 1, 'SYSTEM', 2, 'UNIFORM',
'UNDEFINED'),
decode(bitand(ts.flags,32), 32,'AUTO', 'MANUAL'),
decode(bitand(ts.flags,64), 64,'ENABLED', 'DISABLED'),
decode(bitand(ts.flags,16), 16, (decode(bitand(ts.flags, 512), 512,
'GUARANTEE', 'NOGUARANTEE')), 'NOT APPLY'),
decode(bitand(ts.flags,256), 256, 'YES', 'NO')
from sys.ts$ ts
where ts.online$ != 3
and bitand(flags,2048) != 2048 and ( exists (select null from sys.tsq$ tsq
where tsq.ts# = ts.ts#
and tsq.user# = userenv('SCHEMAID') and
(tsq.blocks > 0 or tsq.maxblocks != 0)) or exists
(select null
from sys.v$enabledprivs
where priv_number = -15 /* UNLIMITED TABLESPACE */))
The part in red shows that it must exist a row for the user and tablespace in sys.tsq$ which is the table containing the quotas.
So your DBA is right, you can see a tablespace in user_tablespaces only if you have some quota on it (Note I did this on a 10.2 database).
Regards
Michel
|
|
|
|
|
|
|
Goto Forum:
Current Time: Thu Nov 28 23:47:10 CST 2024
|