Friday, November 11, 2011

Oracle Silent Installation...

./runInstaller -silent -ignorePrereq \
-responseFile /ora/Disk1/response/enterprise.rsp \
ORACLE_HOME=/u01/app/oracle/product/9.2.0 \
ORACLE_HOME_NAME=ORADB9i_Home1 \
n_configurationOption=3

version GLIBC_2.0 not defined in file libc.so.6 with link time reference (libzip.so)

DBCA error on 9i oracle RHEL 4....

Error:

[oracle@test1 bin]$ dbca
/u01/app/oracle/jre/1.1.8/bin/../lib/i686/green_threads/libzip.so: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference (libzip.so)
Unable to initialize threads: cannot find class java/lang/Thread
Could not create Java VM
[oracle@test1 bin]$

Solution:

[oracle@test1 bin]$ LD_ASSUME_KERNEL=2.2.5
[oracle@test1 bin]$ export LD_ASSUME_KERNEL
[oracle@test1 bin]$ dbca

Saturday, November 5, 2011

How to drop/create Database Link from another schema?

SQL> CREATE or replace PROCEDURE scott.create_db_link AS
BEGIN
EXECUTE IMMEDIATE 'create database link LINK1 connect to scott identified by tiger using ''testdb''';
END create_db_link;
2 3 4 5
6 /

Procedure created.

SQL> show user
USER is "SYS"
SQL> exec scott.create_db_link

PL/SQL procedure successfully completed.

SQL> select * from dba_db_links where OWNER='SCOTT';

OWNER DB_LINK USERNAME HOST CREATED
------------------------------ -------------------- ------------------------------ -------------------- ---------
SCOTT LINK1 SCOTT testdb 04-NOV-11

SQL> drop database link scott.LINK1;
drop database link scott.LINK1
*
ERROR at line 1:
ORA-02024: database link not found


SQL> CREATE PROCEDURE scott.drop_db_link AS
BEGIN
EXECUTE IMMEDIATE 'drop database link LINK1';
END drop_db_link; 2 3 4
5 /

Procedure created.

SQL> exec scott.drop_db_link

PL/SQL procedure successfully completed.

SQL> select * from dba_db_links where OWNER='SCOTT';

no rows selected

SQL>