Showing posts with label login. Show all posts
Showing posts with label login. Show all posts

Tuesday, March 27, 2012

Error: Cannot open database requested in login projectAllocations. Login fails. Login fail

Hi,
Im getting this error when attempting to retrieve data from an sql database.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Cannot open database requested in login 'projectAllocations'. Login fails. Login failed for user 'sa'.

Source Error:

Line 13: objConn = New SqlConnection( "Server=LAB303-066\NETSDK; Database=projectAllocations; User ID=sa;Password=mypassword")
Line 14: objCmd = New SqlCommand("SELECT * FROM project_descriptions", objConn)
Line 15: objConn.Open()
Line 16: objRdr = objCmd.ExecuteReader()
Line 17: While objRdr.Read()

Source File: C:\finalyearproject2\sample.aspx Line: 15

Please Help!! Im a beginner to this, so if anyone knows the answer, take baby steps when explaining. Thanksas the message says you prbly need to give permissions to the user to access the database. in your enterprise manager, if you xpand the databases tab and then the db you are working on, there's a Users tab. click on it and in the panel to your right you would see a list of users. You might need to add the user "projectAllocations" to the list here and give permissions to the user to access the tables/stored procs and other objects..

hth|||Hi,
Thanks for the response. When I login to the web data administrator and expad the database im workin on, there is no users tab. Does the database have to be empty to do this?|||>>in your enterprise manager, if you xpand the databases tab

Thursday, March 22, 2012

Error: 18456, Severity: 14, State: 16. Login failed for user

Hello.

I get this error when I try to connect to my SQL Server with JDBC:

