whoami and echo in Windows??

were you ever curious to know on which domain you are logged into currently and what is your user SID and what are all the groups you belong to and what are all the permissions you’ve etc??  Wouldn’t it be nice if we get all this info at a single place, with a single command? “WHOAMI” is the guy which can do it for you. Before moving on to WHOAMI please see below screenshot for legacy “ECHO” command. Basically I’m showing you how can we pull username and/or domain name.

WHOAMI:

Basic “whoami” will give you the same info..you can see below.

Let’s get little fancy now…by appending “/USER” switch.

in the above screenshot you can see SID as well…Okay, let’s see by appending “/FQDN” switch now.

well, how about appending “/ALL” Switch?

As you can see I’ve got very detailed information using “ALL”! Instead, I can buffer this to some text file using ‘>whoami.txt’ and open it later anytime using Notepad…

SQL Server 2012 RTM(Trial) Released today:)

At laaast…..Microsoft released SQL 2012 RTM(Trial) today!! They also made Feature Pack(s) Available for download. Go ahead and Download and Install RTM along with desired feature packs and Brand new SQL Server Data Tools 🙂 Official RTM will be released in early April 2012!

SQL Server 2012 RTM (Eval) can be downloaded from

http://www.microsoft.com/sqlserver/en/us/get-sql-server/try-it.aspx

or

http://www.microsoft.com/download/en/details.aspx?id=29066

For Feature pack, visit

http://www.microsoft.com/download/en/details.aspx?id=29065

For Data Tools, visit

http://msdn.microsoft.com/en-us/data/hh297027

Have Fun testing RTM 🙂

How Intelligent is SQL 2012 IntelliSense??

I’m assuming whoever reading this post is already aware of SQL Server 2008 SSMS brand new Enhancement “IntelliSense”. Being said that, was “IntelliSense” really Intelligent enough upto SQL Server 2008R2? IMHO, It’s not really smart enough to read our minds! But WHY?? Because, It’s not smart enough to recognize a word in middle of your Object name! For Example, if you need information regarding DB Mirroring Endpoints, you’ve to actually start your typing with  “SYS.DATABASE_MIRRORING_*******”. With all the new hundreds and hundreds of DMO’s available, it’s really difficult to remember each and every starting word of a DMO. It would be really nice if SSMS is smart enough to return all the Objects if it finds a word anywhere in the Object name. I mean, in the above example It should display a list of all DMO’s even though we just type “SYS.MIRR” irrespective of where the word “MIRR” actually present.

You know what, with SQL 2012 that is how it works 🙂 This Simply Rocks!! It makes our DBA life so simple…Yeyyyyyy 🙂

See below Screenshots for better understanding what I meant in the above paragraph.

SSMS 2008R2:

As you can see in the above Screen cap, it’s no where close to Mirroring DMV’s 😦 In other words, I’ve to remember the actual starting words in that DMV!!

SSMS 2012:

Here you can see a list of all the DMO’s which contain a word “Mirr” any where in the Object! This is what I call it as really “Intelligent”. This is something which is really really Cooooooool!!!

Still running on SQL Server 2000/2005 today??

Are you running your business still on Backend SQL Server 2000 or SQL Server 2005 Databases? Well, let me tell you this. Go ahead and Upgrade to SQL Server 2008R2 now, at least give it a consideration right now. Plan for it, work with your architects and DBA’s for options you’ve.

Beware, Microsoft has announced End of Extended Support(April 2013) as well for SQL 2000. In other words you’ve to run your business on Unsupported SQL Server Version with Self-help Online Support only!!!!

If you are running on SQL 2005 and unaware of support policy, SQL 2005 is already running on Extended Support as of now. Mainstream support has already been ended on April 2011.

For more information and for understanding the options you’ve in place if your shop is still running on Older Versions of SQL Server, please refer to

 http://www.microsoft.com/sqlserver/en/us/support/support-updates.aspx.

DB Mirroring from SQL 2008SP2 to 2008 RTM or from SQL 2005 to SQL 2008?

Have you ever thought about this? Can we Mirror a Database from SQL Server 2008SP2(Principal) to SQL Server 2008(Mirror) RTM? Well, how about Mirroring from SQL Server 2005 to SQL Server 2008??  Let me show you the prior case.

Scenario 1:

Principal DB Engine Version: SQL Server 2008 SP2

Mirror DB Engine Version: SQL Server 2008 RTM

DB Name: DB_Mirror

Answer: Yes, we can! You can see below screenshot.

You should not see any Issues with Failover/Switching DB Roles from Principal to Mirror and Viceversa.

Scenario 2: 

Principal DB Engine Version: SQL Server 2005 SP3

Mirror DB Engine Version: SQL Server 2008SP2/2008R2.

I don’t have a SQL Server 2005 Instance to show you how it works, but Yes, we can! Very Important point to consider in this case is, Once you failover(Switch the Mirroring Roles) the Database from SQL 2005 to 2008, you can’t failback! This is One-Way approach. 

Note: You can’t setup Mirroring from 2008(as Principal) to 2005(as Mirror). Well, DB Version can’t be downgraded. In other words, we can’t restore a DB to lower Versions!!

Hope this is Informative and something which you can think about as an option for upgrading/Migrating Large Databases with very less acceptable downtime! ( Make sure, you understand all the caveats before trying this in your Prod Environments).