Unable to login in to SQL Server for all the users - sql

Suddenly I am unable to login to our SQL Server. No one in the office is able to connect to the server. What could be the issue?
Error
Login Failed for user XXX/YYY (Microsoft SQL Server, Error; 18456)

You can try one of the following:
Check if the SQL Server / SQL Server Agent Services in the Services.msc are not stopped. If they are start them and try connecting.
Sometimes it also can be that your account is disabled. You could try creating another Windows user, adding it to the local administrator group on your computer, log onto your computer with that account and try accessing SQL Server then.
When i had similar issue(s) the above solutions worked.
Happy coding.

Related

SQL server Login Fail for user 'ROMANCH9326/romanch'

I installed SQL server 2012 developer addition.
My windows is working on Parallel Access installed on MAC.
When I tried opening SQL server, It initiated a call to connect to server. And when I clicked on connect it gave me error.
I've never installed SQL server 2012 in my personal PC. WHen I was installing I chose Windows authentication mode and user ROMANCH9326 came out automatically.
Please help me, I'm clueless about this problem.
TITLE: Connect to Server
Cannot connect to ROMANCH9326.
ADDITIONAL INFORMATION:
Login failed for user 'ROMANCH9326\romanch'. (Microsoft SQL Server, Error: 18456)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476
On Start > Search type "sql configuration"
Open SQL Configuration Manager
SQL Server Network Configuration >Protocols for [SQLINSTANCENAME]
Check if Named Pipes is enabled, enable it if not.
Restart your SQL Server Instance.
Well This is a pretty silly solution but when I tried repair function on SQL server it said that my Database Engine libraries were not installed properly somehow.
So I reinstalled the software and now it worked just fine. I was able to log in.
Thanks :)

Unable to start T-SQL Debugging. Could not connect to computer ("*****")

When I try to debug an Stored Procedure using Microsoft SQL Server Management Studio, I encounter this error message: Unable to start T-SQL Debugging. Could not connect to computer ("*"). The dubugger cannot connect to the remote computer. This may be because the remote computer does not exist or a firewall may preventing communication to the remote computer. Please see help for assistance.
I really appreciate any help.
SSMS needs to be able to find your SQL Server by DNS. When you connect to the DB in SSMS, you can use (local), but (local) does not resolve on your network so the debug program can not find it. Try connecting to localhost or your computer's name on the "Connect to Server" screen.
You should not have to run as administrator.
I just wanted to pay this forward, as after searching for quite some time I've yet to see anyone mention the problem that I encountered here.
I ran into this issue while connected to SQL using a SQL Server Authenticated user. Once I tried using a Windows Authenticated user I was able to debug without issue. That user must also be assigned the sysadmin role.
Hope this helps someone.
There's still problem in MSSQL 2012 if you want to debug a query connected to server via some defined alias. You need to connect to that server with the full name of the server first and then the debugger finds the server - otherwise it doesn't.
Simple way to just go to the database-> security->login->right click on the login and add your name and check the service role as public and sysadmin. more reference Unable to start T-SQL Debugging
I had this issue, I was connected to the server through RDC, and when connected to the instance I simply used '.', which failed. Then I tried 'SQL12P1' with and without port number, which failed. I then used 'localhost' and this solved my issue.
For local debugging (and I think for remote debugging too?) the Windows account under which you are running SSMS also needs to be set up as a SQL Server login and be a member of the SQL Server sysadmin role, in addition to this being required for the account (Windows or SQL Server) which you are more apparently using to connect to SQL Server, where these are different!
If not, you still get the same error message asked about in this question.
https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/s0fk6z6e(v=vs.100)
Run Microsoft SQL Server Management Studio as User Administrator mode. You will not get this error while debugging. And You can debug stored procedure. This helps to solve my problem.

SQL Server 2008 - Reporting Services Failed Login for User '...'

