How can I find out the location of my (localdb) SQL Server 2012 database and back it up?

前端 未结 7 1176
旧巷少年郎
旧巷少年郎 2021-02-01 15:09

I am using VS2012 and I have a database created:

(localdb)\\v11.0 (SQL Server 11.0.2100 - T61\\Alan)

How can I find out the physical location o

7条回答
  •  广开言路
    2021-02-01 15:32

    It is quite confusing for people who touch with Entity Framework the first time.

    If you use Code First, a mdf file is generated, it is under C:/Users/"username"

    If you use Database First, you create a database under SQL Server Object Explorer (Not Server Explorer !!), a mdf file will be generated under the C:\Users\"username"\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSQLLocalDB

提交回复
热议问题