Sometimes you need a mechanism to generate rows. For example when you need to create a demonstration table . Recursive CTE’s (Common Table Expression) might be your friend WITH engine (rownum) AS (select 1 as rownum from sysibm.sysdummy1 union all select rownum + 1 AS rownum from engine where rownum<10) SELECT rownum FROM engine; …
Introduction To me the most important thing as a DBA is making sure the data in a database is safe. This means…when there is some sort of failure, you must be completely sure that your backups are working properly. Actually more important then making the backups is making sure you can restore your backups. What …
Starting the database [db2inst1@bloemkool ~]$ db2start 01/11/2022 14:57:48 0 0 SQL1063N DB2START processing was successful. SQL1063N DB2START processing was successful. [db2inst1@bloemkool ~]$ Stopping the database [db2inst1@bloemkool ~]$ db2stop 01/11/2022 14:58:43 0 0 SQL1064N DB2STOP processing was successful. SQL1064N DB2STOP processing was successful. [db2inst1@bloemkool ~]$ Stopping the database when there are connections/applications in the database.At first …
A basic rman configuration (backups to disk): RMAN> show all; RMAN configuration parameters for database with db_unique_name TINUS are: CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 31 DAYS; CONFIGURE BACKUP OPTIMIZATION ON; CONFIGURE DEFAULT DEVICE TYPE TO DISK; CONFIGURE CONTROLFILE AUTOBACKUP ON; CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘/u04/backups/tinus/%F’; CONFIGURE DEVICE TYPE …
Every time I install a new oracle machine it hits me: Why is login.sql not executed when I start a sqlplus session. So here is a quick reminder for myself: sqlplus is not looking in $SQLPATH for login.sql ….. it is looking in $ORACLE_PATH So set $ORACLE_PATH and you will be fine. This …
Let’s say I have the formula Y(n+1)= λ*Y(n)(1-Y(n)) So the value of Y at time n+1 is some factor (λ) times Y at time n times 1 minus Y at time n. Y is between 0 and 1. λ can be anything. As a starting point I choose Y0 to be 0.5 and λ=1. (In …
Sierpinsky Triangle A Sierpinsky trianlge looks like: The above example is not to much developed….but you will get the idea. A Siepinsky triangle can be constructed the following way: Draw a triangle and color it completely black In every black triganle you see in the image do the following Create a white triangle by choosing …
Problem Playing around in DB2 I wanted to know how to create a hiearchical query. This because I wanted to create view for explain plans, a bit resembling the explain plans which oracle provides. First step is understanding how to make the recursive SQL’s The setup: drop table relations; create table relations (id int, parent …
I installed KVM on my debian host. Since I have 8 cores and 32GB RAM I have room to play around 🙂 And since I have some experience with KVM it was the obvious choice. Installing KVM : easy … apt is your friend Creating an VM : easy … Maybe I’ll once write it …
I’m was going crazy because off the annoying bell sound vi(m) makes all the time. To solve it I put “set belloff=all” in my .vimrc martijn@radijs:~$ cat .vimrc set belloff=all martijn@radijs:~$