DH Unlimited
Portfolio Blog Login

DH Unlimited is comprised solely of me, Dave. I've been doing freelance web development since 2010, mainly for the purpose of expanding my technical skill set.

Site Updated

Apache Client Certificate Authentication

Tuesday, May 14, 2013 10:01 am

1. Install OpenSSL
2. Open a command prompt and enter
openssl pkcs7 -in rel3_dodroot_2048.p7b -inform DER -out result.pem -print_certs

Tag(s): Windows  Web Programming 

Loading Data into MySQL

Friday, May 3, 2013 1:54 pm

These notes below are for me and me alone. :)

load data infile
into table tablename
columns ENCLOSED BY ‘’‘’


Tag(s): MySQL 

Restore Master database

Friday, May 3, 2013 10:47 am

1. create a new master device:
dataserver -b “location of datafiles”
2. start ASA in single-user mode
startserver -f RUN_SYBASE -m
3. load the backup — once completed it will shut down ASA automatically
load database master from “location of master backup”
4. start ASA in single-user mode and check that all databases, devices, logins appear to be restored correctly

Tag(s): Sybase 

Remove a non-empty folder

Sunday, April 28, 2013 11:37 pm

rm -rf directoryname

The -r flag means recursive and the -f flag means force (i.e. ask no questions). Be careful with that command though.

Tag(s): Linux 

Sybase 15.7 Drop All Constraints

Tuesday, April 23, 2013 7:50 pm


Below is a script to drop all of the constraints of a database regardless of the table owner:

setuser ‘dbo’
sp_configure ‘allow updates’, 1
declare cur cursor
select SOR.Name as ‘constraint’, s2.name as ‘owner’, SOT.Name as ‘table’
from sysreferences SR
join sysobjects SOR on SOR.id = SR.constrid
join sysconstraints SC on SC.constrid = SR.constrid
join sysobjects SOT on SOT.id = SC.tableid
join sysusers s2 on SOT.uid = s2.uid
declare constraint varchar(500
declare owner varchar(500)
declare table varchar(500)
declare SQL varchar(500)
open cur
fetch cur into constraint,owner,@table
while (sqlstatus = 0)
select SQL = 'setuser ' + '''' + owner + ‘’‘’
print SQL
exec (SQL)
select SQL = 'alter table '+owner+’.’@table‘ drop constraint ‘+@constraint
exec (SQL)
fetch cur into constraint,owner,@table
close cur
deallocate cursor cur


Tag(s): Sybase 
Back to the Top