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

Long time no update

Monday, June 17, 2019 1:13 pm

I haven’t had the desire to spend much time adding posts or upgrading this website lately although I still keep the O/S up-to-date.

Tag(s): Web Programming 

Eliminate gtk warnings

Friday, July 22, 2016 12:42 pm

The following post helped me out a lot this morning:


When executing the vmware workstation bundle, the following gtk2 errors are displayed:

Extracting VMware Installer…done.
Gtk-Message: Failed to load module “pk-gtk-module”: libpk-gtk-module.so: cannot open shared object file: No such file or directory
Gtk-Message: Failed to load module “canberra-gtk-module”: libcanberra-gtk-module.so: cannot open shared object file: No such file or directory


Create a gtk2 configuration file and reload libraries.

~]# echo “/usr/lib64/gtk-2.0/modules” > /etc/ld.so.conf.d/gtk2.conf

~]# ldconfig


The installer should run without gtk2 errors.

Tag(s): Linux  Work  VMware 

Microsoft Excel Carriage Return in a Cell

Friday, July 15, 2016 2:41 pm

To go to the next line in a cell without skipping directly to the next cell type in:

Alt Enter

Tag(s): Work  Windows 

Banner for Red Hat Enterprise Linux 7

Tuesday, June 28, 2016 12:41 pm

Below is the simplest way to change the login banner for RHEL 7.

sudo -u gdm dconf-editor —> org —> gnome —> login-screen
sudo -u gdm dconf update

Tag(s): Work  Linux 

Banner for Red Hat Linux 6

Tuesday, June 28, 2016 12:38 pm

chmod u+s /lib64/dbus-1/dbus-daemon-launch-helper
#disable power button
sudo -u gdm /usr/bin/gconftool-2 —type bool —set /apps/gdm/simple-greeter/disable_restart_buttons true
#disable showing local user list
sudo -u gdm /usr/bin/gconftool-2 —type bool —set /apps/gdm/simple-greeter/disable_user_list true
#enable the banner and display /etc/issue
sudo -u gdm /usr/bin/gconftool-2 —type bool —set /apps/gdm/simple-greeter/banner_message_enable true
sudo -u gdm /usr/bin/gconftool-2 —type string —set /apps/gdm/simple-greeter/banner_message_text “$(cat /etc/issue)”

Tag(s): Work  Linux 

Intel Graphics for CentOS 6

Thursday, October 15, 2015 3:09 pm

Recently, I started seeing error messages regarding many bad sectors in the hard drive in my HP laptop. After looking at various websites I determined that it wouldn’t be a bad idea to purchase a new hard drive as opposed to trying to fix this issue with disk utilities. 

After purchasing and installing the new hard drive, I had to install CentOS again. One thing I quickly noticed is that the default Installer did not seem to work so I tried “Install with basic video driver”. Long story short, after doing the install with the basic video driver I had to do 2 things to enable CentOS to use the Intel graphics card.  

1. Edit the /etc/X11/xorg.conf file replacing the word “vesa” with “intel”
2. Edit the /boot/grub/menu.lst file by removing the word “nomodeset”  

Credit is voluntarily given to the person who created the website below.

Tag(s): Linux 

PostgreSQL Current Process List

Wednesday, May 20, 2015 4:26 pm

To kill a process:
    — don’t kill my own connection!
    procpid <> pg_backend_pid()
    — don’t kill the connections to other databases
    AND datname = ‘database_name’;
Or you can just leave off the FROM clause
SELECT pg_terminate_backend(procpid);

To view process details:
SELECT datname, procpid, current_query FROM pg_stat_activity;

Tag(s): PostgreSQL 

CompTIA Frames

Wednesday, April 29, 2015 9:49 am

Why can’t CompTIA reward their certification holders with a certificate that is a normal size? What’s up with the 8.5” x 5.5” dimensions??


Tag(s): CompTIA 

Linux Authentication Without a Password

Friday, April 17, 2015 2:29 pm

Steps to generate SSH keys on a client machine and transfer to a remote server for authentication:

On Remote Server:
Turn PasswordAuthentication off in /etc/ssh/sshd_config
Restart SSHD Service

