Wednesday, June 20, 2012

ODBC/DSN Adventures


I was having issues with the ODBC connections of a legacy classic asp project i was working on.


I received the error "the specified dsn contains an architecture mismatch between the driver and application".


Unfortunately the previous "developers" (i use this term loosely)  decided to use DSN connections instead of a real connection string like:
(oConn.Open = "Provider=SQLOLEDB; Data Source=SERVER; Initial Catalog=CAT; User Id=sa; Password=*************").


Because I am running a Win7 x64 machine i needed to use the x32 odbc driver and not the x64 one.  If you type ODBC into the start menu you get the x64 version whereas if you type c:\windows\sysWOW64\odbcad32.exe it will open the x32 version.  This also help when connecting a mysql server through ODBC to excel.

Monday, June 18, 2012

Understanding Malware

This is one of the best video's i have ever seen regarding windows internal processing and how to identify and kill malware. http://channel9.msdn.com/Events/TechEd/NorthAmerica/2012/SIA302

Monday, June 11, 2012

Monday, June 4, 2012

Installing Couchdb 1.2 on Ubuntu 12.04 server

Helpful links: http://cvee.github.com/blog/2011/11/28/configuring-couchdb-on-ubuntu/

1) install git
apt-get install git

2) make directory for source
mkdir /data/couchdb_source

3) put source files into directory
cd /data/couchdb_source
git clone http://git-wip-us.apache.org/repos/asf/couchdb.git

4) change branch to version you need. We will be checking out 1.2.0
cd /data/couchdb_source/couchdb
git checkout 1.2.0
5) Install dependencies needed to build couchdb
sudo apt-get -y install build-essential autoconf automake libtool erlang libicu-dev libmozjs-dev libcurl4-openssl-dev
6) Build the configure and make files
./bootstrap
./configure --prefix=/data/couchdb
make && sudo make install
7) Create a user account dedicated for CouchDB and update permissions
sudo adduser --system --home /data/couchdb/var/lib/couchdb --no-create-home --shell /bin/bash --group --gecos "CouchDB Administrator" couchdb
sudo chown -R couchdb:couchdb /data/couchdb
sudo chmod 0770 -R /data/couchdb
8) Update Admin pass
/data/couchdb/etc/couchdb/local.ini
Change:
[admins]
root = [PASS]
9) Make it so couchdb will startup automatically
sudo cp /data/couchdb/etc/init.d/couchdb /etc/init.d
sudo update-rc.d couchdb defaults
10) Update Couchdb Config settings
nano /data/couchdb/etc/couchdb/default.ini
a) set delayed_commits - false
b) set reduce_limit - false

 11) Open firewall
iptables -A INPUT -p tcp -d 0/0 -s 0/0 --dport 5984 -j ACCEPT
iptables -A INPUT -p tcp -d 0/0 -s 0/0 --dport 6984 -j ACCEPT

12) Start Couchdb
service couchdb start

Phoenix

I am resurrecting this tech blog for notes related to Azure Logic Apps with SAP.