Friday, November 07, 2008

 

Ever running on low memory wont mean you can't run Internet Explorer, "Start without Add-ons" will give help you in running Internet Explorer but it comes with a price?

If you run without add-ons options Internet Explorer will skip all the add-ons while loading in memory.

Try on and feel the difference.

Bandagi!

11/7/2008 4:56:35 PM UTC  #    Disclaimer  |  Comments [0]  | 
 Sunday, November 02, 2008
This post is in response to Top 10 Things I Hate About SQL Server found at http://weblogs.sqlteam.com/jeffs/archive/2005/05/24/5248.aspx

1. SQL is too complicated!

This comment doesn't make a lot of sense. If you design your database to be properly NORMALIZED, you wouldn't be storing "JAN, FEB, MAR" in one column. Learn how to NORMALIZE your tables and it will make your life a lot easier.

MS didn't make this complicated. It's a standard, mathematically-proven concept that has been around since Dr. Codd introduced the Relational Model.

2. Datatype conversions!

Using VARCHAR for everything is very poor strategy. If you have a column that's supposed to hold only INTEGER values, but use a VARCHAR, how do you keep people from entering "ZDFGEH34" in it?

Different Data Types and conversions are a standard in any language. Additionally, SQL Server has some implicit conversions; although it's best to tell SQL Server exactly what you want. After all, you probably learned a long time ago that computers can only do *exactly* what you tell them to do. They used to call it "GIGO" - Garbage In, Garbage Out.

By the way, what do you get when you add "A" and "1"? Is it "B"? Or is it "A1"? Probably depends on whether you're using your VARCHARs to represent hexadecimal numbers or hard text. Unfortunately SQL is only as smart as the developer. For every person who wants "12" + "5" to equal "17", there is someone else who just wants to concatenate the strings.

3. Uh .... Formatting?

Uh... If you haven't figured it out yet, SQL Server is not a presentation platform. It is a data storage and retrieval platform; what we often refer to in the biz as the "back end". You can write functions to do the formatting for you, or you can do it on the "front end", as God and ANSI intended. After all, if your SQL Server is located on a box in the next state, how do you properly right-justify or center the data using a non-fixed-width font at the server? Keep in mind that your SQL Server might have different display settings than your workstation. Are you going to pass in the various required hardware settings with each query? Query Analyzer is a developer's tool, not an end-user database access application. (REF: "front end", "back end")

4. Sorting?

Really simple. Add an "ORDER BY" clause to your orders. If you want SQL Server to *know* that results are to be sorted by Last Name/First Name without telling it, set up a CLUSTERED INDEX. Otherwise, how will the next user get a result set ordered by ADDRESS? Work location? Date of Birth??? Unfortunately having the options to bring the data back in ANY ORDER means you have to actually type in "ORDER BY Lastname, Firstname". P.S. - You can copy and paste the ORDER BY clause I just gave you to avoid all that tedious typing.

Oh yeah, that months out of order thing is one of those great benefits of storing ALL your data as VARCHARs instead of doing it the RIGHT WAY.

5. The IN() operator never works!

IN works just fine. It does not split up lists, like it appears you want. There are plenty of ways to do that though; if you PROPERLY NORMALIZE your data that is. But it sounds like that's not really an option for you anyway.

6. Foreign Keys Constraints !

It's called DRI (Data Referential Integrity), and it's built into SQL Server.

7. Primary Keys don't work!

LMMFAO. You need to use the NATURAL KEY, which would be StateName or StateAbbreviation in your "tblStatesTable" (REF: Redundant Department of Redundancy). Set your PRIMARY KEY on the NATURAL KEY. Study up on the differences between NATURAL and SURROGATE KEYS.

8. S-Q-L is S-L-O-W !!!

LMMFATFO. It's SLOW because you're using LIKE '%JAN%' in your query. It's SLOW because the WHERE clause below cannot use an INDEX. It's SLOW because you did not properly NORMALIZE your data.

Just for comparison, pull out a phone book, and locate every last name entry that begins with "JOH" (i.e., "JOH%"). Now locate every last name entry that has "TL" anywhere in it (i.e., "%TL%"). Which one will take you longer? SQL Server is only as smart as the developer.

This is all the more ridiculous because you name your tables "tblTable" (how redundantly redundant) and your columns tblTable_colMonthList (extreme, over-the-top, excessive redundantly redundant redundancy).

9. Cryptic Error Messages!

That means that you don't have an Order in the Orders table to match the row you're trying to put into the Order Details table. Really simple stuff. Your GROUP BY problem is caused because you're using aggregate functions and not specifying the correct columns in the GROUP BY. The Error Messages are for Developers, and they make perfect sense; although you could always make your own error messages. Look it up in Books Online sometime.

You're trying to truncate tables in the MASTER database? Are you on medication?? Bill Gates could probably afford to buy bad developers brain transplants; but why in the world would he?

10. Table and Column referencing!

Look up Dynamic SQL sometime. It's called sp_executesql or EXEC. There are a bazillion ways to dynamically build SQL statements, but they're very dangerous. I'd be wary of letting anyone who TRUNCATES Master database system tables write dynamic SQL against my databases. Geez.

INSERT works just fine. And you can modify the design of your tables with ALTER TABLE. But then again if you need to dynamically alter your tables it's a pretty good sign that you don't know what the heck you're doing anyway. A properly NORMALIZED database makes SELECTING the data easier, and alleviates the need for DYNAMIC SQL. SQL Server doesn't really need to address this, since Database Design 101 usually does a pretty good job of addressing it. For those who didn't sleep through it anyway.

11/2/2008 7:16:57 PM UTC  #    Disclaimer  |  Comments [0]  | 
 Friday, October 31, 2008