On Client Server:
[username@localhost ~]$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/username/.ssh/id_rsa):
Created directory ‘/home/username/.ssh’.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/username/.ssh/id_rsa.
Your public key has been saved in /home/username/.ssh/id_rsa.pub.
The key fingerprint is:
91:12:3b:12:24:re:0b:w1:e2:fe:ce:33:fa:b8:99:ed username@localhost.localdomain
The key’s randomart image is:
—[ RSA 2048]—— | . . .. | |..oo | |
[username@localhost ~]$ cd /home/username/.ssh/
[username@localhost .ssh]$ cp id_rsa.pub authorized_keys
[username@localhost .ssh]$ chmod 700 /home/username/.ssh
[username@localhost .ssh]$ chmod 600 /home/username/.ssh/authorized_keys
[username@localhost .ssh]$ ssh-copy-id user@domain.com
The authenticity of host ‘dommain.com (’ can’t be established.
RSA key fingerprint is 00:c9:00:be.
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed — if you are prompted now it is to install the new keys
user@domain.com’s password:

Number of key(s) added: 1

Now try logging into the machine, with: “ssh ‘user@domain.com’”
and check to make sure that only the key(s) you wanted were added.

Tag(s): Linux 

Create a new PostgreSQL user

Wednesday, April 8, 2015 12:45 pm

Example of how to create a user in PostgreSQL copied directly from:

$ createuser -P -s -e joe
Enter password for new role: xyzzy
Enter it again: xyzzy

-P prompts for password
-s specifies superuser
-e echoes the commands

Tag(s): PostgreSQL 


Monday, March 23, 2015 12:41 pm

“All matter originates and exists only by virtue of a force… We must assume behind this force the existence of a conscious and intelligent Mind. This Mind is the matrix of all matter.”

Max Planck

Tag(s): Life  Quotes 

Check I/O in Linux

Friday, March 13, 2015 4:19 pm

[root@wks1 ~]# hdparm -tT /dev/sda

Tag(s): Linux 

Convert .ova to .vmx

Wednesday, March 4, 2015 2:25 pm

[root@wks]# ovftool test.ova test.vmx

Tag(s): VMware 

Invoice Generator

Sunday, August 31, 2014 4:57 pm

I found http://invoice-generator.com a few minutes ago.

Tag(s): Work 

Thoughts of the day

Friday, June 13, 2014 2:17 pm

My manual database migration from Sybase 12.5.3 to 15.7 was a complete success. It makes me very happy.


Tag(s): Work  Sybase 

Living and Learning

Friday, January 17, 2014 10:32 pm

I’m just like anyone else. I make mistakes.

One thing I am still trying to do is learn from other people’s mistakes.

There are some points I need to remember that are below the next time I decide to work for another client:

1. Have a signed contract outlining the work to be performed and the amount of money to be paid.

2. Do not do ANY work without receiving a deposit, specifically half up front and the other half BEFORE receiving code, not after, no exceptions.

4. Know what your services are worth and charge accordingly.

5. Don’t do work outside of the contract. If you agreed on creating two different web pages, then do not do three pages just because the client asked.

Any questions? Read rules 1-5 again.

Tag(s): Freelance 

Background Generator

Friday, January 10, 2014 7:00 pm

This site below is very useful for generating a textured background for a website.


Tag(s): Web Programming 

Car Audio

Tuesday, January 7, 2014 7:11 pm

I was really not wanting to hear tonight that I am going to have to get the speakers I bought online from bavsound.com professionally installed. Well, let me back up a minute. First, I went to their website which stresses how easy it is to replace the factory speakers by yourself. Then I took out my wallet and bought some speakers. I spent a few days waiting. And I was happy tonight that my speakers arrived. I didn’t think much of it that they wanted me to go to their website and download the instructions since they were not included. OK, no problem. Until I got the following:

Maybe this is for the best — I don’t know.

Tag(s): Life 


Tuesday, January 7, 2014 3:55 pm

How do I log in to MySQL via the command line in Linux?

mysql -h localhost -u myname -p mydb

Tag(s): Linux  MySQL 

An A-Z Index of the Windows CMD command line

Thursday, October 24, 2013 11:57 am

Helpful information below for those of us fortunate enough to work with Windows DOS batch files!


Tag(s): Windows  Work 

Burn ISO to DVD

Friday, September 13, 2013 12:26 pm

Use ImgBurn! It’s Free!

Tag(s): Windows 

Sybase 12.5 Useful Commands

Tuesday, August 20, 2013 11:06 am

From the command line: isql -U sa -D database_name

dump database database_name_no_quotes
to “D:\file_path_with_quotes\database_name.db”

The keyword go must be used unlike the semicolon Oracle uses.

Tag(s): Work  Sybase 

Quote of the day

Thursday, June 20, 2013 3:42 pm

“Educated men are as much superior to uneducated men as the living are to the dead.” – Aristotle, 384–322 B.C.

Tag(s): Quotes 

Oracle NOT NULL Constraints

Thursday, June 20, 2013 11:10 am

NOT NULL constraints can not be created “out of line” such as in the following example:     

(PORT_ID                 NUMBER,

However, the following is correct syntax: 

(PORT_ID                 NUMBER,


Tag(s): Oracle 

Forgot Your Windows Admin Password?

Thursday, June 13, 2013 12:58 pm


Offline Windows Password & Registry Editor

Tag(s): Windows  Work 

Install Programs In Citrix

Wednesday, June 12, 2013 1:29 pm


Enable install mode. This command has to be run before installing any new software on a Terminal Server.

Tag(s): Windows 

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 

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 

Empty The Sybase Transaction Log

Monday, April 22, 2013 2:25 pm

dump tran


with truncate_only

Tag(s): Sybase 

iTunes Problem

Sunday, April 7, 2013 6:27 pm

One issue I’ve had is downloading a purchase made on another device and then playing on my iPod. For some reason something is not quite right and iTunes “thinks” I’m not eligible to listen to whatever it is I bought.

My Solution:

Delete all traces of the file on both my iPod and my computer. Sign Out of iTunes. Change my password. Sign back in iTunes. Download the file again.

Tag(s): Apple  Music 

High Flight

Friday, March 22, 2013 12:38 pm

By Pilot Officer John Gillespie Magee 

 Oh! I have slipped the surly bonds of Earth
 And danced the skies on laughter-silvered wings;
 Sunward I’ve climbed, and joined the tumbling mirth
 of sun-split clouds, — and done a hundred things
 You have not dreamed of — wheeled and soared and swung
 High in the sunlit silence. Hov’ring there,
 I’ve chased the shouting wind along, and flung
 My eager craft through footless halls of air….

 Up, up the long, delirious, burning blue
 I’ve topped the wind-swept heights with easy grace.
 Where never lark, or even eagle flew —
 And, while with silent, lifting mind I’ve trod
 The high untrespassed sanctity of space,
 - Put out my hand, and touched the face of God.

Tag(s): Poetry 

SQL Server and Sybase Versions

Thursday, March 21, 2013 11:08 am

It’s fairly easy to find out which version of SQL Server / Sybase you’re using.  Both Microsoft SQL Server and Sybase implement T-SQL so the command below will work for either RDBMS. Just open a query window and type in:  


 But if you don’t have access to query a database that resides on a SQL Server instance you can always go to the registry and find out by going to the following key:   



    —> Microsoft

      —> Microsoft SQL Server

        —> “Your SQL Server Instance”

          —> Setup

Tag(s): Sybase  SQL Server 

Connecting to Oracle Enterprise Manager

Tuesday, March 12, 2013 6:39 pm

I don’t usually install Oracle that often, but when I do it’s usually a successful install without too much fuss. Well, lately I’ve noticed I can’t get Enterprise Manager up in Internet Explorer. At first I just blamed it on the internet security settings being too harsh, but today I had some free time so I decided to make certain I have the talent to open it. 

Long story short not being able to view the Enterprise Manager is caused by a certificate with a key length of less than 1024 bits according to Microsoft: http://support.microsoft.com/kb/2661254

To fix:

open a command prompt

certutil -setreg chain\EnableWeakSignatureFlags 8

restart CertSvc 

browse to Enterprise Manager 


Tag(s): Oracle 

Difficult Projects

Wednesday, February 27, 2013 10:49 am

If I could say one thing about working as an IT Professional it is this: the projects you are asked to complete usually have very poor documentation accompanying them (if any). I have a current project where I am converting an application and database over from Sybase to Oracle with IBM WebSphere as the application software.

It sounds really easy, but isn’t…

Tag(s): Work  Oracle  Web Programming 

Oracle Install Tips

Monday, February 4, 2013 9:58 am

There are probably multiple data files that are zipped up that you need to unzip to install.

For me, installing 11g 32-bit on Windows 2003 Enterprise Server, I had 6 total zip files to unzip before officially attempting to install Oracle.

My biggest tip is to first unzip each zip file to the same directory. Otherwise you are guaranteed to get errors.

You may still get errors, but if you are trying to install each zip file separately then forget ‘bout it.

Tag(s): Work  Oracle 

Converting Folder To ISO

Thursday, January 31, 2013 3:05 pm

A VMware Virtual Machine can connect to ISO files locally. However, not every file that needs to be uploaded to the VM is in an ISO format.

So, to solve this problem I have downloaded Folder2ISO. It does this one task and does it very well for FREE!

Tag(s): Work  Web Programming  Windows 

Cat 6 Cables

Monday, January 14, 2013 7:45 pm

I’m really good with a lot of things computer-related. However, one thing I struggle with is making Cat 6 cables!

Tag(s): Hardware 

Bye 2012

Saturday, December 29, 2012 2:36 pm

It’s been a long year but a good year. Instead of focusing on the negative I will focus on the positive for this post. The list below is in no particular order.


  • Went to New Orleans for the first time
  • Reconnected with some old friends
  • Met some new friends
  • Got a new job
  • Finally got some use out of that SQL Server 2008 book I bought a few years ago
  • Improved my web programming skills
  • Ate some really good food
  • Learned to be more patient in life and not be so down on myself all the time

Tag(s): Life 

I passed!

Thursday, December 27, 2012 5:21 pm

I now have my MCITP for SQL Server 2008!

Tag(s): SQL Server  Personal 

Debugging SQL Server Stored Procedures

Wednesday, December 26, 2012 2:21 pm

I’ve written probably 100,000 lines minimum of SQL Server stored procedures.  I had to.  Otherwise they wouldn’t have paid me.  Some of those stored procedures took hours to run.  So if I was debugging them I couldn’t necessarily wait that long on the PRINT function in SQL Server to show me what results I was expecting because that function does not produce output until the stored procedure is over.  So I turned to the RAISERROR function.  It’s kind of a “hack” as it’s designed to show errors mainly (I think) but I use it since it has the option of NOWAIT which should be pretty explanatory.  Below is an example:

raiserror ( ‘text goes right here’ , 0 , 1 )

with nowait

Tag(s): SQL Server 

Oracle 11g Client Install on Windows 7 x64

Wednesday, December 26, 2012 12:18 pm

After many hours trying to get Oracle to work with SQL Server I decided to give up with the current software installed and reinstall the client for 11g.  Long story short the only way I was able to get this to work was running the setup on the command line as follows:  

setup -ignoresysprereqs 

And then….SUCCESS!

Tag(s): SQL Server  Oracle 

I'm Still Here

Friday, December 21, 2012 3:37 pm

The world didn’t end (yet).  It’s 12 – 21 – 2012!

Tag(s): Life 

SQL Server Maximum Key Length

Tuesday, December 11, 2012 11:18 am

Warning! The maximum key length is 900 bytes. The index ‘PK_BATCH_ORACLE_SHIPMENTS’ has maximum length of 919 bytes. For some combination of large values, the insert/update operation will fail.

This message bothered me until I found a way around it (kind of sorta).  Instead of using all 360 characters of a particular field to use as a key I chose to use only 320 (it’s a customer name).  I used a calculated column with keyword PERSISTED.

So…instead of using  

[customer] [nvarchar](360) not null

as my primary key I use part of it instead 

[customer_truncated] as left ([customer], 330) persisted

I hope this helps anyone interested in overcoming this issue (although I hope you can find better columns to build a primary key…).

Tag(s): Oracle  Windows  Work  SQL Server 

Divide by Zero

Monday, December 3, 2012 10:37 am

Instead of using a CASE statement inside a SELECT statement in SQL Server, I have found a better, cleaner method is to implement NULLIF which takes two parameters and compares them.  If they are equal then NULL is returned.   This forces the divisor to become NULL instead of zero.  And dividing by NULL makes the entire equation NULL.

For my project this morning I need to return 0 instead of NULL so I will also implement a COALESCE function which compares the output. 

So rather than use this logic below:

when isNull(divisor, 0) = 0
then 0
else numerator/divisor
end as value

I use: 

select coalesce( numerator / nullif( divisor, 0 ) , 0)

Tag(s): SQL Server 

SQL Server Date Conversions from Excel

Thursday, November 22, 2012 11:44 am

Going from Excel data to SQL Server data shouldn’t be difficult.  A common problem when doing this conversion is how to go from an Excel date like ’6/4/2011 11:34’ to a SQL Server date that is identical, but with a datetime data type.  The first thing to do in SQL Server is to convert the data from NVARCHAR to Float.  From there convert the float to datetime.  It really is almost too easy.

select cast(
	    	cast([column name] as float)
	    	-2 as datetime
  from [table]

Tag(s): SQL Server  Windows  Oracle 

Oracle Patch Install

Tuesday, October 30, 2012 12:10 pm

I ran into an issue installing an Oracle patch a few months ago. The solution was found at:


Hello all,

Just though I would share my findings on this issue.

I’m a Information Assurnace engineer for a large communications company. I’m responcible for developing security solutions for a vast array of Windows based devices. Recently it had come to my attention that our security solution was blocking the install of the JAVA Runtime Enviroment. I naturally set to work on a resolution and here is what ultimatly solved this problem. I noticed that the JRE install worked on a freshly installed copy of the OS, but after applying security settings. . .they immediatly failed. I was able to root cause our failure to two registry keys. Below is the details:

Please note, that we had this 1330 error due to the fact that our prodcuts are NOT connected to the internet, hence they are off-line.

This solution worked for: XP, 2003, 2008, Vista, and 7.
WARNING: I cannot be held responcible for any issues the below may cause. Plase use at your own risk. Take good notes so that you can restore the two settings below to the origional “as found” values. Exporting the registry key before making changes is a good idea, that way it can be restored.
Basically there are two registry keys that can cause the JRE install to fail with 1330.

The first Key is a very complex beast. It is located in:
Subkey: \Software\Micorosft\Windows\CurrentVersion\WinTrust\Trust Providers\Software Publishing\
Value Name: State
Value: 23c00

The default windows value for “STATE” should be 23c00 in hexidecimal / 146432 decimal. If the STATE value is NOT 23c00, then someone, or something changed this setting for a reason, and this is the root cause of your problem. Now, the quick and easy fix is to set this key back to 23c00 HEX. But you may want to investigate why this value was changed. . .it may be important.

The resason why this settin is complex, is because the BINARY representation of this number activates a bunch of switches related to .NET security. 23c00 = 100011110000000000 in BINARY. Look at page 65 of this document (http://iase.disa.mil/stigs/checklist/dot_net_checklist_v1r2-3.pdf) to understand the individual switches, as I don’t have the time to explain them here. Please note however, that the DISA / FDCC / CIS security requriments for this setting is 10,000 HEX or 010000000000000000 BINARY, or 65536 DECIMAL. If you see this number, some form of security has been applied to your box. Please note that 10800 HEX, or 010001000000000000 BINARY, or 69632 DECIMAL will also fix the JAVA 1330 problem.

Lastly, since this setting is based on a “per-user” basis. . .this is the reason why logging into another account to install JRE sometimes works. If this setting was set in a LGPO or GPO. . .then all accounts would fail. But if this setting was only set in for one user, then all other user accounts would allow JRE to install.

NOTE: The above setting will fix 1330 ONLY if JRE had been installed previously. If the above setting does not resolve the problem, then you will need to change the following registry as well.

Subkey: \Software\Policies\Microsoft\SystemCertificates\AuthRoot\
Value Name: DisableRootAutoUpdate
Value: 1

Quite simply, this registry value should NOT exist in a default install of any Windows OS. Once again, if this value exists someone or something has applied some level of security to the computer. Simply deleting this value (in conjunction with the about value) will enable JRE offline to install without errors.

PLEASE NOTE: It’s probably a good I idea to put these registry settings back to how your found them when you are done installing JRE. . .as these settings are important security settings.

Hope this helps,

Tag(s): Oracle 

Clustered Server Issues

Saturday, September 15, 2012 8:40 am

I was able to upgrade SQL Server 2008 with Service Pack 3 in a formerly clustered server by changing the following registry key from 2 to 0.

  --> Microsoft
   --> WindowsNT
    --> CurrentVersion
     --> Cluster Server
      --> ClusterInstallationState

Tag(s): SQL Server 

Move All SQL Server System Databases

Wednesday, September 12, 2012 1:54 pm

Copied directly from:

There are lots of articles, Links and sites that describe how to move system databases from the SQL default location to the location described by the DBA but still lot of users find difficult while moving them and land up in trouble. So I thought of wiriting an article for moving the databases so that the users can use the same and enjoy the task.

Tasks for moving system databases:

1.Moving tempdb databases.

a.) Execute the script below.

USE master;
alter database tempdb
alter database tempdb

b.) Restart services.

c.) Confirm path of database files.

2. Moving model and msdb databases.

a.) Execute the script below.

USE master;
alter database msdb
alter database msdb

USE master;
alter database model
(NAME = modeldev,FILENAME=‘NEW PATH’);
alter database model
(NAME = modellog,FILENAME=‘NEW PATH’);

b.) Stop services
c.) Copy the files to the new location
d.) Restart services.
e.) Confirm path of database files.

