Backup Recovery »

[23 Nov 2009 | No Comment | 283 views]

rman target sys/change_on_install nocatalog
  run { 
     allocate channel t1 type disk;
     backup 
        format ‘/backup/full_backup/%d_t%t_s%s_p%p’
            ( database 
            release channel t1;
}

Oracle Code »

[23 Nov 2009 | No Comment | 1,372 views]

Some tablespaces can be autoextensible, in this case, when necessary, Oracle automatically allocate new space for the tablespace; so you have not to add space to tablespaces. Use this query to see list of tablespaces with used and free space and to see if each tablespace is autoextensible:

SELECT
a.file_id,
a.tablespace_name,
trunc(decode(a.autoextensible,’YES’,a.maxsize-a.bytes+b.free,’NO’,b.free)/1024/1024) free_mb,
trunc(a.bytes/1024/1024) size_mb,
trunc(a.maxsize/1024/1024) maxsize_mb,
a.autoextensible ae,
trunc(decode(a.autoextensible,’YES’,(a.maxsize-a.bytes+b.free)/a.maxsize*100,’NO’,b.free/a.maxsize*100)) free_pct
FROM
(SELECT
file_id,
tablespace_name,
autoextensible,
bytes,

Oracle Code »

[22 Nov 2009 | No Comment | 337 views]

Enlarge a datafile

ALTER DATABASE datafile ‘/path/datafile.dbf’ resize 1024M;

DB2, DB2 Error »

[22 Nov 2009 | 2 Comments | 2,526 views]

 

SQLCODE -991, Error: CALL ATTACH WAS UNABLE TO ESTABLISH AN IMPLICIT CONNECT OR OPEN TO DB2. RC1= RC2=

SQLCODE -981, Error: THE SQL STATEMENT FAILED BECAUSE THE RRSAF CONNECTION IS NOT IN A STATE THAT ALLOWS SQL OPERATIONS, REASON

SQLCODE -950, Error: THE LOCATION NAME SPECIFIED IN THE CONNECT STATEMENT IS INVALID OR NOT LISTED IN THE COMMUNICATIONS DATABASE

SQLCODE -948, Error: DISTRIBUTED OPERATION IS INVALID

SQLCODE -947, Error: THE SQL STATEMENT FAILED BECAUSE IT WILL CHANGE A TABLE DEFINED WITH DATA CAPTURE CHANGES, BUT THE DATA CANNOT BE PROPAGATED

SQLCODE -939, Error: ROLLBACK REQUIRED …

Oracle Error »

[22 Nov 2009 | No Comment | 147 views]

ORA-31409: one or more values for input parameters are incorrect
Cause: One or more of the inputs to the procedure had invalid values.
Action: Identify the bad parameter(s) and supply correct values to the procedure.

Oracle Error »

[22 Nov 2009 | No Comment | 179 views]

ORA-31404: all input parameters are null
Cause: All input parameters are null. At least one property must be altered.
Action: Call the procedure again, making sure that all the required parameters have been specified. Ensure that at least one parameter is not null. Refer to user documentation for the correct way of calling this procedure.

Oracle Error »

[22 Nov 2009 | No Comment | 139 views]

ORA-31398: DBMS_LDAP: Shared servers are not supported.
Cause: The session executing functions from the DBMS_LDAP package is being handled by a shared server in the Database.
Action: Use dedicated database sessions to execute functions in the DBMS_LDAP package.

Oracle Error »

[22 Nov 2009 | No Comment | 150 views]

ORA-31228: DBMS_LDAP: invalid MOD_ARRAY
Cause: An attempt was made by a PL/SQL module to use a MOD_ARRAY which is not valid and might have already been freed.
Action: Check the MOD_ARRAY in PL/SQL module involving DBMS_LDAP.

Oracle Error »

[22 Nov 2009 | No Comment | 383 views]

ORA-31223: DBMS_LDAP: cannot open more than string LDAP server connections
Cause: An attempt was made to open more than the maximum allowed LDAP server connections.
Action: Free unused connections.

Administration, ORA-HOWTO, Oracle Code »

[22 Nov 2009 | No Comment | 786 views]

This query shows all invalid objects in the Oracle database:

SELECT owner, object_name, object_type, STATUS
FROM dba_objects WHERE STATUS=’INVALID’ ORDER BY owner DESC;

Next is a metaquery that generates all statements to recompile invalid objects:

SELECT ‘ALTER ‘||decode(owner,’PUBLIC’,'PUBLIC’)||’ ‘||
decode(object_type,’PACKAGE BODY’,'PACKAGE’,'TYPE BODY’,'TYPE’,object_type)||’ ‘||
decode(owner,’PUBLIC’,NULL,owner||’.')||’”‘||object_name||’” COMPILE ‘||
decode(object_type,’PACKAGE BODY’,'BODY;’,'TYPE BODY’,'BODY;’,';’)
FROM dba_objects WHERE STATUS=’INVALID’ ORDER BY owner DESC;