x$kglob: ORA-02030: can only select from fixed tables/views

Hi all!
While selecting on x$kglob with DBA credentials hanging on:

SQL> select count(*) from sys.x$kglob;
ERROR at line 1:
ORA-00942: a tabela ou view não existe

But with sys it succeed. Ok, let’s grant privilege:

SQL> grant select on sys.x$kglob to dba;
grant select on sys.x$kglob to dba
*
ERROR at line 1:
ORA-02030: can only select from fixed tables/views

What a hell! I couldn’t grant it any way!
So the MCGayver solution was:

Continue reading

ORA-01950 On Insert but not on Create Table

Sounds weird creating table does not raise any error, but inserting a correct tuple in this table raise a permission error, right? Just take a look:

SQL> create table matheusdba.table_test(a number) tablespace TEST_TABLESPACE;
Table created.
SQL> insert into matheusdba.table_test values (1);
insert into matheusdba.table_test values (1)
*
ERROR at line 1:
ORA-01950: no privileges on tablespace 'TEST_TABLESPACE'

Continue reading

Package Body APEX_030200.WWV_FLOW_HELP Invalid after Oracle Text Installing

Hi all!
The package body APEX_030200.WWV_FLOW_HELP become invalid after Oracle Text installation with the follow errors:

Compilation errors for PACKAGE BODY APEX_030200.WWV_FLOW_HELP
#13#10Error: PL/SQL: ORA-00942: table or view does not exist
Line: 189
#13#10Error: PL/SQL: SQL Statement ignored
Line: 188
#13#10Error: PLS-00201: identifier 'CTX_DDL.DROP_PREFERENCE' must be declared
Line: 191
#13#10Error: PL/SQL: Statement ignored
Line: 191
#13#10Error: PL/SQL: ORA-00942: table or view does not exist
Line: 197
#13#10Error: PL/SQL: SQL Statement ignored
Line: 196
#13#10Error: PLS-00201: identifier 'CTX_DDL.DROP_PREFERENCE' must be declared
Line: 199
#13#10Error: PL/SQL: Statement ignored
Line: 199
#13#10Error: PLS-00201: identifier 'CTX_DDL.CREATE_PREFERENCE' must be declared
Line: 261
#13#10Error: PL/SQL: Statement ignored
Line: 261
#13#10Error: PLS-00201: identifier 'CTX_DDL.SET_ATTRIBUTE' must be declared
Line: 262
#13#10Error: PL/SQL: Statement ignored
Line: 262
#13#10Error: PLS-00201: identifier 'CTX_DDL.SET_ATTRIBUTE' must be declared
Line: 265
#13#10Error: PL/SQL: Statement ignored
Line: 265
#13#10Error: PLS-00201: identifier 'CTX_DDL.CREATE_PREFERENCE' must be declared
Line: 280
#13#10Error: PL/SQL: Statement ignored
Line: 280
#13#10Error: PLS-00201: identifier 'CTX_DOC.FILTER' must be declared
Line: 292
#13#10Error: PL/SQL: Statement ignored
Line: 292
#13#10Error: PLS-00201: identifier 'CTX_DOC.FILTER' must be declared
Line: 312
#13#10Error: PL/SQL: Statement ignored
Line: 312

It happens bassically because APEX schema has not been granted with execute privileges for CTX_DDL and CTX_DOC. The note below it’s exactly about it:
The WWV_FLOW_HELP PACKAGE Status is Invalid After Installing Oracle Text (Doc ID 1335521.1)

The solution is simple:

mydb> grant execute on ctx_ddl to APEX_030200;
Grant succeeded.
mydb> grant execute on ctx_doc to APEX_030200;
Grant succeeded.
mydb> alter package APEX_030200.WWV_FLOW_HELP compile;
Package altered.
mydb> alter package APEX_030200.WWV_FLOW_HELP compile body;
Package body altered.

Have a nice day!
Matheus.

Explain ORA-XXX on SQL*Plus

For those when the error is unkown/rare, SQL*Plus helps us. It’s just call “oerr” from OS.

See the Linux example (made on RHEL):

SQL>  !oerr ora 01652
01652, 00000, "unable to extend temp segment by %s in tablespace %s"
// *Cause:  Failed to allocate an extent of the required number of blocks for
//          a temporary segment in the tablespace indicated.
// *Action: Use ALTER TABLESPACE ADD DATAFILE statement to add one or more
//          files to the tablespace indicated.

Pretty cool, han?

Have a nice week!
Matheus.

ORA-01994: GRANT failed: password file missing or disabled

Quick tip:

[oracle@server ~]$ orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=$password entries=$num_users force=y

 

KB: http://docs.oracle.com/cd/B28359_01/server.111/b28310/dba007.htm#ADMIN12478

# OBS 1
“If you are running multiple instances of Oracle Database using Oracle Real Application Clusters, the environment variable for each instance should point to the same password file.”

# OBS 2
REMOTE_LOGIN_PASSWORDFILE need to be in EXCLUSIVE to alter user with sysdba.

# OBS 3
Users can be chacked on V$PWFILE_USERS.

# OBS 4
Entries represent the quantity of users on orapwd/with sysdba.

Matheus.