Excel Files

Business Users like to have data in a spreadsheet format. Since Microsoft Office is installed world-wide, it will be a common request for data in a XLS format. Let’s make believe that we have the business problem to write and read information about the first five presidents to a MS Excel file. The Cliché, there are many ways to skin a cat, does apply to technical solutions. I installed the write package (Spreadsheet::WriteExcel) and read package (Spreadsheet::ParseExcel) from CPAN to solve my problem. Both packages have more methods and properties…

Application Logging

Error handling and application logging are the most import tasks associated with programming that are over looked by many developers. After a program is released to the field, how do you know if it is performing as it should? Are there issues with the language execution (1-tier), with the database (2-tier) or with the middle-ware (3-tier) ? Many times, issues are only noticed and acted upon after several complaints have been issued. Here is a short list of why you should adding logging to all programs that you create. Traps…

Running the SMTP Relay

Today, I want to talk about sending email using SMTP relay host. The topic of a SMTP relay is an mportant one that you will come across in your career. A open mail relay allows a PERL script to send mail messages from a mail box that you can name and does not have to exist on the mail server. In todays information world, it is very important to stay connected via emails. Emails can be used for many different purposes in your PERL scripts. Alerting when system thresholds or…

Text Files

The first type of file that every programmer writes to and reads from is an ASCII text file. A text file is a kind of computer file that is structured as a sequence of lines. Each line is terminated with a special character such as a line feed (LF) in UNIX or a carriage return (CR) and line feed (LF) in MS DOS. One special type of text file is called a Comma Seperated Value (CSV) file. CSV is a delimited data format that has fields/columns separated by the comma…

Why use PERL?

PERL was originally written by Larry Wall while he was working at NASA’s jet prepulsion laboratories. It’s syntax is a combination of many different languages. While PERL is not a acryonymn, one of Larry’s favorites is ‘Pratical Extraction and Reporting Language’. The first version of PERL was release in December, 1987. Getting to the main question, ‘Why use PERL?’. Here are a few reasons why people use the language. It’s free! The PERL language can be installed on any UNIX box for free. The community version of Active State Perl…

Just Say No!

Most security administrators are eager beavers when it comes to deploying and running antivirus software on any computer they can get their hands on. This includes Microsoft Windows Servers running your SQL Server Database engine. Do not let security administrators scan your database files and make your 2012 Dell xeon with eight cores perform like a 1996 Gateway Pentium 4 single core. I have seen the results of antivirus software scanning the database files while I am trying to execute basic queries. It is extremely painful.   With that said.…

RunAs SSMS VB Script

A seperation of power between a day-to-day user account and a special occasion adminstrator account can be beneficial for a DBA. By usig a less privledge account for daily activities can avoid costly human mistakes. A mistake will be denied due to not having the correct privledges. It is standard to use Microsoft Windows Domain Accounts for daily adhoc queries. A Standard SQL Account is usually used by custom applications to connect and perform work in the database. How does one easily switch from one windows account to another? A…

Access Linked Tables

Today, I am going to build upon the prior ODBC Connection article by showing you how to create a LINKED TABLE in MS ACCESS. I am assuming that you have created a blank MS ACCESS 2007 database named [WILDLIFE.accdb]. I will be using the [WILD LIFE] SQL Server database that was created in a earlier article as the source of our information. First step is to select the external data, more, ODBC database option from the menu. This launches the wizard which walks you thru creating a LINKED TABLE. Second…

ODBC Connection

The ODBC standard was developed in the early 1990’s to allow a software developer to use a single interface to access mutltiple data sources. Microsoft Access is a very versatile application since it can import or link to a variety of ODBC data sources. Today’s article will cover how to define a new ODBC connection. I will be using the [WILD LIFE] database that was created in a earlier article. First step is to open to the administrator tools on the windows operating system. You can find this group under…

Managing Files

The most basic storage unit of any operating system is a file. Files can contain anything from textual data in this article, a bitmap image of your baby daughter, a MS Excel worksheet containing your finances or a Visual Basic program you are currently working on. Therefore it is very important to know how to manipulate files after they are created. Common actions that are performed on files are copy, rename, move and delete. Each file has properties such as creation date, last date modified, and attributes such as read…