How to migrate a SQL Server database to a lower version


Problem

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.

Solution

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.

SSMS
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

তোমার চোখ এতো লাল কেন?


আমি বলছি না ভালোবাসতেই হবে, আমি চাই
কেউ একজন আমার জন্য অপেক্ষা করুক,
শুধু ঘরের ভেতর থেকে দরোজা খুলে দেবার জন্য।
বাইরে থেকে দরোজা খুলতে খুলতে আমি এখন ক্লান্ত।

আমি বলছি না ভালোবাসতেই হবে, আমি চাই
কেউ আমাকে খেতে দিক।
আমি হাতপাখা নিয়ে,
কাউকে আমার পাশে বসে থাকতে বলছি না,
আমি জানি, এই ইলেকট্রিকের যুগ
নারীকে মুক্তি দিয়েছে স্বামী-সেবার দায় থেকে।

আমি চাই কেউ একজন জিজ্ঞেস করুক:
আমার জল লাগবে কি না,
নুন লাগবে কি না,
পাটশাক ভাজার সঙ্গে আরও একটা
তেলে ভাজা শুকনো মরিচ লাগবে কি না।
এঁটো বাসন, গেঞ্জি-রুমাল আমি নিজেই ধুতে পারি।

আমি বলছি না ভলোবাসতেই হবে, আমি চাই
কেউ একজন ভিতর থেকে আমার ঘরের দরোজা খুলে দিক।
কেউ আমাকে কিছু খেতে বলুক।
কাম-বাসনার সঙ্গী না হোক,
কেউ অন্তত আমাকে জিজ্ঞেস করুক: “তোমার চোখ এতো লাল কেন?”

– নির্মলেন্দু গুণ

Ip and Mac Hunter


This Software “IP & MAC Hunter” is help to collect IP,MAC of lan pc’s by its HostName.

Software window view

++++++++++++Soft Info++++++++++++++++++++
Product Name: IP & MAC Hunter
Version: 0.02.13 Beta
License: Freeware
First release date: 14-02-2013

+++++++++++++++++++++++++++++++++++++++++
////////////////////////Developer Info///////////////////////////
H.R.Shadhin
E-mail: dev@hrshadhin.me
web: hrshadhin.wordpress.com
/////////////////////////////////////////////////////////////

============Instalation & Requerment=====================
**NO need to install,its a batch program(Portable).Just run it.
** Work on any windows system(xp,vista,windows7,windows8)
**If you want to run on eailier version of windows(xxx<xp) need .Net version 2.0

How to Cross Compiling with codeblocks using linux


The following is how I did this on Ubuntu ‘Precise Pangolin’ Linux:

Step 1:

Install MingW32 for linux

Code:
# sudo apt-get install mingw32

Step 2:

Settings->Compiler and debugger settings

Code:
 Select GNU GCC Compiler and click the Copy button.
 Name this: MingW32 Compiler

Step 3:

Click the Compiler tab and then click the #defines tab.
Add the following:

Code:
  WINVER=0x0400
  __WIN95__
  __GNUWIN32__
  STRICT
  HAVE_W32API_H
  __WXMSW__
  __WINDOWS__

Click the Linker tab and the following under “Other Linker Options”:

Code:
-lstdc++
-lgcc
-lodbc32
-lwsock32
-lwinspool
-lwinmm
-lshell32
-lcomctl32
-lctl3d32
-lodbc32
-ladvapi32
-lodbc32
-lwsock32
-lopengl32
-lglu32
-lole32
-loleaut32
-luuid

*Note: Not all of these are REQUIRED… As I have been recently messing with compiling apps for windows with ogl and dx9 support I have realized that there are some additions I have needed to add here… I will update accordingly when I know more.

Step 4:

Click the Directories tab and the Compiler tab.

Code:
 Modify the path to read the following (where ix86 is your architecture type):
 /usr/i586-mingw32msvc/include

Click the Directories tab and the Linker tab:

Code:
 Modify the path to read the following (where ix86 is your architecture type):
 /usr/i586-mingw32msvc/lib

