Saturday, December 22, 2012

./ggsci: error while loading shared libraries: libnnz10.so: cannot open shared object file: No such file or directory

Yes; this is when you bring up the oracle golden gate console.

Ensure the right oracle home is installed for the Golden Gate version installed.

In this case the golden gate program tries to use libnnz10 that is part of your 10g oracle home.Set manually the $LD_LIBRARY_PATH or set $ORACLE_HOME to point to a 11g oracle home.

libnnz11 > when you using 11g golden gate media.

and libnnz10 > when you are using 10 GG media.

Most importantly make sure your your variable are set right.

Hope it helps.
#################################################################################


Saturday, October 8, 2011

ORA-24247: network access denied by access control list (ACL)

Notes : Something new on 11g ..

Oracle allows access to external network services using several PL/SQL APIs (UTL_TCP, UTL_SMTP, UTL_MAIL, UTL_HTTP and UTL_INADDR), all of which are implemented using the TCP protocol. In previous versions of the database, access to external services was effectively an on/off switch based on whether a user was granted execute permissions on a specific package or not. Oracle 11g introduces fine grained access to network services using access control lists (ACL) in the XML DB repository, allowing control over which users access which network resources, regardless of package grants.

##### Run below PROC to setup ACL (run by sys)#############################

create or replace procedure acl_setup(
aacl varchar2,
acomment varchar2,
aprincipal varchar2,
aisgrant boolean,
aprivilege varchar2,
aserver varchar2,
aport number)
is
begin
begin
DBMS_NETWORK_ACL_ADMIN.DROP_ACL(aacl);
dbms_output.put_line('ACL dropped.....');
exception
when others then
dbms_output.put_line('Error dropping ACL: '||aacl);
dbms_output.put_line(sqlerrm);
end;
begin
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(aacl,acomment,aprincipal,aisgrant,aprivilege);
dbms_output.put_line('ACL created.....');
exception
when others then
dbms_output.put_line('Error creating ACL: '||aacl);
dbms_output.put_line(sqlerrm);
end;
begin
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(aacl,aserver,aport);
dbms_output.put_line('ACL assigned.....');
exception
when others then
dbut.put_line('Error assigning ACL: '||aacl);
dbms_output.put_line(sqlerrm);
end;
commit;
dbms_output.put_line('ACL commited.....');
end;
/
show errors
Procedure created.

####Call Procedure to create new ACL (run by sys)#############################

begin
acl_setup(
'acl_for_apple.xml',
'ACL for apple',
'APPLE',
TRUE,
'connect',
'appleskeepsdocaway.fruits.com',
7777);
end;
/

Where :

acl - The name of the access control list XML file, generated relative to the "/sys/acls" directory in the XML DB Repository.
description - A description of the ACL.
principal - The first user account or role being granted or denied permissions. The text is case sensitive.
is_grant - TRUE to grant, FALSE to deny the privilege.
privilege - Use 'connect' for UTL_TCP, UTL_SMTP, UTL_MAIL and UTL_HTTP access. Use 'resolve' for UTL_INADDR name/IP resolution. The text is case sensitive.
hostname - hostname where links refers to.
Port - port to where destination listens to.

#####PROC to assign new hostname to be run by sys ################
#####Single ACL can access to many hosts #######

BEGIN
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('acl_for_apple.xml', 'havemorefruits.fruits.com',7777);
END;
/
COMMIT;


##################################################################################

Thursday, May 5, 2011

ksukia: Attempt to re-kill process OS PID during shutdown immediate

Many have reported this as a bug.
Issue :

Shutdown immediate goes into a wait trying to kill a defunct process.
You should see somthing like this in the alert log.

*** 2011-05-05 04:56:10.282
ksukia: Starting kill, force = 0
ksukia: Attempt 215 to re-kill process OS PID=7135.
ksukia: killed 1 out of 1 processes.
.
.
where PID=7135 is the defunct process.
ps -ef| grep 7135
oraware 7135 7134 0 - ? 0:00
oraware 9921 7878 0 05:25:48 pts/33 0:00 grep 7135
==========================================================================
Resolution

1. Simply exist from the current session ie shutdown immediate.
2. make sure no session on the database (have application down if required).
3. Initiate shutdown immediate again.
4. Should work..!

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

Sunday, March 20, 2011

ORA-48141: error creating directory during ADR initialization

You probably have it during the startup phase of your database.

Make sure you check or set on the following points :

$ export ORACLE_HOME
$ export PATH
$ export ORACLE_SID

And the entries in the pfile (In my case left a blank line :)

Failed to verify status

Do you have the below error when you setup ORACLE_HOME :

Failed to verify status of /u01/app/oracle/product/11.1.0/inventory/ContentsXML/oraclehomeproperties.xml.

Example-
$ . oraenv
ORACLE_SID = [WMSDEV] ? TEST11
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.1.0 is Failed to verify status of /u01/app/oracle/product/11.1.0/inventory/ContentsXML/oraclehomeproperties.xml. Error returned is 13
Unable to change directory to /u01/app/oracle/product/11.1.0/inventory/ContentsXML/ location. The error returned is 13

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

Provide 777 Privs to the file oraclehomeproperties.xml at /u01/app/oracle/product/11.1.0/inventory/ContentsXML

If that still doesnt work provide 777 recursive privs (chmod -R 777 inventory)to the inventory folder.
Should'nt bug you the next time ..!

Saturday, March 12, 2011

ORA-24324: service handle not initialized

So heres a Bug:

$ sqlplus "/ as sysdba"

SQL*Plus: Release 11.1.0.7.0 - Production on Thu Mar 10 09:19:17 2011

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

