Git Product home page Git Product logo

Comments (7)

potatoqualitee avatar potatoqualitee commented on August 20, 2024

check it, @wsmelton! when MSFT figures this out, we can too 😅 I know you said it had to do with sqlbulkcopy so i think it'll have to be fixed in the sqlclient.

from sqlserverpsmodule.

PatrickSpies avatar PatrickSpies commented on August 20, 2024

Still fails with v22.1.1

from sqlserverpsmodule.

peterbud avatar peterbud commented on August 20, 2024

Same here

from sqlserverpsmodule.

Matteo-T avatar Matteo-T commented on August 20, 2024

Sorry folks. I completely missed this issue.

I do not know on top of my head how to setup all that stuff and my MI is not configured for User Managed Identities.

If you have a script to set it up, it would help me debugging.

The cmdlets are not really doing much: they typically pass around the token to either SMO or the driver (Microsoft.Data.SqlClient). It is possible that the way the Read-Sql* cmdlet is passing the token to SMO is incorrect for some reason; Invoke-Sqlcmd passed the token straight to the driver... so that could be a difference.

What is the behavior if you don't pass the full token object -AccessToken (Get-AzAccessToken -ResourceUrl https://database.windows.net) instead of just the text blob -AccessToken (Get-AzAccessToken -ResourceUrl https://database.windows.net).Token: same error?

Also, what is the real error? Can you just capture the $Error[0].Exception.ToString() and see if it reveals anything interesting?

from sqlserverpsmodule.

PatrickSpies avatar PatrickSpies commented on August 20, 2024

Sorry for my mistake, it seems the issue had been fixed with v22.1.1
I´ve had an additional issue with multiple az-contexts within the running script.

Both of your variants (with and withoud .Token are working.

from sqlserverpsmodule.

Matteo-T avatar Matteo-T commented on August 20, 2024

Thanks for confirming!

from sqlserverpsmodule.

slarionoff avatar slarionoff commented on August 20, 2024

... as a parent issue is marked as "closed", I shifted a description to a new issue

from sqlserverpsmodule.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.