SQL Server 2012 SSDT "The project could not be deployed to .... A connection cannot be made ...." - sql-server

I'm a newbie to SQL Server 2012. Here is my condition.
I have a running SQL Server 2012 Business Intelligence SP1. The problem is I cannot deploy a project to my SSAS from another computer.
The error is:
The project could not be deployed to the 'DATABASE-SERVER\MSSQLSERVER' server because of the following connectivity problems : A connection cannot be made to redirector. Ensure that 'SQL Browser' service is running. To verify or update the name of the target server, right-click on the project in Solution Explorer, select Project Properties, click on the Deployment tab, and then enter the name of the server.
The following is the things that I've tried:
Check the target name on Project > Properties > Deployment > Target server.
Check the server service --> all SQL Server services are running.
The project can be deployed from server.
The connection to server is clear
I can connect to the Database Engine and Analysis Service from another computer from SQL Server Management Studio.
Please help me to fix this problem, I've been search for many days for this problem.
Thank you, sorry for my bad english.
Best regards, Stella.

I had the same problem, for me the solution was to explicitly specify login information on the Impersonation Information tab on the Data Source.

I know this is an old thread, but I had the same issue and I reckon more will run into this buzz saw.
My problem was that the remote installation of SSAS did not have an Inbound firewall rule for SSAS application; msmdsrv.exe.
Resolution:
Log on to the server running SSAS as Administrator
Launch Windows Firewall and advanced Security
Add Inbound Rule, give it a meaningful name like SQL Server - SSAS
Action: Allow the connection
On Program and Services Tab: For 'This Program' use Browse and identify msmdsrv.exe
For SQL Server 2014, it is by default here:
%ProgramFiles%\Microsoft SQL Server\MSAS12.SQLSVR14\OLAP\bin\msmdsrv.exe
(Very similar for 2012 and 2016, the numbers are different)
Click OK; You should see a green dot with check mark
Try your project again; It should connect, did for me.
NOTE: If this also work for you, consider going back to the Inbound Rule and consider adding connection restrictions for security reasons.

I solved mine by right clicking my data source (under Data Sources in Solution Explorer) → Edit in the General tab → In Connection Manager, do two things:
Change Server name from localhost to your computer name
Use SQL Server Authentication as Authentication, as opposed to Windows Authentication, and proceed to enter your user name and password (the "sa" password you use for SSMS).

Related

Check client connection to SQL Server 2008 Express [duplicate]

