Friday, November 26, 2010

SQL Server 2011 - DENALI

..can be downloaded from here. Well, nothing new and exciting here. If you have installed SQL Server 2008, you will find this installation familiar. As was expected, the UI is a bit glossier now.

If you want to play around with the next gen SQL Server, here are the sample databases

Wednesday, October 20, 2010

SQL Server myths and misconceptions: Paul Randal

Here is a nice collection of misconceptions and explanations about SQL Server by Paul Randal. If you are a SQL Server novice, I think this will help you a lot in diving deep down into the subject -

Download common SQL Server Myths

Monday, September 13, 2010

The more magical things seem....

.....That would be implementing some level of eventual consistency the hard way, but to be honest, that is my ultimate goal after all: knowing how things work.

I prefer having to know how a few things are supposed to work in order to get them to work, than having them work easily at the cost of hiding the implementation details from me altogether. I tend to avoid tools that do too much for me. The more magical things seem, the less likely I am to be able to fix them

--- Jonas Galvez

Wednesday, July 14, 2010

Detect Fragmentation SQL Server 2005

SELECT AS databaseName
, ps.OBJECT_ID AS objectID
, ps.index_id AS indexID
, ps.partition_number AS partitionNumber
, ps.avg_fragmentation_in_percent AS fragmentation
, ps.page_count
FROM sys.databases db
INNER JOIN sys.dm_db_index_physical_stats (NULL, NULL, NULL , NULL, N'Limited') ps
ON db.database_id = ps.database_id
WHERE ps.index_id > 0 
AND ps.page_count > 100 
AND ps.avg_fragmentation_in_percent > 30
OPTION (MaxDop 1);

The above script tries to find fragmented indexes in ALL the databases. If you want to run this against a specific database, replace ps.database_id with the database id from sys.databases

Sunday, June 27, 2010

Make checklists

Wise words: "A short pencil is better than a long memory"

DBAs - Make checklists!

Sunday, June 6, 2010

Buck Woody: Seek first to understand, then to be understood

Worth remembering - From Buck Woody's blog

One of the most important (and most difficult) lessons for a technical professional to learn is to not jump to the solution. Perhaps you’ve done this, or had it happen to you. As the person you’re “listening” to is speaking, your mind is performing a B-Tree lookup on possible solutions, and when the final node of the B-Tree in your mind is reached, you blurt out the “only” solution there is to the problem, whether they are done or not.

There are two issues here – both of them fatal if you don’t factor them in. First, your B-Tree may not be complete, or correct. That of course leads to an incorrect response, which blows your credibility. People will not trust you if this happens often.

The second danger is that the person may modify their entire problem with a single word or phrase. I once had a client explain a detailed problem to me – and I just KNEW the answer. Then they said at the end “well, that’s what it used to do, anyway. Now it doesn’t do that anymore.” Which of course negated my entire solution – happily I had kept my mouth shut until they finished.

So practice listening, rather than waiting for your turn to speak. Let the person finish, let them get the concept out, give them your full attention. They’ll appreciate the courtesy, you’ll look more intelligent, and you both may find the right answer to the problem.

Friday, May 21, 2010

Dedicated Administrator Connection - SQL 2005

When you try to connect to a SQL server instance using the Dedicated Administrator Connection(DAC), from SSMS - the following error will occur : "Dedicated administrator connections are not supported(Object explorer).

The thing is, dedicated administrator connection only works when there are no concurrent active connections. So, you gotta connect by clicking on "New Query" button - and then connect with



sqlcmd -E -S servername -A

When a server level trigger prevents new connections to SQL server, then you might want to connect using the DAC and troubleshoot.

By default, only local dedicated admin connections are enabled - if you want to enable remote DAC, use Surface Area Configuration too.

exec sp_configure 'remote admin connections', 1

Wednesday, May 19, 2010

Install IIS on windows 7

I don't understand why Microsoft makes it extremely difficult to install something as trivial as IIS on one's machine. Installing IIS on XP if u don't have XP setup cd is a nightmare. There are a few workarounds though.

If you are trying to install IIS on your windows 7 machine, here is an easy way. Worked for me, let me know if it works for you!

Type the following command into a script:

start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ASP;IIS-CGI;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-ServerSideIncludes;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ODBCLogging;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;IIS-ClientCertificateMappingAuthentication;IIS-IISCertificateMappingAuthentication;IIS-URLAuthorization;IIS-RequestFiltering;IIS-IPSecurity;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-ManagementScriptingTools;IIS-ManagementService;IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;IIS-LegacyScripts;IIS-LegacySnapIn;IIS-FTPPublishingService;IIS-FTPServer;IIS-FTPManagement;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI
And boom!

Source: here

Friday, May 7, 2010

Bitnami Stacks

Want to play around with django without going through the hassle of installation configuration etc., Bitnami django stack lets you perform a super fast django install, your test environment will be up and running in a matter of minutes

Also checkout other stacks too. Wordpress, Drupal, SugarCRM, Alfresco to name a few.. 

Friday, April 30, 2010

When was your server last restarted?

Since Tempdb gets recreated every time the server is restarted, all you need to know is when was tempdb created -
SELECT create_date
FROM  sysdatabases
WHERE database_id = 2;
Another way -
SELECT sqlserver_start_time
FROM sys.dm_os_sys_info

Thursday, April 22, 2010

MariaDB-better branch of MYSQL Database server

MariaDB is a backward compatible, drop-in replacement branch of the MySQL® Database Server. It includes all major open source storage engines, including the Maria storage engine.
You can find the MariaDB code on Launchpad, and download binaries here.
MariaDB is community developed in collaboration with Monty Program. Our ambition is to make MariaDB the best open and free branch of MySQL Database Server for the end user, developer and partner communities.

Gotta watch this

Sunday, January 3, 2010

Snake Wrangling for Kids

Snake Wrangling for Kids @ Jason R Briggs: "“Snake Wrangling for Kids” is a printable electronic book, for children 8 years and older, who would like to learn computer programming. It covers the very basics of programming, and uses the Python 3 programming language to teach the concepts.

There are 3 different versions of the book (one for Mac, one for Linux and one for Windows), and the printable 1.4MB PDFs can be downloaded from the Google Code project for free (zipped size is about 1MB):"

Online whiteboard: alternative to Google Wave

Scribblar is great for
* Online training and tutoring
* Revising artwork and images
* Creative brainstorming
* Sales and product demos
* Interviews and tests

Ebook: Invent your own computer games with python

"Invent Your Own Computer Games with Python" is a free e-Book that teaches you how to program in the Python programming language. Each chapter gives you the complete source code for a new game, and then teaches the programming concepts from the example.

"Invent with Python" was written to be understandable by kids as young as 10 to 12 years old, although it is great for anyone of any age who has never programmed before.

read the book here