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...

Build a Reporting Database using standby and flashback

It's been a long time since I posted something. So, here's something worthwhile. Thanks to my colleague Kevin who devised this method! Requirement A reporting database to be refreshed daily from the UAT instance. The reporting database should be available during the daytime and the refresh can happen during the night. Solution 1. Initially, build the reporting database as a standby database. 2. Once the Managed Recovery process (MRP) is initiated and the standby is in sync with the primary database, cancel the MRP. SQL> alter database recover managed standby database cancel; 3. Enable flashback in the standby database. Note that the DB should be in mount state for this. SQL> startup mount force; SQL> alter database flashback on; 4. create guaranteed restore point. SQL> drop restore point before_open; SQL> create restore point before_open guarantee flashback database; 5. Activate the standby database. SQL> alter database activate standby database; SQL> start...

WGET Syntax for downloading patches from Metalink

I am sure everyone knows this but just to emphasise the point (and ease the pain somewhat), Classic MetaLink Retires November 6, 2009 . Extract of the text of email from Oracle Support: During the weekend of November 6 – 8, 2009, My Oracle Support, Oracle's next-generation customer support platform, will be upgraded and Classic MetaLink will be retired. Moreover (and this is the most painful part especially for Apps DBAs), the ftp to the patch site will also retire on 06-Nov-2009. :( Below is the extract of the message displayed on updates.oracle.com ftp site: 230- This service will be retired on November 06, 2009 and "My Oracle Support" 230- will be the only interface for downloading the patches and updates. To 230- search and download patches from "My Oracle Support" users are required 230- to login to https://metalink.oracle.com and then go to "Patches & Updates" 230- tab. Though I do NOT like it, I suppose I have to force myself to use wg...

Find Request Set Name, Conc Manager given a request ID

Given a request id, how does one find out the program name and the manager running the request? Most of the Metalink notes and blogs provide the answer to this question but for one aspect. What is that? Read on to find out. What the SQL queries available on the web and Metalink lack is that they provide the concurrent program name for a single request given the request id. What about for a request set? Do they provide the answer? No, they don't. I have tried here to cover this aspect too. So, here goes. Note : This query works for all request ids, not only for request ids for request sets. select request_id,fcpv.CONCURRENT_PROGRAM_NAME "PROGRAM_NAME", nvl (fcr.description,fcpv.user_concurrent_program_name) "USER_PROGRAM_NAME", decode(fcpv.REQUEST_SET_FLAG,'N','SINGLE_REQUEST','Y','REQUEST_SET') "PROGRAM_TYPE", fcqv.CONCURRENT_QUEUE_NAME, fcqv.USER_CONCURRENT_QUEUE_NAME from fnd_concurrent_requests fcr, fnd_concurrent_p...

Print UNIX pipe character ("|") in Blogger

In order to get the UNIX pipe character ("|") printed in blogger, do the following: Always use the "Edit Html" tab for posts containing the pipe character and NOT the Compose tab. The ASCII value for the pipe character is "& # 124 ;" (I am delibrately using whitespace in betwen the ASCII value. Please remove them before using). Thanks for Greg Houston's blog and this thread for pointing me in the right direction.

Get R12 Login URL from Command Prompt

A quick question before getting started with today's subject. How does one retrieve the url of an instance? Suppose you were asked to work (or login to the front end) on an instance of which you know only the server names, how do you find the login URL? There are 2 methods (of course, there might be more but I've listed the ones that I use the most) to retrieve the login URL information: 1. Login to sqlplus as apps and query the table icx_parameters for the home_url. 2. Better still and much faster than the above method would be to issue the below command. The output would be nothing but the value for the env variable FORMS60_MAPPING. $ env | grep http I prefer the 2nd method over the 1st. Anyway, to my surprise and dismay, I found out that R12 does NOT set the above env variable. So, the quick recourse to getting the login URL is ruled out or is it? I have written a shell script to get/set the env variable. You can access it here . Let me know if you notice any errors or have ...

Find the number of CPUs and RAM size in UNIX

I have tried to collate commands to find the number of CPUs and total physical memory (RAM) size in all common flavours of UNIX in one blog entry. This certainly is not an exhaustive list and will be modified as and when I find new commands. You are also more than welcome to add to this list. Number of CPUs Sun SPARC Solaris 1. prtconf | grep cpu | wc -l 2. psrinfo | wc -l 3. psrinfo -v | grep "Status of" | wc -l 4. psrinfo -vp 5. prtdiag | grep "on-line" | wc -l 6. mpstat | grep -vi cpu | wc -l Linux 1. grep "processor"/proc/cpuinfo | wc -l HP-UX 1. ioscan -kfnC processor | grep "processor" | wc -l 2. sar -M 1 | awk 'END {print NR-5}' 3. sar -Mu 1 1 | awk 'END {print NR-5}' 4. ioscan -kf | grep -c processor 5. cat /var/adm/syslog/syslog.log | grep processor | grep "vmunix" | wc -l AIX 1. lscfg -vp | grep proc | wc -l 2. lparstat -i | grep "Online Virtual CPUs" | cut -d ':' -f2 ...

Choose Connection Not Visible in Discoverer 10g after install

Image
Issue “Choose Connection” is NOT seen in Discoverer Plus and Discoverer Viewer screen after installation. Symptom Installed Discoverer 10g as an OracleBI standalone installation (i.e., without associating with an OracleAS infrastructure). Associated the standalone Discoverer to Oracle Apps Database. Users are unable to see Choose Connection in the Discoverer Plus and Viewer login screen. Cause Discoverer has not been associated with an infrastructure. This happens when Discoverer 10g is installed as a Standalone without associating it with an OracleAS infrastructure. Quoting from the documentation: “An OracleBI standalone installation is not associated with an OracleAS Infrastructure, and therefore has a limited number of components available. .. .. If Discoverer is not associated with an OracleAS Infrastructure, Discoverer connections are not available to end users. For more information about associating Discoverer with an Oracle Infrastructure install, see Chapter 2, "About Orac...

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