I just installed SQL Server 2008 Express on my Vista SP1 machine. I previously had 2005 on here and used it just fine with the old SQL Server Management Studio Express. I was able to connect with no problems to my PC-NAME\SQLEXPRESS instance (no, PC-NAME is not my computer name ;-).
I uninstalled 2005 and SQL Server Management Studio Express. I then installed SQL Server 2008 Express on my machine and elected to have it install SQL Server Management Studio Basic.
Now, when I try to connect to PC-NAME\SQLEXPRESS (with Windows Authentication, like I always did), I get the following message:
Cannot connect to PC-NAME\SQLEXPRESS.
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 Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476
When I installed SQL Server 2008, I had it use SQLEXPRESS as the local instance name. As far as I can tell, through SQL Server Configuration Manager, SQL Server is configured to allow remote connections.
When I went to the help link it mentions, the help page suggests the following:
Make sure that the SQL Server Browser service is started on the server.
Use the SQL Server Surface Area Configuration tool to enable SQL Server to accept remote connections. For more information about the SQL Server Surface Area Configuration Tool, see Surface Area Configuration for Services and Connections.
Well, as far as I can tell, there is no SQL Server Browser service on my system (looked in MMC for one, couldn't find one).
And the SQL Server Surface Area Configuration tool doesn't exist in SQL Server 2008. So good job there with your help documentation, Microsoft ;-).
I'm at a loss for what to do right now. I had a lot of work I was hoping to get done today after upgrading to 2008 (the person I'm working with got it up and running with no problem and told me it would be easy - he's also far better with database stuff that I am). Does anyone have any idea what might be wrong? I'd really appreciate it. If I can't get this working in a few hours, I'm going back to SQL Server 2005 (if that will even work, gah...).
Edit: I have tried turning Windows Firewall off, and that did not help. Also, I noticed that I do not have a "Data" directory under my SQL Server 2008 install directory tree - could I have possibly set something up wrong when I installed it?
Please check the ServerName which you provided. It should match with the below shown Name in the UserName textbox, and that name should followed with \SQLEXPRESS:
Start your Local SQL Server Service
Start SQL Config Manager: Click Start -> Microsoft SQL Server 2008 R2 -> SQL Server
Configuration Manager
Start SQL Services: Set the SQL Server (SQLEXPRESS) and SQL Server Browser services to automatic
start mode. Right-click each service -> Properties -> Go into the Service Tab
This will ensure they start up again if you restart your computer. Please check to ensure the state is "Running" for both services.
Login and authenticate with your Local SQL Server
Now open up SQL Server Management Studio and click "Connect to Object
Explorer" and select Server Name:
[Your PC name]\SQLEXPRESS
Example: 8540P-KL\SQLEXPRESS or (localhost)\SQLEXPRESS
To find your PC name: Right click My Computer -> Properties ->
Computer Name tab
Alternative: Login using windows authentication: Using the user name [Your
Domain]/[Your User Name]
Setup User Account
Create a new Login acct: In SQL Mgmt Studio -> Expand your local Server -> Security -> Right
click on Logins -> New Login
Set Password settings on New User Account: Uncheck Enforce password policy, password expiration and user must
change pw(Since this is local) Default database -> Your Database
Grant roles to New User Account: User Mapping Page -> Map to your db and grant db_owner role Status
Page -> Grant Permission to connect and Enable Login
Setup Access Permissions/Settings for User
Enable all auth modes: Right click your Local Server -> Properties -> Security Tab -> Enable
SQL Server and Windows Authentication Mode
Enable TCP/IP: Open SQL Server Configuration Manager -> SQL Server Network
Configuration -> Protocols for SQLEXPRESS -> Enable TCP/IP
Restart SQL Server Service: You will have to restart the SQL Server(SQLEXPRESS) after enabling TCP/IP
Database Properties File for Spring Project
database.url=jdbc:jtds:sqlserver://[local PC Computer
name];instance=SQLEXPRESS;DatabaseName=[db name];
database.username=[Your user name] database.password=[Your password]
database.driverClassName=net.sourceforge.jtds.jdbc.Driver
If you want to view larger screen shots and better formatting of the answer with more details please view the blog article below:
Setting up a Local Instance of SQL Server 2008 Blog Post:
I used (LocalDB)\MSSQLLocalDB as the server name, I was then able to see all the local databases.
Haha, oh boy, I figured it out. Somehow, someway, I did not install the Database Engine when I installed SQL Server 2008. I have no idea how I missed that, but that's what happened.
I know this question is old, but in case it helps anyone make sure the SQL Server Browser is running in the Services MSC. I installed SQL Server Express 2008 R2 and the SQL Server Browser Service was set to Disabled.
Start->Run->Services.msc
Find "SQL Server Browser"->Right Click->Properties
Set Startup Type to Automatic->Click Apply
Retry your connection.
I've just solved a problem related to this which may help other people.
Initially when loading up MSSMSE it had the server as PC_NAME\SQLEXPRESS and when I tried to connect it gave me Error: 26 - Error Locating Server/Instance Specified, so I went into SQL Server Configuration Manager to check if my SQL Server Browser and SQL Server services were running and set to automatic, only to find that instead of saying SQL Server (SQLEXPRESS) it says SQL Server(MSSQLSERVER).
I then tried connecting to PC-NAME\MSSQLSERVER and this time got SQL Network Interfaces, error: 25 - Connection string is not valid) (MicrosoftSQL Server, Error: 87) The parameter is incorrect so I googled this error and found that somebody had suggested that instead of using PC-NAME\MSSQLSERVER just use PC-NAME as the Server Name at the server connection interface, and this seems to work.
There's a link here http://learningsqlserver.wordpress.com/2011/01/21/what-version-of-sql-server-do-i-have/ which explains that MSSQLSERVER is the default instance and can be connected to by using just your hostname.
I think this may have arisen because I've had SQL Server 2008 installed at some point in the past.
Under Configuration Manager and Network Configuration and Protocols for your instance is TCP/IP Enabled? That could be the problem.
var.connectionstring = "server=localhost; database=dbname; integrated security=yes"
or
var.connectionstring = "server=localhost; database=dbname; login=yourlogin; pwd=yourpass"
For me, I was only able to get it to work by using "." in the server name field; was banging away for awhile trying different combos of the user name and server name. Note that during install of the server (ie this file: SQLEXPR_x64_ENU.exe) i checked default instance which defaults the name to MSSQLSERVER; the above high voted answers might be best used for separate named (ie when you need more than 1) server instances.
both of these videos helped me out:
use dot for server name: https://www.youtube.com/watch?v=DLrxFXXeLFk
general setup: https://www.youtube.com/watch?v=vng0P8Gfx2g
One of the first things that you should check is that the SQL Server (MSSQLSERVER) is started. You can go to the Services Console (services.msc) and look for SQL Server (MSSQLSERVER) to see that it is started. If not, then start the service.
You could also do this through an elevated command prompt by typing net start mssqlserver.
For me it was a windows firewall issue. Allow incoming connections. Opening port didn't work but allow programs did.
Link
Link2

