While installing SQL Server 2005, I unknowingly uninstalled the existing SQL Express(I dont know 2005/2008) , but then I installed sql express 2005. But now the membership api is not able to connect to the sql express database. When I run my application with the Visual Studio 2008 , and try to login into my application I am getting the following error ,
"Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed."
SQLExpress database file auto-creation error:
The connection string specifies a local Sql Server Express instance using a database location within the applications App_Data directory. The provider attempted to automatically create the application services database because the provider determined that the database does not exist. The following configuration requirements are necessary to successfully check for existence of the application services database and automatically create the application services database:
If the applications App_Data directory does not already exist, the web server account must have read and write access to the applications directory. This is necessary because the web server account will automatically create the App_Data directory if it does not already exist.
If the applications App_Data directory already exists, the web server account only requires read and write access to the applications App_Data directory. This is necessary because the web server account will attempt to verify that the Sql Server Express database already exists within the applications App_Data directory. Revoking read access on the App_Data directory from the web server account will prevent the provider from correctly determining if the Sql Server Express database already exists. This will cause an error when the provider attempts to create a duplicate of an already existing database. Write access is required because the web server accounts credentials are used when creating the new database.
Sql Server Express must be installed on the machine.
The process identity for the web server account must have a local user profile. See the readme document for details on how to create a local user profile for both machine and domain accounts.
Actually I am using ASP.NET MVC, and by default it has the membership functionality in the web application template, and that too is not working.
you need to change the settings of the sql server express service - refer here
Try deleting the SQLExpress directory which should be at C:\Documents and Settings\username\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS directory.
Then restart your machine.
Related
Building a tabular model in Visual Studio I'm facing an issue when trying to deploy the model to the Analysis Service Server (SQL Server 2019 Standard). I get this error:
Cannot deploy metadata. Reason: An error occurred while connecting to the server.
I already set the deployment server in the model properties. And the last thing I tried was to set the Administrator local user of the SQL Server in the Impersonation Information dialog, but is giving me the invalid user / password error.
Also tried to use Service Account, but having the same error.
I can get the data from the SQL Server (using SQL Server Authentication) but the problem is when trying to deploy the model to the Analysis Server.
Is this error caused because the servers are not part of an AD?
Any way to work around this, or way to see any logs?
Using Visual Studio 2017 and 2019.
Thanks.
Is this error caused because the servers are not part of an AD?
Possibly. SSAS only supports Windows Integrated Auth, so you need to make that work. The preferred method is to deploy from a session owned by a SSAS administrator, from a workstation in the same domain.
If that's not possible there are a couple of other options. One is to create a local account on both the workstation and the server with the same name and password, and log in as that account to deploy.
The other is to install a Windows Credential in the windows credential store for an identity that has rights to deploy to the SSAS database. Or to run visual studio via runas /netonly specifying the credentials for the remote server.
I have an ASP.NET Web application hosted in IIS. Application is running under LocalSystem account. Application is trying to connect to a database on SQL Server with Integrated Security=True. I have added the machine account to sql server and also made it sysadmin. I have provided access to the specified database. Still I am getting error: Failed to open the explicitly specified database.
Please help.
I have SQL Server 2014 installed as a default instance MSSQLSERVER. My computer's name is DHAVAL-PC.
So I used to connect SQL Server database engine with DHAVAL-PC.
Coming to DNN 8 Installation, I used to type my server name as DHAVAL-PC and the empty database that I have created. But I am getting the following error:
Even I tried with MSSQLSERVER, DHAVAL-PC/MSSQLSERVER, ./MSSQLSERVER, ..
None of the server names worked.
My best guess is that DNN 8 service is not running with your identity (account). This identity can not login to the database server.
So figure out under which identity does this process/service run and then add this service account to the database, configure access rights too.
... or just create an SQL server account, with username/password and then set security to "User defined".
What identity is your site running under? Assuming you are using IIS look at the identity field of your application pool. If it is an application pool identity make sure you have granted owner permission on the database to that application pool.
To do that, add IIS APPPOOL\<application_pool_name> as a user/logon in sql server
In SSMS, I'm trying to use the "Deploy Database to SQL Azure Database" utility.
I'm moving a small local database in SQL Server 2012 to Azure for hosting. But after entering the host database server connection parameters I always get a "Login Failed for user,...." error, referencing the name of the local database to be created on the server.
Why this would fail is unclear, since the database does not exist on the cloud server yet. Here is what I have done:
Set up a firewall exception for my local IP address.
Confirmed my server administrator user name and password
So now I am left guessing... Locally I use Windows Authentication. If a database is to be moved to the server, does it have to have SQL Server authentication, as is required on Azure host?
You need to have the SQL server Authentication enabled in order to be able to login to your database when you move it to Azure.
Once, you login through SQL server authentication, you can create your users then and have different logins for different users.
Hope this helps!
I am running desktop app that uses mdf file on local path.What if I want to do is that this mdf file should be placed over a network shared folder but network is using Domains and we need password to connect to that folder.Server is running windows Server and dont know if it has installed SQL Express or not.
Q
1-> do server needs to have SQL server Express.
2-> If I publish that project then use on multiple clients that may not have Visual Studio and sql server express but will have Dot Net framework. Will that Database Using application will work
1 - You don't have to use SQL Server Express, but its better than sharing a folder and use a mdf file over network using file sharing, and more trustable.
If your application will be used by one user at time only, you can share a folder on remote server, put the mdf file in there and give read/write access permission on share to the user running your desktop app.
If several users will run the app at the same time and access the database, it won't work because windows will probably lock the mdf file (and if not, your database will get corrupt). Then, you will have to use SQL Server Express and no folder sharing at all.
2 - It will work as long as your clients have SQL Compact Edition, that is installed with the .net framework by default, so you won't have any problems. By the way, if you are planning to all your customers using the same database, all the concerns I answered in question 1 applies here. If multiple users have to connect to the same db file at the same file, you'll have to: 1 - setup a SQL Server Express on client or 2 - publish your sql server express so it can be accessible from outside your network and configure your custumers desktop app to access this server.