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.
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 PROCEDURE GO AS
SELECT 1 AS NUMBER
Create Table CREATE TABLE T1 (ID INT)
Now execute following code INSERT INTO T1(ID) EXEC GO;
Now when selecting from table it will give us following result: SELECT * FROM T1
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.
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.
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.
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.
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.
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
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.
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.