3.) Moving master database:

a.) Edit the startup parameters to reflect the new path for –d, –l and -e parameters.
b.) Stop the services.
c.) Move the master and resource database files to the new location
d.) Change the sql port to different one than usual to avoid excess connections and create an alias with that port
e.) Start the services using NET START MSSQLSERVER /f /T3608 (*MSSQLSERVER is for default instance, if you have installed named instance then you need to use NET START MSSQL$Instancename /f /T3608)
f.) Execute the script given below from sqlcmd

USE master;
alter database mssqlsystemresource
alter database mssqlsystemresource
alter database mssqlsystemresource set READ_ONLY;

g.) Stop the services
h.) Change the port back to 1433
i.) Remove the alias
j.) Start sql services.
k.) Confirm if the data files and log files reside on desired path.

Tag(s): SQL Server 

Security+ Certification

Wednesday, August 22, 2012 7:40 pm

Passed my CompTIA Security+ test this morning.  I am very happy as I don’t want to study for it any more and definintely did not want to spend another $276 to take it again if I didn’t pass.  I am planning on upgrading my MCITP SQL Server 2005 Certification to the 2008 version next.

Tag(s): Life 

Microsoft Excel data import to SQL Server

Friday, December 16, 2011 7:36 am

This is a very common task, data import to SQL Server from Excel.  Load the Excel file with First Row as Header off even it contains the header. This can ensure all the fields are read in text format. And then add a Conditional Split to skip the first row.

Tag(s): Windows  SQL Server 

Oracle Date Comparisons

Wednesday, December 7, 2011 9:53 am

Comparing date ranges is a frequent action completed in Relational Database Management Systems.  One of my favorite ways of decided whether an arbitrary date is between two other dates is use of the word BETWEEN in SQL Server.  As luck (or something else) would have it, Oracle also has a BETWEEN function.  This is a good thing!  However, make sure the dates you’re comparing are actually of the date data type OR if they’re of the timestamp data type.  And it’s very possible you may hardcode the date value so you would have to use the to_date(‘dd-mmm-yy’) syntax to convert your hardcoded value from a string data type to a date data type.

Tag(s): SQL Server  Oracle 

Oracle Table Details

Tuesday, November 22, 2011 10:17 am

Desc is a good way to find out vital details about an Oracle table.  An even better was is to use SQL Developer, highlight the table name, right-click (or hit Shift – F4).  Not only do you get data types, but also other vital details like table dependencies and primary key details.

Tag(s): Oracle 


Wednesday, November 16, 2011 5:04 pm

I thought I knew PL/SQL fairly well, but there’s always something to learn.  Today’s lesson involved the dreaded ORA-01971: not a SELECTed expression error.  Long story short, it’s not cool to have an Order By and Distinct function in the same Select statement.  CORRECTION:  just found this bit of wisdom on stackoverflow.com:  “When doing a DISTINCT your order by needs to be one of the selected columns.”