Click the Directories tab and the Resource Compiler tab:

Code:
 Modify the path to read the following (where ix86 is your architecture type):
 /usr/i586-mingw32msvc/include

Step 5:

Click the Programs tab:

Code:
 C compiler: i586-mingw32msvc-gcc
 C++ compiler: i586-mingw32msvc-g++
 Linker for dynamic libs: i586-mingw32msvc-g++
 Linker for static libs: i586-mingw32msvc-ar
 Debugger: i586-mingw32msvc-gdb    **** MORE ON THIS LATER ****

Click OK and save your changes.

Step 6:

Ubuntu’s mingw32 package and from what I can tell, MingW32 in general doesnt really have a solid gdb option for debugging natively in linux so we’re going to work around this using wine and mingw32’s latest insight build for windows

Install Wine

Code:

# sudo apt-get install wine

Step 7:

Download Insight here:

Code:
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=82725&release_id=371590

http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=82725&release_id=371590

Step 8:

Once you download insight.exe, extract the archive using wine:

Code:
wine insight.exe

I extracted this to my desktop

Step 9:

Move the insight folder to /opt

the path should now look like

Code:
/opt/insight/bin/gdb.exe

Step 10:

create a shell script in /usr/bin:

(note: shell scripts should start with a hash (#) bang (!), ie: “# ! / bin / sh ” [with no spaces] but when I add that the forum post tanks)

Code:
# sudo gedit /usr/bin/i586-mingw32msvc-gdb

and add the following:

Code:
wine /opt/insight/bin/gdb.exe "$@"

Save the file and quit gedit

Step 11:

Code:
# sudo chmod +x /usr/bin/i586-mingw32msvc-gdb

Now we have a way to execute the windows version of mingw32’s gdb for windows in linux using our shell script wrapper

Step 12:

Create a new console application project in Codeblocks…

Using the wizard select the MingW32 Compiler option.

Step 13:

Right click the project and go to properties. Click the Targets tab and set the Output Filename to be whatever you want with a .exe file extension. Make sure the Type is a Console Application.

Step 14:

Hit F9 in codeblocks and the hello world application runs!! YAY!

Set a breakpoint on line 5 and hit F8 and the application breaks in the debugger!! Woot!

Now you can successfully compile, execute, and debug windows applications in linux using codeblocks!!!

Source post:  Click here

Ubuntu 12.04 (Precise Pangolin) released!


The Ubuntu team is very pleased to announce the release of Ubuntu 12.04 LTS (Long-Term Support) for Desktop, Server, Cloud, and Core products.Codenamed “Precise Pangolin”, 12.04 continues Ubuntu’s proud tradition of integrating the latest and greatest open source technologies into a high-quality, easy-to-use Linux distribution. The team has been hard at work through this cycle, introducing a few new features and improving quality control.To be a bit more precise about what we’re releasing today…

There are 54 product images and 2 cloud images being shipped with this 12.04 LTS release, with translations available in 41 languages.The Ubuntu project’s 12.04 archive currently has 39,226 binary packages in it, built from 19,179 source packages, so lots of good starting points for your imagination!

For PC users, Ubuntu 12.04 supports laptops, desktops, and netbooks with a unified look and feel based on an updated version of the desktop shell called “Unity”, which introduces “Head-Up Display” search capabilities. Finding and installing software using the Ubuntu Software Centre is now easier thanks to improvements in speed, search and usability.

Ubuntu Server 12.04 has made it much easier to provision, deploy, host, manage, and orchestrate enterprise data centre infrastructure services with the introduction of new technologies such as “Metal asa Service” (MAAS), the Juju Charm Store, and the latest OpenStack version, codenamed Essex. These technologies further position Ubuntu Serveras the best OS for scale-out computing.

Read more about the new features of Ubuntu 12.04 in the following press releases:

http://www.canonical.com/content/ubuntu-server-1204-lts-certified-available-and-ready-hyperscale-world

http://www.canonical.com/content/ubuntu-1204-lts-aims-conquer-enterprise-desktop

Long term support maintenance updates will be provided for Ubuntu 12.04 for five years, through April 2017. For those working on the ARM architecture, an 18 month supported release is also provided for the ARM server using the ARM Hard Float (HF) architecture.

Thanks to the efforts of the global translation community, Ubuntu is now available in 41 languages. For a list of available languages and detailed translation statistics for these and other languages, see:

http://people.canonical.com/~dpm/stats/ubuntu-12.04-translation-stats.html

The newest Kubuntu 12.04 (LTS), Edubuntu 12.04 (LTS), Xubuntu 12.04 (LTS), Mythbuntu 12.04, Lubuntu 12.04 and Ubuntu Studio 12.04 are also beingreleased today. More details can be found in their announcements:

Kubuntu: http://kubuntu.org/news/12.04-release

Xubuntu: http://xubuntu.org/news/12-04-release

Edubuntu http://edubuntu.org/news/12.04-release

Mythbuntu: http://mythbuntu.org/12.04/release

Lubuntu: https://wiki.ubuntu.com/Lubuntu/Announcement/12.04

Ubuntu Studio: https://wiki.ubuntu.com/UbuntuStudio/12.04release_notes

To get Ubuntu 12.04

——————-

In order to download Ubuntu 12.04, visit:

http://www.ubuntu.com/download

Users of Ubuntu 11.10 will be offered an automatic upgrade to 12.04 via Update Manager. For further information about upgrading, see:

http://www.ubuntu.com/download/desktop/upgrade

As always, upgrades to the latest version of Ubuntu are entirely free of charge.

We recommend that all users read the release notes, which document caveats, workarounds for known issues, as well as more in-depth notes on the release itself. They are available at:

http://www.ubuntu.com/getubuntu/releasenotes

Find out what’s new in this release with a graphical overview:

http://www.ubuntu.com/ubuntu/whats-new

http://www.ubuntu.com/ubuntu/features

If you have a question, or if you think you may have found a bug but aren’t sure, you can try asking in any of the following places:

#ubuntu on irc.freenode.net

http://lists.ubuntu.com/mailman/listinfo/ubuntu-users

http://www.ubuntuforums.org

http://askubuntu.com

Help Shape Ubuntu

—————–

If you would like to help shape Ubuntu, take a look at the list of ways you can participate at:

http://www.ubuntu.com/community/get-involved

About Ubuntu

———

Ubuntu is a full-featured Linux distribution for desktops, laptops, netbooks and servers, with a fast and easy installation and regular releases. A tightly-integrated selection of excellent applications is included, and an incredible variety of add-on software is just a few clicks away.

Professional services including support are available from Canonical and hundreds of other companies around the world. For more information about support, visit:

http://www.ubuntu.com/support

More Information

—————-

You can learn more about Ubuntu and about this release on our website listed below:

http://www.ubuntu.com

Programming Languages are Like Women


 There are so many programming languages available that it can be 
very  difficult to get to know them all well enough to pick the 
right one for you.  On the other hand most men know what kind of 
woman appeals to them. So here  is a handy guide for many of the 
popular programming languages that describes  what kind of women 
they would be if programming languages were women.

 Assembler - 
A female track star who holds all the world speed 
records.  She  is hard and bumpy, and so is not that pleasant to 
embrace.  She can cook up  any meal, but needs a complete and 
detailed recipe.  She is not beautiful or  educated, and speaks in 
monosyllables like "MOV, JUMP, INC".  She has a  fierce and 
violent temper that make her the choice of last resort.

 FORTRAN - 
Your grey-haired grandmother.  People make fun of her 
just because  she is old, but if you take the time to listen, you 
can learn from her  experiences and her mistakes.  During her 
lifetime she has acquired many  useful skills in sewing and 
cooking (subroutine libraries) That no younger  women can match, 
so be thankful she is still around.  She has a notoriously  bad 
temper and when angered will start yelling and throwing dishes.  
It was  mostly her bad temper that made grandad search for another 
wife.

 COBOL - 
A plump secretary.  She talks far too much, and most of 
what she says  can be ignored.  She works hard and long hours, but 
can't handle really  complicated jobs.  She has a short and 
unpredictable temper, so no one really  likes working with her.  
She can cook meals for a huge family, but only knows  bland 
recipes.

 BASIC - 
The horny divorcee that lives next door.  Her specialty 
is seducing  young boys and it seems she is always readily 
available for them.  She  teaches them many amazing things, or at 
least they seem amazing because it is  their first experience.  
She is not that young herself, but because she was  their first 
lover the boys always remember her fondly.  Her cooking and  
sewing skills are mediocre, but largely irrelevant, it's the 
frolicking that  the boys like.  The opinion that adults have of 
Mrs.  BASIC is varied.  Shockingly, some fathers actually 
introduce their own sons to this immoral  woman!  But generally 
the more righteous adults try to correct the badly  influenced 
young men by introducing them to well behaved women like Miss  
Pascal.

 PL/I - 
A bordello madam.  She wears silk dresses, diamonds, furs 
and red high  heels.  At one time she seemed very attractive, but 
now she just seems  overweight and tacky.  Tastes change.

 C - 
A lady executive.  An avid jogger, very healthy, and not too 
talkative.  Is an good cook if you like spicy food.  Unless you 
double check everything  you say (through LINT) you can unleash 
her fierce temper.  Her daughter C++  is still quite young and 
prone to tantrums, but it seems that she will grow  up into a fine 
young woman of milder temper and more sophisticated character.

 ALGOL 60 - 
Your father's wartime sweetheart, petite, well 
proportioned, and  sweet tempered.  She disappeared mysteriously 
during the war, but your dad  still talks about her shapely form 
and their steamy romance.  He never  actually tasted much of her 
cooking.

 Pascal - 
A grammar school teacher, and Algol 60's younger sister.  
Like her  sister she is petite and attractive, but very bossy.  
She is a good cook but  only if the recipe requires no more than 
one pot (module).

 Modula II 
- A high-school teacher and Pascal's daughter.  Very 
much like her  mother, but she has learned to cook with more than 
one pot.

 ALGOL 68 - 
Algol 60's niece.  A high-society woman, well educated 
and terse.  Few men can fully understand her when she talks, and 
her former lovers still  discuss her mysterious personality.  She 
is very choosy about her romances  and won't take just any man as 
her lover.  She hasn't been seen lately, and  rumor has it that 
she died in a fall from an ivory tower.

 LISP -
 She is an aging beatnik, who lives in a rural commune with 
her hippie  cousins SMALLTALK and FORTH.  Many men (mostly college 
students) who have visited the farmhouse,-- enthusiastically 
praise the natural food, and perpetual love-ins that take place 
there.  Others criticize the long cooking times, and the abnormal 
sexual postures (prefix and postfix). Although these women seldom 
have full-time jobs, when they do work, their employers praise 
them for their imagination, but usually not for their efficiency. 

APL - 
A fancy caterer specializing in Greek food.  She can cook 
delicious meals for rows and rows of tables with dozens of people 
at each table.  She doesn't talk much, as that would just slow her 
work down.  Few people can understand her recipes, since they are 
in a foreign language, and are all recorded in mirror writing.

LOGO - A grade-school art teacher.  She is just the kind of 
teacher that you wish you had when you were young.  She is shapely 
and patient, but not an interesting conversationalist.  She can 
cook up delicious kiddie snacks, but not full-course meals.

LUCID & PROLOG - 
These clever teenagers show a new kind of cooking 
skill. They can cook-up fine meals without the use of recipes, 
working solely from a description of the desired meal (declarative 
cooking).  Many men are fascinated by this and have already 
proposed marriage.  Others complain that the girls work very 
slowly, and that often the description of the meal must be just as 
long as a recipe would be.  It is hard to predict what these girls 
will be like when they are fully mature.

Ada - 
A WAC colonel built like an amazon.  She is always setting 
strict rules, but if you follow them, she keeps her temper.  She 
is quite talkative, always spouting army regulations, and using 
obscure military talk.  You gotta love her though, because the 
army says so.