This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Downloads all public traces on OpenStreetMap for a given user. | |
# This requires gunzip and bzip2 to extract the compressed traces. | |
# Also, wget to retrieve the traces from OSM. | |
# | |
# Arguments. | |
# 1) Username. If the username has spaces, you should provide the name between quotes. | |
# | |
# Version: 2024-05-26 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--#SET TERMINATOR @ | |
--SET SERVEROUTPUT ON@ | |
/** | |
* Function that returns a string containing the insert statement with the | |
* values from the fields of a given row id. The case of the tableschame or of | |
* the tablename could be ignored if the name is stored in uppercase. | |
* This function does not generate the columns for the following datatypes: | |
* - XML |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--#SET TERMINATOR @ | |
BEGIN | |
DECLARE VALID SMALLINT; | |
DECLARE VAL SMALLINT; | |
DECLARE PROCEDURE LUHN_TEST ( | |
IN NUMBER VARCHAR(24), | |
OUT RET SMALLINT | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--#SET TERMINATOR @ | |
SET SERVEROUTPUT ON@ | |
/** | |
* Creates a temporary table with the headers of a given query. | |
* A user temporary tablespace is necessary. This is useful when exporting data. | |
* The table with the header is called: session.header. | |
* | |
* IN query |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script to install a set of different Db2 fixpack in the same machine. | |
# The prerequisites to install Db2 should have been resolved: | |
# For V11.1: | |
# sudo dpkg --add-architecture i386 | |
# sudo apt-get install binutils # strings | |
# sudo apt-get install libaio1 # libaio.so.1 | |
# sudo apt-get install libpam-ldap:i386 -y -q # libpam | |
# supo apt-get install lib32stdc++6 -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script to install a set of different Db2 fixpack in the same machine. | |
# The prerequisites to install Db2 should have been resolved: | |
# For V11.1: | |
# sudo dpkg --add-architecture i386 | |
# sudo apt-get install binutils # strings | |
# sudo apt-get install libaio1 # libaio.so.1 | |
# sudo apt-get install libpam-ldap:i386 -y -q # libpam | |
# supo apt-get install lib32stdc++6 -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
OBJECT=$2 | |
if [[ -n ${OBJECT} ]] ; then | |
SCHEMA=$1 | |
else | |
OBJECT=$1 | |
fi | |
STMT="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DATABASE=sample | |
TABLE1=t1 | |
TABLE2=t2 | |
db2 connect to ${DATABASE} > /dev/null | |
db2 "drop table ${TABLE1}" > /dev/null | |
db2 "drop table ${TABLE2}" > /dev/null | |
db2 "create table ${TABLE1} (col1 int, col2 varchar(15))" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Returns all privileges on a database granted to a user. | |
# The user is passes as first parameter. | |
# | |
# Author: Andres Gomez Casanova (AngocA) | |
# Version: 2016-08-02 | |
# Made in COLOMBIA | |
DBUSER=$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Reads the Networker logs periodically. | |
# By default 15 seconds. | |
# | |
# Original from: http://www.backupcentral.com/phpBB2/two-way-mirrors-of-external-mailing-lists-3/emc-networker-19/nsr-render-log-97064/ | |
LOG_FILE=/nsr/logs/daemon.raw | |
#LOG_FILE=/nsr/apps/logs/nmda_db2.messages.raw | |
DATE=$(date +"%m/%d/%y %H:%M:%S") |
NewerOlder