Saturday, October 22, 2011

Logical comparison of NULL = NULL And NULL != NULL in (SQL) oracle database is false ?

see the example


C:\Documents and Settings\Administrator>sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Sat Oct 22 13:15:50 2011

Copyright (c) 1982, 2010, Oracle. All rights reserved.

SQL>
SQL>
SQL>
SQL> conn sys@orcl105 as sysdba
Enter password:
Connected.
SQL>
SQL>
SQL> set serveroutput on
SQL>
SQL> begin
2 if null = null then dbms_output.put_line('TRUE');
3 elsif not (null = null) then dbms_output.put_line('FALSE');
4 else dbms_output.put_line('Not TRUE and not FALSE');
5 end if;
6 end;
7 /

Not TRUE and not FALSE

PL/SQL procedure successfully completed.

SQL>
SQL>
SQL>
SQL> ed
Wrote file afiedt.buf

1 begin
2 if null != null then dbms_output.put_line('TRUE');
3 elsif not (null != null) then dbms_output.put_line('FALSE');
4 else dbms_output.put_line('Not TRUE and not FALSE');
5 end if;
6* end;
SQL> /

Not TRUE and not FALSE

PL/SQL procedure successfully completed.

SQL>
SQL>
SQL>
SQL>

see the following link
https://forums.oracle.com/forums/thread.jspa?messageID=4098609

Monday, October 17, 2011

ORA-09945: Unable to initialize the audit trail file

this error is showing when i am trying to start oracle database. solution is below.


SQL> startup

---it show this error

ORA-09817: Write to audit file failed.
Linux-x86_64 Error: 28: No space left on device
ORA-09945: Unable to initialize the audit trail file
Linux-x86_64 Error: 28: No space left on device


Why :=
============

its because of full the Mount point where Oracle is installed .
your audit_trail_dest or audit trail destination is full for generation of audit file.


you can do :-
==============

1) check the space of mount point. like below.....

$ df -k

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 9877432 9500268 0 100% /
none 3932160 1736 3930424 1% /dev/shm
/dev/sdf 30963708 9434056 19956788 33% /u02
/dev/sdb 433455904 203020 411234580 1% /u03


2) delete some unnecessary trace file or something from that fulled mount point.
then try to start the oracle database.

it is advisable, backup the files before they are delete since they might be useful in future.

you see here