Are You Following SQL Erudition yet?!

Photo credit: https://www.flickr.com/photos/kalexanderson/5696097036/

Like what you read here at SQL Erudition?! Why not follow the blog to get an email notification for new posts?

WordPress users can simply click on the Follow button. The button is at the top of this page or in the sidebar.

Not a WordPress user?! No issues! Follow via email address in the Follow|Subscribe field in the sidebar of this page and you are done!

Or maybe follow on Twitter!

Simple Fix to a Backup Restore Error Due to Disk or Cluster Resource Issue on SQL Server

One of our database restore attempt failed with an error message that mentioned cluster resources. At least the error message indicated that the issue was not related to backward compatibility but rather a physical resource or cluster settings.

Error Details

The Error Message Window –

SQL Restore Error - sqlerudition.wordpress.com
SQL Restore Error – sqlerudition.wordpress.com

The Error Message –

TITLE: Microsoft SQL Server Management Studio
------------------------------

Restore failed for Server 'MYDEVSQLSERVER'.  (Microsoft.SqlServer.SmoExtended)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.2500.0+((KJ_PCU_Main).110617-0038+)&

EvtSrc=Microsoft.SqlServer.Management.Smo.

ExceptionTemplates.FailedOperationExceptionText

&EvtID=Restore+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

System.Data.SqlClient.SqlError: Cannot use file 'J:\MSSQL10_50\MSSQL\DATA\MyDatabaseName.mdf' for clustered server. Only formatted files on which the cluster resource of the server has a dependency can be used. Either the disk resource containing the file is not present in the cluster group or the cluster resource of the Sql Server does not have a dependency on it. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.2500.0+((KJ_PCU_Main).110617-0038+)&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

Both the links in the error message above pointed to a missing information message on Microsoft website –

No information on the restore error.
No information on the restore error – sqlerudition.wordpress.com
Details
ID: Restore Server
Source:
We’re sorry
There is no additional information about this issue in the Error and Event Log Messages or Knowledge Base databases at this time. You can use the links in the Support area to determine whether any additional information might be available elsewhere.
Thank you for searching on this message; your search helps us identify those areas for which we need to provide more information.

Cause and Resolution

We determined the cause rather quickly. The source system of the backup file had a drive letter layout that was different from the destination server. The restore process was trying to create the data files on a drive that didn’t exist on the destination! So the location of the files was changed in the restore dialog to a correct drive letter of the destination server. After that the restore progressed normally.

Embed Facebook Posts in WordPress. But Why?

Facebook with WordPress - aalamrangi.wordpress.com

Posts on a WordPress blog can be shared on social media sites like Facebook, Twitter etc. You can do the reverse too and share Facebook page posts in a WordPress blog post which will include the Facebook comments, likes and shares. The Facebook page timeline has to be public.

So you first post something on your blog. Then you share it on Facebook. Then you again share the Facebook post back to your blog! Why would someone do this kind of cross posting?! The answer is, to promote your Facebook page with your blog readers and vice-a-versa. Even if you are not promoting a page (because it is not YOUR page), Facebook posts from others’ pages can still be useful to your blog readers or relevant to what you already write about.

Now, why Facebook? A Facebook user is most likely just browsing, not actively looking for solutions to any technical issue. But they sure love to share and read interesting stuff. So by posting to a Facebook page, there is a higher chance of someone liking or sharing it with their friends and as a result catch the attention of another casual browser. Oh yes, there are social-sharing buttons on a WordPress post too. But those buttons will be used by a reader who is already on your blog. Also, in some situations the sharing buttons may not even work due to restrictions like work network, device issues etc. The point here is to engage a casual reader on Facebook who is not actively looking for content on a search engine or a forum.

On the other hand, most of blog readers are looking actively for a solution to an issue. There is a high chance that they have been directed to the blog via a search engine result or a technical forum thread about a specific issue. (Check your stats, duh!) Very few are here for general reading. As a blogger, I would like to capture the interest of this “accidental” reader and hope that they return. One way for me to stay connected with them is to have them subscribed to or follow my blog through (at least one or preferably) various channels like email, RSS, WordPress, Twitter, Facebook etc. Some people may be reluctant to share their email address but may be willing to Like the Facebook page. Sending a new reader to your Facebook page and getting them to Like your Facebook page is equivalent to getting a new subscriber. Of course the restrictions mentioned above will come into play here too but the opportunity can still be used to make the reader aware of a Facebook page. With its huge active user count, Facebook is a good medium for outreach and engagement. Major websites report that bulk of their views are driven by social media sites. Consider the Facebook cross-post as a banner ad for yourself!

To promote your blog, you can either use your personal Facebook profile page or create a new page for the blog. I would suggest the latter so that you don’t spam your non-tech friends with technical rants.

I plan to experiment with various blog promotion strategies, especially in the technical niche, and write in more detail about them. I have started a Facebook page for this blog and will share my adventures periodically. If you are interested in following my learning path, you can subscribe to this blog or like my Facebook page. (Notice what I did right there?!)

For now, here is an embedded Facebook post –