Sunday 15 October 2017

Node id does not exist for the current application server id

Issue:

After completing cloning procedure, you generally may across the following issue. "Node id does not exist for the current application server id" or

May be we created a disaster database for testing purpose due to this also you will get node id error.

There is a mismatch between server_id in the  fnd_nodes table and appl_server_id in the dbc file and hence are getting this  "node id does not exist" error.

When trying to open Oracle Forms, all forms error out with the below message:

“Node id does not exist for the current application server id”.

Solution:

Do a select on the server_id in the fnd_nodes table.  Here is an example of what it could look like:

server_id=EA99227ED75CFE4EE030149077C4515496138833635529486962342698410274

Do a search on APPL_SERVER_ID in the .dbc file.  It could show something like:

APPL_SERVER_ID=EA99220924EF823FE030149077C450C096138833635529486962342698410274

compare both the id if any mismatch or if both same also you can run the below script it will solve the issue.

Run adgendbc.sh to config the apps tier dbc file with the correct id from the database instance.

cd $INST_TOP/admin/install/
sh adgendbc.sh

Completes with:

Updating Server Security Authentication
AUTHENTICATION SECURE executed
successfully –
/u01/PROD/inst/apps/xxx/appl/fnd/12.0.0/secure/PROD.dbc
adgendbc.sh
exiting with status 0
ERRORCODE = 0 ERRORCODE_END

solution steps:

1.First stop the application.
2.Run adgendbc.sh script to configure apps tier dbc file with the correct id from the database instance.
3.Start the application and test your issue.

Best Regards.

Wednesday 11 October 2017

How to delete expired or obsolete archvielog files.

RMAN provided two commands for deleting archive log.

1.delete expired archivelog
2.backup archivelog all delete input

These command can delete archive logs based on the input provided. There were two things that RMAN made sure every time it attempted to delete an archive log. The first is that specified archive log is backed up to all the locations specified under log_archived_dest_n parameters. The value under these parameters can be flash recovery area or non flash recovery area. Second is whether the archive logs to be deleted are obsolete or not. This in turn depends on your backup retention policy. An archive redo log is considered obsolete if it is not required in any recovery scenario.

Using RMAN we can remove the old archvielogs or old backup file using report obsolete or delete obsolete by setting rman rman retention policy
RMAN> show all;
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name DEV are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # defaultCONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'E:\APP\USER\PRODUCT\12.1.0\DBHOME_1\DATA
BASE\SNCFDEV.ORA'; # default
RMAN>
Above Configuration show  RMAN  retention policy is 1, based on this retention policy only report obsolete or delete obsolete will work.
Manually we can remove the expired archivelog using below 2 options:

1.delete .. expired archivelog;
2.backup archivelog all delete input;

1. delete .. expired archivelog;

By using this command we can remove the old archivelog manually.

Using OS command remove the old archivelog files from the archivelog log location.
Move to archivelog location then issue (to find the achivelog location , connect sqlplus / as sysdba )
execute below command to find the archive log.
SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     46
Next log sequence to archive   48
Current log sequence           48
SQL> 
Archvielog location using Flash revoerey area,

SQL> show parameter recover
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      E:\app\user\fast_recovery_area
db_recovery_file_dest_size           big integer 6930M
db_unrecoverable_scn_tracking        boolean     TRUE
recovery_parallelism                 integer     0
SQL>

ARchivelog location is "E:\app\user\fast_recovery_area\dev\ARCHIVELOG".
move to this location and issue command below with 2 options.
Recommended options is move the old archivelog file to some other directory wait for 2 days then remove that files. or directly reomove like below
rm -rf  *.arc or
rm -rf  (specified archivelog files)

Then issue the command connecting RMAN.

C:\Users\user>rman target /
Recovery Manager: Release 12.1.0.1.0 - Production on Wed Oct 11 17:19:15 2017
Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.
connected to target database: DEV (DBID=4027486540)
RMAN>
RMAN> list expired archivelog all;
using target database control file instead of recovery catalog
specification does not match any archived log in the repository
RMAN>
Before crosscheck its shows like this.
RMAN> crosscheck archivelog all;

It will crosscheck the archivelog files with RMAN repository deleted files status changed to expired in RMAN repository.

RMAN> list expired archivelog all;
List of Archived Log Copies for database with db_unique_name DEV
=====================================================================
Key     Thrd Seq     S Low Time
------- ---- ------- - ---------
39      1    48      X 11-OCT-17
        Name: E:\APP\USER\FAST_RECOVERY_AREA\DEV\ARCHIVELOG\2017_10_11\O1_MF_1_
8_DXW2ZZFW_.ARC
RMAN>

Then issue below command to remove from the RMAN repository.

RMAN> delete expired archivelog all;
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=129 device type=DISK
List of Archived Log Copies for database with db_unique_name DEV
=====================================================================
Key     Thrd Seq     S Low Time
------- ---- ------- - ---------
39      1    48      X 11-OCT-17
        Name: E:\APP\USER\FAST_RECOVERY_AREA\DEV\ARCHIVELOG\2017_10_11\O1_MF_1_4
8_DXW2ZZFW_.ARC
Do you really want to delete the above objects (enter YES or NO)? yes
deleted archived log
archived log file name=E:\APP\USER\FAST_RECOVERY_AREA\DEV\ARCHIVELOG\2017_10_11\
O1_MF_1_48_DXW2ZZFW_.ARC RECID=39 STAMP=957116888
Deleted 1 EXPIRED objects
RMAN>
RMAN> delete noprompt expired archivelog all;

this command will remove the files without prompting the Yes or no.

2.Backup archivelog all delete input:

Above command will remove the all archivelog file after taking the backup of all archvielog available in current RMAN repository.

We have options also

It will take backup 2 days before archivelog file and then remove it.
RMAN> backup archivelog until time 'sysdate-2' delete input;

Crosscheck commands:

To crosscheck all backups use:
RMAN> CROSSCHECK BACKUP;

To list any expired backups detected by the CROSSCHECK command use:
RMAN> LIST EXPIRED BACKUP;

To delete any expired backups detected by the CROSSCHECK command use:
RMAN> DELETE EXPIRED BACKUP;

To crosscheck all archive logs use:
RMAN> CROSSCHECK ARCHIVELOG ALL;

To list all expired archive logs detected by the CROSSCHECK command use:
RMAN> LIST EXPIRED ARCHIVELOG ALL;

To delete all expired archive logs detected by the CROSSCHECK command use:
RMAN> DELETE EXPIRED ARCHIVELOG ALL;

To crosscheck all datafile image copies use:
RMAN> CROSSCHECK DATAFILECOPY ALL;

To list expired datafile copies use:
RMAN> LIST EXPIRED DATAFILECOPY ALL;

To delete expired datafile copies use:
RMAN> DELETE EXPIRED DATAFILECOPY ALL;

To crosscheck all backups of the USERS tablespace use:
RMAN> CROSSCHECK BACKUP OF TABLESPACE USERS;

To list expired backups of the USERS tablespace:
RMAN> LIST EXPIRED BACKUP OF TABLESPACE USERS;

To delete expired backups of the USERS tablespace:
RMAN> DELETE EXPIRED BACKUP OF TABLESPACE USERS;

Best Regards.