I see a login failure exception when I try to generate DDL script on the objects in my SQL Sever database. I am able to connect to the database with 'testuser' and run queries against the tables in the database. Please find stacktrace for the exception occurred below.
I am able to login to the database with the same user both using Toad for SQL Server and SSMS.
Any help to resolve this problem is highly appreciated.
Thanks!
System.Data.SqlClient.SqlException
Login failed for user 'testuser'.
Stack Trace:
at Quest.Shared.MSSQL.SQLConnOptions.GetOpenSqlConnection(ISQLConnOptions conn, Boolean defaultConnection)
at Quest.Shared.MSSQL.SQLConnOptions.<.ctor>b__1()
at Quest.Shared.Memorizing.ThreadSafeObjectHolder1.Initialize() at Quest.Schema.MSSQL.ComparePlugin.ObjectSearch.TargetsController.control_ConnectionChanged(Object sender, EventArgs e) at Quest.Schema.Common.ComparePlugin.Controls.SchemasSelectionComboBoxControl.OnConnectionChanged(Object sender, EventArgs e) at Quest.Schema.Common.ComparePlugin.Controls.DatabasesSelectionCheckedListController.OnConnectionChanged() at Quest.Schema.Common.ComparePlugin.Controls.DatabasesSelectionCheckedListController.InitializeConnection(IConnection connection, List
1 selectedSchemas)
at Quest.Schema.Common.ComparePlugin.Controls.SchemasSelectionComboBoxControl.InitializeConnection(IConnection connection, List`1 selectSchemas)
at Quest.Schema.Common.ComparePlugin.ObjectsSearch.GenerateDDLScriptDocument.document_ConnectionChanged(Object sender, ConnectionEventArgs e)
at Quest.Schema.Common.ComparePlugin.ObjectsSearch.GenerateDDLScriptDocument.CreateDocument(ITrl trls)
System.Data.SqlClient.SqlException
Login failed for user 'testuser'.
Stack Trace:
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at Quest.Shared.MSSQL.SQLConnOptions.GetOpenSqlConnection(ISQLConnOptions conn, Boolean defaultConnection)