SQL Server 2008 R2 can't connect to local database in Management Studio

I am using SQL Server 2008 R2 Express.
I first installed SQL Server 2008 R2 Express Management Studio and then I installed SQL Server 2008 R2 Express. I have the instance SQLEXPRESS running and it is set to automatic.
I am trying to connect to it locally using Windows authentication - server name is set to local and the username is grayed out and set to my profile username.
When I try to connect I get the following error:
Have I installed the wrong SQL Server Management Studio?
If your instance is called SQLEXPRESS, then you need to use .\SQLEXPRESS or (local)\SQLEXPRESS or yourMachineName\SQLEXPRESS as your server name - if you have a named instance, you need to specify that name of the instance in your server name.
Your "SQL Server Browser" service has to be started too.
Browse to Computer Management > Services.
Find find "SQL Server Browser"
set it to Automatic
and also Manually start it (2)
Hope it helps.
Follow these steps to connect with SQL Server 2008 r2 (windows authentication)
Step 1: Goto Control Panel --> Administrator Tools --> Services
select SQL SERVER (MSSQLSERVER) and double click on it
Step 2:
Click on start Service
Step 3:
Now login to SQL server with Windows authentication
and use user name : (local)
Enjoy ...
I also received this error when the service stopped. Here's another path to start your service...
Search for "Services" in you start menu like so and click on it:
Find the service for the instance you need started and select it
(shown below)
Click start (shown below)
Note: As Kenan stated, if your services Startup Type is not set to Automatic, then you probably want to double click on the service and set it to Automatic.
I know, this problem can be faced by so many people and many of them have uninstalled and re-installed the sql server for resolving this issue.
In my observation the problem of not connecting the database service locally is just because of your network connection you are using, in most of the cases these problems will come when you are using wi-fi network.
Solution is, if you are using wi-fi then just right click on status of the network and get the ip details and enter the same ip in sql server name,
it will work.
Regards
Vishwajeet
I have the same error but with different case. Let me quote the solution from here:
Luckly I also have the same set up on my desktop. I have installed
first default instance and then Sql Express. Everything is fine for
me for several days. Then I tried connecting the way you trying, i.e
with MachineName\MsSqlServer to default instance and I got exctaly the
same error.
So the solution is when you trying to connect to default instance you
don't need to provide instance name.(well this is something puzzled
me, why it is failing when we are giving instance name when it is a
default instance? Is it some bug, don't know)
Just try with - PC-NAME and everything will be fine. PC-NAME is the
MSSQLServer instance.
Edit : Well after reading your question again I realized that you are
not aware of the fact that MSSQLSERVER is the default instance of Sql
Server. And for connecting to default instance (MSSQLSERVER) you
don't need to provide the instance name in connection string. The
"MachineName" is itself means "MachineName\MSSQLSERVER".
Lots of the above helped for me, plus the accepted answer, but since I was on an EC2 instance, I had no idea what my instance name was. Finally, I opened SQLServer Configuration Manager and in the Name column, use whatever is there as your connection server, so in my case, .\EC2SQLEXPRESS and worked great!
Okay so there might be various reasons behind Sql Server Management Studio's(SSMS) above behaviour:
1.It seems that if our SSMS hasn't been opened for quite some while, the OS puts it to sleep.The solution is to manually activate our SQL server as shown below:
Go to Computer Management-->Services and Applications-->Services. As you see that the status of this service is currently blank which means that it has stopped.
Double click the SQL Server option and a wizard box will popup as shown below.Set the startup type to "Automatic" and click on the start button which will start our SQL service.
Now check the status of your SQL Server. It will display as "Running".
Also you need to check that other associated services which are also required by our SQL Server to fully function are also up and running such as SQL Server Browser,SQL Server Agent,etc.
2.The second reason could be due to incorrect credentials entered.So enter in the correct credentials.
3.If you happen to forget your credentials then follow the below steps:
First what you could do is sign in using "Windows Authentication" instead of "SQL Server Authentication".This will work only if you are logged in as administrator.
Second case what if you forget your local server name? No issues simply use "." instead of your server name and it should work.
NOTE: This will only work for local server and not for remote server.To connect to a remote server you need to have an I.P. address of your remote server.
I had this problem. My solution is: change same password of other in windowns. Restart Service (check logon in tab Service SQL).