Excepcion en MyPool Pool.getNewConnection() [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Cannot open database "lituania" requested by the login. The login failed.

And in the ERRORLOG I get:

2002-02-22 19:59:46.62 Logon Error: 18456, Severity: 14, State: 16.

2002-02-22 19:59:46.62 Logon Login failed for user 'frontend'. [CLIENT: 10.0.0.75]

I found it is supossed to be a password mismatch:

http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx

but I checked the password is correct.

Any ideas? Thank you in advance.

State: 16

It means the login does not have permissions to log into the target database, i.e. lituania in your case.

This is also indicated by the error msg: --> Cannot open database "lituania" requested by the login. The login failed.

So, please make sure you grant access privilige to "frontend".

|||Been there / done that. Maybe I'm not granting the access priviledge correctly.

What I do is right-clicking over the lituania database within the Microsoft SQL Server Management Studio Express. Then I go to Properties -> Permissions -> Users or roles: frontend -> Explicit permissions for frontend: (and in the Grant column I grant actually everything) -> OK

Still the same problem.

Please help.|||Hi,

navigate through Security > Logins > Properties > User Mapping > Choose the Database > Map the user to the database (you will see that he will get the public role by default)

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||I did that and then checked db_accessadmin (that was unchecked) and leave public checked (anyway I cannot uncheck it). Then I pressed OK and got the message:

Create failed for user 'frontend'. (Microsoft.SqlServer.Express.Smo)
Additional information:
An exception ocurred while executing a Transact-SQL statement or batch, (Microsoft.SqlServer.Express.ConnectionInfo)
User, group or role 'frontend' already exists in the current database. (Microsoft SQL Server, Error: 15023)

Any ideas?|||moving to SQL Security forum. Somebody should be able to help you.|||

I got the same problem. May anyone help me to solve this?

Thanks a lot!

|||

You should check the database permissions catalog for database 'lituania', to verify that the user 'frontend' is actually granted access permissions to the database.

Thanks
Laurentiu

Error: 18456, Severity: 14, State: 16. Login failed for user

Hello.

I get this error when I try to connect to my SQL Server with JDBC:

Excepcion en MyPool Pool.getNewConnection() [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Cannot open database "lituania" requested by the login. The login failed.

And in the ERRORLOG I get:

2002-02-22 19:59:46.62 Logon Error: 18456, Severity: 14, State: 16.
2002-02-22 19:59:46.62 Logon Login failed for user 'frontend'. [CLIENT: 10.0.0.75]

I found it is supossed to be a password mismatch:

http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx

but I checked the password is correct.

Any ideas? Thank you in advance.

State: 16

It means the login does not have permissions to log into the target database, i.e. lituania in your case.

This is also indicated by the error msg: --> Cannot open database "lituania" requested by the login. The login failed.

So, please make sure you grant access privilige to "frontend".

|||Been there / done that. Maybe I'm not granting the access priviledge correctly.

What I do is right-clicking over the lituania database within the Microsoft SQL Server Management Studio Express. Then I go to Properties -> Permissions -> Users or roles: frontend -> Explicit permissions for frontend: (and in the Grant column I grant actually everything) -> OK

Still the same problem.

Please help.
|||Hi,

navigate through Security > Logins > Properties > User Mapping > Choose the Database > Map the user to the database (you will see that he will get the public role by default)

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||I did that and then checked db_accessadmin (that was unchecked) and leave public checked (anyway I cannot uncheck it). Then I pressed OK and got the message:

Create failed for user 'frontend'. (Microsoft.SqlServer.Express.Smo)
Additional information:
An exception ocurred while executing a Transact-SQL statement or batch, (Microsoft.SqlServer.Express.ConnectionInfo)
User, group or role 'frontend' already exists in the current database. (Microsoft SQL Server, Error: 15023)

Any ideas?
|||moving to SQL Security forum. Somebody should be able to help you.|||

I got the same problem. May anyone help me to solve this?

Thanks a lot!

|||

You should check the database permissions catalog for database 'lituania', to verify that the user 'frontend' is actually granted access permissions to the database.

Thanks
Laurentiu

sql

Error: 18456, Severity: 14, State: 16. Login failed for user

Hello.

I get this error when I try to connect to my SQL Server with JDBC:

Excepcion en MyPool Pool.getNewConnection() [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Cannot open database "lituania" requested by the login. The login failed.

And in the ERRORLOG I get:

2002-02-22 19:59:46.62 Logon Error: 18456, Severity: 14, State: 16.

2002-02-22 19:59:46.62 Logon Login failed for user 'frontend'. [CLIENT: 10.0.0.75]

I found it is supossed to be a password mismatch:

http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx

but I checked the password is correct.

Any ideas? Thank you in advance.

State: 16

It means the login does not have permissions to log into the target database, i.e. lituania in your case.

This is also indicated by the error msg: --> Cannot open database "lituania" requested by the login. The login failed.

So, please make sure you grant access privilige to "frontend".

|||Been there / done that. Maybe I'm not granting the access priviledge correctly.

What I do is right-clicking over the lituania database within the Microsoft SQL Server Management Studio Express. Then I go to Properties -> Permissions -> Users or roles: frontend -> Explicit permissions for frontend: (and in the Grant column I grant actually everything) -> OK

Still the same problem.

Please help.|||Hi,

navigate through Security > Logins > Properties > User Mapping > Choose the Database > Map the user to the database (you will see that he will get the public role by default)

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||I did that and then checked db_accessadmin (that was unchecked) and leave public checked (anyway I cannot uncheck it). Then I pressed OK and got the message:

Create failed for user 'frontend'. (Microsoft.SqlServer.Express.Smo)
Additional information:
An exception ocurred while executing a Transact-SQL statement or batch, (Microsoft.SqlServer.Express.ConnectionInfo)
User, group or role 'frontend' already exists in the current database. (Microsoft SQL Server, Error: 15023)

Any ideas?|||moving to SQL Security forum. Somebody should be able to help you.|||

I got the same problem. May anyone help me to solve this?

Thanks a lot!

|||

You should check the database permissions catalog for database 'lituania', to verify that the user 'frontend' is actually granted access permissions to the database.

Thanks
Laurentiu

Wednesday, March 21, 2012

Error: 18456, Severity: 14, State: 16.

I am getting the error

Error: 18456, Severity: 14, State: 16.
Login failed for user 'PRI\sqlservice'. [CLIENT: 172.16.9.2]

in the log repeated every 15 seconds or so. I am logged into the server as pri\sqlservice, I have started the sql server and sql server agent with pri\sqlservice and I can access databases and tables inside the Server Management studio. I have set up the login pri\sqlservice and given it dbo owner access to all databases.

I am in the process of upgrading from 2000 to 2005. I have installed a new sql server 2005, restored backups of databases from 2000. I have also converted all packages and uploaded those to the new server (although they all point to the 2000 server). I have imported the jobs, but all but one are disabled and the one that is enabled ran okay when I ran it manually.

I have researched and researched this issue, and none seem to apply to my specific issue.

This is an extract of my errorlog:

2006-12-20 16:23:16.95 Server Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86)
Oct 14 2005 00:33:37
Copyright (c) 1988-2005 Microsoft Corporation
Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)

2006-12-20 16:23:16.98 Server (c) 2005 Microsoft Corporation.
2006-12-20 16:23:16.98 Server All rights reserved.
2006-12-20 16:23:16.98 Server Server process ID is 1780.
2006-12-20 16:23:16.98 Server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'.
2006-12-20 16:23:16.98 Server This instance of SQL Server last reported using a process ID of 4532 at 12/20/2006 4:23:52 PM (local) 12/20/2006 9:23:52 PM (UTC). This is an informational message only; no user action is required.
2006-12-20 16:23:16.98 Server Registry startup parameters:
2006-12-20 16:23:17.00 Server -d C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf
2006-12-20 16:23:17.00 Server -e C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG
2006-12-20 16:23:17.00 Server -l C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf
2006-12-20 16:23:17.23 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2006-12-20 16:23:17.23 Server Detected 2 CPUs. This is an informational message; no user action is required.
2006-12-20 16:23:17.93 Server Set AWE Enabled to 1 in the configuration parameters to allow use of more memory.
2006-12-20 16:23:19.65 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
2006-12-20 16:23:22.07 Server Attempting to initialize Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.
2006-12-20 16:23:23.21 Server Attempting to recover in-doubt distributed transactions involving Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.
2006-12-20 16:23:23.48 Server Database Mirroring Transport is disabled in the endpoint configuration.
2006-12-20 16:23:23.79 spid5s Starting up database 'master'.
2006-12-20 16:23:25.01 spid5s Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
2006-12-20 16:23:26.17 spid5s SQL Trace ID 1 was started by login "sa".
2006-12-20 16:23:26.37 spid5s Starting up database 'mssqlsystemresource'.
2006-12-20 16:23:27.93 spid9s Starting up database 'model'.
2006-12-20 16:23:27.95 spid5s Server name is 'KSDBT01'. This is an informational message only. No user action is required.
2006-12-20 16:23:29.06 spid9s Clearing tempdb database.
2006-12-20 16:23:29.54 Server A self-generated certificate was successfully loaded for encryption.
2006-12-20 16:23:29.62 Server Server is listening on [ 'any' <ipv4> 1433].
2006-12-20 16:23:29.62 Server Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\MSSQLSERVER ].
2006-12-20 16:23:29.62 Server Server local connection provider is ready to accept connection on [ \\.\pipe\sql\query ].
2006-12-20 16:23:29.64 Server Server is listening on [ 127.0.0.1 <ipv4> 1434].
2006-12-20 16:23:29.64 Server Dedicated admin connection support was established for listening locally on port 1434.
2006-12-20 16:23:29.68 Server SQL Server is now ready for client connections. This is an informational message; no user action is required.
2006-12-20 16:23:32.56 spid9s Starting up database 'tempdb'.
2006-12-20 16:23:32.67 spid13s Starting up database 'msdb'.
2006-12-20 16:23:32.67 spid12s Starting up database 'test'.
2006-12-20 16:23:32.67 spid14s Starting up database 'bravoAztecnology'.
2006-12-20 16:23:32.67 spid15s Starting up database 'bravoKNE'.
2006-12-20 16:23:32.67 spid16s Starting up database 'bravoKNS'.
2006-12-20 16:23:32.67 spid17s Starting up database 'bravoKNSBelgium'.
2006-12-20 16:23:32.68 spid18s Starting up database 'bravoKNSCanada'.
2006-12-20 16:23:32.68 spid19s Starting up database 'bravoKNSEngland'.
2006-12-20 16:23:34.79 spid20s The Service Broker protocol transport is disabled or not configured.
2006-12-20 16:23:34.81 spid20s The Database Mirroring protocol transport is disabled or not configured.
2006-12-20 16:23:35.01 spid12s Starting up database 'bravoKNSKennedy'.
2006-12-20 16:23:35.20 spid17s Starting up database 'bravoKNSSuperior'.
2006-12-20 16:23:35.35 spid13s Starting up database 'bravoKNSSuperiorSS'.
2006-12-20 16:23:35.48 spid19s Starting up database 'stamp'.
2006-12-20 16:23:35.83 spid20s Service Broker manager has started.
2006-12-20 16:23:38.59 spid14s Starting up database 'KNSSpecial'.
2006-12-20 16:23:39.31 spid18s Starting up database 'knsRPCS'.
2006-12-20 16:23:39.39 spid14s Analysis of database 'KNSSpecial' (16) is 100% complete (approximately 0 seconds remain). This is an informational message only. No user action is required.
2006-12-20 16:23:43.03 spid5s Recovery of any in-doubt distributed transactions involving Microsoft Distributed Transaction Coordinator (MS DTC) has completed. This is an informational message only. No user action is required.
2006-12-20 16:23:43.03 spid5s Recovery is complete. This is an informational message only. No user action is required.
2006-12-20 16:23:50.95 spid51 Using 'xpsqlbot.dll' version '2005.90.1399' to execute extended stored procedure 'xp_qv'. This is an informational message only; no user action is required.
2006-12-20 16:23:55.85 spid51 Using 'xpstar90.dll' version '2005.90.1399' to execute extended stored procedure 'xp_instance_regread'. This is an informational message only; no user action is required.
2006-12-20 16:23:57.10 spid51 Using 'xplog70.dll' version '2005.90.1399' to execute extended stored procedure 'xp_msver'. This is an informational message only; no user action is required.
2006-12-20 16:24:00.02 Logon Error: 18456, Severity: 14, State: 16.
2006-12-20 16:24:00.02 Logon Login failed for user 'PRI\sqlservice'. [CLIENT: 172.16.9.2]
2006-12-20 16:24:00.06 Logon Error: 18456, Severity: 14, State: 16.
2006-12-20 16:24:00.06 Logon Login failed for user 'PRI\sqlservice'. [CLIENT: 172.16.9.2]
2006-12-20 16:24:01.06 Logon Error: 18456, Severity: 14, State: 16.
2006-12-20 16:24:01.06 Logon Login failed for user 'PRI\sqlservice'. [CLIENT: 172.16.9.2]
2006-12-20 16:24:01.07 Logon Error: 18456, Severity: 14, State: 16.
2006-12-20 16:24:01.07 Logon Login failed for user 'PRI\sqlservice'. [CLIENT: 172.16.9.2]
2006-12-20 16:24:03.84 Logon Error: 18456, Severity: 14, State: 16.
2006-12-20 16:24:03.84 Logon Login failed for user 'PRI\sqlservice'. [CLIENT: 172.16.9.2]
2006-12-20 16:24:03.85 Logon Error: 18456, Severity: 14, State: 16.
2006-12-20 16:24:03.85 Logon Login failed for user 'PRI\sqlservice'. [CLIENT: 172.16.9.2]
2006-12-20 16:24:03.96 Logon Error: 18456, Severity: 14, State: 16.
2006-12-20 16:24:03.96 Logon Login failed for user 'PRI\sqlservice'. [CLIENT: 172.16.9.2]
2006-12-20 16:24:03.98 Logon Error: 18456, Severity: 14, State: 16.
2006-12-20 16:24:03.98 Logon Login failed for user 'PRI\sqlservice'. [CLIENT: 172.16.9.2]
2006-12-20 16:24:41.41 Logon Error: 18456, Severity: 14, State: 16.
2006-12-20 16:24:41.41 Logon Login failed for user 'PRI\sqlservice'. [CLIENT: 172.16.9.2]
2006-12-20 16:24:41.41 Logon Error: 18456, Severity: 14, State: 16.
2006-12-20 16:24:41.41 Logon Login failed for user 'PRI\sqlservice'. [CLIENT: 172.16.9.2]

