November 22, 2016 at 11:53 pm
Hello,
I am trying to connect to SQL server from excel from data wizard. My server name is like
11111\abcd
When i connect with above details I get error as login failed for user '<username>'
Can anyone help me as to how can I connect SQL to excel.
(I can use this feature when there is just an IP adress or other string named sever. This fails only when there is mixture of number and characters and a \
November 23, 2016 at 6:26 am
Hi
If you are getting login failed error then it already has established connection and it fails at authorisation.
Are you able to connect through SSMS or sqlcmd ?
November 23, 2016 at 7:40 am
I can connect to same server thru ssms but problem occurs when i try to access it thru excel.
Thank you for response
November 23, 2016 at 7:57 am
I am not aware of any such restrictions. I quickly tried with a named instance and it worked for me.
However can you try creating an alias and use it in the wizard?
https://msdn.microsoft.com/en-us/library/ms190445(v=sql.110).aspx
November 23, 2016 at 9:19 am
Considering that the error is "Login failed for user '<username>'" this implies that you login details are the problem, not the fact that it has a \ in it. You wouldn't be getting that message if the server was unreachable.
How are trying to connect to the server, by Windows Authentication or SQL Server Login? Have you checked your SQL Server logs to see if you can see the connection coming in?
Edit: I too just tried a named instance, and didn't have any issues connecting from MS Excel 2010 to a SQL Server 2012 (tested both Windows Authention and SQL Server Login).
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
November 23, 2016 at 9:23 pm
I believe it will need rights to create alias
November 23, 2016 at 9:30 pm
I somehow believe its '\' this which has something to do. I have 2 servers one is our local and one is at onshore location. Onshore location's server name is just an IP. And I can connect to this onshore server. It does not have any '\' in it. However, the local server has it, where the login fails thru excel.
to SSMS, both onshore and local server I can connect without any issues.
I am connecting to SQL thru sQL server login
Error logs for you
Logon,Unknown,Login failed for user 'ABCD'. Reason: Password did not match that for the login provided. [CLIENT: 00.03.00.00]
Logon,Unknown,Error: 18456<c/> Severity: 14<c/> State: 8.
November 23, 2016 at 10:39 pm
This was removed by the editor as SPAM
November 23, 2016 at 11:53 pm
I have following permissions.
CONNECT SQL
SHUTDOWN
CREATE ENDPOINT
CREATE ANY DATABASE
CREATE AVAILABILITY GROUP
ALTER ANY LOGIN
ALTER ANY CREDENTIAL
ALTER ANY ENDPOINT
ALTER ANY LINKED SERVER
ALTER ANY EXTERNAL DATA SOURCE
ALTER ANY EXTERNAL FILE FORMAT
ALTER ANY CONNECTION
ALTER ANY DATABASE
ALTER RESOURCES
ALTER SETTINGS
ALTER TRACE
ALTER ANY AVAILABILITY GROUP
ADMINISTER BULK OPERATIONS
AUTHENTICATE SERVER
EXTERNAL ACCESS ASSEMBLY
VIEW ANY DATABASE
VIEW ANY DEFINITION
VIEW SERVER STATE
CREATE DDL EVENT NOTIFICATION
CREATE TRACE EVENT NOTIFICATION
ALTER ANY EVENT NOTIFICATION
ALTER SERVER STATE
UNSAFE ASSEMBLY
ALTER ANY SERVER AUDIT
CREATE SERVER ROLE
ALTER ANY SERVER ROLE
ALTER ANY EVENT SESSION
CONNECT ANY DATABASE
IMPERSONATE ANY LOGIN
SELECT ALL USER SECURABLES
CONTROL SERVER
November 24, 2016 at 2:01 am
shy.n86 (11/23/2016)
Logon,Unknown,Login failed for user 'ABCD'. Reason: Password did not match that for the login provided. [CLIENT: 00.03.00.00]Logon,Unknown,Error: 18456<c/> Severity: 14<c/> State: 8.
You have your error there then. The password is invalid. If it was the "\" as you think, you'd never see that error, as the connection would never be made.
Check the username and password you're supplying if using SQL Login, or check that your Windows account has permissions to access the server. This isn't a problem to do with named instances.
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply