Archive for the ‘Unsorted’ Category.

Hi, I started new website www.Tomas-Solar.com

I decided to start new web site, where all posts are in czech language.

But all readers are able to translate it to corresponding language.

I dont need to duplicate all my posts, so I’ll put articles more frequently.

Hope you will enjoy reading.

Regards,

Tom

Response received: ERROR-100|No space left on device

Hi,

my OMS suddenly stopped working. I wasn’t able to upload data from any monitored servers.
Agents told me that everuthink is ok but number of pendind messages were quite high.

oracle@db01:~> /opt/app/oracle/product/10.2/agent10g/bin/emctl status agent
Oracle Enterprise Manager 10g Release 4 Grid Control 10.2.0.4.0.
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
—————————————————————
Agent Version     : 10.2.0.4.0
OMS Version       : 10.2.0.5.0
Protocol Version  : 10.2.0.4.0

Started at        : 2009-10-25 02:14:15
Started by user   : oracle
Last Reload       : 2009-10-26 13:21:34
Last successful upload                       : 2009-12-07 11:34:01
Total Megabytes of XML files uploaded so far :  1343.77
Number of XML files pending upload           :     1916
Size of XML files pending upload(MB)         :    46.33
Available disk space on upload filesystem    :    39.89%
Collection Status                            : Disabled by Upload Manager
Last successful heartbeat to OMS             : 2009-12-07 11:33:13
—————————————————————
Agent is Running and Ready
oracle@db01:~> /opt/app/oracle/product/10.2/agent10g/bin/emctl upload agent
Oracle Enterprise Manager 10g Release 4 Grid Control 10.2.0.4.0.
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
—————————————————————
EMD upload error: Upload was successful but collections currently disabled - disk full

Other corresponding messages:
EMD upload error: Upload timed out before completion.
EMD upload error: Failed to upload file D0096435.xml: HTTP error.
Response received: ERROR-100|No space left on device

I found a lot of core files in OMS_HOME:
-rw——-   1 oracle oinstall 16265216 2009-12-07 14:22 core.24493
-rw——-   1 oracle oinstall 16265216 2009-12-07 14:22 core.24533
-rw——-   1 oracle oinstall 16265216 2009-12-07 14:22 core.24582
-rw——-   1 oracle oinstall 16265216 2009-12-07 14:22 core.24588

Solution:
I fount the problem. My access_log in Apache had more than 2GB size.
oracle@beta:/opt/app/oracle/product/10/oms10g/Apache/Apache/logs> du -hs .
2.3G    .
oracle@beta:/opt/app/oracle/product/10/oms10g/Apache/Apache/logs> ls -ltr access_log
-rw-r—–  1 oracle oinstall 2147483647 2009-12-04 21:23 access_log

Kindly delete them and upload data from agents. That’s all.

Metalink:
Problem: Core Dumps: Grid Control OMS generates huge amount of core.xxx files causing the system to halt [ID 419999.1]
How We Corrected a Disabled Agent Due to Disk Full [ID 754458.1]
Agent Upload To Oms Fails With Collections Disabled Due To Disk Full [ID 317242.1]

Regards,

Tom

ORA-12089: cannot online redefine table

SQL> EXEC DBMS_REDEFINITION.can_redef_table(’admin’, ‘y’);
BEGIN DBMS_REDEFINITION.can_redef_table(’admin’, ‘y’); END;

*
ERROR at line 1:
ORA-12089: cannot online redefine table “admin”.”y” with no primary
key
ORA-06512: at “SYS.DBMS_REDEFINITION”, line 139
ORA-06512: at “SYS.DBMS_REDEFINITION”, line 1770
ORA-06512: at line 1

Elapsed: 00:00:00.03

ORA-12089: cannot online redefine table “string”.”string” with no primary key
Cause: An attempt was made to online redefine a table that does not have a primary key defined on it.
Action: Do not attempt to online redefine a table that does not have a primary key defined on it.

Solution:

drop table x;
drop table y;

create table x(id number, name varchar2(20) encrypt);
insert into x values(1,’x');
commit;

alter table x add constraint pk_id primary key(id);

create table Y as
select *
from X where 1=2;

alter table y modify (name encrypt using ‘aes256′);

EXEC DBMS_REDEFINITION.can_redef_table(’admin’, ‘x’);

EXEC DBMS_REDEFINITION.start_redef_table(’admin’, ‘x’, ‘y’);

DECLARE
num_errors PLS_INTEGER;
BEGIN
DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS(
‘ADMIN’,'X’,'Y’,DBMS_REDEFINITION.CONS_ORIG_PARAMS,
TRUE, TRUE, TRUE, FALSE, num_errors, TRUE);
END;
/

EXEC DBMS_REDEFINITION.sync_interim_table(’admin’, ‘x’, ‘y’);

EXEC DBMS_REDEFINITION.finish_redef_table(’admin’, ‘x’, ‘y’);

Now, everything is ok:

SQL> select constraint_name from user_constraints where table_name=’X';
CONSTRAINT_NAME
——————————
PK_ID

SQL> select constraint_name from user_constraints where table_name=’Y';
CONSTRAINT_NAME
——————————
TMP$$_PK_ID0

Regards,

Tom

TOPlist