Just found out its someone running a script to get into our server.|||That wasn't it. The same server is the one trying to log in. I have database mail turned on, too.

Error: 18456, Severity: 14, State: 16.

I'm getting login errors when trying to run reports both locally on the
report server and remotely on a client machine.
This is the error I get:
An error has occurred during report processing. (rsProcessingAborted)
Cannot create a connection to data source 'RequestDataSource'.
(rsErrorOpeningConnection)
Cannot open database "<database name>" requested by the login. The login
failed. Login failed for user "<domain\username>".
Here's what I see in my SQL log:
2007-02-26 14:44:49.88 Logon Error: 18456, Severity: 14, State: 16.
2007-02-26 14:44:49.88 Logon Login failed for user <domain\username>.
[CLIENT: <local machine>]
The user is a domain admin and has full rights to all the databases on the
database server.
Any insight would be apprecaited. Thanks!On Feb 26, 1:57 pm, Henry <H...@.discussions.microsoft.com> wrote:
> I'm getting login errors when trying to run reports both locally on the
> report server and remotely on a client machine.
> This is the error I get:
> An error has occurred during report processing. (rsProcessingAborted)
> Cannot create a connection to data source 'RequestDataSource'.
> (rsErrorOpeningConnection)
> Cannot open database "<database name>" requested by the login. The login
> failed. Login failed for user "<domain\username>".
> Here's what I see in my SQL log:
> 2007-02-26 14:44:49.88 Logon Error: 18456, Severity: 14, State: 16.
> 2007-02-26 14:44:49.88 Logon Login failed for user <domain\username>.
> [CLIENT: <local machine>]
> The user is a domain admin and has full rights to all the databases on the
> database server.
> Any insight would be apprecaited. Thanks!
Sometimes this occurs when the datasource has not yet been set up -or-
has not been set up correctly.
Regards,
Enrique Martinez
Sr. SQL Server Developer

Error: 18456, Severity: 14, State: 12.

I am running SQL Server 2005 x64 SP2 and have problem connecting to database with the SQL logins I created. I test the database login using Microsoft ODBC Administrator to connect the the database locally, only 'sa' can login. All other sql logins I created fails and returns this message:


Microsoft SQL Server Login

Connection failed:
SQLState: '28000'
SQL Server Error: 18456
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'doteasylogin'.


OK

In the SQL Logs, it shows: Error: 18456, Severity: 14, State: 12.

The SQL Services is running as 'Local System'.

Can anyone help please?

Did you create the user at the server level and give him access to the server (and to the database) ? The state 12 indicates that there is an access problem which is normally dedicated to the fact that the user is either not allowed to login or does not have the appropiate permissions for the database.


Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||

I created the user 'testlogin' in SQL Server Login and grant the 'testlogin' user db_datareader & db_datawriter permission in Database Role Membership.

I'm using Windows Server 2003 x64 standard edition.

|||

Try executing the following two queries and check that each of them returns a row:

select name, principal_id from sys.server_principals where name = 'testlogin'

select permission_name, state_desc from sys.server_permissions where grantee_principal_id = suser_id('testlogin')

The first query should return the 'testlogin' login name and its associated id.

The second query should display a row with the CONNECT_SQL, GRANT value.

Thanks

Laurentiu

|||

Hello.

I have the same problem.

I am a beginner in SQL Server.I tried to install SQLServerExpress2005sp2

I've migrated a database from Access.

I tried to make a new user: for example 'testlogin' .

I've do all you sugest (server permissions, database permissions, ..)

I've run the queries from above and everything seems ok, but I cannot connect to database using the 'testlogin' account.

Error: 18456, Severity: 14, State: 12.

Login failed for user 'testlogin'. [CLIENT: xx.xx.xx.xxx]

IMPORTANT: if I grant sysadmin role to 'testlogin' I can connect.

thanks a lot in advance.

|||I started receiving this error after attempting to set up database mirroring. After running through the configuration including setting up endpoints (unsuccessfully) the mirror server has stopped accepting logins from SQL accounts (except SA). The principal server still accepts SQL logins without failure. I have stopped mirroring and deleted the database on both servers. Thank you for any help you can give. This was not an issue before I attempted database mirroring.

Okay after looking at it further it turned out that in my instance there was a new object for mirroring created. This object was accessible by going to the properties of the user account, choosing securables on the left side of the window. Then click on the add button and choose "all objects of the types" click OK; check Endpoints and click OK. In my case I saw the "Mirroring" option under Securables. That seems to be the culprit, after selecting Grant for the Connect permission I was able to connect fine. As a temporary solution I have chosen to follow the steps mentioned before using the "Public" server role, that way all accounts will have connect access. This is just temporary until I learn how to Drop the pesky Mirroring object from the server altogether.
|||

I am having the same issue, create a login using TSQL and granting access to a user database and it will not connect. I have tried the queries mentioned and from sys.server_permissions is saying CONNECT SQL with the GRANT option.

As soon as I added the user to the sysadmin server role, no problems connecting.

Thank you.

Error: 18456, Severity: 14, State: 12.

I am running SQL Server 2005 x64 SP2 and have problem connecting to database with the SQL logins I created. I test the database login using Microsoft ODBC Administrator to connect the the database locally, only 'sa' can login. All other sql logins I created fails and returns this message:


Microsoft SQL Server Login

Connection failed:
SQLState: '28000'
SQL Server Error: 18456
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'doteasylogin'.


OK

In the SQL Logs, it shows: Error: 18456, Severity: 14, State: 12.

The SQL Services is running as 'Local System'.

Can anyone help please?

Did you create the user at the server level and give him access to the server (and to the database) ? The state 12 indicates that there is an access problem which is normally dedicated to the fact that the user is either not allowed to login or does not have the appropiate permissions for the database.


Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||

I created the user 'testlogin' in SQL Server Login and grant the 'testlogin' user db_datareader & db_datawriter permission in Database Role Membership.

I'm using Windows Server 2003 x64 standard edition.

|||

Try executing the following two queries and check that each of them returns a row:

select name, principal_id from sys.server_principals where name = 'testlogin'

select permission_name, state_desc from sys.server_permissions where grantee_principal_id = suser_id('testlogin')

The first query should return the 'testlogin' login name and its associated id.

The second query should display a row with the CONNECT_SQL, GRANT value.

Thanks

Laurentiu

|||

Hello.

I have the same problem.

I am a beginner in SQL Server.I tried to install SQLServerExpress2005sp2

I've migrated a database from Access.

I tried to make a new user: for example 'testlogin' .

I've do all you sugest (server permissions, database permissions, ..)

I've run the queries from above and everything seems ok, but I cannot connect to database using the 'testlogin' account.

Error: 18456, Severity: 14, State: 12.

Login failed for user 'testlogin'. [CLIENT: xx.xx.xx.xxx]

IMPORTANT: if I grant sysadmin role to 'testlogin' I can connect.

thanks a lot in advance.

|||I started receiving this error after attempting to set up database mirroring. After running through the configuration including setting up endpoints (unsuccessfully) the mirror server has stopped accepting logins from SQL accounts (except SA). The principal server still accepts SQL logins without failure. I have stopped mirroring and deleted the database on both servers. Thank you for any help you can give. This was not an issue before I attempted database mirroring.

Okay after looking at it further it turned out that in my instance there was a new object for mirroring created. This object was accessible by going to the properties of the user account, choosing securables on the left side of the window. Then click on the add button and choose "all objects of the types" click OK; check Endpoints and click OK. In my case I saw the "Mirroring" option under Securables. That seems to be the culprit, after selecting Grant for the Connect permission I was able to connect fine. As a temporary solution I have chosen to follow the steps mentioned before using the "Public" server role, that way all accounts will have connect access. This is just temporary until I learn how to Drop the pesky Mirroring object from the server altogether.
|||

I am having the same issue, create a login using TSQL and granting access to a user database and it will not connect. I have tried the queries mentioned and from sys.server_permissions is saying CONNECT SQL with the GRANT option.

As soon as I added the user to the sysadmin server role, no problems connecting.

Thank you.

Error: 18456, Severity: 14, State: 11 when logging in

I just installed SQL Server 2005 with SP2 on Vista. When I try to login from SQL Server Management Studio, I get the following error message in the log:

2007-09-15 18:58:02.23 Logon Error: 18456, Severity: 14, State: 11.
2007-09-15 18:58:02.23 Logon Login failed for user '<computer name>\<user account>'.[CLIENT: <local machine>]

Since I can't login, I can't try some of the stuff I have seen here, such as creating new logins etc.

I installed Analysis Server and Integration Services at the same time. Logging in to them both works fine.

I use windows authentication. I don't know if changing that helps, as I don't know how to change it without logging in in the first place...

I think you entered in Windows with an account (<computer name>\<user account>) that hasn't a SQL login.

If your windows account should have administrator privillege it should enter with SQL login named "Builtin\administrators"

To the other part reading this the builtin administrator is disabled by default in Vista.

So repair first this.

|||

Gigi is correct. You can also read about this issue here: http://msdn2.microsoft.com/en-us/library/Aa905868.aspx.

Thanks

Laurentiu

Error: 18456, Severity: 14, State: 11 when logging in

I just installed SQL Server 2005 with SP2 on Vista. When I try to login from SQL Server Management Studio, I get the following error message in the log:

2007-09-15 18:58:02.23 Logon Error: 18456, Severity: 14, State: 11.
2007-09-15 18:58:02.23 Logon Login failed for user '<computer name>\<user account>'.[CLIENT: <local machine>]

Since I can't login, I can't try some of the stuff I have seen here, such as creating new logins etc.

I installed Analysis Server and Integration Services at the same time. Logging in to them both works fine.

I use windows authentication. I don't know if changing that helps, as I don't know how to change it without logging in in the first place...

I think you entered in Windows with an account (<computer name>\<user account>) that hasn't a SQL login.

If your windows account should have administrator privillege it should enter with SQL login named "Builtin\administrators"

To the other part reading this the builtin administrator is disabled by default in Vista.

So repair first this.

|||

Gigi is correct. You can also read about this issue here: http://msdn2.microsoft.com/en-us/library/Aa905868.aspx.

Thanks

Laurentiu

Error: 18456, Severity: 14, State: 11 Valid login but server access failure

Recently, one of my clients began receiving this error. My team gave them sysadmin permissions, but this is terrible practice. I have read into disablying simple file sharing, but I don't even think I have the option to do it. I look in mycomputer > tools > view and don't see any option for this. Besides, the problem just started occuring recently, within the last week. The server is a cluster with veritas clustering and the edition is sql server 2000. Has anybody ever had a problem like this and have a good fix?

Thanks for any help in advance...

-Kyle

Disabling simple file sharing is usually more of something you do to address issues with XP operating system and authentication in workgroup scenarios. What user was the login failing for? Was it a regular domain user or a built in account that is failing? Does the login name show up in the login failure? How are the users granted access - individually, through groups or are they accessing this through an application and authentication is handled by the application?

-Sue

|||

Hi Sue,

I'm currently having the same issue.

We have 4 domain AD accounts who access an MS access link through citrix metaframe presentation server.

this links to the actual dbase on another server running SQL Server 2005.

3 of these accounts work fine.

one of them however comes up with the error which i'm reading from the log file viewer

Login failed for user 'Domain\Username'. (CLIENT: ip address)

Error: 18456, Severity:14, State: 11.

the error received when running the appliation is...

Connection Failed:

SQLState: '28000'

SQL Server Error: 18456

