none
How to access the data in a master.mdf from another PC on my PC?

    Question

  • Hi,

    I got the SQL Server system databases (master, model, msdb, temp, including the log files) from another PC. How can I access those databases on my PC. I know the attach method in general, but since it is not a database like "customers.mdf", there is a problem. How can I attach a master.mdf, or how can I access the master.mdf?

    The goal is to have some (all would be ok too) tables of those 4 databases in a new database, named like "newdb.mdf".

    Which possibilities are there? BTW: Most probably those 4 mdf-files are from a SQL Server 2000 version. I have 2005, 2008 and 2012 on my PC (or on VMs).

    Regards
    CSN22


    Viele Grüße / Best regards CSN22

    Wednesday, October 30, 2013 3:00 PM

All replies

  • What would you do with them?

    What kind of information are you interested in master.mdf?

    In msdb.mdf?

    You can rename them like master2K.mdf and try to attach them. I don't know if it works, I have the feeling it is not a good idea.


    Kalman Toth Database & OLAP Architect IPAD SELECT Query Video Tutorial 3.5 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012



    Thursday, October 31, 2013 12:50 AM
  • Well, the problem belongs back to a misconfiguration. Normally there is a database name in our database connection dialog that must be filled. Somehow this field was blank. But the data in the program is shown and can be accessed. The only mdf-files that are on the harddisk are the 4 system databases. So I believe, the tables that I am looking for are inside there. I would like to have that tables transferred into a "normal" database. Any ideas?

    btw: I tried to rename the master.mdf, but I could not get it attached.


    Viele Grüße / Best regards CSN22

    • Edited by CSN22 Thursday, October 31, 2013 8:39 AM Addition
    Thursday, October 31, 2013 8:30 AM
  • Latest info copied over by moderator. (Please do not open new threads on the same question. Thanks.)

    ----------------------------------------------------------------------------------------

    because of a misconfiguration in our software there was a connection without a database name. I tested this on my environment and I got the result, that the tables were created in master.mdf and the data was written into those tables inside master.mdf. Normally this should has been a user database with a choosen name. Now I got the 4 system databases (mdf and ldf files) from the customer PC and copied it onto my PC. The customer PC databases are from SQL Server 2000. I have 2005, 2008 and 2012 on my PC or in VMs.

    How can I access/export the data in those tables that are in master.mdf? If this forum is not the right one for this question, then please move it to the correct place, thanks!

    -------------------------------------------------------------------------------------------


    Kalman Toth Database & OLAP Architect IPAD SELECT Query Video Tutorial 3.5 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012



    Friday, November 01, 2013 2:13 PM
  • I don't know why you would have any custom configuration information in master, msdb or tempdb. Model, perhaps but that is even strange unless you spin up a lot of db's that need that information.

    You can attach the mdf files with a different name and if they are sql 2000 files you'll need to set compat to 80 (SQL 2000)

    Friday, November 01, 2013 2:31 PM