SQL SERVER – 2012 RC0: Fix Setup Error: File format is not valid

I recently had long email conversation with one of the blog reader who was struggling with installing SQL Server 2012 RC0 installation. I just thought I will publish what we have done and how we solved problem so if you are facing the same issue, you can avoid the same.

Though our conversation was very long – I have kept only relevant conversation here.

User: While installing the SQL Server 2012 RC0 the error which is displayed is: File format is not valid.
Pinal: Download the iso format idea again.
User: Downloaded the iso media and extracted it again into C Drive and attempted the installation – still the same error.
Pinal: What is the tool you are using to extract the file?
User: (Some tool)
Pinal: Use alternate iso extractor tool or  winrar to extract file.
User: It worked!

The original media was all fine. However, when user was using a software which extract the files from ISO to folder, it was corrupting few files. Well, if you face this issue remember to attempt new software to extract your file. If that does not work, try one more time to download the file.

Reference: Pinal Dave (http://blog.SQLAuthority.com)

About these ads

SQL SERVER – Bad Practice of Using Keywords as an Object Name – Avoid Using Keywords as an Object

Madhivanan is SQL Server MVP and very talented SQL expert. Here is one of the nugget he shared on Just Learned.

He shared a tip where there were two interesting point to learn.

  1. Do not use keywords as an object name
  2. [read DHall's excellent comment below]

He has given excellent example how GO can be executed as stored procedure. Here is the extension of the tip. Create a small table and now just hit EXEC GO; and you will notice that there is row in the table.

Create Stored Procedure

Create Table

Now execute following code

Now when selecting from table it will give us following result:

Now see following resultset:

So without inserting any data we inserted the data, well indeed good puzzle but very bad practical practice. Every body should be aware of this gotcha and avoid it. Thanks Madhivanan for teaching this interesting learning.

Republishing here with authorization of Just Learned.

Reference: Pinal Dave (http://blog.SQLAuthority.com)

SQL SERVER – Error: Deleting Offline Database and Creating the Same Name

Offline database is very interesting subject, and there are a couple of interesting details associated with it, which one must know.

There are two common queries related to offline database:

1)      My hard drive is getting full and I deleted my ‘offline’ databases. After deleting my offline databases, my hard drive is still full and there is no empty space.

2)      I recently deleted the ‘offline’ database, and now, when I am attempting to create database with the same name, it is giving me error that the database file already exists.

I can see why these questions are coming up frequently. The common understanding that seems to prevail is that when any database is deleted, files associated with the database (.mdf, .ndf and .ldf) are deleted automatically. This is true for any database that is an ‘online’ database. However, the behavior is bit different in the case of the ‘offline’ database. When any ‘offline’ database is deleted, files associated with the database are not deleted automatically. All the files related to the ‘offline’ database need to be deleted manually after deleting the offline database.

Reference: Pinal Dave (http://blog.SQLAuthority.com)

SQL SERVER – Plenty of SQL Community Updates

Every day we learn something new and we come across something which we like to read. I had decided to keep a log of things what I do during whole day. Here are few updates which I think you will find it interesting. This updates are in no specific order.

Comment by David Bridge on SQL SERVER – Effect of SET NOCOUNT on @@ROWCOUNT
David has written comment and clarified the message which I wanted to pass while writing blog post. I wish I had written the statement “NOCOUNT statement only affects the information messages and not the DML statement results ” which he wrote effortlessly in comment. Thanks David.

Blog by Vinod Kumar on SQL Server RC0 Resources
Vinod Kumar compiles the exhausting list of links and resources that might be of some interest to you on SQL Server 2012 RC0.

SQL Saturday 116
SQL Server 116 is here in India. This is going to very first SQL Saturday in India. Here are various links related to SQL Saturday 116.

Excellent Best Practices article by Aaron Bertrand
Aaron has written excellent timeless article on SQL Server Best Practices. If you have not read it earlier, well you read it now.

Just learned from Madhivanan – SSMS Allows you to ask a question in the MSDN forum directly from SSMS
I really loved this simple trick. I did know this earlier and I have now just learned.

SQL Server Interview Questions and Answers on Kindle
Our new book SQL Server Questions and Answers is now available on Kindle at special rate for this month.

Pluralsight SQL Server training courses by Dan Sullivan
I have so far attended every single course created by Dan on Pluralsight and find it very informative.

Well, these are my top 7 updates of yesterday.

Reference: Pinal Dave (http://blog.SQLAuthority.com)

SQLAuthority News – SQL Server Interview Questions and Answers Available on Kindle Format as eBook to Download

Reading the books on Kindle seems to be very popular. Since our new book released a month ago, we have received so many request from users regarding making it available on Kindle. Well, today we have acknowledge the request. Our new book is available to purchase on kindle.

SQL Server Interview Questions and Answers on Kindle

I am really impressed how kindle ebook format works. If I find any errata or make changes in the kindle format book now and re-publish the book in kindle format again, if you have purchased the eBook earlier, you will get updated version automatically and for FREE. If the fever of eBook reading on kindle is yet not caught up on you – you can still get this book on Amazon and Flipkart. Remember if you are expert in SQL Server – this book not for you but if you are looking for mastering the basics or a quick revision on SQL Server Concepts – this book is for YOU!

Here is the link to download Kindle Software for free PC, WP7, and in marketplace for various other mobile devices. I thank you for giving warm response to SQL Server Interview Questions and Answers book. I am motivated to write the next expanded version of this book.

The price of this book is currently set to low introductory price. It will be reset to normal price on 1st January, 2012.

Reference: Pinal Dave (http://blog.SQLAuthority.com)

SQLAuthority News – SQL Saturday 116 – SQL Saturday in Bangalore, India on January 7, 2012

This is the biggest news for SQL Enthusiast in India. SQL Saturday is here in India. PASS SQLSaturday’s are free 1-day training events for SQL Server professionals that focus on local speakers, providing a variety of high-quality technical sessions, and making it all happen through the efforts of volunteers. We think you’ll find it’s a great way to spend a Saturday – or any day.

SQL Saturday is FREE event all the attendees and 100% SQL community driven.

Schedule and Venue

Event Date: January 7, 2012
Event Time: 10 AM to 6 PM
Event Venue: Microsoft Singature Building, Domlur, Bangalore , Bangalore, India

Click here for link.

Who can participate


Cost to attend the event

FREE for all.

Call to Action – Register for the event

Experience suggests that all the SQL Saturday event always gets over capacity. There are always more attendees than the event venue can accommodate. Register for the event. SQLPASS website maintains waiting list after the capacity is full.

Call to Action – Submit SQL Session

Speaking at this SQL only event which happens world-wide is prestigious itself. You are welcome to submit your session title and abstract by December 10, 2011. We will have volunteers and speaker dinner either on event day or the day before.

Call to Action – Nominate yourself as Volunteer

Every successful event needs dedicated volunteers, this events needs your help. Send email to sqlsaturday116 “at” sqlsaturday.com your details. You can also opt yourself as volunteer when you register for the event.

Call to Action – Spread the words

Blog, tweet, facebook it – spread the word. Use the #SQLSat116 as your hashtag on tweeter. Use the SQL Saturday Logo in your postings.

Reference: Pinal Dave (http://blog.SQLAuthority.com)

SQLAuthority News – Microsoft SQL Server ODBC Driver for Linux Available Now

Yesterday I went to watch movie based on recommendation of the readers on my Facebook page. If you think we only discuss SQL on facebook page, it is not correct. We discussion pretty much everything what DBA do in their daily life.

During the movie, someone recognized me from our blog photo. He changed his sit and while I was watching movie and asked couple of quick question. I understand it is a bad manner to talk in movie while others are watching but still answered him quickly. Let us call him Jatin.

Here is our conversation:

Jatin: Are you Pinal Dave?
Pinal: I guess so.
Jatin: Guess?
Pinal: I am.
Jatin: I have one SQL question?
Pinal: Sure – can we talk after the movie is over.
Jatin: This movie is boring any way.
Pinal: Hm… Some may like it too. Any way we should talk afterwords.
Jatin: Answer me when you can – how can I connect from Linux box to SQL Box?
Pinal: Oh… why do you want to do that?
Jatin: Now you are asking me question and prolonging the conversation – see you lost interest from this boring movie.
Pinal: Oh…I did… (silence)… you are correct. Let us talk after the movie.
Jatin: Nice blog by the way, I read it every day.

Well, that was it, after the movie was over – we all rushed outside and never connected. I never met Jatin afterwords, Infact, I do not know what is his real name. I wanted to answer his question and reason why he wanted to use Linux box to connect to SQL Server installed machine. Any way, Jatin if you are reading my blog everyday as you said, here is your answer. Please leave your answer in comment as well – do mention your real name and details so we can continue our conversation.

The Microsoft SQL Server ODBC Driver for Linux provides native connectivity from Linux to Microsoft SQL Server. The 64 bit version of the Microsoft SQL Server ODBC Driver for Linux provides robust data access to Microsoft SQL Server. It allows native C and C++ applications to leverage the standard ODBC API and connect to Microsoft SQL Server 2008 R2. Microsoft SQL Server ODBC Driver for Linux also comes with powerful tools – sqlcmd and bcp.

Details of Microsoft SQL Server ODBC Driver for Linux Available Now

Reference: Pinal Dave (http://blog.SQLAuthority.com)