Test Data Manager

 View Only

Manual attached and detached script for CI/CD pipeline

  • 1.  Manual attached and detached script for CI/CD pipeline

    Posted May 15, 2020 06:50 AM
      |   view attached
    Hi there,

    One of our client use window integrated authentication for creating clones due to which we could not use the default inbuilt attached and detach clones provided on tdm portal.

    The workaround was to manually add the server on SQL.

    Wrote a quick script to attached and detach the database please find attached. Hope it helps

    /**
    NOTE: --- Map drive to allow seamless integration
    Process for attaching and detaching database from the vTDM Server
    @param attach_or_detach BIT (Boolean 0 for attaching the database greater than 0 for detaching
    @param user String Drive UNC Username
    @param pwd String Drive UNC Password
    @param DriveLetter Mapped Drive available to map Must NOT EXIST
    @param DriveName String the UNC drive name e.g \\serverName\driveName\fileName
    @param DatabaseName String the Database name to create as attached file
    @param DatabaseMDIF String the .mdif file name in unc path
    @param DatabaseLDIF String the .ldf file name in unc path
    @param TDMServer URL the path or server name to access the appliance
    ---- Derived Values
    @param BaseFile UNC path until drive
    @param MFile Complete UNC path for MDif file
    @param LFile Complete UNC path for LDif file

    */


    ------------------------------
    Pre-Sales Consultant
    CA Southern Africa
    ------------------------------

    Attachment(s)

    txt
    TDM_Clone_Import.sql.txt   2 KB 1 version