Good Afternoon,
I'm having difficulty running a report with a data source saved on the Report Server using credentials for a user I created on SQL Server named 'ReportUser'. Attempting to resolve this I've mapped the user to the 'ReportServer' database with the db_owner role as well as setting the default database to the 'ReportServer'. However, each time I attempt to run the report I receive the error message:
Cannot create a connection to data source 'Test'. Login failed for user 'ReportUser'.
I'm running SQL Server 2008 from my local machine and am able to successfully run the reports when I setup the datasource using Windows Authentication. Any idea on what could be causing the issues when attempting to use the SQL Authentication with the 'ReportUser'
Thank you very much for your help!
Thank you for your reply.
I believe I found the cause of my issue. Since this was a local install for testing purposes I just set up the instance of SQL Server with Windows Authentication. However, I made the mistake of not setting up the server for both Windows and SQL Authentication. The following link helped me resolve this.
http://forums.asp.net/t/1784261.aspx/1?Could+not+connect+to+database+login+failed+for+user+sa
After changing this setting and restarting the SQL Server everything appears to be running properly now.

Cannot login to sql server 2008 R2 after rebooting server

I am using Windows-server-2008 with Microsoft SQL Server 2008.
And there are a lot of questions about this, but nothing on the internet solved it.
The problem is that i can't connect to the my SQL Server 2008 R2 after rebooting my server.
I placed some new memory in my server, and after rebooting my client/server application didn't work anymore because it cannot reach the database.
So i tried to get in SQL Server Management Studio (SSMS), and tried to loggin with Administrator and another user but both do not work.
When i logg in the following message is displayed:
Cannot connect to (local)
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
(Microsoft SQL Server, Error: 2)
I Tried a lot of different things like:
Rebooting server
Try to start the server manually from Sql Server Configuration Manager
Named Pipes - Enabled
TCP/IP - Enabled
Tried to create an new system user or database user as described in the following article: Click Here
Can somebody please help me? I am really confused because i need to get this online. Otherwise i have to reinstall the database server but i do not have a back-up. (is there some folder with a back-up of the settings/tables/columns are stored and can be imported from reinstall?
I was having the exact same problem. net start mssqlserver was giving me the blurb about a failed login attempt. The problem was that I had recently changed the password for the administrator account, and the new password didn't get updated in services.
Here's how I fixed it:
First locate SQL Server from the list here:
Right click and select properties, and navigate to the Log On tab:
Then I typed the new password, and like magic I was able to start SQL Server right through the services manager.
I also did this for any other processes which were marked as "stopped" even though Startup Type was marked as "automatic" (namely, SQL Server Agent).
Is it a named instance or default? Also, is this a local instance? (I see the "(local)" but just wanted to make sure.)
Start the sql server services from services.msc and try to connect

SQL Server 2008 R2 First Time Login

I've just started work on a new computer in which I had to download all the software fresh.
I've just download a copy of SQL Server 2008 R2, and I'm trying to connect to SQL Server Management Studio without success. I vaguely remember last time I installed this, it asked me to choose between windows, or sql server authentication, however this didn't happen for this installation.
If I try to login via Windows Authentication (where the username and password fields are greyed out, localhost as server name) it gives the following error:
"A Network-related or instance
specific error occured 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: Named Pipes
Provider, error: 40 - Could not open a
connection to SQL Server) (Microsoft
SQL Server, Error: 2)"
I have checked everything in SQL Server Configuration Manager, and everything bar VIA is enabled.
If I try SQL Server Authentication, It asks me for a username and password which I definiately have not set yet. Also, under SQL Server Services in configuration manager, there is nothing there.
Any help would be appreciated :)
Thanks
PS: I don't know if it's worth mentioning but I am running Windows 7 as a virtual machine on a Mac.
Are you sure you have the correct instance name? If it was SQL Server 2008 R2 Express Edition then the default instance name is .\SQLEXPRESS.
Also if your using sql authentication to connect try running sql management studio as admin, if you are a limited user your identity might not be mapped to an account in sql server yet but i believe the Administrators user group is.
You need to check if your services are running.
Please type
net start mssqlserver
in your command prompt. Then try to login.
Ended up reinstalling completely and doing a fresh install from a fresh download. When I did this I was brought through the steps of selecting the default instance, and selecting authentication modes.
Working fine now :)
After checking tons of sites looking for an answer to this question, I think I have a simple solution.
Open the sql Server Configuration
Click on the sql server services node
Right Click on Sql server
Click Start.
I have been screwing around with this forever, and this simple method actually worked.