Microsoft Developer Network > Página Inicial dos Fóruns > Visual Basic Language > sql 2005 error 18456 severity 14 state 16
Fazer uma PerguntaFazer uma Pergunta
 

Respondidosql 2005 error 18456 severity 14 state 16

  • terça-feira, 12 de junho de 2007 2:12daimaku Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     

    hello i'm making a solution with visual basic.net 2005 using the sql server express 2005 that came in the visual studio 2005, i'm trying to use a sql database from the network, i have configured the server to receive remote conection using the tcp/ip protocol, i have granted all the acces to the user "copejunko" in the database and in the server configuration, but when i try to access the database from the client machi i have received this error message:

     

    cannot open database 'copejunko_data' requested by the login. the login failed. login failed for user 'copejunko'

     

    i have saw in the sql error log file and there is this error in all of the connections attempts

     

    2007-06-11 15:17:46.40 Logon       Error: 18456, Severity: 14, State: 16.
    2007-06-11 15:17:46.40 Logon       Login failed for user 'copejunko'. [CLIENT: 192.168.10.4]

     

    somebody can help me with this ? thank you in advance.

Respostas

  • sexta-feira, 15 de junho de 2007 7:56Bruno YuMSFT, ModeradorMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     Respondido

    daimaku,

     

    1. This is a common question. "Error: 18456, Severity: 14, State: 16" indicates that the session database could not be determined which may mean that the database is offline or the user does not have permissions to access the database.  You can verify the name and location of the mdf file and make sure that the user has permissions to read and write the the file (C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\MusuemInventory.mdf). It is better to provide the connection strings in this kind of problem.

     

    2. SQL Server supports using multiple data and log files for a database and these files can be distributed in multiple file groups. This is not supported in the AttachDBFileName syntax. Also the network share, HTTP paths, or Universal Naming Conventional (UNC) remote databases are not supported.

     

    3. Enabling SQL Authentication. SQL Express supports Windows Authentication as well as SQL Server authentication. Maybe you mix up both in the connectionstring.

Todas as Respostas

  • sexta-feira, 15 de junho de 2007 7:56Bruno YuMSFT, ModeradorMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     Respondido

    daimaku,

     

    1. This is a common question. "Error: 18456, Severity: 14, State: 16" indicates that the session database could not be determined which may mean that the database is offline or the user does not have permissions to access the database.  You can verify the name and location of the mdf file and make sure that the user has permissions to read and write the the file (C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\MusuemInventory.mdf). It is better to provide the connection strings in this kind of problem.

     

    2. SQL Server supports using multiple data and log files for a database and these files can be distributed in multiple file groups. This is not supported in the AttachDBFileName syntax. Also the network share, HTTP paths, or Universal Naming Conventional (UNC) remote databases are not supported.

     

    3. Enabling SQL Authentication. SQL Express supports Windows Authentication as well as SQL Server authentication. Maybe you mix up both in the connectionstring.