PASS Community Summit 2008 Bulletin
     

Looking for ROI Justification to Attend PASS Summit 2008?

Look no further. This is the one SQL Server event you simply can't afford to miss. We've assembled a list of ideas that you can customize in order to justify the cost to your manager.

REGISTER NOW

With three days of proven best practices, how-tos, and practical training to make you and your teams successful with SQL Server you simply need to attend. Our action-packed agenda includes:

Face-to-face interaction with over 300 Microsoft SQL Server development team members

Best Practices for using SQL Server directly from the Microsoft Customer Advisory Team

Over 150 technical sessions, including 14 pre-conference sessions and 29 hands-on-labs

And so much more.

Join your SQL Server colleagues and register now.

PASS Summit 2008
Nov 18-21, Seattle WA
$1,595 until November 18

Extended Hotel Discounts
Have a better Summit experience and stay at the center of activity. Contact the hotels below to access the best rates in Seattle.

Red Lion Hotel
$179/night
Call 206-971-8091
Email Red Lion hotel
(mention PASS Summit)

Renaissance Seattle
$185/night
Call 206-583-0300
Reserve online
(use code SQLSQLA)

The Westin Seattle
$195/night
Call 206-728-1000 x5533
Email Westin hotel
(mention PASS Summit)

 

dell
Microsoft VMWare

   


Contact Us | Privacy Policy | Terms of Use

Copyright © 2008 PASS
Professional Association of SQL Server
Suite 2100- 203 North LaSalle Street Chicago IL 60601
604.899.6009
www.sqlpass.org

All Rights Reserved

 

 

Events | News | PASS
10/31/2008 2:25:50 PM UTC  #    Disclaimer  |  Comments [0]  | 
 Thursday, October 30, 2008

http://www.microsoft.com/middleeast/gulf/ITEvolution/images/logo.png

Technology is moving into the next era. Are you ready to take the leap with us?

At IT Evolution 08, join us as we unveil the latest technologies that could help change the very DNA of your IT department.

Get a front row seat as we unveil technologies like Hyper-V, App-V and Virtual Machine Manager that will help you ride the hottest trend in IT today - Virtualization. Learn how the new SQL Server 2008 will help you manage any data, any place, any time. See how Visual Studio 2008 provides the most productive developer experience and learn how you can deliver the next generation of rich interactive applications with Silverlight.

 

http://www.microsoft.com/middleeast/gulf/ITEvolution/Images/Register.gif

 

City

Date

Abu Dhabi

Tue Nov 4th

Bahrain

Sun Nov 9th

Oman

Sat Nov 15th

Qatar

Wed Nov 19th

Dubai

Sun Nov 23rd

Kuwait

Wed Nov 26th

 

http://www.microsoft.com/middleeast/gulf/ITEvolution/Images/Robot.png

http://www.microsoft.com/middleeast/gulf/ITEvolution/Images/IT.png

http://www.microsoft.com/middleeast/gulf/ITEvolution/Images/Microsoft.png

http://www.microsoft.com/middleeast/gulf/ITEvolution/Images/bg_bottom.png

http://www.microsoft.com/middleeast/gulf/ITEvolution/Images/ITELogos.JPG

Events | News
10/30/2008 1:08:00 PM UTC  #    Disclaimer  |  Comments [0]  | 
 Sunday, October 26, 2008

Once again I've been elected as ATE SQL Server "Ask The Expert" for TechEd Europe 2008 Barcelona. I was excited throughout the year that whether I would be able to be there or not and finally I my wish comes true. Now I am getting prepared to answer all the questions hopefully and to attend the KeyNote from Jason Zander which is the most exciting part.

Last year there was great number of audience around 4000+, this time I don't know what would be the strength.

Thanks to God giving me another chance to be with the Product team and to visit the place.

Stay tuned for the latest updates.

Bandagi!

News | TechEd
10/26/2008 1:07:50 PM UTC  #    Disclaimer  |  Comments [0]  | 
 Saturday, October 25, 2008

Often question comes to mind "What's the difference between Primary and Unique Key"

Primary Key:

  • Enforce uniqueness
  • Never allow NULL value
  • By Default create Clustered Index on column

Unique Key:

  • Enforce uniqueness
  • Allow Null value
  • By Default create Non Clustered Index on column

 

Bandagi!

10/25/2008 10:26:53 AM UTC  #    Disclaimer  |  Comments [0]  | 
 Friday, October 24, 2008

So far you have heard about Deadlock where this Livelock comes in?

Deadlock, if a process acquires a lock on a piece of data and another process is also looking for the same piece of data but due to first process waiting indefinitly then it would become a Deadlock, unless one of the user processes is terminated. SQL Server detects Deadlock and terminates one user's process.

Livelock, if a process's exclusive lock request is repeatedly denied due to series of overlapping shared locks then it would become a Livelock, SQL Server detects the Livelock and after 3 denials terminates the Livelock. Another example of Livelock; when a read transaction hold a lock on a table and forcing a write transaction to wait indefinitly.

 

Bandagi!

10/24/2008 11:17:01 AM UTC  #    Disclaimer  |  Comments [1]  | 
 Thursday, October 23, 2008

This is a basic checklist and if you follow then you can secure your SQL Server instance.

  • Disable all guest accounts
  • Apply strong passwords to SA account
  • Rename builtin administrative account
  • Prefer Windows Authentication
  • Install Secure Socket Layer or SSL
  • Install a Network Firewall
  • Isolate SQL Server from your Web Server
  • Restrict physical access to SQL Server
  • Secure SQL Server data files with NTFS Permissons

 

Bandagi!

10/23/2008 11:26:37 AM UTC  #    Disclaimer  |  Comments [0]  |