Giter Site home page Giter Site logo

Comments (5)

dansqldba avatar dansqldba commented on May 22, 2024

Paging @ClaudioESSilva here's the existing issue for your cmdlet!

from dbatools.

ClaudioESSilva avatar ClaudioESSilva commented on May 22, 2024

The subset of tests is repetead for each method of copy (Local, remote (UNC-PATHS) and full-remote (PSSession))
I have copy&pasted so you can check each one individualy.
Any other test that came to your mind please fell free. We can talk first if you want.

  1. Run scritps local (same host than sql server instance) - This should use robocopy to copy the files, if not exists use Start-BitsTransfer
    • Only one file - Execute command only with -SqlServer and -Databases one database parameters. Choose one file, choose destination. Will do an DBCC CHECKDB after database come online.
    • Two files - Execute command only with -SqlServer and -Databases one database parameters. Choose one file, choose destination (with this method you only choose on destination for all files).
    • Two files with -CheckFileHash switch - Execute command only with -SqlServer, one database and -CheckFileHash. This will take longer than the example before because for each file choosed an hash will be generated for source and destination files to garantee that is the same.
    • Two files with -CheckFileHash switch - Execute command only with -SqlServer, one database and -CheckFileHash. This will take longer than the example before because for each file choosed an hash will be generated for source and destination files to garantee that is the same.
    • Two files with -NoDbccCheckDb switch - Execute command only with -SqlServer, one database and -CheckFileHash. This will less time than the examples before because no checkdb will be run on database.
    • Only one file with -DeleteSourceFiles switch - Execute command only with -SqlServer, one database and -DeleteSourceFiles. When all the process ends, the files no longer be available on the source.
    • Generate csv with file structure - Execute command with -SqlServer, one database, -ExportDatabaseStructure and -OutFile ".csv" - Will generate a csv file with all database structure. A message must appear at the end saying which command you should run after change de csv in order to move files.
    • Generate csv with file structure - Execute command with -SqlServer, one database, -MoveFromCSV and -InputFile ".csv" - Will move all files specified on csv with valid "DestinationFolderPath" values.
    • try to move a file with a size bigger than the existing freespace on the destination drive/lun
    • try to move a file to an folder where you don't have access
  2. Run scritps remotely (outside the host of sql server instance) - This should use robocopy to copy the files, if not exists use Start-BitsTransfer
    • Only one file - Execute command only with -SqlServer and -Databases one database parameters. Choose one file, choose destination. This should use Start-BitsTransfer to copy the files and do an DBCC CHECKDB after database came online.
    • Two files - Execute command only with -SqlServer and -Databases one database parameters. Choose one file, choose destination (with this method you only choose on destination for all files).
    • Two files with -CheckFileHash switch - Execute command only with -SqlServer, one database and -CheckFileHash. This will take longer than the example before because for each file choosed an hash will be generated for source and destination files to garantee that is the same.
    • Two files with -CheckFileHash switch - Execute command only with -SqlServer, one database and -CheckFileHash. This will take longer than the example before because for each file choosed an hash will be generated for source and destination files to garantee that is the same.
    • Two files with -NoDbccCheckDb switch - Execute command only with -SqlServer, one database and -CheckFileHash. This will less time than the examples before because no checkdb will be run on database.
    • Only one file with -DeleteSourceFiles switch - Execute command only with -SqlServer, one database and -DeleteSourceFiles. When all the process ends, the files no longer be available on the source.
    • Generate csv with file structure - Execute command with -SqlServer, one database, -ExportDatabaseStructure and -OutFile ".csv" - Will generate a csv file with all database structure. A message must appear at the end saying which command you should run after change de csv in order to move files.
    • Generate csv with file structure - Execute command with -SqlServer, one database, -MoveFromCSV and -InputFile ".csv" - Will move all files specified on csv with valid "DestinationFolderPath" values.
    • try to move a file with a size bigger than the existing freespace on the destination drive/lun
    • try to move a file to an folder where you don't have access
  3. Run scritps full-remote (outside the host of sql server instance and without access to UNC paths) - This should use robocopy to copy the files, but only if PSSession is available to be used
    • Only one file - Execute command only with -SqlServer and -Databases one database parameters. Choose one file, choose destination. This should use Start-BitsTransfer to copy the files and do an DBCC CHECKDB after database came online.
    • Two files - Execute command only with -SqlServer and -Databases one database parameters. Choose one file, choose destination (with this method you only choose on destination for all files).
    • Two files with -CheckFileHash switch - Execute command only with -SqlServer, one database and -CheckFileHash. This will take longer than the example before because for each file choosed an hash will be generated for source and destination files to garantee that is the same.
    • Two files with -CheckFileHash switch - Execute command only with -SqlServer, one database and -CheckFileHash. This will take longer than the example before because for each file choosed an hash will be generated for source and destination files to garantee that is the same.
    • Two files with -NoDbccCheckDb switch - Execute command only with -SqlServer, one database and -CheckFileHash. This will less time than the examples before because no checkdb will be run on database.
    • Only one file with -DeleteSourceFiles switch - Execute command only with -SqlServer, one database and -DeleteSourceFiles. When all the process ends, the files no longer be available on the source.
    • Generate csv with file structure - Execute command with -SqlServer, one database, -ExportDatabaseStructure and -OutFile ".csv" - Will generate a csv file with all database structure. A message must appear at the end saying which command you should run after change de csv in order to move files.
    • Generate csv with file structure - Execute command with -SqlServer, one database, -MoveFromCSV and -InputFile ".csv" - Will move all files specified on csv with valid "DestinationFolderPath" values.
    • try to move a file with a size bigger than the existing freespace on the destination drive/lun
    • try to move a file to an folder where you don't have access

from dbatools.

dansqldba avatar dansqldba commented on May 22, 2024

This is beautiful @ClaudioESSilva, exactly what I wanted 👍 :)

from dbatools.

niphlod avatar niphlod commented on May 22, 2024

@ClaudioESSilva : sorry for pinging but isn't this a "duplicate" of #250 ?

from dbatools.

ClaudioESSilva avatar ClaudioESSilva commented on May 22, 2024

@niphlod no problem. Yes this one was the first. Those tests can be copied later for a new PR.
For now this can be closed.

from dbatools.

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.