Monday, October 5, 2009

Universal Database

There are hundred’s of websites that ask you to register and in the member registration screen / page they usually ask you to fill-in your residential or shipping address details like STATE and COUNTRY. If you go to any ecommerce sites like eBay or PayPal they usually ask for CURRENCY that you like to trade-in. Look at currency exchange site, so may countries are listed with CURRENCY abbreviations. Similarly if you go to sites where you buy and sell used automobiles like www.autotrader.com, there you will see automobile MAKE and MODEL listed, even these two fields are repeated in many other similar sites. These some of the examples that we can easily see over the web, but imagine about the desktop applications in every organization – its mind blowing to think how many copies of this same set of data is sitting and what it might be costing.




Anyways let’s get going, details like STATE, State abbreviations (CT, NY etc), Days (Monday, Tuesday …Sunday), TIME (00:15, 00:30….. 23:45 etc…), MONTH (Jan, Feb, Mar etc) – let me call them as generic for the purpose of writing this article. Below are the examples that I am talking about.





Examples:


DAY:

TIME:

TIMEZONES:

CURRENCY:

CAR MAKE:
**Model depends on Make
COUNTRY






What came next to my mind was, how about having Universal Database? All the above generic information stored and maintained as one single copy by some organization/ person/ entity, of course with all the disaster recovery and availability in place




How do we share this data with the world – may be via Web services or may be via

AJAX
. Create JavaScript (AJAX) functions to fill up the combo boxes; the client website will call the JavaScript function or API to fill the dropdown in his page.




Most of the time these fields are used to ensure that the end user does not make typo errors while entering his details and then the details are stored as is. However many a time the data is stored in relational model and there you need these physical (tables with generic data) table itself to generate your reports. If that is also addressed i.e. if the consumers of the generic data is given access to join with these tables with generic data that would solve the problem.




These are just my meandering – don’t take it serious. But these are near future possibilities or may be already in use who knows – at least I don’t know. However I found something interesting – www.freebase.com. This site is trying to gather/ organize all the information and is like wiki, anyone can update the database. This massive database can be queried, watch the video posted over there – it’s cool!

Thursday, September 3, 2009

Powershell for SQL Database Administrators

Here is list of links that can get you started with Power Shell for SQL Database Administrators (DBA)


http://www.databasejournal.com/features/mssql/article.php/3681061/Microsoft-Windows-PowerShell-and-SQL-Server-2005-SMO--Part-I.htm
This is a 3 part article that start from installation and how to interact with Power Shell (PS)

http://www.mssqltips.com/tip.asp?tip=1680 - again this one introduces how to use PS and makes you comfortable with couple of commands

http://www.simple-talk.com/sql/database-administration/why-this-sql-server-dba-is-learning-powershell/
This one directly delves into how to us PS to automate some of the SQL Server admin task, includes good practical samples.

http://itknowledgeexchange.techtarget.com/dba/powershell-sql-server-health-check-script/ - Here is the really working sample that dumps the database information into an excel sheet.

Using the above links you should be able to build a script which can scan all your SQL Servers (listed in a given txt file) and dump the required information into a nicely formatted excel sheet.

But in my case most of the automation that I built around SQL Server was using VB Script, HTML templates and DOS!

I think Power Shell is for new age Database Administrators.

About Me

By profession I am a Database Administrator (DBA) with total 13 yrs. of experience in the field of Information Technology, out of that 9 yrs as SQL DBA and last 3 years in IBM System i/iSeries and DB2 LUW 9. I have handled Developer, plus production support roles, and I like both the roles. I love and live information technology hence the name "Techonologyyogi" Apart from that I am a small, retail investor, with small investments in India and United States in the form of Equity holdings via common stocks. Don't ask me if I have made money, I have been loosing money in stocks.