连接问题错误消息:
NHibernate.ADOException: cannot open connection ---> System.Data.Odbc.OdbcException: ERROR [28000] [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'view5service'.
ERROR [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]Cannot open database "VMwareView5" requested by the login. The login failed.
ERROR [28000] [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'view5service'.
ERROR [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]Cannot open database "VMwareView5" requested by the login. The login failed.
at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle)
at System.Data.Odbc.OdbcConnectionOpen..ctor(OdbcConnection outerConnection, OdbcConnectionString connectionOptions)
at System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.Odbc.OdbcConnection.Open()
at NHibernate.Connection.DriverConnectionProvider.GetConnection()
at NHibernate.Impl.SessionFactoryImpl.OpenConnection()
--- End of inner exception stack trace ---
at NHibernate.Impl.SessionFactoryImpl.OpenConnection()
at NHibernate.AdoNet.ConnectionManager.GetConnection()
at NHibernate.Transaction.AdoTransaction.Begin(IsolationLevel isolationLevel)
at NHibernate.Impl.SessionImpl.BeginTransaction(IsolationLevel isolationLevel)
at VMware.Sim.ServiceCore.Persistence.Database.SimDbTransaction.Begin(Nullable`1 isolationLevel)
--- End of inner exception stack trace ---
答案1
Login failed for user 'view5service'
会是个问题。
检查该帐户的密码,确保您可以连接到数据库并拥有作为该用户的正确权限。