localdb

How to delete (localdb) database if the file is gone

不羁的心 提交于 2019-12-17 22:26:32
问题 If I run SQL Server Management Studio, and tell it to connect to (localdb)\v11.0, it knows about every database I've ever used, despite the fact that most of the the database files are long gone. If I ask it to delete one of these databases, it complains that it can't DROP the database because the database file is gone (duhhh). So, how do I clean up this mess and delete all of database references whose assicated database files are gone? Bob 回答1: In this situation, detach the database rather

IIS connecting to LocalDB

*爱你&永不变心* 提交于 2019-12-17 19:40:09
问题 Is there any way so IIS could connect to LocalDB without using the NT SERVICE\NETWORK SERVICE user account. This account has not suitable permissions. I'm looking use some other default account or is there some way that I can use the NETWORK SERVICE account without changing permissions? 回答1: You should use Shared Instances feature of LocalDB. These two posts on Using LocalDB with Full IIS should give you more information. Especially the second part seems relevant, but the first one contains

“Server” vs “Data Source” in connection string

半世苍凉 提交于 2019-12-17 15:53:08
问题 I'm new to SqlServer, right now I have SqlLocalDb installed to work locally. Good, but I can see two connection strings typically and both works: Data Source=(localdb)\v11.0;Integrated Security=true; and Server=(localdb)\v11.0;Integrated Security=true; What exact difference is there between the two? 回答1: For the full list of all of the connection string keywords, including those that are entirely synonymous, please refer to the SqlConnection.ConnectionString documentation: These are all

How to deploy ASP.NET MVC 4 application using localDB to local IIS on Windows 7?

一世执手 提交于 2019-12-17 06:38:27
问题 When I try to run my ASP.NET MVC 4 application using Local IIS on Windows 7 with Visual Studio 2013. I run into the following error when the application tries to connect to localDB\v11.0 Server Error in '/' Application. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network

ASP.NET 4.5 has not been registered on the Web server

杀马特。学长 韩版系。学妹 提交于 2019-12-17 04:13:03
问题 In my Win 7 development machine, and in order to use SQL Express instance instead of the localDB installed by default. I unchecked "Use IIS Express" in my MVC 4 project properties page (Web tab), then I got the following error: ASP.NET 4.5 has not been registered on the Web server. You need to manually configure your Web server for ASP.NET 4.5 in order for your site to run correctly. I verified that ASP.NET is activated within the IIS features. Please what could be done to resolve this? 回答1:

What is the connection string for localdb for version 11

徘徊边缘 提交于 2019-12-17 03:07:37
问题 I'm trying to do the Code First Walkthrough of the entity framework ( http://blogs.msdn.com/b/adonet/archive/2011/09/28/ef-4-2-code-first-walkthrough.aspx ). I have the latest SQL Server Express and when I check my versions available via command line ( sqllocaldb info ): I see localdbApp1 and v11.0. When I try to run the walkthrough with a few minor tweaks, I get a can't connect error. My app.config looks like this: <parameter value="Server=(LocalDB)\v11.0; Integrated Security=True;

Updating once deployed

吃可爱长大的小学妹 提交于 2019-12-14 03:14:52
问题 I have searched everywhere, however have not found a straightforward answer. I have deployed a WinForms C# .NET application, which uses a LocalDb SQL Server 2012 Express database. The database is thus a data file contained in the project. I would like to add some columns to a number of tables, and since the project is deployed at a lot of clients, I would like to send them a script, or a file of some sort, and once they run it, their database would have these changes. How can this be done?

Why is my MVC 5 application trying to access Local DB

风流意气都作罢 提交于 2019-12-13 17:09:09
问题 I have been developing an MVC 5 application on my local machine, and having just tried to public a test version to Azure, I have found this new error. My connection strings have no reference to a LocalDB, and I can't find anything in my code that wants to create or access a LocalDB. Yet I am receiving an error related to an attempt to create/access localDB: The connection string specifies a local Sql Server Express instance using a database location within the application's App_Data directory

How to prevent LocalDB from detaching MDF file after some idle time?

喜你入骨 提交于 2019-12-13 12:40:41
问题 I'm building a .NET 4.5 (winforms) application that uses LocalDB to work with a local MDF file, using this connection string: Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\DB\DatabaseFile.mdf;Integrated Security=True;MultipleActiveResultSets=True When I run my application, the first SQL query takes some time to execute - nothing drastic, about 2 or 3 seconds. After that, all next SQL queries are executed instantly. I assume that the extra seconds during the first execution are

VB.NET Simultaneous connections LocalDB Database

放肆的年华 提交于 2019-12-13 08:04:07
问题 I've been using some LocalDB databases (.mdf files). I've been the only one using those DB for a while, but more and more are using it now. Every time we use the app at the same time we have an error because we connect to the DB at the same time. Is there a way to allow simultaneous connections to an SQL LocalDB database? If not what is the best alternative assuming we will never have more than 5 people connecting at the same time? Here is the code i'm suing to acess my DB file : Public