I'm working with Visual Studio 2010 express and MSSQL 2008 R2 express.
I've created model from DB tables.
Now I have problem with connection.
When I connected to DB with Management Studio, I can't run my project, I'm receiving exception with message "The underlying provider failed on Open".
Restart of SQL instance helps, than I can run my project and work with entities, but after that I can't connect to DB from Management Studio.
To connect successfully, I need to restart SQL server instance again.
Are there some ways to do that simultaneously?
It sounds a little bit like your database might be set to Single User Mode, have you checked that?
Related
I use visual studio team foundation server 2013 on windows server 2008 R2 and SQL SERVER 2014, When I want to "get latest" or "check in" files from Microsoft visual studio occurred this error:
TF53001: The database operation was canceled by an administrator.
So, One of the projects on the server is in trouble and the others do not have problems.
I had this trouble before, you should update your sql server to latest service pack version.
try this one https://download.microsoft.com/download/2/F/8/2F8F7165-BB21-4D1E-B5D8-3BD3CE73C77D/SQLServer2014SP1-KB3058865-x64-ENU.exe
We had just the same issue.
The service account had been disabled.
It seems some data was cached somewhere on client such that some collections seemed operational on the clients which are used to working with that collection. but actually for many operations it was not working (for example creating a new repository
My TFS 2013.4 server suddenly started doing this.
I eventually changed the Compatibility Level of the TFS databases to Server 2014 (120) and restarted TFS, and it worked!
Strange thing, the other Team Project Collections still worked, it was just the one we were busy on that had this issue....
When I try to create an Sql Server Database in the App_Data folder of my Visual Studio 2010 project, I get the following error:
Login failed for user:[Domain]\[user]
I am able to create databases using Sql Server Management Studio. I am using Sql Server Express 2008.
Any help regarding this is appreciated. Thanks in advance!
As you are using express edition, in Visual Studio go to Tools>Options>Database Tools>Data Connections.
Remove the SQL Server Instance Name and click OK.
Now try connection to the server using Server Explorer. Once you get connected, you will be able to create a new DB in App_Data folder.
Here is the connection string:
public string ConStr = "Data Source=.;AttachDbFilename=|DataDirectory|CodeDB.mdf;
Integrated Security=True;User Instance=True";
Also make sure that you have user instances for your DB enabled.
In Visual Studio 2013:
Go to Tools-->> Options-->>Database Tools-->>Data Connections. SQL Server Instance Name
Type ProjectsV12
Then Create SQL Server Database inside the App_Folder, and it will work.
Open CommandPrompt as administrator
Type sqllocaldb info and press enter
It will display all the available local db.
I've been looking around to find an answer to this question, and seeing lots of different answers, some of which don't look right to me. Here's my problem.
I've created a SQL Server 2008 Express database, and populated it with tables from 2 regular SQL Server databases (it's to receive data from the 2 databases). I've done this using Windows Authentication.
Now I want to test deploying an app, as a ClickOnce application, so I've written a bare-bones console app in VS 2010. Next I tried to add a new data source to the SQL Express 2008 database. But when I try to do that I get a message saying, "This file is in use. Enter a new name of close the file that's open in another program." (I'm running VS 2010 as an administrator on my Windows 7 Ultimate box, which was one of the answers someone gave to fix this problem, but isn't working for me.) I don't have the SQL Express db open in SSMS or anything else. One solution I've read is to get into SSMS and detach the .mdf, but then how would I do maintenance, like create new SP's, views, etc? Is it a maintenance nightmare of attaching in SSMS while not in VS 2010, do DBA work, then detach the DB, get into VS 2010 do work, etc?
The database is meant to run on the user's machine; not a network share.
I'm trying to connect to SQL Server 2008 express database from Visual Studio 2010 using data connection wizard. I choose new connection -> MS Sql Server then I choose the only available server name (PAVEL-PC\SQLEXPRESS). The problem is i cannot see my database in the combobox below. System databases (like master, model, msdb etc) are shown though.
I've managed to find similar questions (like this one: Cannot connect to SQL Server database in Visual Studio because my database isn't there) and it seems I'm having permission issues. However I cannot understand which user (and where) should I add.
The account name which I'm running my Visual Studio on is Pavel. My computer name is Pavel-PC. I'm not sure what my SQL Servers account names are, but it was installed using default settings.
Here is the answer to my question:
use "PAVEL-PC" instead of "PAVEL-PC\SQLEXPRESS"
This is crazy. We develop app in VS2008 and the connection string pointing to oracle db (generated by a Dataset designer) allows to view table adapter's queries just fine at design time. But when we hit F5 the stupid ora-12154 pops up and you can die or beat your head to death. By the way toad, dbartisan work perfectly.
That error code indicates your database service name is not correct. That's probably because the Oracle client hasn't been configured correctly on the PC or you're using the wrong name. Can you connect with sqlplus or any of the Oracle tools that came with the client?