Category Archives: Windows trick

How to migrate a SQL Server database to a lower version


After recently upgrading a SQL Server instance to SQL Server 2012 a few days ago, you noticed that your application is not functioning properly. You decided to roll back the upgrade by downgrading the SQL Server database engine to SQL Server 2008 R2.  After the downgrade of the database engine, you are unable to attach the databases or restore the backups of the databases, even though the database compatibility level is set to the downgraded version of SQL Server. You receive the following error message, when you attempt to restore the database:

Msg 1813, Level 16, State 2, Line 1
Could not open new database ‘DatabaseName’. CREATE DATABASE is aborted.
Msg 948, Level 20, State 1, Line 1
The database ‘DatabaseName’ cannot be opened because it is version 655. This server supports version 611 and earlier. A downgrade path is not supported.

This error message is generated because SQL Server automatically upgrades the database, when you restore or attach the database from lower version to higher version.  SQL Server does not allow you to restore or attach a database from a higher version of SQL Server to a lower version  of SQL Server. In this tip, we will look at a one time procedure which we can follow to downgrade the database from a higher version (SQL Server 2012) of SQL Server to a lower version (SQL Server 2008 R2) of SQL Server.


The error message in the problem statement occurs because the SQL Server database files (*.mdf, *.ndf and *.ldf) and backups are not backward compatible.  Backward compatibility is why we cannot restore or attach a database created from a higher version of SQL Server to a lower version SQL Server. However, there are a few options that can help us to downgrade the database from a higher version of SQL Server to a lower version SQL Server. These options include:

  • Generate Scripts wizard of SQL Server Management Studio
  • SQL Server Integration Services
  • Custom scripting and BCP

In this tip we will use the Generate Scripts wizard of SQL Server Management Studio.  Here are the basic steps we need to follow:

  • Script the database schema in higher version of SQL Server by using the Generate Scripts wizard of SQL Server Management Studio interface.
  • Connect to the lower version of SQL Server, and then run the SQL scripts that were generated in the previous step, to create database schema and copy data.

In the next section, I will demonstrate the steps for downgrading a SQL Server 2012 database to SQL Server 2008 R2 database.

Note: For demonstration purpose, I’ll be downgrading the OUTLANDER database hosted on my SQL Server 2012 instance (IITCUKDEV01) to SQL Server 2008 R2 instance (IITCUKSQLSERVER2008).

Step-by-Step Demo: Downgrading a SQL Server 2012 database to SQL Server 2008 R2

Step-1: Script the schema of the OUTLANDER database on the SQL Server 2012 instance (IITCUKDEV01) using the Generate Scripts wizard of the SQL Server Management Studio interface.

In Object Explorer connect to IITCUKDEV01, right-click OUTLANDER database, expand Tasks and choose “Generate Scripts…”.

In Object Explorer, right-click OUTLANDER database, expand Tasks and choose “Generate Scripts…”

This launches Generate and Publish Scripts wizard. Click Next, to skip the Introduction screen and proceed to the Choose Objects page.

SQL Server Management Generate and Publish Scripts Wizard - Introduction Screen

On the Choose Objects page, choose option “Script entire database and all database objects”, and then click Next to proceed to “Set Scripting Options” page.

Choose option Script entire database and all database objects in the SQL Server Management Studio Generate Scripts Wizard

On the Set Scripting Options page, specify the location where you want to save the script file, and then choose the Advanced button.

Choose option Specifying scripting options in the SQL Server Management Studio Generate Scripts Wizard

In Advanced Scripting Options dialog box, set Script Triggers, Indexes and Primary Key options to True, Script for Server Version to SQL Server 2008 R2, and Types of data to script to Schema and Data.  This last option is key because this is what generates the data per table.

Choose option Set scripting options including scripting the Schema and Data

Once done, click OK, to close Advanced Scripting Options dialog box and return to Set Scripting Options page. In Set Scripting Options page, click Next to continue to Summary page.

After reviewing your selections on Summary page, click Next to generate scripts.

Generate and Publish Scripts - Summary Interface

Once scripts are generated successfully, choose the Finish button to close the Generate and Publish Scripts wizard.

Generate and Publish Scripts wizard iterating through each object

Step-2: Connect to the SQL Server 2008 R2 instance (IITCUKSQLSERVER2008), and then run the SQL scripts that were generated in Step-1, to create the OUTLANDER database schema and copy its data.

In Object Explorer connect to IITCUKSQLServer2008, then in SQL Server Management Studio, open the SQL Server script you saved in Step-1.

Opening SQL Script to install OUTLANDER database
Opening SQL Script to install OUTLANDER database

Modify the script, to specify the correct location for the OUTLANDER database data and log files. Once done, run the script to create the OUTLANDER database on IITCUKSQLServer2008 instance.

Restoring OUTLANDER database

Upon successful execution, refresh the Database folder in Object Explorer. As you can see in the following image OUTLANDER database has been successfully downgraded.

Verifying OUTLANDER database downgrade

Next Steps

  • To avoid this issue, always make sure that you perform a full backup of the database before you upgrade the SQL Server and database to a higher version of SQL Server.  In addition, be sure to thoroughly test the application prior to releasing the application to the users.
  • Consider this downgrade option as your last option to rollback from an upgrade because the time and storage needed can be very large.
  • With a very large database be sure you have sufficient storage to support the data needs.
  • Be sure to verify row and object counts as well as test your application before releas

5 Tweaking Tools Make Windows 7 Like Windows 8

based Windows 8 is getting around the corner. But for those who like the Tiles, here are a few tools that can make your Windows 7 to the tiles.
Omnimo 4

Omnimo 4 is a Windows Phone 7 inspired multifunctional interactive desktop information center based on Rainmeter, a popular desktop customization platform. It turns your desktop into a productive and attractive workarea where delivers the information you need. Every interactive tile on the desktop gives you information at glance, and can be easily customized to your needs.
Omnimo 4 requires Rainmeter 2.0 or higher installed on your Windows 7 system first before can be installed and configured.


AeroTile is a free portable utility tools that adds an selective glassy aeroful tiles on your computer’s desktop. By using it, you have the choices choosing many of the options like My Computer, Control Panel, Fonts, My Documents, etc.
It’s a fairly easy to use tool. Simply download and extract the files from the zipped file, and launch it. Then, pick up the items you want them to show on your desktop in tile shape. The only downside is that you will have to manually organize those tiles to make them layout neatly.

Mosaic (formally known as Metro Home 2)

Mosaic is an application that brings Metro UI to your desktop. It’s a set of widgets that displays in tile on your desktop showing the content from your local computer or from the Internet.
When the application is running, it shows a list of selective choices from the panel that stick to the right side of your desktop. Simply click to select them and it will immediately show on the desktop. Once on the desktop, you will be able to move them around just dragging and dropping to the grid predefined by the application.


Windows8Menu is a simple portable application that put the Windows 8 UI on top of Windows 7 desktop. It works just like any other application that you can simply launch and see what it offers. You can also customize the settings to show the stuff you would like to see.



Zetro is a Windows 8 metro UI style theme made for Windows 7. It brings the snazzy tiles to Windows 7. The Zetro theme takes a few steps to get Windows 7 ready to the tile, but it’s fairly easy to follow the instructions in the Readme file from the package. And because it’s a Theme pack, you can switch between Tiles and Aeros back and forth fairly easy.

Some keyboard shortcut for windows specially

• Windows key – access Start menu
• Windows key + Pause – open System Properties
• Windows key + D – minimise/restore windows
• Windows key + F – open Search window
• Windows key + F1 – open Help and Support Center
• Windows key + E – open Windows Explorer window
• Windows key + M – minimise all windows
• Windows key + TAB – move through open windows on Taskbar
• Windows key + SHIFT + M – restore all windows
• Hold CTRL while dragging – make a copy of selected item
• Hold CTRL + SHIFT while dragging – make a shortcut to selected item
• CTRL + ESC – open Start menu
• CTRL + C – Copy
• CTRL + X – Cut
• CTRL + V – Paste
• CTRL + A – Select All
• CTRL + Z – Undo
• CTRL + B – Bold highlighted text
• CTRL + U – Underline highlighted text
• CTRL + I – Italicise highlighted text
• CTRL + Plus key – increase browser text size
• CTRL + Minus key – decrease browser text size
• CTRL + ALT + DELETE – open Task Manager
• ALT + underlined letters in menus – open menu item
• ALT + ENTER – show Properties of selected object
• ALT + F4 – close current window or program
• CTRL + F4 – close window within program
• ALT + TAB – switch between open windows or programs
• TAB – move forwards through control items or links in current window
• SHIFT + TAB – move backwards through control items or links
• ENTER – click selected control item or link
• BACKSPACE – move up one folder level
• HOME – go to start of current line or web page
• END – go to end of current line or web page
• CTRL + END – go to end of current document
• PAGE UP – move up through current document or web page
• PAGE DOWN – move down through current document or web page
• PRINT SCREEN – take snapshot image of current screen
• ALT + PRINT SCREEN – take snapshot image of current window
• F2 – rename selected item
• F5 – refresh current window or web page
• F6 – move through window panes

Matrix Effect using notepad

        This is amazing notepad trick which will display matrix effect like you might have seen in movies, that is numbers flashes in green colour. Basically we will be creating a small batch file in notepad.

  • Go to Notepad and copy below codes

@echo off

color A


echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%

goto star


  • Save this file as matrix.bat 
  • Now open this file as see matrix effect on your screen.

How to try the Windows 8 Metro interface free

Windows 8 is still just a promise, except for a few folks with developer’s builds. If you want to try out the fabled Metro interface on your computer, there’s now a solution. The metro7 app changes theWindows 7 interface to make it look and feel like Metro. Here’s how to use it:

    1.Download and install the app here.
    2.Start it up. You should see a tiled interface, though it is separate from your desktop.
    3.Click the arrow in the upper right to set your options, pin programs or Web sites to the tile screen, and more. Experiment! The built-in apps are minimal, but you can get more or add any apps or bookmarks you like.

Step 3: Settings.
   Step 3: Settings.
4. You can drag tiles to rearrange them, or drag down to the bottom to trash them.

Step 4: Move tiles.

How to create video clips in VLC

Now you can keep your favorite parts of any video.
With the holidays coming up, your creative side may be seeping into your thoughts. If you have a collection of videos of family, friends, or even events, you can do neat things with clips from these. VLC offers a superfast way to create clips for later editing or enjoyment.
Begin by downloading and installing VLC.
Step 1: Open VLC and open the menu labeled View. In this menu, select Advanced Controls.
Step 2: Open the video you wish to take a cut from. Use the slider to navigate to the time you wish to begin recording. The Frame by frame button, located to the right of the Advanced Controls, will allow you to pinpoint the exact time you will wish to begin recording.
Step 3: Press the Record button on the left end of the Advanced Controls. Once recording is toggled, press Play and allow the video to play through the section you want saved. At the end of the desired section, press the Record button again.
The video cut will be saved automatically by VLC (in Windows 7 the video will be placed in the Videos library). Share your clip with your friends or keep that treasured moment for later.