Moving System DB’s – Part 1

I was recently approached by my manager to free up a Direct Attached Storage Device (DAS) from a test server so that it could be leveraged in a higher environment. To my amazement, both the system databases and binary executables were installed on the drives I needed to move. From the lessons I learnt over the past few days, I am going to write a series of articles on moving a SQL Server system. Please refer to my database files article which explains how to move user databases. Today, we…

Managing Services

The SQL Server Enterprise database comes with many components to solve your business needs. Database Services – core relational database engine that executes TSQL SQL Server Agent – monitors database engine, fire alerts and schedules/executes jobs Integration Services – stores and executes ETL packages Reporting Services – manages, executes, and delivers reports Analysis Services – provides analytical processing and data mining SQL Server Browser – supports instance name resolution for clients All these components have one thing in common! They are all windows services that can be stopped, paused, and/or…

Terminal Server Sessions

Many organizations still have servers running Windows 2003. The default number of sessions for Terminal Server, Remote Desktop Protocol (RDP), is two without add more licenses. If an administrators disconnects from the server instead of logs out, there will be open RDP sessions. If you need to login for some DBA task you are performing, you might get the following screen which states all connections are full. How do over come this situation? There are two solutions that you can try: 1 – Use the admin console option of the…

Server Benchmarking

“I feel the need for speed” is a memorable quote by the character Maverick in the 1986 Movie called Top Gun. We all want to have a server that executes as fast as a Mustang, not as slow as Yugo. With today’s servers being built on Virtual Machines (VM), how can you tell if your server is slow? One way to determine server speed is to benchmark your physical laptop against the newly built virtual machine (VM). To do this test, you need to create a program that is both…

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…

Various Triggers – Part 6

Triggers can be used to track Data Manipulation Language (DML) changes that occur in tables. Today, I am going to expand the AUTOS database script to add table auditing. Auditing is a very good practice when multiple people have rights to make changes to important semi-static data. This is not a good solution if the amount of data is large or number of table changes are huge. First, I am going to leverage the newly built schema called Audit Database Tracking (ADT) to seperate data tables from audit tables. A…