Posts

Redis user permissions (ACL) and python connection

 Recently, I was working on setting up a redis cluster along with separate users for readwrite and readonly. I setup the readonly user using the below privileges (ACLs):   user redisreadonly on >mySuperSecretPassword ~* resetchannels -@all +@read +ping +asking   Once this is setup, I wrote a simple program in python to connect to the redis cluster using the readonly credentials and print the number of keys.   #!/usr/bin/env python3 """ pip3 install redis """ from redis.cluster import RedisCluster, ClusterNode # ─────── Cluster connection ─────── startup_nodes = [ ClusterNode("redis_host_1", 6379), ClusterNode("redis_host_2", 6379), ClusterNode("redis_host_3", 6379) ] rc = RedisCluster(startup_nodes=startup_nodes,decode_responses=True,username='redisreadonly',password='mySuperSecretPassw...

Find Tablespace Usage Percent

I have written a sql query which would output the usage percent of all the tablespaces in a given database. Although lots of tablespace usage queries are available, most of them, if not all, utilise dba_free_space view as the tool of measurement. It is well known that this view is inadequate when datafiles have autoextend feature turned on. I have tried to address this inadequacy in my query. Caveat : This query is not optimised for performance. Hence, you might observe slow performance. set linesize 100 set pagesize 10000 set feedback off verify off col tablespace_name format a18 col num_files format 999 col total_space format 9999999.99 col free_space format 9999999.99 col used_percent format 999.99 select /*+ parallel(tbs) */ tbs.tablespace_name, count(tbs.file_id) num_files, round(sum(TOTAL_SPACE),2) TOTAL_SPACE_MB, sum(FREE_SPACE) FREE_SPACE_MB, round(((sum(tbs.USED_SPACE)/sum(tbs.TOTAL_SPACE)) * 100),2) USED_PERCENT from (select ddf.file_id file_id, ddf.file_name, ddf.tablespace...

EXCEPTION_ACCESS_VIOLATION in Jinitiator and IE crashes

The Environment Apps Version : 11.5.10.2 Jinitiator Version : 1.3.1.26 Internet Explorer Version : 6 The Issue One of our end users was receiving a very strange error while using jinitiator. The Internet explorer window would crash (close by itself) after creating a file HS_ERR_PID .log on the desktop, where #### stands for the Process ID of the f60webmx session. This error is intermittent and not easily reproducible. Moreover, the user would have to redo his/her work and hence this issue was turning out to be very vexing indeed. The error log is as below: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D043D1AFunction name=Java_sun_java2d_loops_DefaultComponent_IntIsomorphicCopy Library=C:\Program Files\Oracle\JInitiator 1.3.1.26\bin\awt.dll Current Java thread: at sun.java2d.loops.DefaultComponent.IntIsomorphicCopy(Native Method) at sun.java2d.loops.IntRgbToIntRgb.OpaqueBlit(Unknown Source) at ...

java.lang.ExceptionInInitializerError while trying to Access login page

Today morning, we (the DBAs) were faced with a strange issue. On Saturday (the 14th of February - (St.) Valentine's day!!), the UNIX boxes hosting our critical test instance went down for scheduled maintenance without any prior information. So, we could not bring down our databases and applications. As soon as the unix box came up, we encountered this issue. Let me briefly describe the environment, the issue, the analysis performed and of course, the solution to this most vexing problem. Environment : Apps Version : 11.5.10.2 with ATG RUP 5 DB Version : 10.2.0.3 Architecture : Two Node instance with database + admin on one tier and web server on another. PS : Another instance (development) exists on the same server with the same configuration, which was working fine. Issue : When trying to access the login page of Oracle Apps, received the below error. Even OAM login page was throwing the same error. Request URI: /OA_HTML/AppsLocalLogin.jsp Exception: java.lang.ExceptionInIniti...

Flower brackets {} and variables in UNIX - A perfect match

When passing a variable in unix, the general convention is to use $variable . Although this does suffice in most cases but in some rare cases, it gives connotations totally different than what was originally intended, as shown in the below example. The requirement Copy all files ending with ver to ver_old. For example, suppose I have a file called formver, I would like to copy it to formver_old. The code below is the code that I wrote to achieve the above requirement. for i in `ls *ver` do cp -p $i $i_old done The pitfall A cursory glance at the code indicates that it should run smoothly like a river. But it doent' and herein lies the catch. Let's have a look at the error and figure out what exactly is wrong with the above code. __________________________________________________________________ $ for i in `ls *ver` > do > cp -p $i $i_old > done cp: Insufficient arguments (1) Usage: cp [-f] [-i] [-p] [-@] f1 f2 cp [-f] [-i] [-p] [-@] f1 ... fn d1 cp -r-R [-H-L-P] [-f] [...

11.5.9 & JDK 5 - Mutually exclusive

Apps Configuration Oracle Apps Version ==> 11.5.9 Node Type ==> Multi-node RAC ==> No OS & version ==> Sun SPARC Solaris (64-Bit) 10 (5.10) Issue Recently (last week, to be precise), I was researching an "Internal Server error" while opening Installed Base. The error log had error "client denied by server configuration" (not very helpful, I would say). The mod_jserv.log was much more informative and in fact, quite specific. Refer the note marked in red below. __________________________________________________________________ [28/01/2009 06:39:44:223] (ERROR) ajp12: Servlet Error: OracleJSP: oracle.jsp.provider.JspCompileException: <H3>Errors compiling$COMMON_TOP/_pages/_oa__html//_csiSwitchRespMain.java< /H3><TABLE BORDER=1 WIDTH=100%><TR><TH ALIGN=CENTER>Line #</TH><TH ALIGN=CENTER>Error</TH></TR><TR><TD WIDTH=7% VALIGN=TOP><P ALIGN=CENTER>990</TD><TD> as of release ...

Find OS Kernel Bit in UNIX - Ready reckoner

Listed below is the ready reckoner for finding out the kernel bit information for Linux, Solaris, HP-UX and IBM AIX, which are the most commonly used OS for Oracle Apps. Linux getconf LONG_BIT or uname -m (works for x86-64 bit servers. Not tested it in 32 bit servers) eg: $ getconf LONG_BIT 64 $ uname -m x86_64 $ Sun SPARC Solaris isainfo -kv eg: $ isainfo -kv 64-bit sparcv9 kernel modules $ HP-UX getconf KERNEL_BITS eg: $ getconf KERNEL_BITS 64 $ IBM AIX bootinfo -K Not tested as I currently do not have any AIX servers to test on! Note 1 : To find whether a given executable is 32-bit or 64-bit, use the command file <executable_name> eg: $ file oracle oracle: ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, not stripped $ file tnslsnr tnslsnr: ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, not stripped $ file sqlplus sqlplus: ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, not stripped Note 2 : You can install a 32-bit executab...

The curious case of database crash and ORA_NLS10

Case Facts : Database Version ==> 10.2.0.3.0 Oracle Apps Version ==> 11.5.10.2 Node Type ==> Multi-node RAC ==> No OS & version ==> Sun SPARC Solaris (64-Bit) 10 (5.10) Symptom ==> Database crashes with ORA-07445 Case Description : While trying to bring up an Oracle Apps instance, I found that the database was crashing with ORA-07445 errors (as below) as soon as I brought up the concurrent managers. _____________________________________________________________ Mon Feb 2 00:26:24 2009 Errors in file $ORACLE_HOME/admin/[CONTEXT_NAME]/udump/cpek_ora_6085.trc: ORA-07445: exception encountered: core dump [lfilic()+328] [SIGSEGV] [Address not mapped to object] [0x000000040] [] [] ORA-29282: invalid file ID Mon Feb 2 00:26:27 2009 Errors in file $ORACLE_HOME/admin/[CONTEXT_NAME]/udump/cpek_ora_5512.trc: ORA-07445: exception encountered: core dump [lfilic()+328] [SIGSEGV] [Address not mapped to object] [0x000000040] [] [] Mon Feb 2 00:26:34 2009 Errors in file $ORACLE_HOM...

Popular posts from this blog

EXCEPTION_ACCESS_VIOLATION in Jinitiator and IE crashes

Version of mod_security with EBS 11.5.10.2

Read a file and extract specific lines using Native Ansible Modules