locked
getting connection error while attaching an master.mdf file to the SQL Server 2014? RRS feed

  • Question

  • hi experts, while attaching my master.mdf file in SQL Server 2014 it shows an error. how can I attach this .mdf file to my SQL Server database? see the image below for the error message.

    atttach mdf file

    Friday, October 16, 2015 9:08 AM

Answers

  • Hello Jackson,

    "master" is a system database, which exists in every SQL Server.

    As the error message already says, you can not attach a database with the same name as an existing one. You can only attach the database file as a user database with a different name then "master".

    Why at all do you want to attach a "master" database?


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    • Marked as answer by Jason_Clark03 Friday, October 16, 2015 10:09 AM
    Friday, October 16, 2015 9:15 AM
  • Hi Jackson,

    MDF is the primary master database file in every SQL server. If you want to attach a database file, you need to use another name, rather than using "master".

    By the way, if you are looking for more information about MDF file, refer this: -

    http://www.whatisfileextension.com/mdf/

    Regards


    Ashish@V

    • Marked as answer by Jason_Clark03 Friday, October 16, 2015 10:09 AM
    Friday, October 16, 2015 9:24 AM

All replies

  • Hello Jackson,

    "master" is a system database, which exists in every SQL Server.

    As the error message already says, you can not attach a database with the same name as an existing one. You can only attach the database file as a user database with a different name then "master".

    Why at all do you want to attach a "master" database?


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    • Marked as answer by Jason_Clark03 Friday, October 16, 2015 10:09 AM
    Friday, October 16, 2015 9:15 AM
  • Hi Jackson,

    MDF is the primary master database file in every SQL server. If you want to attach a database file, you need to use another name, rather than using "master".

    By the way, if you are looking for more information about MDF file, refer this: -

    http://www.whatisfileextension.com/mdf/

    Regards


    Ashish@V

    • Marked as answer by Jason_Clark03 Friday, October 16, 2015 10:09 AM
    Friday, October 16, 2015 9:24 AM