informationagenation.wordpress.com

A reference journal on interesting IT topics

Archive for the ‘S C R I P T S’ Category

Mixing emacs with vi syntax (with viper) and enabling emacs backup files version control

leave a comment »

Here, just in case you don’t use VMS, versioning:

versions

versions

Minimal changes:

-download viper:

http://repo.or.cz/w/emacs.git/blob_plain/HEAD:/lisp/emulation/viper.el

-modify .emacs add:

;; version control
(setq version-control "t")

;; viper mode
(setq viper-mode t)
(require 'viper)

Have fun. 😉

Written by dibi58

December 7, 2014 at 7:02 pm

Quick settings, Oracle 11.1 db, kernel parameters and other, for Solaris 11 and OI 11 x86-64

leave a comment »

WARNING, USE AT YOUR OWN RISK !

groupadd dba
groupadd oinstall
groupadd asmdba
groupadd asmadmin
echo "oracle localhost:/export/home/&" >> /etc/auto_home
useradd -g oinstall -G dba,asmdba,asmadmin -m -d /home/oracle -s /bin/bash oracle
passwd oracle
projadd -U oracle -K "project.max-shm-memory=(priv,5g,deny)" user.oracle
projmod -sK "project.max-sem-nsems=(priv,512,deny)" user.oracle
projmod -sK "project.max-sem-ids=(priv,128,deny)" user.oracle
projmod -sK "project.max-shm-ids=(priv,128,deny)" user.oracle
ipadm set-prop -p smallest_anon_port=9000 tcp
ipadm set-prop -p largest_anon_port=65500 tcp
ipadm set-prop -p smallest_anon_port=9000 udp
ipadm set-prop -p largest_anon_port=65500 udp
ipadm show-prop|grep anon|egrep 'tcp|udp'
echo "set maxuprc=16384" >> /etc/system
echo "set max_nprocs=30000" >> /etc/system
echo "set shmsys:shminfo_shmmax=4294967295" >> /etc/system
pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms SUNWpool SUNWpoolr SUNWsprot SUNWtoo SUNWuiu8 SUNWfont-xorg-core SUNWfont-xorg-iso8859-1 SUNWmfrun SUNWxorg-client-programs SUNWxorg-clientlibs SUNWxwfsw SUNWxwplt
pkg install compatibility/packages/SUNWxwplt SUNWmfrun SUNWarc SUNWhea SUNWlibm

You may have to review MEMORY_TARGET, on the Oracle Solaris install it was not needed, the installer picked it up and set it to proper values, but on the OI install I had a too low MEMORY_MAX_TARGET , would make the machine responding very slow, I had to raise that one, 75% of physical RAM is safe, with a swap of 150% of RAM.

Written by dibi58

June 15, 2013 at 7:50 am

VMS configuration on Simh VAX

leave a comment »

; firmware
load -r ka655.bin
;
; nvram
attach nvr nvram.bin
;
; ram
set cpu 64m
;
; drives
set rq0 ra92
set rq1 ra92
set rq2 ra92
set rq3 cdrom
attach rq0 ../../vms73/d0.dsk
attach rq1 ../../vms73/d1.dsk
attach rq2 ../../vms73/d2.dsk
attach -r rq3 ../../vms73/vms73.iso
set rl disable
set ts disable
;
; ethernet
set xq mac=00-ff-0f-e2-34-00
attach xq eth0
;
; boot
boot cpu

Written by dibi58

July 21, 2011 at 9:28 am

BSD configuration on Simh VAX

leave a comment »

; firmware
load -r ka655x.bin
;
; nvram
attach nvr nvram.bin
;
; cpu and ram
set cpu 64m
;
; disks
set rq0 ra90
set rq1 ra90
set rq2 cdrom
set rq3 disable
attach rq0 ../bs0.dsk
attach rq1 ../bs1.dsk
attach rq2 ../vaxcd-5.0.1.iso
set rl disable
set ts disable
;
; ethernet
set xq mac=00-02-A5-22-56-8A
attach xq eth0
;
; boot
boot cpu

Written by dibi58

July 21, 2011 at 9:16 am

Oracle 11 install on SuSE 11.4 x64

leave a comment »

DISCLAIMER, TRY AT YOUR OWN RISK ! GENERIC CONFIGURATION

ORACLE 11 IS NOT CERTIFIED FOR USE ON OPEN SUSE, FOR PRODUCTION USE SLES 11

LXDE desktop, taboo anything windows compatible (.NET, wine, mono etc.) and most of bonobo

OK, HERE THE INSTALL, AS SIMPLE AS IT CAN BE

This is for Suse 11.4 x64, did not actualy change hardly anything,
it just installed out the box with -ignoreSysPrereqs

Memory 1536, swap 1536, you may be able to get away with 1024M of RAM,
with larger swap and lower % for SGA

You may want to check the kernel option on the Oracle site,
to be sure, I forgot to but at a later time it looks the default
values of 11.4 x64 are higher than oracle minimums.

Just in case, check the values, (below are mine):
sysctl -a | egrep ‘shmmax|shmall|shmmni|sem|file-max|ip_local_port_range’
kernel.shmmax = 18446744073709551615
kernel.shmall = 1152921504606846720
kernel.shmmni = 4096
kernel.sem = 250 256000 100 1024
fs.file-max = 6553600
net.ipv4.ip_local_port_range = 32768 61000

If you make changes, they go in /etc/sysctl.conf , make sure to
make them active if you do.

Next you need the needed libraries:
zypper install gcc gcc-c++ glibc libaio libaio-devel make openmotif-libs

No worries, if already there you will just get a “Nothing to do.”

You need to create the user oracle, with group dba,
this is the old method before the orainstall group, on Suse works
anyhow. It used to need the ksh shell, but now bash works, so
leave everything as it is.

Use the menu or just do on the command line:
groupadd dba
useradd oracle -g dba passwd oracle

Logout, and login as oracle/oracle or whatever you wish.

Now you need your environment variables, adjust for your
specific directory layout, I have the generic list in a file, so
I can transfer from one machine to the other and modify.

This is my devel-profile file for the oracle user 11.4 x64 rdbms 11.1:

export ORACLE_BASE=/home/oracle/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.1/db_1
export ORACLE_SID=orcl
export TNS_ADMIN=$ORACLE_HOME/network/admin
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib

Now add it to the .bashrc file “and” read it again (unless you
want to logout and back in):
cat devel-profile >> .bashrc
. .bashrc

Confirm it reloaded:
echo $ORACLE_HOME

Download your database from Oracle, follow the direction for your license:
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

Scroll down, this version is:
(11.1.0.6.0)
Download Linux x86-64 (1.8 GB)

Extract your database:
unzip linux.x64_11gR1_database.zip

And run your installer:
./database/runInstaller -ignoreSysPrereqs

The preset options should be read by the environment, verify the
match of options, leave the choices to the defaults and you should be OK.

Make sure you take notes from the outcome of your database configuration
assistant, generally your management is on port 1158 at:
https://localhost:1158/em

Once you exit the installer you can start your listener and database:
$ORACLE_HOME/bin/lsnrctl start
$ORACLE_HOME/bin/dbstart $ORACLE_HOME
$ORACLE_HOME/bin/sqlplus /nolog

and at the sql prompt:
connect /as sysdba
startup
connect

Here you log in with your system account and you should be ready to go.

Just in case:

DATABASE CREATION DOES NOT COMPLETE

Not my case but run $ORACLE_HOME/bin/dbca and change parameters, keep in mind that if you run out of memory you “decrease” the memory % for the SGA “and” you “increase” the size of your swapfile (or install more RAM, better)

NO TNS ERROR

check your tnsnames.ora and listener.ora for missing pieces (such as SID name)

check your net configuration, make sure it works:

$ORACLE_HOME/bin/netca

check your database listener

$ORACLE_HOME/bin/tnsping orcl

That’s all folks …

Written by dibi58

July 21, 2011 at 7:19 am

Posted in DB, oracle, S C R I P T S