Posts

Showing posts from November, 2008

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

R12 install and post install Issues in 64 Bit Solaris

Recently, I installed R12 on Sun SPARC Solaris 64 Bit and I faced a few issues that I have listed below. Issue 1 Installation errors with the below error in .log. Statusstring Configuring Database .. Log file located at ../ApplyDatabase_ .log .. RC-50004: Fatal: Error occurred in ApplyDatabase: Control file creation failed Cannot execute configure of database using RapidClone RW-50010: Error: - script has returned an error: 1 RW-50004: Error code received when running external process. Error in ApplyDatabase_ .log WARNING: Default Temporary Tablespace not specified in CREATE DATABASE command Default Temporary Tablespace will be necessary for a locally managed database in future release Mon Nov 17 01:05:46 2008 Errors in file /opt/apps/Release12/db/tech_st/10.2.0/admin/R12VIS_suomt06k/udump/r12vis_ora_3206.trc: ORA-01565: error in identifying file '/opt/apps/Release12/db/apps_st/data/sys5.dbf' ORA-27037: unable to obtain file status SVR4 Error: 25: Inappr...

Check JDBC Connection String using java

Sometimes, I have faced a situation wherein the tnsping to the database is working but the JDBC connection fails. So, in order to check the JDBC connection string, one has to use a java program, which unfortunately isn't my forte. Thankfully, my friend, Padmaraj, who is a SME on java gave me a small piece of code which works wonderfully well. Note : Save the below java program as ReadCharacter.java, else the program won't work. // Program to check the JDBC Connection string. import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; public class ReadCharacter { public static void main(String[] args) { Connection dbConnection; Statement stmt; String sqlStmt; // For Oracle 9.2 String thin = "jdbc:oracle:thin:@[db_host]:[db_port]:[oracle_sid]"; String name = "[username]"; String pass = "[...

Popular posts from this blog