Upgrade SQL Server 2008 R2 database to 2019 | .mdf file | db detach & attach | Complete Video 2021



Upgrade SQL Server 2008 R2 database to 2019 | .mdf file | db detach & attach | Complete Video 2021

Upgrade SQL Server 2008 R2 database to 2019 | .mdf file | db detach & attach | Complete Video 2021

Upgrade SQL Server 2008 R2 database to 2019 | .mdf file | db detach and attach | sql server 2014 | sql server 2019

upgrade mssql 2008 R2 database to 2019 | .mdf file | db detach and attach | Migrate database from Microsoft SQL Server Management Studio 2008R2 to MSSQL 2019 18.5.1 version , Upgrade mssql 2008 R2 to MSSQL 2019, Upgrade mssql 2008 R2 database to 2019 | MDF File | db detach & attach | Re-Make Video | June 2021 | how to migrate ms sql 2008 r2 to 2019 | how to upgrade ms sql 2008 r2 to 2019 | Microsoft Server 2008 to Microsoft Server 2019 | What do i need to know inorder to migrate from mssql 2008 r2 to 2019 | Upgrade SQL Server 2008 R2 Express to SQL Server 2019 | Can I upgrade SQL Server 2008 R2 to SQL Server 2019?

Hello All,

This is a remake video of my old tutorial Upgrading to moving MSSQL 2008R2 Database to MSSQL 2019.

First I opened MSSQL 2008R2 and created a database called “sql2008”, you can see database under databases section in Object Explorer (left side panel).

After that, I create a table “user_tbl” with dummy data inside values and executed a query “select * from user_tbl”.
Result showing in above screen. behind this notepad++ file nothing open. Don’t confuse or doubt on me :).

I am showing you database version for verification that i am moving/upgrading my 2008R2 database to 2019.

now I am opening mssql 2019. In 2019 i did not created any database yet.

Now goto 2008R2 Studio. Follow same steps as showing in screen. if any step covered by this notepad file i will minimize this and repeat same step.

Now we need to detach our mssql 2008R2 database,
Here i got queries why we need to detach our database from mssql.
Answer is, We logged in MSSQL 2008R2, and login system give access to all database to current user, thats why that particular user can see all database in object explorer.

IF we did not detach our database or drop connection then database .mdf file is having an active connection with existing user and did not allowed to copy or move to another location.

Now I am going to detach “sql2008” database from mssql 2008R2 Studio. Please follow same steps to detach database from SQL Studio Management.

In my case, i take database to offline, if your database is offline than no need to detach you can directly copy .mdf file from 2008R2 Data folder and paste to 2019 data folder, but most of developer did not do database offline, they always make online connection in studio. so first I am bring it online back.

Now my mssql “sql2008” database is online. now i need to detach database. please follow same steps to detach database from sql studio management 2008R2.

I successfully detach “sql2008” database from MSSQL Studio 2008R2.
Now open mssql 2008R2 data folder. in my case “C:Program FilesMicrosoft SQL ServerMSSQL10.MSSQLSERVERMSSQLDATA”

and find your database name file.mdf
now copy these 2 files and paste it in mssql 2019 data folder.
in my case 2019 data folder “C:Program FilesMicrosoft SQL ServerMSSQL15.SQLEXPRESSMSSQLDATA”
you can see both are different folders. now i need to copy “sql2008” .mdf file and .ldf file to 2019 data folder.

after successfully copy/paste .mdf file to destination. open MSSQL 2019 Studio. in screen i am showing 2019 MSSQL Studio Version.

Now we need to attach .mdf file in this studio. please follow my steps.
As i select .mdf file studio automatically collect .ldf file too and after clicked on okay, its successfully connected in 2019 studio.
now i am executing same query i executed in MSSQL 2008R2.

Left side database is SQL 2008R2 and right side on screen is MSSQL 2019. now if you need to use old .mdf file to 2008R2, you can re-attach in 2008R2 Studio. I am doing same.

You can see both database is separately working. left side showing “2008R2” value in row 6 but right side studio 2019 showing “2019 studio 18.5.1” value on 6th row.

I hope all video and steps, clear.

Don’t forget guys, if you like this video please “Like”, “Favorite”, and “Share” it with your friends to show your support – it really helps us out! If there’s something you’d like to see on the channel, comment us about it! See you next time 🙂 #mssql #sqlserver #gouravgupta #tech #technology #server #windows #servers #gouravguptaofficial #gouravgofficial #LearnWithGouravGupta #LearnWithGouravG

Comments are closed.