Skip to main content

Posts

Showing posts from July, 2012

How to get Oracle Error Statements

Hi, The best way to track the oracle errors is throug it's ORACLE Error log files. However, we do have one more manual mechanism to track all those ERROR Messages in Database using "SERVERERROR" DDL Triggers. Please find the below steps to achieve this. Step 1 ====== SQL> GRANT ADMINISTER DATABASE TRIGGER TO <USERNAME>; Step 2 ====== create table oraerror ( id NUMBER, log_date DATE, log_usr VARCHAR2(30), terminal VARCHAR2(50), err_nr NUMBER(10), err_msg VARCHAR2(4000), stmt VARCHAR2(4000) ); Step 3 ====== create sequence oraerror_seq start with 1 increment by 1 minvalue 1 nomaxvalue nocache nocycle; Step 4 ====== CREATE OR REPLACE TRIGGER after_error  AFTER SERVERERROR ON DATABASE  DECLARE  pragma autonomous_transaction;  id NUMBER;  sql_text ORA_NAME_LIST_T;  v_stmt VARCHAR2(4000);  n NUMBER; BEGIN  SELECT oraerror_seq.nextval INTO id FROM dual;  n := ora_sql_txt(sql_text);  IF n ...

Dblink From PostgresPlus To Oracle

Hi, Dblink_Ora_* functions are useful for getting oracle connection into PostgresPlus Advanced Server. i.e, we can retrive oracle data from postgresplus. Please find the steps how to proceed. Step 1 ====== For doing dblink_ora* setup, we need a OCI(Oralce Client Interface which is nothing but libpq in Postgresql)file. If you have oracle 11*, then no need to download this file from any where. if not, we need to donwload this file from oracle site. Filename Required is : "libclntsh.so" in Linux       "OCI.DLL" in Windows In Oracle 11g, you will get this directly from $ORACLE_HOME/lib. In this example, we have created a symlink for this from "/lib64" to "$ORCLE_HOME/lib". ln -s /home/oracle/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so /lib64/libclntsh.so Step 2 ====== [root@localhost PGBAR]# chmod -R 766 /home/oracle/ Because, we are accessing this "libclntsh.so" as a enterprisedb user. Hence, we have given ...

Radius Server Configuration In PostgreSQL

Hi All, After some time spent on PostgreSQL Radius Configuration, I came up with the following steps to configure PostgreSQL with Radius authentication Configuration. Please correct me, if any where i'm wrong.  Step 1 ===== We have Downloaded radius server from below link and installed it in local machine. http://freeradius.org/download.html Step2 ===== radiusd.conf ------------------ prefix = /usr/local exec_prefix = ${prefix} sysconfdir = ${prefix}/etc localstatedir = ${prefix}/var sbindir = ${exec_prefix}/sbin logdir = ${localstatedir}/log/radius raddbdir = ${sysconfdir}/raddb radacctdir = ${logdir}/radacct name = radiusd confdir = ${raddbdir} run_dir = ${localstatedir}/run/${name} db_dir = ${raddbdir} libdir = ${exec_prefix}/lib pidfile = ${run_dir}/${name}.pid max_request_time = 30 cleanup_delay = 5 max_requests = 1024 listen { type = auth ipaddr = * port = 1999  } listen { ipaddr = * port...