dump to csv -- image column

  • If there is an Image Column in mssql table and I wanted to use export-csv to dump this info to file how do you handle that column to be able to import that csv to another DB.

    Thanks.

  • Did you check with DBATools ?

    ref:

    Export-DbaBinaryFile

    Import-DbaBinaryFile

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • I ran into this issue using dbatools

    WARNING: [09:31:34][Get-DbaDatabase] Failure | The certificate chain was issued by an authority that is not

    trusted

  • Bruin wrote:

    I ran into this issue using dbatools

    WARNING: [09:31:34][Get-DbaDatabase] Failure | The certificate chain was issued by an authority that is not trusted

    Set Trust Server Certificate to true to jump past this, assuming you do trust it.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • That is normal as security has become tighter with the lastest updates.

    To ommit this extra security for dbatools you can use

    <# https://docs.dbatools.io/Set-DbatoolsInsecureConnection.html
    Synopsis

    Sets the default connection settings to trust all server certificates and not require an encrypted connection.
    Description

    Microsoft changed the default connection settings in the SQL Server connection libraries
    to require an encrypted connection and not trust all server certificates.

    This command reverts those defaults and sets the default connection settings to trust all server
    certificates and not require encrypted connections.

    You can read more here: https://dbatools.io/newdefaults
    #>
    $ItsSet = Set-DbatoolsInsecureConnection -SessionOnly


    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply