Archive for the ‘Database’ Category

Viewing complete session information


23 Oct

Most DBA know that they can query the v$session view to see the current sessions.  However, you can also interrogate the v$sysstat view to see the current logons, cumulative logons since startup, and the high-water-mark of logons since startup time.

The following script provides a wealth of information about the number of sessions on your Oracle database. (more…)

Check Free Table Space


22 Oct

A little script to check free table space in Oracle

SQL> SELECT TABLESPACE_NAME, SUM(BYTES) “SIZE BYTES”,  SUM(BYTES)/1000 “SIZE KB”, SUM(BYTES)/1000000 “SIZE MB”, SUM(BYTES)/1000000000 “SIZE_GB”
  2  FROM DBA_FREE_SPACE
  3  GROUP BY TABLESPACE_NAME;

TABLESPACE_NAME        SIZE BYTES       SIZE KB          SIZE MB        SIZE_GB
—————————– ———- ———- ———- ———-
UNDOTBS1                            65536           65.536        .065536   .000065536
SYSAUX                            11730944    11730.944     11.730944  .011730944
USERS                                1900544       1900.544      1.900544  .001900544
SYSTEM                              7929856      7929.856       7.929856  .007929856
EXAMPLE                          23724032     23724.032    23.724032  .023724032

SQL>

IMP-00032 Error Code


20 Oct

- Import Utility (IMP)
IMP-00032: SQL statement exceeded buffer length
IMP-00008: unrecognized statement in the export file

cause: The insert statement run when importing exceeds the default or specified buffer size.

For import of tables containing LONG, LOB, BFILE, REF, ROWID, LOGICALROWID or type columns, rows are inserted individually. If the sql statement on the .dmp file exceeds the default buffer size, the buffer size needs to be increased to accomodate this, otherwise the imp utility won’t be able to load the full sql statement into the buffer, spooling the IMP-00032,IMP-00008 error.

How to fix:

Increase the buffer size, and make sure that it is big enough to contain the biggest row in the table(s) imported. Import uses default buffer size of 30720.
For example: imp system/manager file=test.dmp full=y log=test.log buffer=1000000

Oracle Error ORA-00065


01 Jan

Oracle Error :: ORA-00065
initialization of FIXED_DATE failed

Cause
The FIXED_DATE string was not in date format yyyy-mm-dd:hh24:mi:ss.

Action
Make sure the initialization parameter is in the correct date format.

Oracle Error ORA-00064


01 Jan

Oracle Error :: ORA-00064
object is too large to allocate on this O/S (string,string)

Cause
An initialization parameter was set to a value that required allocating more contiguous space than can be allocated on this operating system.

Action
Reduce the value of the initialization parameter.

Oracle Error ORA-00063


01 Jan

Oracle Error :: ORA-00063
maximum number of log files exceeded string

Cause
The number of log files specificied exceeded the maximum number of log files supported in this release.

Action
Re-create the control file with the highest number of log files no greater than the maximum supported in this release.

Oracle Error ORA-00062


01 Jan

Oracle Error :: ORA-00062
DML full-table lock cannot be acquired; DML_LOCKS is 0

Cause
The instance was started with DML_LOCKS = 0, and the statement being executed needs a full-table lock (S, X, or SSX).

Action
Restart the instance with DML_LOCKS not equal to zero, and reexecute the statement.

AntoniusSony.Com

It's Good to be an Important person,but it's more Important to be a Good person