Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sgroth001
Frequent Visitor

Connecting to SQL Server User Name or PW incorrect

Hi Power BI Community,

 

I'm trying to make the leap from MS Access to Power BI.  I've been connecting via an ODBC connection to a SQL Server production database, but I haven't been able to connect Power BI to that database.  

 

When trying to connect to my (hosted) SQL Server Database, I get an error message saying my user name or password is incorrect,.  However, I was not prompted to enter a username or password.

 

From Power BI Desktop I clicked import data from SQL Server, enter the IP address in the server box, and the database name in the Database box.  Data connectivity mode is Import.  The only advanced option selected is "include relationship columns".  Click ok, and the error pops up.

 

I copied the IP address and database name from the ODBC connection that I use for Access.  I'm not using windows authentication, so when connecting in Access, I'm prompted to enter the database password (username is pre-filled).

 

The database will only take connections from whitelisted IP addresses, so I'm using a VPN.

 

Here's the full error messasge:

 

Feedback Type:

Frown (Error)

 

Error Message:

Error

 

Stack Trace:

Microsoft.Mashup.Evaluator.Interface.ErrorException: The user name or password is incorrect.

 ---> System.Security.SecurityException: The user name or password is incorrect.

 ---> System.Security.SecurityException: The user name or password is incorrect.

 

   at System.Security.Principal.WindowsIdentity.KerbS4ULogon(String upn, SafeAccessTokenHandle& safeTokenHandle)

   at System.Security.Principal.WindowsIdentity..ctor(String sUserPrincipalName, String type)

   at System.Security.Principal.WindowsIdentity..ctor(String sUserPrincipalName)

   at Microsoft.Mashup.Engine1.Runtime.CredentialExtensions.GetImpersonationWrapper(String username, String password, IEngineHost host, IResource resource)

   at Microsoft.Mashup.Engine1.Runtime.CredentialExtensions.GetImpersonationWrapper(IResourceCredential credential, IEngineHost host, IResource resource)

   at Microsoft.Mashup.Engine1.Library.Common.SqlResourceCredentialDispatcher.Apply(WindowsCredential credential)

   at Microsoft.Mashup.Engine1.Library.Common.SqlResourceCredentialDispatcher.Apply(ResourceCredentialCollection credentials)

   at Microsoft.Mashup.Engine1.Library.Common.ConnectionStringResourceCredentialDispatcher.ConstructConnectionString(String server, String database, ResourceCredentialCollection credentials, Nullable`1 connectionTimeout)

   at Microsoft.Mashup.Engine1.Library.Common.DbEnvironment.CreateConnectionInfo()

   at Microsoft.Mashup.Engine1.Library.Common.DbEnvironment.get_ConnectionInfo()

   at Microsoft.Mashup.Engine1.Library.Common.DbEnvironment.LoadCachedServerMetadata()

   at Microsoft.Mashup.Engine1.Library.Common.DbEnvironment.CreateConnection()

   at Microsoft.Mashup.Engine1.Library.Common.DbValueBuilder.ConnectionReader..ctor(DbEnvironment environment, Func`2 readerWrapper)

   at Microsoft.Mashup.Engine1.Library.Common.NativeQueryTableValue.Initialize(Boolean selectTopForTableSchema)

   at Microsoft.Mashup.Engine1.Library.Common.NativeQueryTableValue.EnsureInitialized(Boolean selectTopForTableSchema)

   at Microsoft.Mashup.Engine1.Library.Common.NativeQueryTableValue.GetEnumerator()

   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()

   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)

   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)

   at Microsoft.Mashup.Engine1.Library.Sql.SqlModule.DatabasesFunctionValue.DatabasesTableValue.GetEnumerator()

   at Microsoft.Mashup.Engine1.Language.Query.SkipTakeEnumerable.GetEnumerator()

   at Microsoft.Mashup.Engine1.Language.Query.QueryTableValue.GetEnumerator()

   at Microsoft.Mashup.Engine1.Runtime.TableValue.Microsoft.Mashup.Engine.Interface.ITableValue.GetEnumerator()

   at Microsoft.Mashup.Evaluator.SimpleDocumentEvaluator.ValuePreviewValueSource.TableValuePreviewValueSource.SerializeRows(Int32 count)

   at Microsoft.Mashup.Evaluator.SimpleDocumentEvaluator.ValuePreviewValueSource.TableValuePreviewValueSource.get_SmallValue()

   at Microsoft.Mashup.Evaluator.Interface.TracingPreviewValueSource.get_SmallValue()

   at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.<>c__DisplayClass0_0.<RunStub>b__0()

   at Microsoft.Mashup.Evaluator.EvaluationHost.ReportExceptions(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Action action)

   --- End of inner exception stack trace ---

   at Microsoft.Mashup.Evaluator.EvaluationHost.<>c__DisplayClass11_0.<TryReportException>b__1()

   at Microsoft.Mashup.Common.SafeExceptions.IgnoreSafeExceptions(IEngineHost host, IHostTrace trace, Action action)

   at Microsoft.Mashup.Evaluator.EvaluationHost.TryReportException(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Exception exception)

   at Microsoft.Mashup.Evaluator.EvaluationHost.ReportExceptions(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Action action)

   at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.RunStub(IEngineHost engineHost, IMessageChannel channel, Func`1 getPreviewValueSource)

   at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.<>c__DisplayClass12_1`1.<OnBeginGetResult>b__0()

   at Microsoft.Mashup.Evaluator.EvaluationHost.ReportExceptions(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Action action)

   at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.OnBeginGetResult[T](IMessageChannel channel, BeginGetResultMessage message, Action`1 action)

   at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.OnBeginGetPreviewValueSource(IMessageChannel channel, BeginGetPreviewValueSourceMessage message)

   at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)

   at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)

   at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)

   at Microsoft.Mashup.Evaluator.ChannelMessenger.OnMessageWithUnknownChannel(IMessageChannel baseChannel, MessageWithUnknownChannel messageWithUnknownChannel)

   at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)

   at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)

   at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)

   at Microsoft.Mashup.Evaluator.EvaluationHost.Run()

   at Microsoft.Mashup.Container.EvaluationContainerMain.Run(Object args)

   at Microsoft.Mashup.Evaluator.SafeThread2.<>c__DisplayClass9_0.<CreateAction>b__0(Object o)

   at Microsoft.Mashup.Container.EvaluationContainerMain.SafeRun(String[] args)

   at Microsoft.Mashup.Container.EvaluationContainerMain.Main(String[] args)

   --- End of inner exception stack trace ---

   at Microsoft.Mashup.Evaluator.EvaluationHost.OnException(IEngineHost engineHost, IMessageChannel channel, ExceptionMessage message)

   at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)

   at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)

   at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)

   at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)

   at Microsoft.Mashup.Evaluator.Interface.IMessageChannelExtensions.WaitFor[T](IMessageChannel channel)

   at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.WaitFor(Func`1 condition, Boolean disposing)

   at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.get_SmallValue()

   at Microsoft.Mashup.Evaluator.Interface.TracingPreviewValueSource.get_SmallValue()

   at Microsoft.Mashup.Host.Document.Analysis.PackageDocumentAnalysisInfo.PackagePartitionAnalysisInfo.SetPreviewValue(EvaluationResult2`1 result, Func`1 getStaleSince, Func`1 getSampled)

 

Stack Trace Message:

Error

 

Invocation Stack Trace:

   at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()

   at Microsoft.Mashup.Client.UI.Shared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace, String exceptionMessage)

   at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.GetStackTraceInfo(Exception e)

   at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)

   at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass15_0.<HandleException>b__0()

   at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)

   at Microsoft.PowerBI.Client.Windows.Utilities.UIBlockingAwareExceptionHandler.HandleException(Exception e)

   at Microsoft.Mashup.Client.UI.Shared.DataImporter.HandleImportEvaluationException(ExceptionResult exceptionView, Query query, String sourceID, String formulaTitle, Boolean isNewQuery, Boolean isFromEditor)

   at Microsoft.Mashup.Client.UI.Shared.DataImporter.OnGetPreviewResult(PreviewResult preview, Query query, String sourceID, String formulaTitle, Nullable`1 explicitImportDestination, Boolean isNewQuery, Boolean isFromEditor)

   at Microsoft.Mashup.Client.UI.Shared.DataImporter.GetPreviewResult(Query query, String sourceID, String formulaTitle, Boolean isNewQuery, Boolean isFromEditor, Nullable`1 explicitImportDestination)

   at Microsoft.Mashup.Client.UI.Shared.DataImporter.<>c__DisplayClass86_1.<OnQuerySettingsResolved>b__0()

   at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)

   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

   at System.Delegate.DynamicInvokeImpl(Object[] args)

   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)

   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)

   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

   at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)

   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()

   at System.Windows.Forms.Control.WndProc(Message& m)

   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)

   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

   at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)

   at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)

   at Microsoft.PowerBI.Client.Program.<>c__DisplayClass4_0.<Main>b__1()

   at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<>c__DisplayClass3_0.<HandleExceptionsWithNestedTasks>b__0()

   at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)

   at Microsoft.PowerBI.Client.Program.Main(String[] args)

 

 

PowerBINonFatalError:

{"AppName":"PBIDesktop","AppVersion":"2.87.1061.0","ModuleName":"","Component":"Microsoft.Mashup.Engine1.Runtime.CredentialExtensions","Error":"Microsoft.Mashup.Client.UI.Shared.ExceptionResultException","MethodDef":"GetImpersonationWrapper","ErrorOffset":""}

 

Snapshot Trace Logs:

C:\Users\sgroth\AppData\Local\Microsoft\Power BI Desktop\FrownSnapShotd7828a9c-aaeb-44bf-9efd-0e039b7e5934.zip

 

Model Default Mode:

Empty

 

Model Version:

PowerBI_V1

 

Is Report V3 Models Enabled:

True

 

Performance Trace Logs:

C:\Users\sgroth\AppData\Local\Microsoft\Power BI Desktop\PerformanceTraces.zip

 

Enabled Preview Features:

PBI_NewWebTableInference

PBI_v3ModelsPreview

 

Disabled Preview Features:

PBI_shapeMapVisualEnabled

PBI_SpanishLinguisticsEnabled

PBI_JsonTableInference

PBI_ImportTextByExample

PBI_ExcelTableInference

PBI_qnaLiveConnect

PBI_azureMapVisual

PBI_dataPointLassoSelect

PBI_narrativeTextBox

PBI_dynamicParameters

PBI_anomalyDetection

PBI_newFieldList

 

Disabled DirectQuery Options:

TreatHanaAsRelationalSource

 

Cloud:

GlobalCloud

 

ExceptionResultMessage:

The user name or password is incorrect.

 

 

PowerBIUserFeedbackServices_IsReported:

True

 

Formulas:

 

 

section Section1;

 

shared Query1 = let

    Source = Sql.Databases("40.114.115.161")

in

    Source;

1 REPLY 1
laura_gb
Advocate I
Advocate I

Power BI remembers a login so my first guess would be to check to see if there is a saved login which is incorrect so not working.

Look in File - Oprions and settings - Data source settings
In Global permissions if there is an entry there I would try a Clear Permissions and try connecting again.

 

Regards

L

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors