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
import java.util.Iterator; | |
import twitter4j.Query; | |
import twitter4j.QueryResult; | |
import twitter4j.Tweet; | |
import twitter4j.Twitter; | |
import twitter4j.TwitterFactory; | |
import COM.ibm.db2.app.UDF; | |
/** |
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
#!/usr/bin/ksh | |
# Changes the environment to the given instance. | |
# You need to 'source' this command in order to change the environement. | |
# To ease the process, you can create an alias per instance in the .profile. | |
# alias i1=". ~/chins db2inst1" | |
#set -x |
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 | |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2014 Andres Gomez Casanova | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
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 | |
# Changes the environment to the given DB2 instance. | |
# | |
# You need to 'source' this command in order to change the environement. | |
# To ease the process, you can create a function per instance in the .profile. | |
# | |
# function i01 { . ${CHINS} db2inst1 ; } | |
# | |
# To configure, you just need to change the DB2 path. |
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
CREATE OR REPLACE PROCEDURE LOOK_FOR_OBJECT ( | |
IN SCHEM VARCHAR(256), | |
IN NAME VARCHAR(256) | |
) | |
LANGUAGE SQL | |
SPECIFIC PRO_LOOK_FOR_OBJECT | |
DYNAMIC RESULT SETS 1 | |
READS SQL DATA | |
DETERMINISTIC | |
NO EXTERNAL ACTION |
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") |
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 | |
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/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 | |
# 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 |
OlderNewer