Skip to content

Conversation

@thesqlpro
Copy link
Contributor

I would like to get this example added for COPY INTO using MSI. Customer has tried to go through our documentation, and was unable to find the exact syntax to have copy only use MSI for credentialing. Worked with Synapse Team (Artur Vieira Artur.Vieira@microsoft.com> provided this example) to get code to work with the customer.

F. Load using MSI credentials

Set the Synapse SQL to use “-AssignIdentity”

Set-AzSqlServer -ResourceGroupName $resourcegroupname -ServerName $servername -AssignIdentity

Create a Scoped credential on your Database

CREATE DATABASE SCOPED CREDENTIAL msi_cred WITH IDENTITY = 'Managed Service Identity';

COPY INTO dbo.myCOPYDemoTable

FROM 'https://storlabarturv.blob.core.windows.net/test/bcpDemo.txt'

WITH (

FILE_TYPE = 'CSV',

CREDENTIAL = (IDENTITY = 'Managed Identity'),

FIELDQUOTE = '"',

FIELDTERMINATOR=','

)

I would like to get this example added for COPY INTO using MSI. Customer has tried to go through our documentation, and was unable to find the exact syntax to have copy only use MSI for credentialing.  Worked with Synapse Team (Artur Vieira Artur.Vieira@microsoft.com> provided this example) to get code to work with the customer.


### F. Load using MSI credentials

Set the Synapse SQL to use “-AssignIdentity”

Set-AzSqlServer -ResourceGroupName $resourcegroupname -ServerName $servername -AssignIdentity

Create a Scoped credential on your Database

CREATE DATABASE SCOPED CREDENTIAL msi_cred WITH IDENTITY = 'Managed Service Identity';

COPY INTO dbo.myCOPYDemoTable

FROM 'https://storlabarturv.blob.core.windows.net/test/bcpDemo.txt'

WITH (

    FILE_TYPE = 'CSV',

    CREDENTIAL = (IDENTITY = 'Managed Identity'),

    FIELDQUOTE = '"',

    FIELDTERMINATOR=','

)
@PRMerger8
Copy link
Contributor

@thesqlpro : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@thesqlpro
Copy link
Contributor Author

Any updates on this?

@ktoliver
Copy link
Contributor

ktoliver commented May 5, 2020

@MightyPen Could you or someone on your team review this pull request? Thanks.

@kevinvngo
Copy link
Contributor

Thanks for providing this example! We don't need scoped credential for COPY:

Create a Scoped credential on your Database
CREATE DATABASE SCOPED CREDENTIAL msi_cred WITH IDENTITY = 'Managed Service Identity';

Other than that, it looks good.

@PRMerger17
Copy link
Contributor

@julieMSFT : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@julieMSFT
Copy link
Contributor

#assign:julieMSFT

@julieMSFT
Copy link
Contributor

#sign-off

@PRMerger18
Copy link
Contributor

@julieMSFT: I'm sorry - only the author of this article, @kevinvngo, can sign off on your changes. But we do have an exception process - if you are on the Microsoft content or product team for this product area, you can ask the PR review team to review and merge it by sending mail to the techdocprs alias.

@julieMSFT
Copy link
Contributor

@ktoliver HI Kristine, I spoke with Kevin and updated the PR. This can be merged.

@ktoliver ktoliver merged commit 28a63e2 into MicrosoftDocs:live May 5, 2020
@ktoliver
Copy link
Contributor

ktoliver commented May 5, 2020

Thanks, all

@thesqlpro thesqlpro deleted the patch-1 branch May 5, 2020 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants