Posts

Showing posts from 2015

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

Oracle 12c Container views - CDB_ Views

Today, I did get an opportunity to research on Containers and pluggable databases - the "single instance, multiple databases" concept that's one of the new features of Oracle 12c. I was really curious to know where the container view data comes from, in other words, where does the data for the CDB_ views come from? Well, this is what I found: It is actually coming from a function: SQL> select name,user,cdb from v$database; NAME USER CDB --------- ------------------------------ --- MY12CDB SYS YES 1 row selected. SQL> select dbms_metadata.get_ddl ('VIEW','CDB_OBJECTS') from dual; DBMS_METADATA.GET_DDL('VIEW','CDB_OBJECTS') -------------------------------------------------------------------------------- CREATE OR REPLACE FORCE NONEDITIONABLE VIEW "SYS"."CDB_OB JECTS" CONTAINER_DATA ("OWNER", "OBJECT_NAME", "SUBO...

Is my server physical or virtual?

Am I real or virtual? That is the question! That's the realm of philosophy and adhyatma . When and if I put this question to my server, it becomes technical and here's the answer. On Linux # dmidecode | more or dmidecode -s system-manufacturer Sample Output # dmidecode | more # dmidecode 2.9 SMBIOS 2.4 present. 364 structures occupying 17030 bytes. Table at 0x000E0010. Handle 0x0000, DMI type 0, 24 bytes BIOS Information         Vendor: Phoenix Technologies LTD         Version: 6.00         Release Date: 04/14/2014         Address: 0xEA050         Runtime Size: 90032 bytes         ROM Size: 64 kB         Characteristics:                 ISA is supported                 PCI is supported               ...

Set Hugepages for Oracle 11gR2 database

1. Execute the shell script provided in Note ID: 401749.1 to find out the ideal setting for the parameter vm.nr_hugepages, set it in /etc/sysctl.conf and reboot VM/Server. Script from Note 401749.1 -bash-3.2$ cat huge_pages_calc.sh #!/bin/bash # # hugepages_settings.sh # # Linux bash script to compute values for the # recommended HugePages/HugeTLB configuration # # Note: This script does calculation for all shared memory # segments available when the script is run, no matter it # is an Oracle RDBMS shared memory segment or not. # # This script is provided by Doc ID 401749.1 from My Oracle Support # http://support.oracle.com # Welcome text echo " This script is provided by Doc ID 401749.1 from My Oracle Support (http://support.oracle.com) where it is intended to compute values for the recommended HugePages/HugeTLB configuration for the current shared memory segments. Before proceeding with the execution please note following:  * F...

Popular posts from this blog

Interesting Oracle Applications (EBS) Interview Questions

Modify retention period of workflow queues

Check if UTL_FILE and FND_FILE are working fine