Install Team Foundation Server with Remote SQL Server Database

I am in the process of evaluating TFS 2010. I am trying to install onto our application server which sits in a domain and runs Windows 2008 R2 Standard.
We already have a SQL Server in place on a separate Windows 2008 box that I want to use - this is in the same domain.
After installing TFS, I am using the Advanced Configuration Wizard to try and complete the setup. There are 3 bits that are reporting errors : "Database" and "Reporting".
When I enter the SQL Server details, TFS gives me this error :
TF255049: A connection cannot be made to the server that is running SQL Server. Verify that you have entered the correct name for the server, including the instance name, that the server you attempting to connect to is online, and that you have required permissions to connect... (it goes on a bit more)
The server I have installed TFS on is a web server that runs several .Net websites - all of which can connect to the SQL Server with no problem.
I have tried IP Address, machine name, instance name - all report the same error.
Has anybody been in this situation before?
EDIT : Strangely if I go to the "Reporting Server" page in the wizard and enter the SQL Server name, it connects correctly in order to get the Report Server URL and Report Manager URL. So it seems this maybe user account related?
Two things spring to mind:
You'll need to make sure the TFS service accounts have permissions on the DB server.
If Windows Firewall is on on the TFS box, switch it off for a minute or two and try again.
If that solves it, turn it back on and open the SQL ports.
HTH

Unable to connect to SQL Server instance remotely