[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'Domain\Username'.

I've checked and found that State: 11 means Valid login but server access failure.

this account is identical to the other 3 (AD and SQL).

any help will be greatly appreciated.

thanks,

luke

|||

Well...it's probably not exactly the same. Try dropping the problematic login (and user) from the database users and logins and then recreate it.

-Sue

Error: 18456, Severity: 14, State: 11 Valid login but server access failure

Hi

I am new to SQL server and I have been trying hard to make a client computer to remote connect to a SQL express database on host computer

I have a VB6 application that can connect to SQL server database LOCALLY without problem:

Connection String is:

my_connection.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=MyMushroom;Data Source=LAPTOP\SQLEXPRESS"

I have followed instruction on enabling remote connection function from this blog:

http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx

I then try to run the same app from the client computer, it gives me:

Login failed for user 'LAPTOP\Guest'.

After looking up the web for solution, I found that I can test the connection from the HOST computer in this way:

C:\Documents and Settings\kit>sqlcmd -E -S laptop\sqlexpress
1>
2>

The test is successful

Now I run the same command on the CLIENT computer

C:\Documents and Settings\Kit>sqlcmd -E -S laptop\sqlexpress
Msg 18456, Level 14, State 1, Server LAPTOP\SQLEXPRESS, Line 1
Login failed for user 'LAPTOP\Guest'.

Now I can sure that from the client computer it cannot make a connection to it, then I look at the errorLog from my host computer

2006-08-13 21:41:00.34 Logon Error: 18456, Severity: 14, State: 11.
2006-08-13 21:41:00.34 Logon Login failed for user 'LAPTOP\Guest'. [CLIENT: 192.168.0.5]
2006-08-13 21:45:10.64 Logon Error: 18456, Severity: 14, State: 11.
2006-08-13 21:45:10.64 Logon Login failed for user 'LAPTOP\Guest'. [CLIENT: 192.168.0.5]
2006-08-13 21:48:41.80 Logon Error: 18456, Severity: 14, State: 11.
2006-08-13 21:48:41.80 Logon Login failed for user 'LAPTOP\Guest'. [CLIENT: 192.168.0.5]

Now I know it is actually Error: 18456, Severity: 14, State: 11.

From this site : http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx

11 and 12

Valid login but server access failure

It tells the connection string and SQL Express seem to be set up properly but the server access failed the remote connection

I have previously had SQL Server 2000 installed. I uninstalled SQL 2000 before I install SQL express but somehow the SQL Server Service Manager is still running at startup, and C:\Program Files\Microsoft SQL Server\80 and its files are still exist after uninstallation..... Could this be a problem?

The Knowledge base suggestion on "enabling remote connection" is very simple and I do not understand why it is so difficult to me just to make a remote connection test work..... please, I need your help.

If you want to use Windows Authentication you have to disable the "Simple File and printer sharing" at the "server" (even if its only WIndows XP). With this option enabled, it normally simplifies the logon process as the requestor does not have to give a user name and a password, because he will be logged on with the Guest user.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de|||I did try to disable the file sharing, and also have firewall disabled. But it still gives me the same error..... |||

OK, did you disable that on the "server" (Whereever SQL Server is running on) ?

-Jens.

|||

Yes, to make sure file sharing is disabled , I unlick the Simple File Sharing from Folder Option on both computers.

Both computer have file sharing disabled

filewall disabled

But I am still getting the same error.

Anything to do with MSDE 2000 instance? I have uninstalled MSDE2000 before I install SQL expresss.

What is wrong still?

|||

By the way, I restarted both computer and still got the same error on the client computer while the hosting computer is connecting to the KIT\SQLExpress alright :

C:\Documents and Settings\Kit>sqlcmd -E -S kit\sqlexpress
1>
2>
3>
4>
5>

Here is the current setting of my SQLexpress instance

SQL Server Config. Manager
Protoal: Shared Memory, TCP/IP enabled (Name Pipes and VIA disabled)
SQL server (SQLExpress) and SQL server Browser are running , startmode: automatic
For SQL Server Browser: Log on as : Bulit-in account: Network Service
For SQL Server (SQLExpress): Log on as : Bulit-in account: Network Service
Under Service - General -
Host Name: KIT
Name: SQL Server (SQLExpress)

SQL Native Config. - Client Protocols - Shard Memory 1, TCP/IP 2

SQL Server Surface Area Config.
Service Name: MSSQL$SQLEXPRESS
Display Name: SQL Server (SQLEXPRESS)
Remote COnnection: Local and Remote connection clicked - Using TCP/IP Only clicked

The client computer do not have any SQL express installed, could that be the reason?

Frankly, on the server computer , it can connect to the database on TCP/IP using SQL Management Studio

Here I attached the screen shots

http://www.megaupload.com/?d=JWN349QL

|||

I have a few questions about your setup:

- on the client machine, what account is your application running under?
- when you tried connecting to SQL Express locally, using sqlcmd, what was the account you actually connected as? (you can execute "select suser_name()" to find this out)

Thanks
Laurentiu

|||

Client is running Win XP Professional SP2

Server is running Win XP pro SP2

Client machine is logged in as Admin , without password (so it goes straight into the OS when you start up the machine and bypass the log in screen)

Server machine is also logged in as Admin, with passowrd (log-in: Kit, password: Kit) , TweakUI is setup to log in automatically using the log-in/password pair.

- when you tried connecting to SQL Express locally, using sqlcmd, what was the account you actually connected as? (you can execute "select suser_name()" to find this out) :

C:\Documents and Settings\Kit>sqlcmd -E -S kit\sqlexpress
1> select suser_name()
2> go

--
KIT\Kit


(1 rows affected)
1>

Hope this will give you idea of what has gone wrong with my SQL express setting

Thank you for your response.

|||

On the Server Computer , under Control Panel -> User Accounts , there are 3 accounts: Kit (myself), SQLDebugger and Guest

Guest account is not password protected and is set to off. (I've tried to turn this account on and off but the client computer still give me the same error)

I really havae no idea what I have gone it wrong...

|||

I just realize what you meant by "on the client machine, what account is your application running under?"

It is running under Network Service

|||

Locally, you connect as Kit, which seems to have server access. Remotely, you appear to execute as Network Service and when you get on the server machine, you are actually running as Guest, which does not have server access.

If you execute

CREATE LOGIN [Laptop\Guest] FROM WINDOWS

then you will grant server access to the Guest account.

But if you want your application to connect as Kit, you should run it as Kit or it should internally impersonate Kit before connecting to the server.

Thanks
Laurentiu

|||

To Laurentiu and Jens:

Thank you for your great help and now the client can connect to the server SQL express. I have been myself studying the SQL server and exploring how SQL server work. This SQL express is very interesting and I have a lot more to learn about this "toy".

I am very appreciated to your helps.

Kit

Friday, February 24, 2012

Error while trying to open/create a DTS - urgent

Hi,
I have MSDE SP3 installed and the only thing that I have changed
recently is my Windows login Password.
In the Enterprise Manager the SQL server is registered using mixed
authentication.
When I try to open any DTS in Design mode, I get an error dialog with
the title 'DTS Design error' and saying that:
"Error occured during creation of a DTS package"
and then when I click on the OKAY button I get the 2nd error dialog
saying:
"The selected package cannot be opened. The DTS designer has been
closed."
I am getting the same message when I try to create a new package
Can someone PLEASE help me out here.
Thanks.
Re-register the DTS dlls.
You can find them listed here
Redistributing DTS with your program
(http://www.sqldts.com/Default.aspx?225)
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.Konesans.com
"Learner" <wantnospam@.email.com> wrote in message
news:MPG.1bc14741c6d2435e989747@.msnews.microsoft.c om...
> Hi,
> I have MSDE SP3 installed and the only thing that I have changed
> recently is my Windows login Password.
> In the Enterprise Manager the SQL server is registered using mixed
> authentication.
> When I try to open any DTS in Design mode, I get an error dialog with
> the title 'DTS Design error' and saying that:
> "Error occured during creation of a DTS package"
>
> and then when I click on the OKAY button I get the 2nd error dialog
> saying:
> "The selected package cannot be opened. The DTS designer has been
> closed."
>
> I am getting the same message when I try to create a new package
> Can someone PLEASE help me out here.
> --
> Thanks.
|||Many thanks Allan. Appreciate your help.
Regards.

> | Re-register the DTS dlls.
> |
> | You can find them listed here
> |
> | Redistributing DTS with your program
> | (http://www.sqldts.com/Default.aspx?225)
> |
> |

Sunday, February 19, 2012

Error while registering a new sql server

TITLE: New Server Registration

Testing the registered server failed. Verify the server name, login credentials, and database, and then click Test again.

ADDITIONAL INFORMATION:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)

When I try to regiter a sql server, I take this error message. I am using Sql Server 2005. What is the problem,can you help me?

You have to enable remote connections:

http://sqlserver2005.de/sharedfiles/remoteconnection.jpg

HTH, jens Suessmeyer.

http://www.sqlserver2005.de

|||But how can I reach those properties and settings?
|||

Hi,

if you are using SQL Server 2005 (not Express) as you told below, you can simply go to the SQL Server Surface Area Configuration in the programs menu and execute the program entry.

Start --> Programs --> Microsoft SQL Server 2005 --> Configuration Tools --> Surface Area Configuration

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Friday, February 17, 2012

Error while invoking AcquireConnections(null)

Hi, I have a windows service which is configured to login under the "local System Account". and the windows service is actually creating a SSIS package and running it. however, it was running good with out any problem. but we had to uninstall and again reinstall the windows service and after that it is generating an error "Exception from HRESULT: 0xC020801C" when ever it is invoking the

Instance.AcquireConnections(null);

The connection string that is given for the connection manager is as follows

Data Source=ORION\OFFICESERVERS;Initial Catalog=CDBDBase;Integrated Security=SSPI;User Id=;Password=;Provider=SQLNCLI.1;Auto translate=false"

What is the wrong here-can any body kindly suggest? I have tried with the following too

Data Source=ORION\OFFICESERVERS;Initial Catalog=CDBDBase;Integrated Security=SSPI;Provider=SQLNCLI.1;Auto translate=false"

Does SSIS need to have a connection string with SSPI always? is there any way to use a sql authenlication for this purpose? like using sql user name and password in connection string? Please suggest me. I need it badly.

You can use SQL authentication in SSIS. Remove "Integrated Security = SSPI;", and replace it with "Uid=myUsername;Pwd=myPassword;"

Try this link for help with connection strings: http://www.connectionstrings.com/

|||Do you think I need to use the "provider=SQLNCLI.1 ; auto translate = false" when I will use the SQL authentications? I meant if I use the user id and password instead of "ntegrated Security = SSPI" should I remove the provider and auto translate attributes or I need to keep them?|||You'll need to keep them. The provider determines which OLEDB driver you are using - if you omit it, the connect string won't be valid. Auto translate is optional, but I'd leave it in there.|||

Thanks much!

Error while invoking AcquireConnections(null)

Hi, I have a windows service which is configured to login under the "local System Account". and the windows service is actually creating a SSIS package and running it. however, it was running good with out any problem. but we had to uninstall and again reinstall the windows service and after that it is generating an error "Exception from HRESULT: 0xC020801C" when ever it is invoking the

Instance.AcquireConnections(null);

The connection string that is given for the connection manager is as follows

Data Source=ORION\OFFICESERVERS;Initial Catalog=CDBDBase;Integrated Security=SSPI;User Id=;Password=;Provider=SQLNCLI.1;Auto translate=false"

What is the wrong here-can any body kindly suggest? I have tried with the following too

Data Source=ORION\OFFICESERVERS;Initial Catalog=CDBDBase;Integrated Security=SSPI;Provider=SQLNCLI.1;Auto translate=false"

Does SSIS need to have a connection string with SSPI always? is there any way to use a sql authenlication for this purpose? like using sql user name and password in connection string? Please suggest me. I need it badly.

You can use SQL authentication in SSIS. Remove "Integrated Security = SSPI;", and replace it with "Uid=myUsername;Pwd=myPassword;"

Try this link for help with connection strings: http://www.connectionstrings.com/

|||Do you think I need to use the "provider=SQLNCLI.1 ; auto translate = false" when I will use the SQL authentications? I meant if I use the user id and password instead of "ntegrated Security = SSPI" should I remove the provider and auto translate attributes or I need to keep them?|||You'll need to keep them. The provider determines which OLEDB driver you are using - if you omit it, the connect string won't be valid. Auto translate is optional, but I'd leave it in there.|||

Thanks much!

Error while i register from Enterprise manager

Hello,
Although i have a login account in the SQL server and also i am able
to connect via my application, but somehow when i try to register the
server from the enterprise manager i get the following message
SQL Server registration failed because of the connection failure
displayed below. Do you wish to Register anyway ?
[SQL-DMO]Code execution exception: exception_access_violation"
I am stuck up..
Can anyone suggest me a solution for this problem.
Kind Regards,
Amit KumarThere is an exception logged in the SQL Server errorlog. There probably
will not be much there to help you resolve the problem but Microsoft
support can probably decipher it.
Rand
This posting is provided "as is" with no warranties and confers no rights.

Wednesday, February 15, 2012

error while doing mirroring

I got the following error log from SQL profiler when I tried to start mirroring

"

2006-11-10 11:54:47.28 Logon

Database Mirroring login attempt by user 'NT AUTHORITY\ANONYMOUS LOGON.' failed

with error: 'Connection

handshake failed. The login 'NT

AUTHORITY\ANONYMOUS LOGON' does not have CONNECT permission on the endpoint.

State 84.'. [CLIENT: 10.77.100.86]"

Anybody knows the solution for the same please let me know

Hi,

What is login account your SQL Server start?

Account is the same in both?

Regards,

|||Account is the same in both the SQL servers.|||

I would suggest delete both endpoints in both servers

re-run the Mirror Wizard, give it the AD domain username again, and it'll create the endpoints for you

or it probably uses the authentication you're using when you create the mirror

or try this

/****** Object: Endpoint [Mirroring] Script Date: 11/13/2006 10:31:45 ******/

CREATE ENDPOINT [Mirroring]

AUTHORIZATION [DOMAIN\username]

STATE=STARTED

AS TCP (LISTENER_PORT = 5022, LISTENER_IP = ALL)

FOR DATA_MIRRORING (ROLE = PARTNER, AUTHENTICATION = WINDOWS NEGOTIATE

, ENCRYPTION = DISABLED)

error while creating new sql server login.

while trying to create a new sql server login getting the follwing error:
"You may not be able to browse all of the domains to which you have access
because the following error occurred: Cou;d not find domain controller for
this domain."
what can be the possible cause of this error?
thanks in advance.
regards,
harshalMay be there are multiple domains in your LAN and a two
way trust relationships are established among them.
Possibly one of the domains was a test domain which no
longer exist, thats why you are getting this error.
What happens after this error ? Are you able to add users
from the current domain? As long as you can see users from
your current domain it should be fine.
hth.
>--Original Message--
>while trying to create a new sql server login getting the
follwing error:
>"You may not be able to browse all of the domains to
which you have access
>because the following error occurred: Cou;d not find
domain controller for
>this domain."
>what can be the possible cause of this error?
>thanks in advance.
>regards,
>harshal
>
>.
>|||no I am not able to add users from the current domain.
<anonymous@.discussions.microsoft.com> wrote in message
news:13c3b01c3f7c1$91046900$a401280a@.phx.gbl...
> May be there are multiple domains in your LAN and a two
> way trust relationships are established among them.
> Possibly one of the domains was a test domain which no
> longer exist, thats why you are getting this error.
> What happens after this error ? Are you able to add users
> from the current domain? As long as you can see users from
> your current domain it should be fine.
> hth.
>
> >--Original Message--
> >while trying to create a new sql server login getting the
> follwing error:
> >"You may not be able to browse all of the domains to
> which you have access
> >because the following error occurred: Cou;d not find
> domain controller for
> >this domain."
> >what can be the possible cause of this error?
> >thanks in advance.
> >regards,
> >harshal
> >
> >
> >.
> >

error while creating new sql server login.

May be there are multiple domains in your LAN and a two
way trust relationships are established among them.
Possibly one of the domains was a test domain which no
longer exist, thats why you are getting this error.
What happens after this error ? Are you able to add users
from the current domain? As long as you can see users from
your current domain it should be fine.
hth.

>--Original Message--
>while trying to create a new sql server login getting the
follwing error:
>"You may not be able to browse all of the domains to
which you have access
>because the following error occurred: Cou;d not find
domain controller for
>this domain."
>what can be the possible cause of this error?
>thanks in advance.
>regards,
>harshal
>
>.
>no I am not able to add users from the current domain.
<anonymous@.discussions.microsoft.com> wrote in message
news:13c3b01c3f7c1$91046900$a401280a@.phx
.gbl...
> May be there are multiple domains in your LAN and a two
> way trust relationships are established among them.
> Possibly one of the domains was a test domain which no
> longer exist, thats why you are getting this error.
> What happens after this error ? Are you able to add users
> from the current domain? As long as you can see users from
> your current domain it should be fine.
> hth.
>
>
> follwing error:
> which you have access
> domain controller for