Thursday, July 28, 2011

Solaris Commands

Solaris Command:

Version of Solaris:
# uname -r
5.10


#Determine whether package installed or not
# pkginfo -i SUNWarc
system SUNWarc Lint Libraries (usr)

# pkginfo -i SUNWsprox
ERROR: information for "SUNWsprox" was not found




# prtconf|grep "Memory size"
Memory size: 536 Megabytes
# /usr/sbin/swap -s

total: 218988k bytes allocated + 55636k reserved = 274624k used, 721404k available

# /bin/isainfo -kv

32-bit i386 kernel modules


Enable Network Card:

Enable the network card
#ifconfig e1000g0 plumb

Then issue the ifconfig -a Command

#ifconfig e1000g0 192.168.0.106 netmask 255.255.255.0 up

#ifconfig -a

Configuring Virtual interface

#ifconfig e1000g0:1 172.40.30.4 netmask 255.255.0.0 up


SSH Configuration User Equivalence Failed:

Workaround:

#mkdir -p /usr/local/bin
# ln -s /usr/bin/ssh /usr/local/bin
# ln -s /usr/bin/scp /usr/local/bin

Saturday, July 9, 2011

ORA-04063: package body "SYS.DBMS_REGISTRY_SYS" has errors while running utlrp...

SELECT dbms_registry_sys.time_stamp('utlrp_end') as timestamp from dual
*
ERROR at line 1:
ORA-04063: package body "SYS.DBMS_REGISTRY_SYS" has errors


BEGIN dbms_registry_sys.validate_components; END;

*
ERROR at line 1:
ORA-04063: package body "SYS.DBMS_REGISTRY_SYS" has errors
ORA-06508: PL/SQL: could not find program unit being called:
"SYS.DBMS_REGISTRY_SYS"
ORA-06512: at line 1


Solution:
1.shutdown immediate
2.startup upgrade
3.run catalog and catproc scritp
4.run utlrp
5.shutdown immediate
6.startup
7.select comp_name,version,status from dba_registry;

Monday, July 4, 2011

Avoid library file locking errors (libjox)

Hi,
When applying CPU or Patchsets you may encounter some errors with regards to files being locked or opatch being unable to copy files even though the databases, listeners and any other Oracle processes associated with the ORACLE_HOME to be patched were stopped. If you will apply patchset or CPU patches in Silent mode you cannot see Linking errors.

Work around:
we should following things while installing patchset

We should run slibclean as root user
genld -l grep /u01/app/oracle/product/10.2(Oralce_home)
genkld grep /u01/app/oracle/product/10.2(Oracle_Home)

If genld returns data then a currently executing process has something open in ORACLE_HOME directory, please terminate the process as required/recommended.

If genkld command returns a list of shared objects currently loaded onto the OS system cache then please remove the entries from the OS system cache by running the slibclean command as root;
/usr/sbin/slibclean

Prease verify once installation completed

Please Verify libjox file is updated or not
cd $ORACLE_HOME/lib
ls -lrt libj*
-rw-r----- 1 oracle dba 0 Aug 10 2005 libjox10.so
-rw-r--r-- 1 oracle dba 23177425 Mar 25 2008
libjmisc.so
-rw-r--r-- 1 oracle dba 4070303 May 10 2008 libjox10oraawt.so
-rw-r--r-- 1 oracle dba 13257611 May 10 2008 libjox10.a


so you will face following errors when running Catupgrd.sql script if libjox file not upadated

Error:
grant select on ALL_JOBS to public with grant option
*ERROR at line 1:ORA-03113: end-of-file on communication channel
and subsequently all the following sql statements fail
ERROR:ORA-03114: not connected to ORACLE


Please Refer Metalink Doc. ID 739963.1

Index Corruption(Partition)

Identify Coruppted Index using Block ID

SELECT SEGMENT_TYPE,OWNER'.'SEGMENT_NAMEFROM DBA_EXTENTS WHERE FILE_ID = 123 AND 15608 BETWEEN BLOCK_IDAND BLOCK_ID+BLOCKS -1;

Solution:

select INDEX_NAME,INDEX_OWNER,PARTITION_NAME,status,TABLESPACE_NAME from dba_ind_partitions where INDEX_NAMe like '%IND%';
select COLUMN_NAME,INDEX_NAME,TABLE_NAME from dba_ind_columns where INDEX_NAME= 'IND';
select INDEX_TYPE,TABLE_NAME,INDEX_NAME from dba_indexes where index_name= 'IND';
select sum(bytes/1024/1024) from dba_segments where SEGMENT_NAME= 'IND';
select SEGMENT_NAME,SEGMENT_TYPE,TABLESPACE_NAME from dba_extents where SEGMENT_NAME= 'IND_TAB'
drop index scott. IND;
create index scott. IND on scott.IND_TAB (KEY_SEMRFORE93) tablespace users local;

Sunday, July 3, 2011

Error: ORA-16606: unable to find property,Warning: ORA-16826: apply service state is inconsistent with the DelayMins property

DGMGRL> show configuration

Configuration
Name: DRS
Enabled: YES
Protection Mode: MaxPerformance
Fast-Start Failover: DISABLED
Databases:
starprim - Primary database
starstby - Physical standby database

Current status for "DRS":
Warning: ORA-16608: one or more databases have warnings


DGMGRL> show configuration 'starprim'
Error: ORA-16606: unable to find property "starprim"
Warning: ORA-16826: apply service state is inconsistent with the DelayMins property


Error: ORA-16501: the Data Guard broker operation failed

DGMGRL> show configuration 'starstby'
Error: ORA-16606: unable to find property "starstby"
Warning: ORA-16826: apply service state is inconsistent with the DelayMins property


Error: ORA-16501: the Data Guard broker operation failed



DGMGRL> DGMGRL> show configuration 'starprim'
Error: ORA-16606: unable to find property "starprim"

Error: ORA-16501: the Data Guard broker operation failed

Solution:

DGMGRL> disable configuration
Disabled.
DGMGRL> enable configuration
Enabled.



DGMGRL> DGMGRL>
Configuration
Name: DRS
Enabled: YES
Protection Mode: MaxPerformance
Fast-Start Failover: DISABLED
Databases:
starprim - Primary database
starstby - Physical standby database

Current status for "DRS":
SUCCESS

Saturday, July 2, 2011

libXp.so.6: cannot open shared object file: No such file or directory occurred

Exception java.lang.UnsatisfiedLinkError: /tmp/OraInstall2008-01-07_04-37-54AM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory occurred..
java.lang.UnsatisfiedLinkError: /tmp/OraInstall2008-01-07_04-37-54AM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)


libXp.so.6: cannot open shared object file: No such file or directory

Check whether libXp package is installed or not

Solution:

rpm -q libXp
If it is not the install it.