Connected.

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

Above is what i had even after i killed the pmon process.

Ideally it should have conected as an Idle Instance.

Anything you try to do further would have the following errors:

$ sqlplus "/ as sysdba"

SQL*Plus: Release 11.1.0.7.0 - Production on Thu Mar 10 09:19:17 2011

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

Connected.
SQL> shutdown abort;
ORA-03113: end-of-file on communication channel
SQL> startup mount;
ORA-24324: service handle not initialized
ORA-01041: internal error. hostdef extension doesn't exist

SQL> startup;
ORA-24324: service handle not initialized
ORA-01041: internal error. hostdef extension doesn't exist

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

However Oracle suggests to raise a tar for this.

I tried a simpler way -

Kill -9 all ps -ef | grep ora procs.

OR A server bounce would help too.

NOW try to reconnect.....

$ sqlplus / as sysdba

SQL*Plus: Release 11.1.0.7.0 - Production on Fri Mar 11 09:30:54 2011

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

Connected to an idle instance.
Worked well enough...!

Saturday, March 5, 2011

./rda.sh -T hcve

A remote diagnostic agent (RDA) always helps for a precheck to any oracle installation.

Below is a sample output:

$ ./rda.sh -T hcve
Processing HCVE tests ...
Available Pre-Installation Rule Sets:
1. Oracle Database 10g R1 (10.1.0) Preinstall (Solaris)
2. Oracle Database 10g R2 (10.2.0) Preinstall (Solaris)
3. Oracle Database 11g R1 (11.1.0) Preinstall (Solaris)
4. Oracle Database 11g R2 (11.2.0) Preinstall (Solaris)
5. Oracle Application Server 10g (9.0.4) Preinstall (Solaris)
6. Oracle Application Server 10g R2 (10.1.2) Preinstall (Solaris-sparc)
7. Oracle Application Server 10g R2 (10.1.2) Preinstall (Solaris-x86)
8. Oracle Fusion Middleware 11g R1 (11.1.1) Preinstall (Solaris)
9. Oracle Portal Preinstall (Generic)
10. Oracle Identity Management 10g (10.1.4) Preinstall (Solaris)
11. Oracle E-Business Suite Release 11i (11.5.10) Preinstall (Solaris)
12. Oracle E-Business Suite Release 12 (12.1.1) Preinstall (Solaris)
Available Post-Installation Rule Sets:
13. Oracle Portal Postinstall (generic)
14. Data Guard Postinstall (Generic)
Enter the HCVE rule set number
Hit 'Return' to accept the default (1)
> 3

Enter value for < Planned ORACLE_HOME location >
Hit 'Return' to accept the default (/u01/app/oracle/product)
>

Enter value for < JDK Home >
> /usr/jdk/jdk1.5.0_22


Test "Oracle Database 11g R1 (11.1.0) Preinstall (Solaris)" executed at 26-Feb-2011 19:31:41

Test Results
~~~~~~~~~~~~

ID NAME RESULT VALUE
====== ==================== ======= ==========================================
A00010 OS Certified? PASSED Certified with 11gR1 RDBMS
A00020 User in /etc/passwd? PASSED userOK
A00040 Group in /etc/group? PASSED GroupOK
A00050 Enter ORACLE_HOME RECORD /u01/app/oracle/product
A00060 ORACLE_HOME Valid? PASSED OHexists
A00070 O_H Permissions OK? PASSED CorrectPerms
A00080 oraInventory Permiss PASSED oraInventoryNotFound
A00090 Got ld,nm,ar,make? PASSED ld_nm_ar_make_Found
A00100 Umask Set to 022? PASSED UmaskOK
A00110 ulimits OK? PASSED ulimitOK
A00140 LDLIBRARYPATH Unset? FAILED IsSet
A00150 LDLIBRARYPATH64 Unse PASSED UnSet
A00190 Enter JDK Home RECORD /usr/jdk/jdk1.5.0_22
A00200 JDK Version PASSED Adequate
A00210 Other O_Hs in PATH? PASSED NoneFound
A00220 Other OUI Up? PASSED NoOtherOUI
A00230 /tmp Adequate? PASSED TempSpaceOK
A00240 Disk Space OK? PASSED DiskSpaceOK
A00250 Swap (in MB) RECORD 97588.0078125
A00260 RAM (in MB) PASSED 131072
A00270 SwapToRAM OK? FAILED SwapLessThanRAM
A00290 IP Address RECORD 143.222.222.102
A00300 Domain Name RECORD cummins.com
A00310 DNS Lookup PASSED Host correctly registered in DNS
A00320 /etc/hosts Format FAILED Missing host.domain
A00330 Kernel Parameters OK FAILED NOEXEC_USER_STACKUndef

A00370 Kernel Level OK? PASSED adequate
A00410 Got OS Patches? PASSED adequate
A00430 Got OS Packages? PASSED All required OS packages are installed
A00580 Cluster Information PASSED TestCompleted
Result file: /u01/app/oracle/product/rda/output/RDA_HCVE_A200DB11R1_sol_res.html

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

Always make sure to have all checks passed,with some execptions.

NOEXEC_USER_STACKUndef Failed => is ok to go with as the parapetr is depcreted since Solaris 9.

SwapLessThanRAM Failed => As long as you have sufficient Swap space and Ram (as per oracle installation doc) its fine.

LDLIBRARYPATH => Its fine to have LDLIBRARYPATH unset to any value.

/etc/hosts Format => Not too sure why this failed. I however neglected this precheck , but made sure the /etc/hosts file had the correct entries in the right format.

example:
127.0.0.1 localhost
123.456.789.101 hostname.domainname hostname