Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Logon Error: 18456, Severity: 14, State: 16

Author  Topic 

mssqlnewbie
Starting Member

3 Posts

Posted - 2011-09-22 : 04:42:37
I tried to use sqlcmd to login to database

I tried

sqlcmd -U NGIS -P 122232

FROM http://sqlserverpedia.com/wiki/SQL_Server_Error_Logs
i check error log in D:\Program Files\Microsoft SQL Server\MSSQL\Log

2011-09-22 16:06:14.34 Logon Error: 18456, Severity: 14, State: 16.
2011-09-22 16:06:14.34 Logon Login failed for user 'TELEPARK\NGST-WS$'. [CLIENT: 10.54.24.39]
2011-09-22 16:06:34.56 Logon Error: 18456, Severity: 14, State: 5.
2011-09-22 16:06:34.56 Logon Login failed for user 'NGIS'. [CLIENT: 172.16.27.134]
2011-09-22 16:08:14.36 Logon Error: 18456, Severity: 14, State: 16.
2011-09-22 16:08:14.36 Logon Login failed for user 'TELEPARK\NGST-WS$'. [CLIENT: 10.54.24.39]


however the command reflects otherwise

Msg 18456, Level 14, State 1, Server NGST-BIZ, Line 1
Login failed for user 'NGIS'.

however it is able to login if I use just

sqlcmd

however once I login without any parameters,

when I do the following query or command it returns me no result.

SELECT name
FROM master..sysdatabases


EXEC sp_databases


obviously some thing is wrong some where?

so how do I resolve this login error?

even if I login correctly, how come I cannot view the master database? what must I do to be able to view the master database?

I check from database properties files that the owner is sa

thanks a lot!

jhnegrao
Yak Posting Veteran

81 Posts

Posted - 2011-09-22 : 17:31:35
Hi,

When you connect using sqlcmd -U NGIS -P 1222232, you are connecting using a SQL Login named NGIS, otherwise when you just type sqlcmd, you are connecting using the account you are current logged on the machine.

Check if your SQL Server is configured to use both (SQL Server Login and Domain Account Logins).

Second, check you want to connect using your logged account and submit the query below, check if you have an Login created on SQL Server and if you have the minimum permission to query the master database.

Go to Top of Page
   

- Advertisement -