Monday, February 28, 2011

I hate it when I am wrong

I recently learned that one of my blog posts about the Oracle MERGE statement has one not one-hundred percent correct statement.

"This means the DELETE does not use column data in the USING clause sub-query; very important. Some column in the UPDATE must be updated for the DELETE to work. To handle this set one or more columns to values that would never appear (in combination) in the data and use those values as a delete trigger."

From Oracle 10g 2 and higher SQL Guide: "Specify the DELETE where_clause to clean up data in a table while populating or updating it. The only rows affected by this clause are those rows in the destination table that are updated by the merge operation. That is, the DELETE WHERE condition evaluates the updated value, not the original value that was evaluated by the UPDATE SET ... WHERE condition. If a row of the destination table meets the DELETE condition but is not included in the join defined by the ON clause, then it is not deleted. Any delete triggers defined on the target table will be activated for each row deletion."

To clarify:

The DELETE WHERE condition can reference a column from the USING (the source) but the row table in the MERGE INTO (the target) must be have a column updated.

I need to do more experimentation before I correct previous posts and the best way to code for this. I am guessing that a "transaction" column can be in the source (USING) and then that can be tested on the DELETE WHERE and is part of a DECODE(u.indicator,'DELETE','i.column,u.column) so false data are not needed for columns with a NOT NULL constraint.

Wednesday, February 02, 2011

PCI compliance

Why do searches for PCI compliance on the database return only links to people selling software and or consulting services?

Thursday, January 27, 2011

New mobos and 16GB memory

So I'm going through Newegg looking at motherboard plus AMD processor combo deals, tempting myself to spend money. I want a system with 16GB of memory so I can do virtualization (as in Windows DC, SQL Server, Oracle Database all running at the same time). The first five motherboards I look at support 16GB of DDR3 memory in their specifications at Newegg and at the manufacturer website but when you look at the memory compatibility list NONE of them have verified configurations with 16GB of memory. NONE of them. How can you claim support without verification? The most common verified configuration was 2GB of memory. Who the FRAK buys a high end motherboard with the intent of having only 2GB of memory. That will barely run Windows 7 Ultra Professionasupercalifrakkinfantastic 64bit turbo while watching Blue-Ray movies and playing Crysis 2 full screen at 2 billion frames per second.

Friday, January 21, 2011

VMWare teams, part one

I'm fartin' around with Teams in VMWare Workstation and publishing steps I have used.


What you will need:

  • Windows Server 2008
  • VMWare Workstation
  • hardware with at least 4 GB of memory and 200 GB of disk
  • patience
  • some beer or alcohol of choice helps too


  1. Create a Team
  2. New Team; named SewerSystem
  3. Don't add VMs yet
  4. Add one LAN segment
  5. Finish

VM1 - Domain Controller


  1. Add new VM; Typical for Windows 2008 Server Core (easy install) SepticTank located in the SewerSystem directory
  2. Modify VM configuration to have a single NIC on the LAN segment
  3. Let easy install do the OS and VMware tools, create a user called sadmin
  4. Log in as sadmin after installation completes and reboots a couple times; there should be a command window:
  5. netdom renamecomputer %USERDOMAIN% /NewName:DC1
  6. netsh interface ip set address "Local Area Connection" static 1
  7. net user Administrator Passw0rd1234
  8. shutdown /r /f /t 0 /d p:2:3 /c "STFU"
  9. start /w ocsetup DNS-Server-Core-Role
  10. dcpromo /unattend /AutoConfigDNS=Yes /DomainNetBiosName=grouchnet / /ReplicaOrNewDomain=Domain /NewDomain=Forest /ForestLevel=3 /DomainLevel=3 /SafeModeAdminPassword="Passw0rd1234"
  11. net user a-grouchy "Passw0rd1234" /add /fullname:"A Grouch" /domain
  12. net group "Domain Admins" "a-grouchy" /add /domain
  13. net user e-grouchy "Passw0rd1234" /add /fullname:"A Grouch" /domain
  14. net group "Enterprise Admins" "e-grouchy" /add /domain

Step descriptions:

  1. duh
  2. duh
  3. duh, the easy install can't log in as Administrator so create one
  4. duh, I had to log in once or twice and reboot
  5. rename computer
  6. set NIC to static IP
  7. set Administrator password (was blank)
  8. reboot
  9. configure DNS
  10. configure domain controller (reboots)
  11. add a domain admin user
  12. add to the domain admin group
  13. add an enterprise admin user
  14. add to the enterprise admin group


Thursday, January 20, 2011

VMWare host-only network, part one

I'm fartin' around with host-only networking in VMWare Workstation and publishing steps I have used.

VM1 – domain controller with DNS

What you will need:

  • Windows Server 2008
  • VMWare Workstation (will differ for other virtualization products)
  • hardware with at least 4 GB of memory and 200 GB of disk
  • patience
  • some beer or alcohol of choice helps too


  1. Create a VM for Windows 2008 Server (easy install)
  2. Modify VM configuration to have a single NIC, host-only network
  3. Let easy install do the OS and VMware tools
  4. Log in as Administrator then set up the NIC with a static IP address (usually with yyy usually 128, subnet default gateway
  5. Personal preference: change the computer name and description from the default WIN-K7AATU-BARADA-N1KT08 to something reasonable and easy to remember
  6. Reboot
  7. Log in as Administrator
  8. Run dcpromo.exe; Active Directory Domain Services will begin installing
  9. At the Active Directory Domain Services Installation Wizard leave "Use Advanced mode installation"; Next
  10. Next
  11. Create a new domain in a new forest; Next
  12. Enter a Fully Qualified Domain Name of the forest root domain (,,, ...); Next
  13. Select Windows Server 2008 as the Forest Functional Level; Next
  14. In Additional Domain Controller Options page, select DNS server; Next
  15. Click Continue for the manual delegation message
  16. Accept the defaults for database, log files and SYSVOL folders; Next
  17. Enter a Directory Services Restore Mode Administrator Password (DSRM); Next
  18. Summary; Next
  19. Check Reboot on completion then go get a beer or five
  20. Log in as Administrator of your new domain controller and finish your beers


Wednesday, January 19, 2011

Throw some server at it

From one developer to another; use as much memory and resources as possible because the servers can handle it and we need to make our lives easier.

There are a few vomit inducing things that pop into my mind when I hear things like that.

I fully comprehend and realize that the days of C.I.C.S. and nitpicking over kilobytes of memory are over in favor of get it done now and throw resources at it world of today. We have scalable clouds now, right? Why bother doing something efficiently when you can just do it, get it done and make yourself look good (or save your job, or make your resource manager look good). Just add another node.

Something has to give somewhere though.

As noted in a previous post, adding a millisecond to each transaction might seem like nothing in the long run but when millions of transactions are taking place and those milliseconds multiplying like those bunnies from that Monty Python movie; there will be performance issues.

Then the developers complain to the system administrators and users complain to the help desk (who also complain to the system administrators) and web users complain or simply take their business elsewhere which causes the business units to complain to their managers who meet over lunch at a bistro with IT managers who then order the system administrators to fix it.

Resources are finite, even in a cloud.

Resources are finite on the client, too. Many in the younger generation would rather do things on their phones than sit in front of a computer and not every phone has Flash, Silverlight, etc. or enough display space to handle the additional burden of poorly conceived code.

I just thought of a business model. I'll ask your managers if they are having performance problems and then charge by the hour to point out issues that will cause a crap-ton of meetings, lots of paper to be printed, and inner turmoil to increase between the development staff and administrators while users think I'm a minor god (or something).