job_show.sql

set pagesize 50000
set linesize 240
set echo off

column job format 9999 heading 'Job' justify right
column schema_user format a20 heading 'Oracle User' justify left
column broken format a6 heading 'Broken' justify left
column last_date format a20 heading 'Last Date' justify left

column this_date format a20 heading 'This Date' justify left
column next_date format a20 heading 'Next Date' justify left
column interval format a60 heading 'Interval' justify left
column what format a80 heading 'What'

job_set_ndxsys.sql - will setup the package as job 12 at 21:00 hours today

set echo off;

clear screen;

PROMPT

PROMPT COLLECTING USER INFORMATION
PROMPT

ACCEPT database_sid CHAR PROMPT 'DATABASE TO CONNECT TO [ORCL]: ' DEFAULT ORCL
ACCEPT mhsys_password CHAR PROMPT 'PASSWORD FOR USER MHSYS [MHSYS]: ' DEFAULT MHSYS HIDE
PROMPT

prompt CONNECTING USER MHSYS
connect MHSYS/&mhsys_password@&database_sid;

set serveroutput on;
set linesize 100;
spool job_set_ndxsys.log;

prompt SHOWING JOBS
select JOB, SCHEMA_USER,
to_char(NEXT_DATE, 'DD-MON-YYYY, HH24:MI') NEXT_DATE,
INTERVAL, WHAT
from dba_jobs

order by job;

p

job_remove_ndxsys.sql

set serveroutput on;
set linesize 100;
set echo on;
spool job_remove.log;

select JOB, SCHEMA_USER, BROKEN, WHAT
from dba_jobs;
execute DBMS_JOB.REMOVE(&job_number_to_remove)

commit;

select JOB, SCHEMA_USER, BROKEN, WHAT
from dba_jobs;

spool off;

Install LTSP

#!/bin/bash

# todo
# command to configure language
# command to configure timezone

apt-get update
apt-get -y dist-upgrade

# OPTIONAL: configure germany locale
# http://www.thomas-krenn.com/de/wiki/Locales_unter_Ubuntu_konfigurieren
#sudo sed -i 's|en_US.UTF-8|de_DE.UTF-8|g' /etc/environment
#sudo sed -i 's|en_US|de_DE|g' /etc/default/locale
sudo locale-gen de_DE.UTF-8
update-locale LANG=de_DE.UTF-8
update-locale LANGUAGE=de_DE
sudo sed -i 's|XKBLAYOUT="us"|XKBLAYOUT="de"|g' /etc/default/keyboard

reboot

# install ubuntu-desktop
sudo apt-get -y install ubuntu-deskto

Instal KVM (Kernel-based Virtual Machine)

script:
https://installit.googlecode.com/hg/install.kvm.sh

# configure locale
wget -q http://www.panticz.de/sites/default/files/scripts/configure_locale.sh -O - | bash -

# install on ubuntu
sudo apt install -y qemu-kvm
# apt-get install -y qemu kvm ubuntu-vm-builder

# install on debian
apt-get install -y kvm
apt-get install -y libvirt-bin
apt-get install -y virtinst

/etc/init.d/libvirt-bin restart

# net
virsh net-start default
virsh net-autostart default

# vg
mkdir /etc/libvirt/storage
cat < /etc/libvirt/storage/vg0.xml

vg0