I’m trying to access the SQL Server instance on my VPS from SQL Server Management Studio on my local machine. It’s not working (the error I’m getting is:
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.
I think this is because I need to configure the database engine to allow remote connections (correct me if I’m wrong!). So I’ve found this step-by-step guide to help me do that: http://www.linglom.com/2009/03/28/enable-remote-connection-on-sql-server-2008-express/ I’ve got to point 10 in the guide and I am now stuck! I don’t have SQL Server Management Studio installed on my VPS. Anyway, this has left me with two options:
Install SSMS
Find another way to do point 10 onwards in the guide without having SSMS installed
I tried installing SSMS on my VPS using the Web Platform Installer but it keeps failing. I don’t know why it’s failing because it doesn’t seem to give a reason why. Does anyone know how I could allow remote connections a different way?
The version of SQL Server installed on my VPS is SQL Server 2008 R2 Express.
Update:
I have tried to disable the firewall on both my laptop and VPS to see if it is a firewall issue. This made no difference to the error message.
Another Update:
Having now been able to install SSMS (I installed directly from the website rather than using the WPI), I have been able to check that the server is configured to allow remote connections (I went to SSMS, connected to the SQL Server instance, right-clicked on the connection, clicked Properties, went to the Connections tab. "Allow remote connections to this server" is already ticked).
SOLUTION
Thanks to everyone for helping me get to this solution! I've finally managed to get it to work! I followed Filip De Vos's advice and opened the ports in the Firewall on my VPS and then I received a different error message. This led me to investigate further and I found that I was using the wrong credentials to login! So I've set a password for the sa user and I've managed to login using that! Thanks again!
To enable mixed authentication you can change the following registry key:
HKLM\Software\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\LoginMode
Update the value to 2 and restart the Sql Server service to allow mixed authentication. Note that MSSQL.1 might need to be updated to reflect the number of the SQL Server Instance you are attempting to change.
A reason for connection errors can be a virus scanner installed on the server which blocks sqlserver.exe.
Another reason can be that the SQL Server Browser service is not running. When this service is not running you cannot connect on named instances (when they are using dynamic ports).
It is also possible that Sql Server is not setup to listen to TCP connections and only allows named pipes.
In the Start Menu, open Programs > Microsoft SQL Server 2008 >
Configuration Tools > SQL Server Surface Area Configuration
In the Surface Area Configuration utility, click the link "SQL Server
Configuration Manager"
Expand "SQL Server Network Configuration" and
select Protocols.
Enable TCP/IP. If you need Named Pipes, then you can
enable them here as well.
Last but not least, the Windows firewall needs to allow connections to SQL Server
Add an exception for sqlserver.exe when you use the "Dynamic Port" system.
Otherwise you can put exceptions for the SQL Server ports (default port 1433)
Also add an exception for the SQL Server Browser. (udp port 1434)
More information:
How to: Configure a Windows Firewall for Database Engine Access
Server Connectivity How-to Topics (Database Engine)
As a last note, SqlLocalDB only supports named pipes, so you can not connect to it over the network.
In addition to configuring the SQL Server Browser service in Services.msc to Automatic, and starting the service, I had to enable TCP/IP in: SQL Server Configuration Manager | SQL Server Network Configuration | Protocols for [INSTANCE NAME] | TCP/IP
Launch SQL Server Configuration Manager on your VPS.
Take a look at the SQL Server Network Configuration. Make sure that TCP/IP is enabled.
Next look at SQL Server Services. Make sure that SQL Server Browser is running.
Restart the service for your instance of SQL Server.
Open the SQL Server Configuration Manager....
2.Check wheather TCP and UDP are running or not....
3.If not running , Please enable them and also check the SQL Server Browser is running or not.If not running turn it on.....
Next you have to check which ports TCP and UDP is using. You have to open those ports from your windows firewall.....
5.Click here to see the steps to open a specific port in windows firewall....
Now SQL Server is ready to access over LAN.......
If you wan to access it remotely (over internet) , you have to do another job that is 'Port Forwarding'. You have open the ports TCP and UDP is using in SQL Server on your router. Now the configuration of routers are different. If you give me the details of your router (i. e name of the company and version ) , I can show you the steps how to forward a specific port.
I had the same issue where my firewall was configured properly, TCP/IP was enabled in SQL Server Configuration Manager but I still could not access my SQL database from outside the computer hosting it. I found the solution was SQL Server Browser was disabled by default in Services (and no option was available to enable it in SQL Server Configuration Manager).
I enabled it by Control Panel > Administrative Tools > Services then double click on SQL Server Browser. In the General tab set the startup type to Automatic using the drop down list. Then go back into SQL Server Configuration Manager and check that the SQL Server Browser is enabled. Hope this helps.
Disable the firewall and try to connect.
If that works, then enable the firewall and
Windows Defender Firewall -> Advanced Settings -> Inbound Rules(Right Click) -> New Rules -> Port -> Allow Port 1433 (Public and Private) -> Add
Do the same for Outbound Rules.
Then Try again.
I recently upgraded from SQL 2008 R2 to SQL 2012 and had a similar issue. The problem was the firewall, but more specifically the firewall rule for SQL SERVER. The custom rule was pointed to the prior version of SQL Server. Try this, open Windows Firewall>Advanced setting. Find the SQL Server Rule (it may have a custom name). Right-Click and go to properties, then Programs and Services Tab. If Programs-This program is selected, you should browse for the proper version of sqlserver.exe.
If you have more than one Instances... Then make sure the PORT Numbers of all Instances are Unique and no one's PORT Number is 1433 except Default One...
Open SQL Server Configuration Manager.
Click SQL Server Services, on the right side choose the server you've created during installation (by default its state is stopped), click once on it and a play button should appear on the toolbar. Click on this play button, wait til its state turns to "Running". Now you're good.
Open SQL Server Management Studio; switch the "Server Type" to "Database Engine" and "Authentication" to "SQL Server Authentication". The default login is "sa", and the password is the password that you chose on creating the server. Now you're good to work.
In my case the problem was caused by the inconsistency between computer names. In system settings my computer was named with some long name, but apparently the name used for some certain communications was trimmed.
I changed the name in the settings to a shorter one and it worked.
I had built both a console app and a UWP app and my console connected fine, but not my UWP. After hours of banging my head against the desk - if it's a intranet server hosting the SQL database you must enable "Private Networks (Client & Server)". It's under Package.appxmanifest and the Capabilities tab.Screenshot
Before download the last version and update your sql server to fix errors of TLS 1.2 on Sql Server 2012. For more information, check here.

The request failed or the service did not respond in a timely fashion?

I have the following error while I connect to SQL Server 2008 Management Studio with Windows authentication.
"The request failed or the service did not respond in a timely fashion.
Consult the event log or other applicable error logs for details."
Is anybody tell me why i am getting this error, whereas my SQL Server is running under network service built in a/c????
I googled it but not getting solution..
Thanks
Had the same problem, I fixed it.
Open SQL Server Configuration manager
Click on the SQL Server Services (on the left)
Double-click on the SQL Server Instance that I wanted to start
Select the Built-in account radio button in the Log On tab and choose Local system from the dropdown menu
Click apply at the bottom, then right click the instance and select Start
Above mentioned issue happened in my local system. Check in sql server configuration manager.
Step 1:
SQL server Network configuration
step 2:
Protocols for local server name
Protocol name VIA Disabled or not..
if not disabled , disable and check
.. after I made changes the sql server browser started working
This really works - i had verified lot of sites and finally got the answer.
This may occurs when the master.mdf or the mastlog.ldf gets corrupt . In order to solve the issue goto the following path.
C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL , there you will find a folder ” Template Data ” , copy the master.mdf and mastlog.ldf and replace it in
C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA folder .
That's it. Now start the MS SQL service and you are done.
If you are running SQL Server in a local environment and not over a TCP/IP connection. Go to Protocols under SQL Server Configuration Manager, Properties, and disable TCP/IP. Once this is done then the error message will go away when restarting the service.
If you recently changed the password associated with the service account:
Start SQL Server Configuration Manager.
Select SQL Server Services in the left pane.
Right click the service you are trying to start in the right pane and click Properties.
Enter the new Password and Confirm password.
It was very tedious when I get same problem. When I got this problem, I uninstall my SQL Server 2008 but after installing the SQL Server 2008 again,I got the same problem. I was so tensed plus, I had not gotten any help from any site.
To over come this problem. Simply You Need to go on SQL Server Configuration Manager and then click On Protocols on left panel. If you running Network service just disable 'VIA' Protocol.
And after that try to start your SQL service it will run successfully.
After chasing this issue for some hours, we found an log in the SQL Server Agent logs stating the following:
This installation of SQL Server Agent is disabled. The edition of SQL server that installed this service does not support SQL server agent.
We were using SQL Server Express. After some Googling it appears SQL Server Express does not support SQL Server Agent.
I didn't find a direct piece of Microsoft communications stating that SQL Express doesn't support SQL Server Agent, however this sentiment seems to be echoed across many forums.
In my case, the issue was that I was running two other SQL Server instances which were (or at least one of them was) causing a conflict.
The solution was simply to stop the other SQL Server instance and its accompanying SQL Server Agent.
While I'm at it, I'll also recommend making sure Named Pipes is enabled in your server's protocol settings
I had a similar issue. The next solution is in *case to can't launch the server Locally * and you will see the same error msg.(Image 1)
Imagen 1
Imagen 2
To solve that and have the server working you must have the next steps.
Go to SQL Server Services
Right click to open properties
Go to LogOn tab (By default you will see something like Image 3)
Select the radio button Built-in account (Image 4)
Click on Ok
Go back to SQL Server Services and launch again the server (Image 5)
After that you must be able to see run it.
Image 3
Image 4
Image 5
I hope that works for you or others with similar issues. Follow me for more tips.
Just disable the VIA protocol in sql server configuration manager
I found from event logs that My SQL server evaluation has expired.
I needed to upgrade or needed to use community edition.
For me a simple windows update fixed it, I wish I tried it before.
I think this solution is more appropriate, because it does not prevent you from using TCP/IP access.
To open a port in the Windows firewall for TCP access
On the Start menu, click Run, type WF.msc, and then click OK.
In the Windows Firewall with Advanced Security, in the left pane,
right-click Inbound Rules, and then click New Rule in the action pane.
In the Rule Type dialog box, select Port, and then click Next.
In the Protocol and Ports dialog box, select TCP. Select Specific
local ports, and then type the port number of the instance of the
Database Engine, such as 1433 for the default instance. Click Next.
In the Action dialog box, select Allow the connection, and then click
Next.
In the Profile dialog box, select any profiles that describe the
computer connection environment when you want to connect to the
Database Engine, and then click Next.
In the Name dialog box, type a name and description for this rule, and
then click Finish.
(Source: https://msdn.microsoft.com/en-us/library/ms175043.aspx)
I have SQL 2017 installed and this issue happens when the free trial / evaluation period ends, the solution to the problem is the following:
1 - Go to the windows start button, find the Microsoft SQL Server 20XX folder
2- Then, SQL Server 20XX Installation Center
3- On the left, select the option "Maintenance"
4- Then click on “Edition upgrade”
5- Then in the combox select "developer" option, and then click on “next” button
6- Click on the option "I accept the license terms" and then next
7- Finally, click on "Next" and click on "Upgrade", and wait approximately 15 minutes.
8- After this, restart the SQL Server service in "Services.msc" and open SQL again, it should work.
For more information: watch this video: https://www.youtube.com/watch?v=EVG35ahhjec
If you are still scrolling through the answers, here is one more step you might have missed.
Open SQL server configuration manager with admin access.
Apply the changes first(to local System) and then try to run.
If you are configuring your SQL Server connection using Computer Management under Administrative Tools or SQL Server Configuration Manager in Enterprise or Corporate environment,
make sure you open your Computer Management or SQL Server Configuration Manager as an Administrator or you have
Administrative Privileges
All answers above didn't work for me, but when I run it as Administrative mode, I can now start my SQL Server Agent or SQL Server service.
For me happened similar issue when I did uninstall Microsoft Visual C++ 2015-2020 Redistributable and installed the Microsoft Visual C++ 2017 version
Fixed this issue when re-installed Microsoft Visual C++ 2015-2020 Redistrubutable versions. then services started automatically.
Try changing login from different account:
Open SQL Server Configuration Manager as Admin.
Right click SQL sever and SQL Server Integration Services.
Go to Properties and choose Log on.
Choose Built in account.
Select local service.
Apply and Ok.
Start service again.
This is beacuse your both SQL Servers are using same TCP Port Number i.e. 1433 and only one server could run at this port at a time. You have to change or Remove Port number from below settings;
In SQL Server Configuration Manager Click on SQL Server Network Configration.
Click on required Protocols for SQL...
Double click on TCP/IP then select IP Address tab.
Scroldown to end double click in TCP Port Textbox.
Change Port number from 1433 to other one or remove it.
After save these settings now Start your required server.
Good Luck
https://social.technet.microsoft.com/wiki/contents/articles/52394.sql-server-troubleshooting-logon-failure-the-user-has-not-been-granted-the-requested-logon-type-at-this-computer.aspx
event viewer shows
Logon failure - the user has not been granted the requested logon type at this computer

Resources