Showing posts with label OEM. Show all posts
Showing posts with label OEM. Show all posts

Friday, September 24, 2010

Corrupted OEM Recreation Error

emca -deconfig dbcontrol db -repos drop

drop taking more time and hang the server



not able to create oem because sysman already exist
emca -config dbcontrol db -repos create

use following to drop and create

emca -deconfig dbcontrol db
emca -config dbcontrol db

following is must or restart service oracledbconsoleservice
emctl stop dbconsole
emctl start dbconsole

--------------------

Monday, June 29, 2009

OEM Backup Notification

If Backup is failed or stop then i will get notification

Steps :
- Open a database target (SNS0910)
- Click on User-Defined-Metrics
- Create
- Metric Name = Last datafile backup
- Type = Number
- Output = Single Value
- SQL Query : the time in hour since the oldest checkpoint time of the newest backup


select (sysdate-min(t))*24 from
(
select max(b.CHECKPOINT_TIME) t
from v$backup_datafile b, v$tablespace ts, v$datafile f
where INCLUDED_IN_DATABASE_BACKUP='YES'
and f.file#=b.file#
and f.ts#=ts.ts#
group by f.file#
)
- Credentials : dbsnmp/*****
- Threshold Operator > Warning 24 Critical 48
- Repeat every 1 hour
- OK



Same for redologs, with a name of Last redolog backup query of

select (sysdate-max(NEXT_TIME))*24 from v$BACKUP_REDOLOG


It is now possible to define alerts.
- Preferences
- Notification Rules
- Create
- Apply to specific targets : Add you productive databases group
- Deselect Availability Down
- Metric: Add : Show all: Check User defined metric : Select : Last datafile backup , Last redolog backup
- Severity : Critical and Clear
- Policy : None
- Method : Email



======================

select
to_char(max(completion_time) ,'DDMMYYHH24MISS') lastbackup
from (SELECT completion_time
FROM v$backup_set
UNION
SELECT completion_time
FROM v$datafile_copy
union
select sysdate-365 from dual
)

Warining 0
Critical 320000000000


===========

SELECT
ELAPSED_SECONDS/60 minutes
FROM V$RMAN_BACKUP_JOB_DETAILS
ORDER BY SESSION_KEY desc;

Warining 30
Critical 60

Saturday, June 27, 2009

OEM Backup Error Solution

OEM Backup Error
--------------------


Recovery Manager: Release 10.2.0.3.0 - Production on Sat Jun 27 11:24:24 2009

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


RMAN>

connected to target database: SNS0910 (DBID=45805873)

RMAN>

connected to recovery catalog database

RMAN>

echo set on


RMAN> set command id to 'BACKUP_SNS0910.UNI_062709112403';

executing command: SET COMMAND ID


RMAN> backup device type disk tag 'BACKUP_SNS0910.UNI_062709112403' database;

Starting backup at 27-JUN-09

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=509 devtype=DISK

channel ORA_DISK_1: starting compressed full datafile backupset

channel ORA_DISK_1: specifying datafile(s) in backupset

input datafile fno=00005 name=E:\SNSD0910\USERS01.ORA

input datafile fno=00004 name=E:\SNSD0910\INDEX01.ORA

input datafile fno=00002 name=E:\SNSD0910\UNDOTBS01.ORA

input datafile fno=00003 name=E:\SNSD0910\SYSAUX01.ORA

input datafile fno=00001 name=E:\SNSD0910\SYSTEM01.ORA

channel ORA_DISK_1: starting piece 1 at 27-JUN-09

channel ORA_DISK_1: finished piece 1 at 27-JUN-09

piece handle=E:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\SNS0910TEST\6UKIKHFC_1_1 tag=BACKUP_SNS0910.UNI_062709112403 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:19:15

Finished backup at 27-JUN-09



Starting Control File and SPFILE Autobackup at 27-JUN-09

piece handle=E:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\SNS0910TEST\CONTROL\C-45805873-20090627-01 comment=NONE

Finished Control File and SPFILE Autobackup at 27-JUN-09



RMAN> backup device type disk tag 'BACKUP_SNS0910.UNI_062709112403' archivelog all not backed up;

Starting backup at 27-JUN-09

current log archived

using channel ORA_DISK_1

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of backup command at 06/27/2009 11:43:48

RMAN-06059: expected archived log not found, lost of archived log compromises recoverability

ORA-19625: error identifying file D:\ARCHIVE0910\ARC00928_0681409713.001

ORA-27041: unable to open file

OSD-04002: unable to open file

O/S-Error: (OS 2) The system cannot find the file specified.


RMAN> exit;

Recovery Manager complete.



---------------------------------------
Solutions:

-------------Solution Through OEM------

OEM > Maintenance > Manage Current Backup>
Backup Sets
Crosscheck > Validate
Catalog Additional Files > Crosscheck All > Delete All Obselete > Delete All Expired

Image Copies
Crosscheck > Validate
Catalog Additional Files > Crosscheck All > Delete All Obselete > Delete All Expired

-----------------Solution Through command prompt----------

RMAN > crosscheck archivelog all;

If error is still there then follow following steps

RMAN> crosscheck copy of archivelog all;
RMAN> crosscheck archivelog all;
RMAN> resync catalog;
RMAN> delete force obsolete;
RMAN> delete expired archive all;

---------------------------------------

Tuesday, June 9, 2009

Oracle- OEM - Export Database / Table / Schema / Tablespace (Data Pump)

1)
user: snsexport
passowrd:snsexp
role:exp_full_database

2)
Now Try to export database by login above user


Errors: ORA-31626: job does not exist ORA-31633: unable to create master table "SNSEXPORT.EXPORTTEST" ORA-06512: at

"SYS.DBMS_SYS_ERROR", line 95 ORA-06512: at "SYS.KUPV$FT", line 863 ORA-00955: name is already used by an existing object

Exception : ORA-31626: job does not exist ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79 ORA-06512: at "SYS.DBMS_DATAPUMP", line

911 ORA-06512: at "SYS.DBMS_DATAPUMP", line 4356 ORA-06512: at line 2


solutions
add privilieges for snsexport user


CREATE SESSION
BACKUP ANY TABLE
SELECT ANY TABLE
SELECT ANY SEQUENCE
EXECUTE ANY PROCEDURE
CREATE ANY DIRECTORY
EXECUTE ANY TYPE
ADMINISTER RESOURCE MANAGER
RESUMABLE
SELECT ANY DICTIONARY
READ ANY FILE GROUP
create table

-------------------------------------
3)
Now Following Error

ORA-20204: User does not exist: SNSEXPORT ORA-06512: at "SYSMAN.MGMT_USER", line 122 ORA-06512: at "SYSMAN.MGMT_JOBS", line

142 ORA-06512: at "SYSMAN.MGMT_JOBS", line 78 ORA-06512: at line 1


Solution
Add role MGMT_USER

--------------------------

4) ORA-20204: User does not exist: SNSEXPORT ORA-06512: at "SYSMAN.MGMT_USER", line 122 ORA-06512: at "SYSMAN.MGMT_JOBS",

line 142 ORA-06512: at "SYSMAN.MGMT_JOBS", line 78 ORA-06512: at line 1

Solution:

add the user snsexport

-login as user SYSTEM (or user SYS) to the ‘Enterprise Manager 10g
Database Control’
- At the top right, click on the link ‘Setup’
- On the page ‘Administrators’, click on the button ‘Create’
- On the page ‘Create Administrator: Properties’, add the user snsexport
- Click on the button: ‘Finish’
- On the page ‘Create Administrator: Review’, click on the button: ‘Finish’
- On the page ‘Administrators’, confirm that the user has been added.
- At the top right, click on the link ‘Logout’
--------------------------

5) Now Porblems are Resolved

Friday, June 5, 2009

OEM OS Host Credentials (User Authenication Error)

OEM OS Host Credentials (User Authenication Error)

Validation Error - Connection to host as user kgupta2 failed: ERROR: Wrong password for user

Solution
OEM>Preferences >== Preferred Credentials >== Target Types Host.
provide the hostname, password which is mentioned in following


You have to provide the 'Log on as a batch job' privilege:

1. Go to control panel/administrative tools
a. click on "local security policy"
b. click on "local policies"
c. click on "user rights assignments"
d. double click on "log on as a batch job"
e. click on "add" and add the user that was entered in the "normal username" or "privileged username" section of the EM Console.

2. Go to the Preferences link in the EM GUI
a. click on Preferred Credentials (link on the left menu)
b. under "Target Type: Host" click on "set credentials"
c. enter the OS user who has logon as a batch job privilege into the "normal username" and "normal password" fields

3. Test the connection
a. while in the Set Credentials window, click on "Test"

Thursday, May 21, 2009

Configure OEM through CLI

Set oracle_sid=orcl

Emca –deconfig dbcontrol db –repos drop

Emca –config dbcontrol db –repos create

Note: if invalid user/password for DBSNMP or others

Then

Alter user DBSNMP identified by dbsnmp account unlock;

log >> C:\ORACLE\PRODUCT\10.2.0\db_1\cfgtoollogs\emca\orcl

Repository creation create following two folder

1) C:\ORACLE\PRODUCT\10.2.0\db_1\oc4j\j2ee >> localhost_ORCL _

2) C:\ORACLE\PRODUCT\10.2.0\db_1 >> OC4J_DBConsole_localhost_orcl

3)

Important Files

Repository Manager C:\oracle\product\10.2.0\db_1\sysman\admin\emdrep\bin\RepManager.bat

Enterprise Manager Repository Create SQL C:\oracle\product\10.2.0\db_1\sysman\admin\emdrep\sql\ emreposcre.sql

Followers