Obviously my Order By was incorrect.  Oh well.  Actually doesn’t matter a bit b/c it’s going straight into SQL Server 2008 R2 Enterprise Version.

Tag(s): SQL Server  Oracle 


Friday, November 11, 2011 10:04 am

It’s 11/11/11.  All ones.  Kind of neat.

Tag(s): Life 

Locked Out Of SQL Server??

Wednesday, November 9, 2011 1:22 pm

How to get back in SQL Server 2005 / 2008 if you are locked out AND have local admin rights on your server:

  • Start the instance of SQL Server in single-user mode by adding ;-m to the end of the startup parameters

  • Start command prompt as local administrator

  • Connect to the server: sqlcmd -E -S . (be sure to add the period!)

  • Add yourself (computername\username) to the sysadmin SQL group:

  • create login [computername\username] from windows;

  • exec sp_addsrvrolemember ‘computername\username’, ‘sysadmin’;

  • go;

  • Restart the server in normal mode

Tag(s): SQL Server 

Not Giving Up

Monday, November 7, 2011 8:21 am

It was very frustrating to spend a week trying to figure out exactly why I couldn’t get an Oracle password to persist in a SQL Server Intergration Services Project, but decided this AM to try a different route of using an ADO NET data source instead of OLE DB mainly for the purpose of programmatically getting a connnection to work…But I finally did it.

Tag(s): SQL Server  Oracle 

A great day at Kiawah!

Thursday, December 16, 2010 9:34 pm

Had a great day at the Ocean Course today. It was windy and cold, but worth the drive.

Tag(s): Life 
Back to the Top